MTGBench improvement loop

Overview · Experiment index

Iteration 51: Hoist shared off-zone reconciliation preflight within the read pass

state gate —
switch PHASE_OFF_ZONE_SHARED_PREFLIGHT_LEGACY · branch loop/it51 · base 4ec0b9ef1 · candidate 8ab925779 · took 1327h 45m

Results

No measurement recorded for this iteration yet.

Where the time went

planner: 12 minexecutor: 42 minreviewer: 0 mingate fmt: 0 min
planner 12mexecutor 42mreviewer 0mgate fmt 0m
executor: 7,917,614 in / 20,144 out tokensplanner: 3,430,971 in / 12,278 out tokensreviewer: 21,504 in / 792 out tokens

Mechanism. In triggers.rs::reconcile_off_zone_keyword_triggers_with_prefilter_mode, reuse the shared-effects emptiness verdict throughout read_pass. off_zone_characteristics.rs::off_zone_keyword_reconciliation_can_skip currently repeats cache identity checks and thread-local borrows for each recipient. Keep recipient-index and base-definition checks per object.

Evidence. xn5.67, docs/stage0-decision-memo.md:L4904, attributes 1.4% inclusive process CPU to reconciliation_can_skip within the 7.0% reconciliation family. The shared-list check is only part of that measured component; its individual share is unmeasured. Inspection confirms that read_pass stages changes and commits them afterward. The previous PHASE_RECIPIENT_BUCKET_EMPTINESS_LEGACY candidate addressed empty index buckets, a separate operation.

Counter and kill threshold. Existing xn5.67 reconciliation_can_skip profile row: 1.4% inclusive CPU. Expected instruction reduction: 0.3–0.6% per action at 4,000 actions, an unmeasured planning estimate. The profile predates subsequent loop changes.

Invariant. A shared-effects emptiness verdict remains constant while the same GameState is borrowed read-only. Cache it lazily only after the existing eligibility guards pass, and discard it before staged writes. Preserve recipient ordering, contribution evaluation, grant retirement, and all three fingerprints. Never reuse the verdict across states, nested scratch queries, commits, or reconciliation calls.

Agent steps

RoleHarness / modelTimeExitTokens in / outNote
plannercodex / gpt-6.1-sol12m 9s03,430,971 / 12,278
executorcodex / gpt-6-luna42m 0s07,917,614 / 20,144
reviewercodex / gpt-6.1-sol0m 45s021,504 / 792

Gates

GateResultExitDetail
fmtpass0cargo fmt --all -- --check

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