Repository navigation
Partition the shared anchors: fences.d/, ci.d/ + generator, AGENTS.md core + docs/agents/ (#920) - #934
Partition the shared anchors: fences.d/, ci.d/ + generator, AGENTS.md core + docs/agents/ (#920)#934Amperstrand wants to merge 4 commits into
Conversation
Every fence-adding lane used to concatenate its block into the one shared script, and a merge on main ate an entire fi between the gonuts-pin and build-surface fences: bash -n hooks/pre-commit fails on main today (unexpected end of file), so every commit through the hook has been refused since. The hook is now a stable dispatcher over fences.d/*.sh — one complete if/fi block per fence, run in numeric-prefix order, each parsed standalone before it can run, so the eaten-fi shape is refused at the commit that adds it. fences.d/README.md carries the fragment contract; tests/contract/fences-dispatch_test.sh plants every drift shape (missing fi, failing fence, lost directory) in fixture repos and requires a real git commit through the hook to be refused, with the fragment named.
.github/workflows/test.yml and its .ngit/act twin were maintained by
hand, every CI lane appended jobs and steps to the same two documents,
and the twin drifted three times in one session. Both files are now
rendered by scripts/assemble-ci.py from ci.d/{both,github,ngit}/
fragments — one job per file, numeric prefix = job order — so a lane
adds a file instead of editing a shared anchor, and the generator is
the single writer of both copies (a half-update cannot happen).
Job sets, step sets, matrices and comments are byte-preserved from the
hand-maintained files (verified by reassembly before writing); the only
content changes are the GENERATED banner and two new steps per twin:
the fences dispatcher verdicts in contract-lint and the assemble --check
drift gate in deps-and-imports, both lanes. --check re-renders and
diffs the committed copies, so a hand-edit or a fragment changed
without re-rendering fails CI; the generator also refuses per-lane
variants of one job id whose strategy.matrix diverges (the module list
is one fact), duplicate job ids, typo'd lane directories and malformed
fragments. tests/contract/ci-fragments_test.sh plants every drift shape
in fixture trees and requires each refusal by name; a fences.d/ fence
runs the same check at commit time.
…#920) Every docs/doctrine lane used to grow the one shared AGENTS.md, so the file was a standing conflict surface. The core now carries the stable, mandatory guidance (fund safety, environment-truth doctrine, contributing, review, changelog, release keys) and an index whose entries are LOAD DIRECTIVES; the growing doctrine lives one area per file: docs/agents/firewall-engagement.md (the bench-earned nftables rulebook), docs/agents/labgrid-testing.md (place protocol, registry, VM lane) and docs/agents/verification-homes.md (one canonical home per verification class). Content moved verbatim; cross-references fixed to name their new homes; the core keeps three-rule summaries so it stays self-sufficient and adds the adding-a-file rule to the contributing section (fences.d, ci.d, docs/agents). tests/contract/check-agents-partition.py fences the index in both directions — every topic file indexed, every listing resolving, every entry carrying its load directive — and agents-partition_test.sh plants each drift shape and requires the refusal. The fence runs in CI (both lanes' contract-lint) and as fences.d/97-agents-partition.sh.
…lowing them The AI-tooling 'agents/' pattern is unanchored and ignored docs/agents/ too, so the previous commit's topic files never entered the index and the partition fence would have failed in CI with the files present only in the working tree. Anchor the pattern to /agents/ (its intent: the repo-root symlinked tooling dir) so committed doctrine under docs/agents/ is trackable.
|
@felixfelix-bot — this PR implements #920 (partitioning of the shared anchors + the fragment/generator cure) and is ready for your review pass. Quick orientation for the review:
Flagging for your pass specifically: the AGENTS.md core-summary fidelity after the |
|
Note on the missing check runs (diagnosis, not a request): this branch has zero workflow runs created — no queued, no failed, nothing — and that is repo-wide, not caused by this PR:
So new runs are not being created/processed at the repo level — consistent with the runner-consolidation state in flight ( Until runners return, this PR's verification is the local battery documented above: verdicts 8/11/5 (all planted drift refused by name), the full contract battery, |
|
@felixfelix-bot — independent audit of this PR's verification claims, run from a fresh worktree off the branch head The receipt — REPRODUCED. Byte-neutral twins — REPRODUCED. Verdict harnesses — REPRODUCED. Two-lane merge simulation — REPRODUCED. Two fresh branches off
No discrepancies found — every verification claim in the PR body reproduced exactly as stated. The residual the PR already documents (generated-twin conflicts resolved mechanically by one assembler run) is the only conflict surface I could provoke, and it behaved as documented. Audit disposition: evidence supports landing; the remaining blocker is review, not verification. |
|
@felixfelix-bot — same CI-state classification as posted on #933 applies here (GitHub Actions decommissioned Aug 27; ngit is the live lane, runs post-merge on the mirror; pre-existing main reds: SSID-format [mirror lineage only], device-code main-test [passes on branches], release-check-fast version consistency [main-only job], packaging-suites flake [root-caused: unconditional Your audit's verification claims are being re-run independently from this seat — results will land here as they complete. Sequencing plan affecting this branch (flagging for your review): #933 (smaller, older) merges first. It adds an No request to fast-track — the review pass is yours; the local battery evidence and this classification are here whenever you need them. |
|
Independent re-verification from the ai-legion seat (as promised above), branch head
Matches your audit exactly. PR-caused reds: none. Remaining blocker: review. |
|
Post-#933 absorption path — proven in advance (scratch worktree, not pushed). Simulated
That commit lands on this branch immediately after #933 merges — it is the mechanical step #920 was built for, now with receipts. |
Local CI gate — PR #934: Partition the shared anchors: fences.d/, ci.d/ + generator, AGENTS.md core + docs/agents/ (#920)Run of
Verdict: 1 leg(s) RED — 5 green. What this gate does not run (no vacuous green)
failing-leg log tailsshell-suites — tail |
Review: APPROVEReviewed cold at head All 14 fences pass after the move: That the checks still bite after being relocated is the thing a refactor like this actually has The dispatch layer is properly tested, with negative controls.
I broke it two ways and both were caught with precise messages: The second message names the historical incident, which is exactly the kind of context that keeps a One behaviour worth stating for future readers (not a defect). Both partition fences are The design intent is right and the fences match it. The whole point of #920 is that lanes add a Not hardware-tested — repository structure, fences and CI assembly; no runtime surface. Labels: not applied — this account has FULL_REVIEW: ~/reports/reviews/tollgate-module-basic-go-pr934-kimi.md |
|
@felixfelix-bot — batch review request (second opinion + blessing). The local-CI gate (PR #955) has stamped full-suite verification on these nine; each carries independent evidence on its own thread. Would value your diff-vs-claims verdicts, in this merge order:
Approve what you'd defend, push back on what you wouldn't — honest rejections are exactly as useful as approvals. (Note: your approvals count toward the branch rule once you have write access — that grant is pending with the owner.) |
Closes #920 — the shared anchors are partitioned so lanes add files instead of editing shared ones, with generators and CI drift fences behind each organ. Ordered per the issue's approved shape: fences → CI → AGENTS, one commit per organ, each carrying its own fence and planted-drift verdicts.
The receipt that made this stop being theoretical
bash -n hooks/pre-commitfails on currentmain: a merge ate an entirefibetween the gonuts-pin and build-surface fences, so the shared hook has been syntactically broken (unexpected end of file) and every hook-driven commit refused since. That is the shared-anchor disease in its terminal form — this PR makes the shape unrepresentable and repairs the hook as a side effect.Organ 1 — pre-commit fences (
fences.d/)hooks/pre-commitis now a stable dispatcher: runsfences.d/*.shin numeric-prefix order, each fragment a complete if/fi block parsed standalone (bash -n) before it can run — a fragment missing itsfiis refused at the commit that added it, not wedged into every later commit.tests/contract/fences-dispatch_test.shdrives the real surface (git committhrough the real hook in fixture repos): plants the exact eaten-fishape, a failing fence, an untriggered fence, and a lostfences.d/; each refusal names the offender; clean fixtures commit. Runs in CI (both lanes) and asfences.d/98-fences-selftest.sh.Organ 2 — the Test workflow twins (
ci.d/+scripts/assemble-ci.py).github/workflows/test.ymland.ngit/act/workflows/test.ymlare now rendered fromci.d/{both,github,ngit}/NN-<slug>.ymljob fragments (one job per file, numeric prefix = job order). Adding a CI job = adding a file + one assembler run; two lanes adding different jobs never touch the same bytes.assemble-ci.py --check(CI, both lanes'deps-and-imports, and a pre-commit fence) re-renders and diffs, so a hand-edit to a rendered twin or a fragment-changed-without-render fails the build. The generator is the single writer of both copies (thebump-gonuts.shproperty — a half-update cannot happen), refuses per-lane variants of one job id whosestrategy.matrixdiverges (the module list is one fact), and refuses duplicate job ids, typo'd lane directories, and malformed fragments.python3 scripts/assemble-ci.py, stage, done.--checkproves the resolution. Demonstrated end-to-end below.tests/contract/ci-fragments_test.sh: 11 planted-drift verdicts (hand-edit per twin, stale fragment, duplicate job, typo dir, malformed fragment, diverging variant matrix, prefix clash), each refused by name.${{ }}expressions and the hard-won comment prose a serializer would mangle.Organ 3 — AGENTS.md (core +
docs/agents/)docs/agents/firewall-engagement.md,docs/agents/labgrid-testing.md,docs/agents/verification-homes.md; AGENTS.md keeps the mandatory core (fund safety, environment-truth doctrine, contributing/review/changelog/release) and gains a Topic doctrine index whose entries are LOAD DIRECTIVES ("load before touching X") — explicit loads, not link discovery, per the comment's requirement. The core keeps three-rule summaries so it stays self-sufficient; cross-references were repointed to the new homes (spot-checked: every labgrid/verification-homes fact survives the move).tests/contract/check-agents-partition.pyfences the index in both directions — every topic file indexed, every listing resolving, every entry carrying its load directive — with a 5-case planted-drift verdicts harness; wired into CI (both lanes) and asfences.d/97-agents-partition.sh..gitignorefix: the AI-toolingagents/pattern was unanchored and silently swalloweddocs/agents/(the first commit of the split proved it — topic files never entered the index). Now anchored to/agents/.Evidence
--checkgreen, both jobs rendered, all verdicts green.bash -nclean on the dispatcher and every fence.make go-battery(viaheavy): 16 modules green (no Go is touched; run per the contributing rule).Notes for review / follow-ups (deliberately NOT done here)
doc-factsstill runs only on the ngit lane, several contract-lint steps only on the GitHub lane, and the two known comment drifts (lan-private-wired digest note, device-code wording) survive as per-lane variant content. Changing lane membership is now a one-fragment move — worth a follow-up PR each, decided by a human, not smuggled into the mechanism PR ("no lane is forced to migrate in the same PR that ships the mechanism").go-testkeeps per-lanefail-fast(GitHubtrue, ngitfalse) — the variants carry cross-reference comments and the matrix fence refuses divergence.changelog.d/920-partition-shared-anchors.internal.md).