mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-09-27 05:56:00 -04:00
e40fe9c116
PROVEN: from 14:57:01 to 18:43:23 today HEAD built main to 307aa45d… against the expected 143dbb89…, with NO draft substituted (measured under gate.main.lock, no gate_main alive). Auto-commit commit:2693 had adopted a mid-flight gate_main substitution — its carve-out reverted main's TUs, gate_main re-wrote them, and `git add -A src/` swept the unverified bodies in (a TOCTOU race, 14 s after a bisect chunk banked). Every main batch after it was doomed before its first draft was judged: m00–m03 card cycles drafted ~737, slated 160, banked 0, and burned ~50 clean rebuilds bisecting innocent slates. commit:2712 restored the green content by accident (it swept this investigation's diagnostic checkout). gate_main: on any batch failure, ONE try_batch([]) control runs first — if HEAD itself is red it prints BASELINE RED, leaves the slate reusable, exits 3 (R40). clean_build no longer reports a linked-but-mismatched build as "no binary" (the build target embeds the SHA check), the compile-conflict shortcut fires only on error-shaped lines naming a symbol some draft in the slate actually uses (the baseline's own func_800143AC implicit-decl WARNING was matching — every m04 chunk died with "drafts declaring it: []"), reverts narrow to top-level src/*.c (main_tus) so a main gate can never destroy overlay lanes' in-flight work, and --assert-baseline is a first-class mode. main_lane: every cycle opens with gate_main --assert-baseline and REFUSES to draft or gate against a red baseline (R43) — BaselineRed parks nothing, burns no tries, writes .run/main_lane.BASELINE_RED, re-checks every 30 min. Adopters (ox_campaign ×3, maintenance.sh, gate_stage, gate_lane, idiom_serial): main's TUs (top-level src/*.c) are never staged and never reverted by an overlay/maintenance lane — one writer (gate_main), one committer (main_lane, after the whole-EXE SHA re-checks green). Unstage-after-add is race-free where the old revert-then-add was the losing half of the TOCTOU. Diagnosis, evidence and the full timeline: docs/tool-designs/main-lane-fix-s59.md
Autonomous lanes (P31 S58)
The unattended campaign architecture. These are the RUNNING copies' source of truth — the live
lanes execute from .run/, which is gitignored, so a fresh clone would otherwise have none of it.
Copy back with cp tools/lanes/*.sh .run/ before launching.
| lane | role | rule |
|---|---|---|
drafter.sh |
draw → shard → draft → queue a ready marker, forever | NEVER stop it to ship a code change. Measured 2026-08-23: 139 of 162 idle minutes were exactly that |
gater.sh |
reloc pre-filter → gate → commit → harvest → ledger | safe to kill/restart at will |
maintenance.sh |
the free A-prop sibling lane | triggers on 150+ newly banked functions, not a timer |
stallguard.sh |
60s: revive dead lane shells, kill agents silent >20min, kill gates >90min | the only thing that works at 3am |
Start: setsid nohup .run/<lane>.sh >> .run/<lane>.log 2>&1 </dev/null &
Stop everything: touch .run/ox_campaign.stop
Editing a lane requires replacing its SHELL, not just its python — bash has the loop body parsed, so killing the python restarts it with the old arguments. Verify from the startup banner, never from the file.