Skip to content

Commit 26d16af

Browse files
proto(#262): Phase-3 measurement — slot model = value path for all predicates
Measured the first Phase-3 question (is the assignment-driven slot model viable as the single model?) by extending slot coverage to name-based (global) bindings and running the suite flag-on. Result: 45 failures, ALL of the form "got 0 expected 1" — full-window predicates returning false because the slot window is exactly 1 short. Not a sampling-regime divergence: the slot model matches the value path for every predicate. The sole gap is a 1-count FIRST-ASSIGNMENT lag on name bindings — the binding is created by the upcoming SET_NAME and does not exist at OBSERVE_ASSIGN time, so the slot starts at the 2nd assignment. (Function-locals are unaffected: their slots are pre-allocated by the compiler, so they observe from assignment 1 — Phase 2 already green.) So the assignment-driven slot model is sound; Phase 3 needs first-assignment coverage for name bindings (observe-at-SET, or slot-promote interrogated module vars), then report on the single model, then delete the value path. Exploratory name-based shadow reverted to keep Phase 2 flag-on green; the finding is recorded in the OBSERVE_ASSIGN comment. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent f049fe0 commit 26d16af

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/vm.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3664,9 +3664,14 @@ static Value *vm_run(EigsChunk *chunk, Env *env) {
36643664
}
36653665
v->dirty = 1;
36663666
g_last_observer = v;
3667-
/* #262 Phase-1: a name-based observe is not slot-shadowed —
3668-
* invalidate the slot override so the next predicate uses the
3669-
* authoritative value path. */
3667+
/* Name-based observe is not slot-shadowed (yet) — invalidate
3668+
* the slot override so the next predicate uses the value path.
3669+
* Phase-3 measurement showed shadowing here works for every
3670+
* predicate EXCEPT a 1-count first-assignment lag (the binding
3671+
* is created by the upcoming SET_NAME and doesn't exist yet);
3672+
* fixing that needs first-assignment coverage (post-set observe
3673+
* or slot-promoting interrogated module vars), tracked for
3674+
* Phase 3. */
36703675
if (obs_shadow_on()) g_last_obs_slot_idx = -1;
36713676
}
36723677
}

0 commit comments

Comments
 (0)