PHASE_CAST_PERMISSION_PRESENCE_LEGACY · branch loop/it20 · base 4ec0b9ef1 · candidate a285a0ca5 · took 2h 5m| Arm | Run 1 instructions | Run 2 | Actions | Instr / action | contract ms | apply ms |
|---|---|---|---|---|---|---|
| legacy | 21,758,294,413 | 21,751,049,379 | 4,000 | 5,438,668 | 2,389 | 2,312 |
| optimized | 21,561,617,601 | 21,564,241,134 | 4,000 | 5,390,732 | 2,666 | 2,640 |
perf: indicative only, not a clean timing.| Hardware counters (optimized / legacy) | Value | Reading |
|---|---|---|
| cycles, minimum of the repeats | +0.22% — cycles-neutral (same-arm spread 7.06%) | same within noise |
| IPC (instructions per cycle, higher is better) | 1.010 / 1.002 | same |
| backend stall / frontend stall (share of cycles) | 19.5% / 19.6% · 41.6% / 41.0% | same |
| L1D / L2D refills per 1k instructions (cache misses) | 12.91 / 12.86 · 11.19 / 11.16 | same |
| branch mispredicts per 1k instructions | 5.970 / 5.782 | same |
| Arm | Run 1 instructions | Run 2 | Actions | Instr / action | contract ms | apply ms |
|---|---|---|---|---|---|---|
| legacy | 78,379,782,582 | 78,382,878,703 | 11,418 | 6,864,716 | 18,288 | 11,901 |
| optimized | 76,606,261,857 | 76,590,368,744 | 11,418 | 6,708,558 | 19,036 | 11,972 |
perf: indicative only, not a clean timing.| Hardware counters (optimized / legacy) | Value | Reading |
|---|---|---|
| cycles, minimum of the repeats | -4.13% — cycles-faster (same-arm spread 1.91%) | faster |
| IPC (instructions per cycle, higher is better) | 0.911 / 0.895 | same |
| backend stall / frontend stall (share of cycles) | 24.7% / 23.5% · 39.2% / 41.1% | more waiting |
| L1D / L2D refills per 1k instructions (cache misses) | 17.40 / 17.30 · 14.07 / 13.87 | same |
| branch mispredicts per 1k instructions | 5.475 / 5.457 | same |
Mechanism. In casting.rs, use the existing StaticModePresence summary to skip battlefield/command-zone scans for absent TopOfLibraryCastPermission, ExileCastPermission, GraveyardCastPermission, and CastFromHandFree modes. Require clean layers, a derived summary, and a valid static-source index; otherwise execute the current scan. Graveyard-resident permission sources must still be scanned because the summary does not cover them.
Evidence. xn5.67, memo L4904, and bench/reports/uprof-xn565-20260923-owners-all.txt attribute 1.6% of process CPU to spell_objects_available_to_cast; owners-alloc.txt attributes 0.9% to its allocation work. Source inspection finds permission collectors still scanning sources without the existing discriminant gate. These are family bounds; the removable permission-scan subset has no separate timer.
Counter and kill threshold. Existing xn5.67 spell_objects_available_to_cast profile row: 1.6% nearest-owner CPU. Expected reduction: 0.5–1.0% instructions per action at 4,000 actions, with uncertain coverage after the retained static-iterator change. The loop's instruction A/B decides retention.
Invariant. Absence in the clean, derived board summary proves that the corresponding board-scoped collector returns no permissions. Presence and uncertain state retain exact condition, controller, filter, frequency, and ordering checks. Preserve graveyard sources, ordered candidate vectors, auto-tap selections, and final state.
| Role | Harness / model | Time | Exit | Tokens in / out | Note |
|---|---|---|---|---|---|
| planner | codex / gpt-6.1-sol | 12m 6s | 0 | 3,618,089 / 12,647 | |
| executor | codex / gpt-6-luna | 26m 50s | 0 | 8,321,724 / 15,592 | |
| reviewer | codex / gpt-6.1-sol | 0m 33s | 0 | 22,756 / 497 | |
| executor | codex / gpt-6-luna | 1h 6m | 0 | 12,793,495 / 24,091 | |
| reviewer | codex / gpt-6.1-sol | 0m 53s | 0 | 23,213 / 888 |
| 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 it20-build |
| ir1k | pass | 0 | Ir -0.88% within +/-1%, same-arm spread 0.0333% | optimized 21,562,430,308 vs legacy 21,753,639,391 instructions; fingerprints match: True |
| ir4k | FAIL | 2 | same-arm Ir spread 0.0590% exceeds 0.05%; no verdict | optimized 76,610,729,546 vs legacy 78,381,177,510 instructions; fingerprints match: True |
Status: rejected (loop, instruction-count gate; wall-clock not yet confirmed)
Automated loop result on homelab (aarch64). Switch PHASE_CAST_PERMISSION_PRESENCE_LEGACY, mechanism class compute. Mechanism: In casting.rs, use the existing StaticModePresence summary to skip battlefield/command-zone scans for absent TopOfLibraryCastPermission, ExileCastPermission, GraveyardCastPermission, and CastFromHandFree modes. Require clean layers, a derived summary, and a valid static-source index; otherwise execute the current scan. Graveyard-resident permission sources must still be scanned because the summary does not cover them. Invariant: Absence in the clean, derived board summary proves that the corresponding board-scoped collector returns no permissions. Presence and uncertain state retain exact condition, controller, filter, frequency, and ordering checks. Preserve graveyard sources, ordered candidate vectors, auto-tap selections, and final state.
| gate | passed | detail |
|---|---|---|
| fmt | yes | cargo fmt --all -- --check |
| build | yes | pwsh -NoProfile -File scripts/bench_phase.ps1 -Mode build -CargoProfile bench-fa |
| ir1k | yes | Ir -0.88% within +/-1%, same-arm spread 0.0333% |
| ir4k | NO | same-arm Ir spread 0.0590% exceeds 0.05%; no verdict |
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:15 · read-only · refreshes every 30 s