Commit 6406350
fix(sim): restore reaction + percept verbosity in sim display
The foundations/reaction work introduced five new observable surfaces
but none fed into the sim_logger display system. Two were regressions:
1. ReactionBus events were invisible — the old route_pain_percept
called sim_pain() but Phase 2a deleted that code path without
replacing the display hook. Now PainBus.__init__ wires a
subscribe_all on its ReactionBus that calls a new sim_reaction()
function. All reaction kinds (pain, fear, hunger, etc.) show in
--display bio automatically.
2. Percept factories bypassed sim_percept — the Phase 4 factories
(make_text_percept, make_scene_percept, make_intero_percept)
became the canonical Percept construction path but didn't log.
Now each factory calls _log_percept() which best-effort invokes
sim_percept(). No-op outside simulation context.
Three files, 36 LOC:
- sim_logger.py: new sim_reaction(kind, intensity, source) at BIO tier
- percept_factory.py: _log_percept helper + calls in all 3 factories
- pain_bus.py: _sim_log_reaction subscriber + wiring in PainBus init
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 7485f03 commit 6406350
3 files changed
Lines changed: 36 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
24 | 34 | | |
25 | 35 | | |
26 | 36 | | |
| |||
49 | 59 | | |
50 | 60 | | |
51 | 61 | | |
| 62 | + | |
52 | 63 | | |
53 | 64 | | |
54 | 65 | | |
| |||
79 | 90 | | |
80 | 91 | | |
81 | 92 | | |
| 93 | + | |
82 | 94 | | |
83 | 95 | | |
84 | 96 | | |
| |||
111 | 123 | | |
112 | 124 | | |
113 | 125 | | |
| 126 | + | |
114 | 127 | | |
115 | 128 | | |
116 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
29 | 39 | | |
30 | 40 | | |
31 | 41 | | |
| |||
39 | 49 | | |
40 | 50 | | |
41 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
42 | 56 | | |
43 | 57 | | |
44 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
520 | 529 | | |
521 | 530 | | |
522 | 531 | | |
| |||
0 commit comments