Open and answer this issue on GitHub.
ready · opened 2026-10-31 · updated 2026-10-31 · 0 comments
The owner asked for this on 2026-10-31. Two drivers share one checkout: the main lane (docs/briefs) and the bug lane (docs/briefs/bugs). When both lanes change a tools/*.nika file that is lowered into the same generated file, every rebase in drive_push conflicts there.
On 2026-10-31 it happened twice in one evening, both times in crates/nikaia-std/src/tools/lowered/check_facts.rs (the one-line CheckFacts::empty()):
ESCALATE drive: push rejected, rebase conflicted in .../lowered/check_facts.rs, rebase aborted.SUITE 29c2d8d9 green.Each time the supervisor resolved it by hand. The fix was the union of the field initializers, in the field order of check_facts.nika, and the suite’s lower-std step confirmed the result. A generated file is never merged by hand, though (CLAUDE.md: the lowered files are written by the lowering, and a change to one .nika changes one file). The correct resolution is mechanical: take either side, then regenerate the file from the merged .nika sources.
drive_push, when git pull --rebase stops on a conflict, list the unmerged paths. Only when all of them are generated lowered files (crates/nikaia-std/src/tools/lowered/*.rs and the index lowered.rs) and the .nika sources merged cleanly:
lower-std regeneration (the same command the gate’s lower-std step checks) with the driver’s interpreter;git add exactly those files and git rebase --continue.Repeat this for each commit the rebase replays.
.nika conflict keeps today’s path: git rebase --abort, then escalate (push rejected, rebase conflicted in ...).SUITE <sha8> rebased with regenerated lowered files and test the new HEAD again in the suite worktree before pushing. Alternatively, run only the cheap steps (build, lower-std, fmt, clippy) if the brief decides that is enough; state which, and why.--dry-run shows the regeneration step. Add a Nikaia test with fake commands, as the existing drive tests are written. Update the header comment of drive.nika.Rules: only scripts/drive.nika and its tests. Never reset, stash, checkout . or restore . in the shared checkout.