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#2104
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?
Filed by the healer for run 57327 (signature
0ef3e1e7d379). A protected.sandcastle/path is involved, so this isready-for-sessionper ADR 0174 / #445's own escape path — a healer must not edit the boundary that judges workers.Symptom
Run 57327 red at stage
protected-path violation — a worker edited machinery (#445):The worker created nothing of the sort. It is a false positive, and the rollback deleted a file
mainowns.What actually happened
The #445 boundary fingerprints the protected tree of the shared workdir
~/swarm/Matou/idssbefore the worker (verify_pp_snapshot "$PWD", run-swarm.sh:422) and again after it (verify_protected_paths, run-swarm.sh:461). Between those two snapshots a peer workflow reset that same shared workdir.Timeline (UTC, 2026-10-30):
origin/main=708e2c9cjob-log.txtc644a76a, nots-gate.shsandcastle/worker/20261030-095558-…worker-logs.txte0508db7onorigin/main— the commit that adds.sandcastle/ts-gate.shgit show e0508db7.sandcastle/git-setup.sh→git reset --hard origin/mainin the SAME workdir → mainc644a76a→e0508db7, materialising.sandcastle/ts-gate.shinto the shared working treegit reflog show main:e0508db7 main@{2026-10-30 10:12:23 +0000}: reset: moving to origin/main;runs.json: triage 57332 started 10:12:20fac49ab7(local only)ts-gate.shpresent where before had none →appeared→ attributed to the worker →pp_rollbackrm -fit; run redsjob-log.txt,workdir-git.txt(D .sandcastle/ts-gate.sh)The worker is exonerated by its own log: it ran
git diff --cached --name-only | grep -E '^\.(sandcastle|forgejo|git)/'→no protected paths touched, andls -la .sandcastle/ts-gate.sh→ absent in its sandbox. Its commit5ed55c85touches 11 files, none under.sandcastle/,.forgejo/or.git/.The two defects
reset --hard origin/mainon the shared workdir while a swarm worker is in flight.pp_attributedcompares wall-clock working-tree bytes and has no way to tell "an upstream commit arrived" from "the worker edited machinery". Any heal or human commit that touches.sandcastle/or.forgejo/now reds the next concurrent swarm run.pp_rollbackdeletes filesHEADtracks. protected-paths-lib.sh:234-237 — "no pre-run blob ⇒ the worker created it ⇒rm -f". HereHEADtracks the path, so the correct rollback wasgit checkout -- <path>, neverrm. The boundary destroyed the very TS gate #1252 had just installed, re-opening GOTCHAS 402 in that workdir until the nextgit-setup.shreset restores it.Collateral this run
#2099is a stranded close (#283): close-report closed it against the pushed worker branch at 10:18:32, the land never happened,origin/mainis stille0508db7.landing_reopen_stranded_closesdid not fire — the worker invoked close-report asbash .sandcastle/close-report.sh 2099 … 2>&1 | tail -40, so theSANDCASTLE_ATTEMPT issue=… outcome=success commits=…protocol line (close-report.sh:411) never reached the sandcastle logexecute-lib.sh:156greps, leaving$EXECUTE_ATTEMPTS_FILEempty. The healer reopened and re-queued #2099 by hand. A reconcile that depends on a protocol line a worker's own| tailcan swallow is not a reconcile — worth fixing in the same pass.Shapes a session might consider (not a decision)
HEAD, or touched by a commit reachable from the worker branch but not fromorigin/main. Strictly stronger than the byte snapshot, and immune to any peer reset.HEADmoved mid-run by a commit the worker did not author.pp_rollbackrestore fromHEADwhenHEADtracks the path, so the boundary can never destroy committed machinery.Each of these changes the posture of the worker boundary — the class protected-paths-lib.sh:80-83 already reserves for a session/human (#284(b)).
Closed by agent under ADR 0174 — veto anytime. Landed on
main(push mode), two-way door (fully revertible, proven red-before-green by the vendored offline suites).What landed
The #445 boundary now attributes by
origin/main, not wall-clock bytes, and can never delete machinerymainowns. Both defects in this ticket are fixed; both are strictly no-weaker than the old byte compare.protected-paths-lib.shstays PURE but gains two optional env seams. WithPP_CANONICAL_CMDwired,pp_attributeddrops any path whose AFTER content already equals the canonicalorigin/maincontent and which the worker did not dirty before it ran (PP_BEFORE_DIRTY_FILE) — an upstream advance (a peerreset --hard origin/mainof the shared workdir), not the worker's edit. The only paths dropped are byte-identical to whatmainalready ships, so no machinery deviation is left unprotected: a divergent edit, a worker-branch commit, a dirtied or deleted path is still caught, and another session's uncommitted edit (the #239 hazard) is never exonerated. With neither seam set (the offline tests, an opted-out repo) the boundary is byte-for-byte the pre-change one.pp_rollbackno longerrms a worker-introduced path when the canonical tree tracks it — it reverts to the committed content, so the boundary can never DESTROY committed machinery, only undo a true introduction.verify-lib.shwires the seams with a real git backing (_verify_pp_canonicalresolvesorigin/main:<path>after a best-effortgit fetch;_verify_pp_dirty_protectedrecords the before-dirty set);run-swarm.sh's EXIT trap cleans the new temp file.Had this been live, run 57327's
ts-gate.shwould have been scored an upstream advance: no false red, and the filemainowns left in place.How it reached main (ADR 0180, vendored machinery)
All three files are factory-vendored, so the fix went upstream first:
backport/idss-2104@06f65763cd7d9008933fda79d8d8584998b5fffc(off the pinafc0303, #1684 still open).onboard.sh vendor(ran plain):FACTORY_REFafc0303→06f6576, 5 files updated,FACTORY_MANIFESTno churn, drift-gate OK inline.fb3faec5onmain(STATUS.md updated in the same commit).Proof (red-before-green)
protected-paths-lib-test.sh59→73 checks: exoneration of an upstream advance, Fix A canonical-restore (never delete a main-tracked path), #239 preserved (a dirty-before path reverted to canonical is still rolled back), upstream deletion exonerated, and the pure no-resolver default unchanged. The new assertions FAIL against the pre-fix lib.verify-lib-test.sh+2 real-git groups: a peerreset --hard origin/mainmid-run PASSES the boundary and the file is not deleted; a divergent worker edit still FAILS and rolls back toorigin/main. Fails at exactly that group against the pre-fix lib.run-swarm-stages-test.shgreen.Scope / residue (follow-ups filed, this ticket's two-way parts are complete)
ready-for-human) — forward-port this fix onto dev-factorymain(clean cherry-pick; the files are byte-identical pin→main; gates #1684, the #2053 debt).ready-for-session) — the separable #283 reconcile defect this ticket also noted: theSANDCASTLE_ATTEMPTprotocol line a worker's own| tailcan swallow. Distinct mechanism (close-report.sh/execute-lib.sh, reliable sandbox→host signalling), left to its own ticket. #2099 was already reopened/re-queued by the healer by hand.Audit note — a concurrent session landed this; my in-flight duplicate cleaned up (ADR 0174)
This ticket was fixed and closed by a concurrent session on
elitebook-distributed-server-03(idssfb3faec5, "vendor #445 boundary fix …", FACTORY_REF →06f6576), which vendored the fix from the dev-factory backport branchbackport/idss-2104— the established consumer-fix path that keeps the pin tight. That fix is correct and green onmain(protected-paths-lib 73 checks, verify-lib 13 groups). No action needed on the fix itself.I was working the same ticket in parallel (the session-runner race #992/#283 class) and had an independent implementation in flight. To avoid a divergent duplicate I have discarded all of it:
origin/mainis untouched and carries only the concurrent session's fix.0456fd3. That was wrong — the current convention is abackport/idss-NNNNbranch off the pin, not a push to main. A divergent second #2104 fix on the canonical trunk would conflict with the deployed backport on a future catch-up, so I reverted it on dev-factory main (6142899, "Revert …"). dev-factory main is back tod3b49c5; the reverted design is preserved in history at0456fd3for comparison only.| tail); it duplicates the concurrent session's #2106, so I closed #2105 in favour of #2106.Net effect of my session: zero change to idss main or dev-factory main beyond cleaning up my own erroneous push. Leaving this ticket closed.
Ruled by agent under ADR 0174 — veto anytime.