MTGBench improvement loop

Overview · Experiment index

Iteration 52: Dependency-directed layer invalidation for battlefield departures

state deferred — plan-only run
switch PHASE_LAYER_MEMBERSHIP_DIRTY_LEGACY · branch · base 4ec0b9ef1 · candidate · took 13m 2s

Results

No measurement recorded for this iteration yet.

Where the time went

planner: 13 min
planner 13m
planner: 2,206,530 in / 14,467 out tokens

Mechanism. Extend LayersDirty with a membership-change batch carrying pre-exit characteristics and affected recipients. At flush, derive dependencies from functioning static definitions, including currently false conditions, and transient effects. Recompute the dependency closure using the existing layer ordering and recipient-reset machinery; escalate unsupported dependencies to Full. This replaces the board-global zone-membership test with a structural invalidation path.

Evidence. Open edh-play-xn5.24 owns general layer invalidation; edh-play-xn5.89 identifies its largest current origin. The memo's 2026-10-04 layers follow-up attributes 548.0 ms, 7.50% of contract+apply, to zone-counted-token departures flushed inside mana previews. The newest indexed profile, docs/profiles/perf-20261002-1221/summary.md, also exposes layer costs across multiple owners. xn5.68's memo confirms neutral timing and remaining zone-counted departures.

Counter and kill threshold. Existing layers_dirty_attribution origin-to-flush rows: zones.rs:606#zone-counted-token -> triggers.rs:3871 [contract] = 7.50%; total evaluate_layers = 14.6% of contract+apply. The 7.50% is contained within 14.6%, so their union is 14.6%, not 22.1%. Expected instruction reduction: 3–6% per action at 4,000 actions, contingent on the supported dependency closure covering a substantial fraction of these departures; that fraction remains unmeasured.

Invariant. Incremental and full evaluation must produce identical characteristics, trigger occurrence identities, presence indexes, and public projections. Preserve timestamp and dependency ordering. Unsupported relational filters, source removal, copy or ability-changing dependencies, and incomplete pre-exit observations escalate to Full. Add permanent differential tests comparing both paths after departures and batched mutations, with positive cases proving incremental recomputation actually runs.

Agent steps

RoleHarness / modelTimeExitTokens in / outNote
plannercodex / gpt-6.1-sol13m 2s02,206,530 / 14,467

Gates

GateResultExitDetail

generated 2026-11-28 18:17:10 · read-only · refreshes every 30 s