PHASE_LAND_MANA_PREFLIGHT_SCOPE_LEGACY · branch loop/it45 · base 4ec0b9ef1 · candidate 7a9dabb16 · took 1h 4m| Arm | Run 1 instructions | Run 2 | Actions | Instr / action | contract ms | apply ms |
|---|---|---|---|---|---|---|
| legacy | 20,678,829,813 | 4,000 | 5,169,707 | 2,881 | 2,590 | |
| optimized | 20,650,125,958 | 4,000 | 5,162,531 | 2,786 | 2,859 |
perf: indicative only, not a clean timing.Mechanism. In mana_sources.rs::preflight_tap_land_action, validating one TapLandForMana action currently enumerates activatable mana actions for every controlled permanent. Add a source-scoped mode to the existing enumeration driver so preflight constructs actions only for the submitted source. Keep board-wide activation gates and aura discovery unchanged.
Evidence. docs/stage0-decision-memo.md:L4524, xn5.59, measured 582 TapLandForMana fallback validations consuming 200.2 ms across the two 4,000-action workloads. Those validations execute the action boundary, including this preflight. This is a containing-region ceiling; preflight's removable fraction was not isolated. Actual action applications also reach preflight, but their additional opportunity is unmeasured.
Counter and kill threshold. Existing xn5.59 raw-validation action-shape row: TapLandForMana, 582 calls and 200.2 ms. Expected instruction reduction: 0.4–0.9% per action at 4,000 actions, an unmeasured hypothesis likely to be marginal. The loop's existing instruction and fingerprint gates decide.
Invariant. Every matching TapLandForMana action names the submitted source incarnation. Actions from other sources cannot affect the exact-match count. Preserve battlefield membership, controller and submitter checks, activation restrictions, full selection equality, duplicate-match rejection, and existing errors. Permanent differential tests must compare preflight results and unchanged input states against complete enumeration.
| Role | Harness / model | Time | Exit | Tokens in / out | Note |
|---|---|---|---|---|---|
| planner | codex / gpt-6.1-sol | 12m 14s | 0 | 4,347,019 / 16,346 | |
| executor | codex / gpt-6-luna | 41m 12s | 0 | 6,083,610 / 14,183 | |
| reviewer | codex / gpt-6.1-sol | 0m 31s | 0 | 23,179 / 658 |
| Gate | Result | Exit | Detail |
|---|---|---|---|
| fmt | pass | 0 | cargo fmt --all -- --check |
| build | pass | 0 | pwsh -NoProfile -File scripts/bench_phase.ps1 -Mode build -CargoProfile bench-fast-inc -Label it45-build |
| ir1k | FAIL | 1 | pwsh -NoProfile -File scripts/bench_phase.ps1 -Mode ab -Instrument perf -Legacy PHASE_LAND_MANA_PREFLIGHT_SCOPE_LEGACY -Actions 1000 -Seed 91 -Workers 1 -Timeout 1800 -Repeats 3 -CargoProfile bench-fast-inc -Label it45-ir1k -IrThresholdPercent 1.0 -IrDeterminismPercent 0.05 -VerdictJson /data/mtgbench/loop/reports/it45/ir1k.verdict.json -PerfSudo |
Status: rejected (loop, instruction-count gate; wall-clock not yet confirmed)
Automated loop result on homelab (aarch64). Switch PHASE_LAND_MANA_PREFLIGHT_SCOPE_LEGACY, mechanism class compute. Mechanism: In mana_sources.rs::preflight_tap_land_action, validating one TapLandForMana action currently enumerates activatable mana actions for every controlled permanent. Add a source-scoped mode to the existing enumeration driver so preflight constructs actions only for the submitted source. Keep board-wide activation gates and aura discovery unchanged. Invariant: Every matching TapLandForMana action names the submitted source incarnation. Actions from other sources cannot affect the exact-match count. Preserve battlefield membership, controller and submitter checks, activation restrictions, full selection equality, duplicate-match rejection, and existing errors. Permanent differential tests must compare preflight results and unchanged input states against complete enumeration.
| gate | passed | detail |
|---|---|---|
| fmt | yes | cargo fmt --all -- --check |
| build | yes | pwsh -NoProfile -File scripts/bench_phase.ps1 -Mode build -CargoProfile bench-fa |
| ir1k | NO | INVALID A/B: seat=$($game.candidate_seat) differs … |
Wall-clock confirmation on the workstation is required before this counts as a speedup; instruction count is a screen, not a time prediction.
generated 2026-11-28 18:17:09 · read-only · refreshes every 30 s