Commit 2366098
#262 Phase-3 D1: slot-key the observer loop-stall check
LOOP_STALL_CHECK (the observer-based loop-halting reader) read the global
last-observer Value's dH/entropy directly — a Value-observer dependency that
blocks deleting the Value observer fields (Step E). Route it through the slot
model instead.
New shared helper obs_stall_trajectory(&dH, &ent): prefers the last-observed
slot (g_last_obs_slot_env/idx, eagerly maintained by observer_slot_update);
falls back to the global last-observer Value when the slot isn't populated or
the value path is active (EIGS_OBS_SHADOW=0). Both the interpreter
CASE(LOOP_STALL_CHECK) and jit_helper_loop_stall_check call it, so the two
engines stay byte-identical on loop classification (the same lockstep
invariant the opcode encoding enforces).
Behavior-preserving under the shadow (slot and value agree for the canonical
`loop while not converged: x is f(x)` shape — both sample the same x at the
same point). Validated: tests/test_loop_halting.sh all pass; suite 2080/2080
default(slot) + escape(=0); ASan 2080/2080 leak tally 4; observer corpus
12/12 both paths; solve corpus matches golden both paths.
First of the Step-D reader migrations (decouple the value representation from
observer state). Remaining D readers: bare OP_INTERROGATE on non-ident exprs
(semantic decision — no binding => no slot trajectory), the temporal trace
observer snapshots (state_at / where-at), then gating the value-path writers
+ flipping both promotion sites (slot_from_value, slot_bridge_wrap).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 1e32dab commit 2366098
1 file changed
Lines changed: 29 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
35 | 58 | | |
36 | 59 | | |
37 | 60 | | |
| |||
1233 | 1256 | | |
1234 | 1257 | | |
1235 | 1258 | | |
1236 | | - | |
1237 | | - | |
1238 | | - | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
1239 | 1262 | | |
1240 | 1263 | | |
1241 | 1264 | | |
| |||
4212 | 4235 | | |
4213 | 4236 | | |
4214 | 4237 | | |
4215 | | - | |
4216 | | - | |
4217 | | - | |
| 4238 | + | |
| 4239 | + | |
| 4240 | + | |
4218 | 4241 | | |
4219 | 4242 | | |
4220 | 4243 | | |
| |||
0 commit comments