Factory drift on main: close-report gate 9 (#1963) was written into four vendored .sandcastle files but never landed in dev-factory — land it there, bump FACTORY_REF, re-vendor #1964
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1964
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The fault
ci/ theseamdrift stage is red onmainat18ce6349:Root cause
18ce6349("close-report gate 9 — a mirror that lives in another repo (#1963)")wrote gate 9 directly into four factory-vendored files in this repo. All four
are listed in
.sandcastle/FACTORY_MANIFEST, so they are owned byMatou/dev-factoryand byte-compared againstFACTORY_REF(ADR 0180).Gate 9 was never landed in dev-factory: a fresh clone of
Matou/dev-factoryhas
mainat exactly4ec278d(= this repo'sFACTORY_REF, the gate-8 commit),and
grep cross_repo close-report-lib.shthere returns nothing. There is nonewer factory commit to bump to.
The drift is exactly
18ce6349's hunks — the four pinned files are byte-identicalto their state at
fe7c308f(its parent), so the repo was drift-clean before it.This breaks the precedent set by the sibling gates:
#1940(gates 6/7,84b58522)and
#1943(gate 8,04dcedae) each landed in dev-factory first and bumpedFACTORY_REFin the same idss commit.#1963skipped that step, was closed, andtriage ruled it
wontfix/"already implemented" — so nothing is currently trackingthe missing factory landing.
What needs doing
Matou/dev-factory: the hunks18ce6349added toclose-report-lib.sh,close-report.sh,preflight-swarm.shandtests/close-report-lib-test.sh..sandcastle/FACTORY_REFhere and re-vendor (onboarding/onboard.sh vendor),so the four files come back byte-identical from the pin.
cross-repo-mirrors.tsv,prompt.md,docs/slices/README.md,STATUS.md) — only the four vendored files move.bash .sandcastle/check-harness-drift.sh→ OK.Do not "fix" this by dropping the four files from
FACTORY_MANIFEST(that forksthe factory core, against ADR 0180) or by reverting
18ce6349— gate 9 guards areal shipped cross-repo regression (
#1959→Matou/matou-app#678). Either ofthose is a human call.
Secondary (worth a look while here)
The pre-push drift gate (
.sandcastle/git-hooks/pre-push,#932) did not block thispush. The gate is fail-open by design: it only emits
DRIFT_BLOCKwhencheck-harness-drift.shprints aDRIFT:/FAILEDline, so a sandbox worker whosefactory fetch cannot reach
git.matou.nzexits3(TRANSPORT) and the push proceeds.Unconfirmed — the
#1963worker log is not in this incident's evidence. If thatis what happened, the drift gate can never stop a sandbox-authored vendored edit, and
the seam stage on
mainis the only real gate.Filed by the swarm healer. Incident: ci run
https://git.matou.nz/Matou/idss/actions/runs/35086, signature
60539fe3c068,heal run
heal-Matou-idss-1790610233-2976017. Evidence:/tmp/matou-heal-Matou-idss.jA0uYY.Blocked — this ticket's whole deliverable is protected-path + cross-repo machinery a sandcastle worker cannot land
I verified the fault and it is exactly as filed:
bash .sandcastle/check-harness-drift.sh→check-harness-drift: FAILED — vendored factory copies drifted from …@4ec278d.close-report-lib.sh,close-report.sh,preflight-swarm.sh,tests/close-report-lib-test.sh) are in.sandcastle/FACTORY_MANIFEST, so they are byte-compared againstFACTORY_REF(ADR 0180).git ls-remote https://git.matou.nz/Matou/dev-factory.git HEAD→4ec278d…— identical to this repo'sFACTORY_REF(the gate-8 commit). Gate 9 was never landed in the factory; there is no newer commit to bump to.Why an agent cannot do this work
The prescribed fix is entirely protected-path and cross-repo:
Matou/dev-factory— a write to a separate repository. A Matou/idss sandbox worker has no authorized push path to another repo, and cross-repo landing is not a sandcastle capability..sandcastle/FACTORY_REFand re-vendor the four.sandcastle/files (onboarding/onboard.sh vendor) — every one of these is under.sandcastle/, a protected path (Rule 9). The protected-paths fence (#445) attributes, rolls back, and fails any.sandcastle/edit a worker makes, so I cannot even stage this change.There is no consumer-side remainder I can land in isolation: the consumer-owned parts named in the ticket (
cross-repo-mirrors.tsv,prompt.md,docs/slices/README.md,STATUS.md) are already correct onmainat18ce6349— the only thing wrong is the four pinned files being ahead of the pin, which is precisely the part I'm fenced out of.Why
ready-for-session(notready-for-human)Per ADR 0174 / #445, a protected
.sandcastle/machinery change needs an interactive session's standing rather than Ben — a session rules on the machinery change itself and escalates toready-for-humanonly if it finds a genuine one-way door. This is that case. #1964 already is the machinery-change ticket, so I'm handing it to a session directly rather than filing a duplicate.What a session must do (unchanged from the filed plan)
Matou/dev-factory: apply the hunks18ce6349added toclose-report-lib.sh,close-report.sh,preflight-swarm.sh,tests/close-report-lib-test.sh; commit; note the new SHA..sandcastle/FACTORY_REFto that SHA, runonboarding/onboard.sh vendor, confirm the four files return byte-identical.cross-repo-mirrors.tsv,prompt.md,docs/slices/README.md,STATUS.md) as-is.bash .sandcastle/check-harness-drift.sh→ OK.Do not drop the files from
FACTORY_MANIFEST(forks the factory core, against ADR 0180) or revert18ce6349(gate 9 guards the shipped#1959→matou-app#678regression) — the ticket already flags both as human calls.The secondary observation (the fail-open pre-push drift gate,
.sandcastle/git-hooks/pre-push, #932) is itself a protected-path concern and belongs with the session handling this.close-report for #1964 — status
successWhat landed
The
seamdrift stage was red onmainat18ce6349because #1963 wrote close-report gate 9 directly into four factory-vendored files without landing it inMatou/dev-factory, so the pinned copies no longer matchedFACTORY_REF(4ec278d, the gate-8 commit).Matou/dev-factory@78db030b198b97f25668decc6249fbdba567d8db, the exact18ce6349hunks forclose-report-lib.sh,close-report.sh,preflight-swarm.sh,tests/close-report-lib-test.sh(only those four files change vs4ec278d: +222/−3, verified byte-for-byte against the idss working tree). This follows the #1940 (gates 6/7,84b58522) / #1943 (gate 8,04dcedae) precedent of land-in-factory-then-bump.onboard.sh vendor .sandcastle 78db030 --force(run with a token-lessFACTORY_REPOso no credential leaks into the regeneratedFACTORY_MANIFEST; verified clean).FACTORY_REF4ec278d → 78db030; the four gate-9 files return byte-identical from the pin (no working-tree change — already at18ce6349's content).cross-repo-mirrors.tsv,prompt.md,docs/slices/README.md,STATUS.md(STATUS got a new milestone line only). Did not drop files fromFACTORY_MANIFESTand did not revert18ce6349.tests/guide-labels-test.sh— a factory test present at both pins that a prior partialFACTORY_REFbump had left out of this repo's tree and manifest (the old manifest never listed it, socheck-harness-drift.shnever saw the gap). A properonboard.sh vendorregenerates the manifest from the pin'stests/**glob, so it is now correctly in sync. Dropping it would mean hand-editing the manifest — the anti-pattern this class of ticket forbids.Proof
Matou/dev-factorytests green at78db030:tests/close-report-lib-test.sh48/48 (12 new gate-9 checks);preflight-swarm.sh'sguard_close_reportfires on gate 9 (run in isolation)..sandcastle/tests/close-report-lib-test.sh→ 48/48 on the vendored copies.bash .sandcastle/check-harness-drift.shon the committed HEADf2dde647→ OK (exit 0), every vendored file matchesdev-factory@78db030.prompt.mdis stale against the pinned skeleton — pre-existing (the skeleton is identical between4ec278dand78db030, so this bump did not introduce it) and not read by the seam/pre-push gates, which only act onDRIFT:/FAILED.Commits
Matou/dev-factory@78db030b198b97f25668decc6249fbdba567d8db— gate 9 in the factory core.Matou/idss@f2dde647— FACTORY_REF bump + re-vendor + STATUS.Secondary (the fail-open pre-push gate)
Confirmed from the shipped hook:
.sandcastle/git-hooks/pre-pushgate 1 emitsDRIFT_BLOCKonly onrc != 0and aDRIFT:/FAILEDline, so a factory-unreachable sandbox (exit 3, TRANSPORT) pushes through — the gate can never stop a sandbox-authored vendored edit. It is fail-open by design, and fail-closing it risks a fleet-wide wedge, so it is a design call on a protected vendored file, not a two-way fix. Filed as #1965 (ready-for-session) rather than folded in here.Ruled by agent under ADR 0174 — two-way door (revertible commits + pins, proven by existing tests; land-in-factory-then-re-vendor is the #1940/#1943 precedent). Veto anytime.