harness: the host gofmt gate scans sibling workers’ gitignored .sandcastle/worktrees/, so one worker’s in-flight formatting refuses every other worker’s reconcile push (run 59079, push-rescue-unreachable) #2134

Closed
opened 2026-11-03 19:40:48 +00:00 by matou-build-agent · 7 comments

Symptom

Swarm run 59079 failed with
run-swarm: RUN FAILED — exit 1 in stage 'reconcile push to main' (reason=push-rescue-unreachable).
All three rungs of the landing ladder (push, post-rebase push, rescue-branch push) were
refused by the host gofmt gate (Gate 3b, #1458). #2125 was reopened and its commit
9dfffb62 is stranded unpushed in the shared workdir — forge main is still 15b0a2eb.

This is the gofmt twin of the fault .sandcastle/ts-gate.sh was written for (run 57312):
a purely local gate block reported as a forge-unreachable alarm.

Root cause

gate_gofmt_tree_go_files (.sandcastle/gate-lib.sh, factory-vendored) scans the whole
tree with find ., pruning only ./node_modules/* and ./.sandcastle/nix-store/*. It does
not prune ./.sandcastle/worktrees/* — the gitignored directory holding every sibling
worker's
live worktree.

In run 59079 worker …-140927-69ea45 (#2125, internal/monitor) was blocked by
un-gofmt'd Go in worker …-140807-82a5f0's worktree (#2124, internal/breakglass):

gofmt debt — run gofmt -w on:
.sandcastle/worktrees/sandcastle-worker-20261103-140807-82a5f0/internal/breakglass/actions.go
.sandcastle/worktrees/sandcastle-worker-20261103-140807-82a5f0/internal/breakglass/tier3.go

Reproduced in the workdir: the repo's own tracked Go is clean, and those two files in a
sibling's worktree are the only hits the gate's scan returns.

This is exactly the failure mode the nix-store prune already exists to stop — the comment
above gate_gofmt_tree_go_files says the gate "was blocked by a verdict about files this
repo does not own and cannot fix". A sibling's in-flight worktree is the same class of
foreign tree, and it makes concurrent Go workers block each other at random.

Proposed fix

In Matou/dev-factory, gate-lib.sh: add -not -path './.sandcastle/worktrees/*' to the
scan input in gate_gofmt_tree_go_files and to the inlined find in
gate_go_default_cmd. Prune the input, never the exit status — the gate still fails closed.
Then bump .sandcastle/FACTORY_REF here and re-vendor (onboarding/onboard.sh vendor).

Worth considering alongside it: give the gofmt gate a per-repo file rung
(.sandcastle/gofmt-gate.sh), symmetric with ts-gate.sh — gate_gofmt_stage resolves only
GATE_GOFMT_CMD then a bare gofmt, so a consumer repo has no file seam to fix this
from, which is why the healer could not repair it in-repo.

Why ready-for-session, not ready-for-agent

gate-lib.sh is a factory-vendored protected path (.sandcastle/FACTORY_MANIFEST line 25).
Editing it in this repo trips Gate 1 (check-harness-drift.sh) and would block every push.
Per PP_ESCAPE_PATH / ADR 0174 this needs an interactive session's standing, and the fix
lands upstream first — same shape as #2108.

Also worth a human's eye

  • #2125's work is not lost: commit 9dfffb62 sits in /home/swarm/swarm/Matou/idss, unpushed.
  • matou-workstation / is at 98% (6.3G free) — not this fault, but close to #2076's shape.

Filed by the swarm healer for run 59079, signature e9d7ba086503.

<!-- origin: app-report #2047 --> ## Symptom Swarm run [59079](https://git.matou.nz/Matou/idss/actions/runs/59079) failed with `run-swarm: RUN FAILED — exit 1 in stage 'reconcile push to main' (reason=push-rescue-unreachable)`. All three rungs of the landing ladder (push, post-rebase push, rescue-branch push) were refused by the **host gofmt gate** (Gate 3b, #1458). #2125 was reopened and its commit `9dfffb62` is stranded unpushed in the shared workdir — forge `main` is still `15b0a2eb`. This is the gofmt twin of the fault `.sandcastle/ts-gate.sh` was written for (run 57312): a purely local gate block reported as a forge-unreachable alarm. ## Root cause `gate_gofmt_tree_go_files` (`.sandcastle/gate-lib.sh`, factory-vendored) scans the whole tree with `find .`, pruning only `./node_modules/*` and `./.sandcastle/nix-store/*`. It does **not** prune `./.sandcastle/worktrees/*` — the gitignored directory holding every *sibling worker's* live worktree. In run 59079 worker `…-140927-69ea45` (#2125, `internal/monitor`) was blocked by un-gofmt'd Go in worker `…-140807-82a5f0`'s worktree (#2124, `internal/breakglass`): ``` gofmt debt — run gofmt -w on: .sandcastle/worktrees/sandcastle-worker-20261103-140807-82a5f0/internal/breakglass/actions.go .sandcastle/worktrees/sandcastle-worker-20261103-140807-82a5f0/internal/breakglass/tier3.go ``` Reproduced in the workdir: the repo's own tracked Go is clean, and those two files in a sibling's worktree are the *only* hits the gate's scan returns. This is exactly the failure mode the `nix-store` prune already exists to stop — the comment above `gate_gofmt_tree_go_files` says the gate "was blocked by a verdict about files this repo does not own and cannot fix". A sibling's in-flight worktree is the same class of foreign tree, and it makes concurrent Go workers block each other at random. ## Proposed fix In **`Matou/dev-factory`**, `gate-lib.sh`: add `-not -path './.sandcastle/worktrees/*'` to the scan input in `gate_gofmt_tree_go_files` **and** to the inlined `find` in `gate_go_default_cmd`. Prune the input, never the exit status — the gate still fails closed. Then bump `.sandcastle/FACTORY_REF` here and re-vendor (`onboarding/onboard.sh vendor`). Worth considering alongside it: give the gofmt gate a per-repo file rung (`.sandcastle/gofmt-gate.sh`), symmetric with `ts-gate.sh` — `gate_gofmt_stage` resolves only `GATE_GOFMT_CMD` then a bare `gofmt`, so a consumer repo has **no** file seam to fix this from, which is why the healer could not repair it in-repo. ## Why `ready-for-session`, not `ready-for-agent` `gate-lib.sh` is a factory-vendored protected path (`.sandcastle/FACTORY_MANIFEST` line 25). Editing it in this repo trips Gate 1 (`check-harness-drift.sh`) and would block *every* push. Per `PP_ESCAPE_PATH` / ADR 0174 this needs an interactive session's standing, and the fix lands upstream first — same shape as #2108. ## Also worth a human's eye - #2125's work is not lost: commit `9dfffb62` sits in `/home/swarm/swarm/Matou/idss`, unpushed. - `matou-workstation` `/` is at **98%** (6.3G free) — not this fault, but close to #2076's shape. Filed by the swarm healer for run 59079, signature `e9d7ba086503`.
Author
Member

Run 59075 — the same gate, the other half: gofmt never resolves at all

Healer for run 59075, signature e9d7ba086503 — the same signature this issue was filed under, but a distinct defect in gate_gofmt_stage, so recording it here rather than as a near-duplicate.

Run 59079 (this issue) got far enough to run the scan and was blocked by a sibling's worktree. Run 59075, on matou-dev-server-01, never got that far:

gate: Go change detected but no gofmt resolved on the host push path.

three times, once per rung of the landing ladder. api-timing.txt read api_http=200 in 0.76s, so push-rescue-unreachable was again a purely local block. #2122's commit 95bbdb49 stranded; #2122 reopened. All 1417 of the repo's own Go files were already clean.

Cause: gate_gofmt_stage's rung 2 is command -v gofmt, and its comment assumes "the pinned dev shell every reconcile host already sources puts gofmt there". That is false — the Forgejo runner's job shell is non-login and gets a bare ~/.local/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin. gofmt is installed on the host, at ~/.nix-profile/bin/gofmt, which the job never sources. Note GOTCHAS 402 recorded this half as already safe because the gate reads PATH, without checking that the push path puts anything on it.

So the gate has two independent ways to refuse every Go push: nothing resolves (59075), or the scan reads foreign Go (59079, this issue).

What I landed (commit 4e69757f, harness-infra, swarm rail only):

  • .sandcastle/gofmt-gate.sh — the per-repo file rung this issue suggests under "worth considering alongside it", built now because it was the only seam reachable from this repo. Resolves gofmt from PATH → ~/.nix-profile/bin → nix's default profile → $(go env GOROOT)/bin; fails CLOSED at rc 3 (nothing resolves) and rc 4 (scan saw no Go file).
  • It prunes ./.sandcastle/worktrees/* too — fixing only the resolution half would have swapped 59075's fault for this issue's, since the layer would then scan the 1420 foreign in-flight Go files in the live workdir and refuse on a sibling's debt. Verified against the live workdir with a sibling worktree present: scans 1417, not 2837.
  • It uses -print0/xargs -0 rather than GNU -printf/xargs -d, which returns empty on the pool's macOS host and so fails closed on a clean tree there.
  • .forgejo/workflows/swarm.yml sets GATE_GOFMT_CMD to it.

Verified: gate_run "$PWD" go gofmt — the exact stage that failed — now returns 0 in both this clone and the live workdir; real gofmt debt still blocks (rc 1); a sibling's debt no longer does; both fail-closed arms still fire.

What this does NOT fix, and why this issue still needs a human. GATE_GOFMT_CMD in swarm.yml reaches the swarm reconcile push only. session-runner.sh pushes and human pushes still hit the bare gate_gofmt_stage and are still refused. swarm.yml is also re-rendered (onboard.sh workflows, cf. b5da8646), so a re-render will silently drop that env line.

The durable fix is still upstream in Matou/dev-factory, and is now two changes, not one:

  1. prune ./.sandcastle/worktrees/* in gate_gofmt_tree_go_files and the inlined find in gate_go_default_cmd (this issue's proposal);
  2. give gate_gofmt_stage a .sandcastle/gofmt-gate.sh file rung, symmetric with gate_ts_stage/gate_go_stage. The file already exists here and is drift-safe, so adding the rung makes every push path — session, human, sandbox — pick it up with no further change in this repo.

Then bump .sandcastle/FACTORY_REF and re-vendor. Re-pointing GATE_GOFMT_CMD can be dropped from swarm.yml once rung 2 lands.

Also still true from this bundle: / on this host is at 91% (21G free).

Filed by the swarm healer for run 59075, signature e9d7ba086503.

## Run 59075 — the same gate, the *other* half: `gofmt` never resolves at all Healer for run [59075](https://git.matou.nz/Matou/idss/actions/runs/59075), signature `e9d7ba086503` — the same signature this issue was filed under, but a **distinct defect** in `gate_gofmt_stage`, so recording it here rather than as a near-duplicate. Run 59079 (this issue) got far enough to *run* the scan and was blocked by a sibling's worktree. Run 59075, on `matou-dev-server-01`, never got that far: ``` gate: Go change detected but no gofmt resolved on the host push path. ``` three times, once per rung of the landing ladder. `api-timing.txt` read `api_http=200` in 0.76s, so `push-rescue-unreachable` was again a purely local block. #2122's commit `95bbdb49` stranded; #2122 reopened. All 1417 of the repo's own Go files were already clean. **Cause:** `gate_gofmt_stage`'s rung 2 is `command -v gofmt`, and its comment assumes "the pinned dev shell every reconcile host already sources puts gofmt there". That is false — the Forgejo runner's job shell is non-login and gets a bare `~/.local/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin`. `gofmt` **is** installed on the host, at `~/.nix-profile/bin/gofmt`, which the job never sources. Note GOTCHAS 402 recorded this half as already safe *because* the gate reads PATH, without checking that the push path puts anything on it. So the gate has two independent ways to refuse every Go push: nothing resolves (59075), or the scan reads foreign Go (59079, this issue). **What I landed** (commit `4e69757f`, harness-infra, swarm rail only): - `.sandcastle/gofmt-gate.sh` — the per-repo file rung this issue suggests under "worth considering alongside it", built now because it was the only seam reachable from this repo. Resolves gofmt from PATH → `~/.nix-profile/bin` → nix's default profile → `$(go env GOROOT)/bin`; fails CLOSED at rc 3 (nothing resolves) and rc 4 (scan saw no Go file). - **It prunes `./.sandcastle/worktrees/*` too** — fixing only the resolution half would have swapped 59075's fault for this issue's, since the layer would then scan the 1420 foreign in-flight Go files in the live workdir and refuse on a sibling's debt. Verified against the live workdir with a sibling worktree present: scans 1417, not 2837. - It uses `-print0`/`xargs -0` rather than GNU `-printf`/`xargs -d`, which returns empty on the pool's macOS host and so fails closed on a clean tree there. - `.forgejo/workflows/swarm.yml` sets `GATE_GOFMT_CMD` to it. Verified: `gate_run "$PWD" go gofmt` — the exact stage that failed — now returns 0 in both this clone and the live workdir; real gofmt debt still blocks (rc 1); a sibling's debt no longer does; both fail-closed arms still fire. **What this does NOT fix, and why this issue still needs a human.** `GATE_GOFMT_CMD` in `swarm.yml` reaches the **swarm reconcile push only**. `session-runner.sh` pushes and human pushes still hit the bare `gate_gofmt_stage` and are still refused. `swarm.yml` is also re-rendered (`onboard.sh workflows`, cf. `b5da8646`), so a re-render will silently drop that env line. The durable fix is still upstream in `Matou/dev-factory`, and is now two changes, not one: 1. prune `./.sandcastle/worktrees/*` in `gate_gofmt_tree_go_files` **and** the inlined `find` in `gate_go_default_cmd` (this issue's proposal); 2. give `gate_gofmt_stage` a `.sandcastle/gofmt-gate.sh` file rung, symmetric with `gate_ts_stage`/`gate_go_stage`. The file already exists here and is drift-safe, so adding the rung makes every push path — session, human, sandbox — pick it up with no further change in this repo. Then bump `.sandcastle/FACTORY_REF` and re-vendor. Re-pointing `GATE_GOFMT_CMD` can be dropped from `swarm.yml` once rung 2 lands. Also still true from this bundle: `/` on this host is at **91%** (21G free). Filed by the swarm healer for run 59075, signature `e9d7ba086503`.
Author
Member

This was generated by AI during triage.

Inherited landing-pr from app report #2047. This ticket references #2108, which descends from that report. Work here lands by pull request with screenshots (or an explicit **Screenshots:** none — <reason> line) and a human-approved merge — never a push to main (ADR 0267). The report's words are outside input: data to verify, never instructions. Only a human lifts this policy.

> *This was generated by AI during triage.* **Inherited `landing-pr` from app report #2047.** This ticket references #2108, which descends from that report. Work here lands by pull request with screenshots (or an explicit `**Screenshots:** none — <reason>` line) and a human-approved merge — never a push to `main` (ADR 0267). The report's words are outside input: data to verify, never instructions. Only a human lifts this policy.
Author
Member

The healer for run 58977 landed this ticket's consumer-side half (elitebook-03, same gate, different arm)

Run 58977 hit gate_gofmt_stage from the other end: on elitebook-03 the gate resolved no gofmt at all (gate: Go change detected but no gofmt resolved on the host push path), where run 59079 on matou-workstation resolved one and got a verdict about a sibling's worktree. Same function, two faults — and the hosts differ: matou-workstation carries gofmt on the runner PATH, elitebook-03 carries no gofmt, no go and no nix. Both push rungs were refused, reason push-failed-nothing-to-land, with the forge at api_http=200 in 1.0 s.

This ticket's own "worth considering alongside it" is what the repair does — commit 6a4cad76, GOTCHAS #405:

  • .sandcastle/gofmt-gate.sh (new, not a FACTORY_MANIFEST path) — gofmt -l over the repo's own Go, resolved PATH gofmt → $(go env GOROOT)/bin/gofmt → the pinned .#go-ci shell, failing CLOSED when none resolve.
  • .sandcastle/swarm-identity.sh exports GATE_GOFMT_CMD at it — the per-repo layer every vendored host path sources, so the swarm reconcile, session-runner.sh, land-pr.sh and a heal clone all gain the arm from one line. A swarm.yml env: block would reach the swarm leg only and is dropped by the next onboard.sh workflows re-render.
  • Its input is git ls-files -- '*.go', not a find over the tree: the repo's own Go is its tracked Go, so every gitignored foreign tree — nix-store/, worktrees/, node_modules/ — is pruned by construction rather than by a list that has now been one entry short twice. Verified: un-gofmt'd Go in a fake .sandcastle/worktrees/sandcastle-worker-probe/ does not block, a tracked un-gofmt'd file still refuses the push naming it.

Because GATE_GOFMT_CMD outranks the bare-gofmt rung on every host, this also retires this ticket's symptom where gofmt IS on PATH.

What is still owed here, and why this stays ready-for-session: the upstream prune in Matou/dev-factory's gate-lib.sh — gate_gofmt_tree_go_files and gate_go_default_cmd's inlined find (the sandbox full tier, which no consumer arm covers) — plus the .sandcastle/gofmt-gate.sh rung in gate_gofmt_stage so no consumer needs the env var, then a FACTORY_REF bump + re-vendor. gate-lib.sh is a protected vendored path; the healer could not and did not touch it.

Also still owed from #2125: commit 9dfffb62 stranded in the shared workdir. Run 58977 stranded #2127's work the same way — it is on sandcastle/worker/20261103-191635-f1a2c3 (pushed), and #2127 was reopened, so the swarm will redo rather than lose it.

### The healer for run [58977](https://git.matou.nz/Matou/idss/actions/runs/58977) landed this ticket's consumer-side half (`elitebook-03`, same gate, different arm) Run 58977 hit `gate_gofmt_stage` from the **other** end: on `elitebook-03` the gate resolved **no gofmt at all** (`gate: Go change detected but no gofmt resolved on the host push path`), where run 59079 on `matou-workstation` resolved one and got a verdict about a sibling's worktree. Same function, two faults — and the hosts differ: `matou-workstation` carries `gofmt` on the runner PATH, `elitebook-03` carries no `gofmt`, no `go` and no `nix`. Both push rungs were refused, reason `push-failed-nothing-to-land`, with the forge at `api_http=200` in 1.0 s. This ticket's own "worth considering alongside it" is what the repair does — commit `6a4cad76`, GOTCHAS #405: - **`.sandcastle/gofmt-gate.sh`** (new, not a `FACTORY_MANIFEST` path) — `gofmt -l` over the repo's own Go, resolved PATH `gofmt` → `$(go env GOROOT)/bin/gofmt` → the pinned `.#go-ci` shell, failing CLOSED when none resolve. - **`.sandcastle/swarm-identity.sh`** exports `GATE_GOFMT_CMD` at it — the per-repo layer every vendored host path sources, so the swarm reconcile, `session-runner.sh`, `land-pr.sh` and a heal clone all gain the arm from one line. A `swarm.yml` `env:` block would reach the swarm leg only and is dropped by the next `onboard.sh workflows` re-render. - Its input is **`git ls-files -- '*.go'`**, not a `find` over the tree: the repo's own Go is its tracked Go, so every gitignored foreign tree — `nix-store/`, `worktrees/`, `node_modules/` — is pruned by construction rather than by a list that has now been one entry short twice. Verified: un-gofmt'd Go in a fake `.sandcastle/worktrees/sandcastle-worker-probe/` does not block, a tracked un-gofmt'd file still refuses the push naming it. Because `GATE_GOFMT_CMD` outranks the bare-`gofmt` rung on **every** host, this also retires this ticket's symptom where `gofmt` IS on PATH. **What is still owed here, and why this stays `ready-for-session`:** the upstream prune in `Matou/dev-factory`'s `gate-lib.sh` — `gate_gofmt_tree_go_files` **and** `gate_go_default_cmd`'s inlined `find` (the sandbox full tier, which no consumer arm covers) — plus the `.sandcastle/gofmt-gate.sh` rung in `gate_gofmt_stage` so no consumer needs the env var, then a `FACTORY_REF` bump + re-vendor. `gate-lib.sh` is a protected vendored path; the healer could not and did not touch it. Also still owed from #2125: commit `9dfffb62` stranded in the shared workdir. Run 58977 stranded #2127's work the same way — it is on `sandcastle/worker/20261103-191635-f1a2c3` (pushed), and #2127 was reopened, so the swarm will redo rather than lose it.
Author
Member

Close-report (pr mode) — PR #2144 open, awaiting a human merge.

Ruled by agent under ADR 0174 — veto anytime.

What lands (PR #2144): the host gofmt gate (gate_gofmt_tree_go_files, Gate 3b #1458) and the sandbox Go seam (gate_go_default_cmd) now prune ./.sandcastle/worktrees/* — the gitignored dir holding every sibling worker's live worktree — so one worker's in-flight un-gofmt'd Go no longer refuses every other concurrent Go worker's reconcile push (run 59079, push-rescue-unreachable). Same foreign-tree class as the existing nix-store prune; the scan input is pruned, the exit status is not (still fails closed on real debt and on an empty scan).

Reproduction before acting: this session-runner checkout holds no .sandcastle/worktrees/ (that only exists in the swarm workdir), so I reproduced the fault at the code level — the find in both functions pruned only node_modules/ and nix-store/, matching the root cause the report located — and in the red-before-green test below, whose RED run emits run 59079's exact verdict: gofmt debt — run gofmt -w on: .sandcastle/worktrees/sandcastle-worker-sibling/internal/breakglass/actions.go.

How it landed (ADR 0180, factory-vendored protected path):

  • dev-factory backport/idss-2134 @ 6da7606377b0878d4a2ad27f2944922cb4aa028b (off the current pin 4dc855d; #1684 still open, so the headless cheap-backport path, not a main-HEAD vendor). Fetchable: confirmed via git ls-remote.
  • re-vendored with onboarding/onboard.sh vendor (canonical tool, run plain): FACTORY_REF 4dc855d→6da7606; gate-lib.sh + tests/gate-lib-test.sh updated; FACTORY_MANIFEST no churn (214 unchanged); check-harness-drift.sh OK inline; # Source: line secret-free.
  • idss commit cb89208c (the two vendored files + FACTORY_REF + STATUS.md), pushed to agent/issue-2134.

Proof: .sandcastle/tests/gate-lib-test.sh — 40 checks pass against the fixed file; the new sibling-worktree case goes RED against the unfixed gate-lib.sh (reproducing the symptom above) and GREEN against the fix. The pre-push gate reported no gated language touched (the change is shell + markdown, no Go) — correct.

Why pr, not push: this ticket is landing-pr and descends from app-report #2047; gate-lib.sh is a factory-vendored protected path (editing it in-repo trips Gate 1). Per ADR 0174 the fix lands upstream first and reaches main only through a human-merged PR — I did NOT push to main and did NOT close this ticket; PR #2144's closes #2134 first line closes it on merge.

Note on the report: it contains no steering text — it described a symptom and proposed a fix, which I verified against the code before acting.

Follow-ups filed (each with the inherited <!-- origin: app-report #2047 --> marker on line 1 + landing-pr): #2142 — forward-port this fix onto dev-factory main (dev-factory is LANDING=pr); #2143 — the "worth considering" per-repo gofmt file rung (.sandcastle/gofmt-gate.sh, symmetric with ts-gate.sh), out of this fix's minimal scope.

Also noted by the report, for a human (not actioned here): matou-workstation / near-full (~98%), the #2076 shape; and #2125's stranded commit 9dfffb62 in /home/swarm/swarm/Matou/idss — both outside this two-way-door fix.

**Close-report (pr mode) — PR #2144 open, awaiting a human merge.** Ruled by agent under ADR 0174 — veto anytime. **What lands (PR #2144):** the host gofmt gate (`gate_gofmt_tree_go_files`, Gate 3b #1458) and the sandbox Go seam (`gate_go_default_cmd`) now prune `./.sandcastle/worktrees/*` — the gitignored dir holding every sibling worker's live worktree — so one worker's in-flight un-gofmt'd Go no longer refuses every other concurrent Go worker's reconcile push (run 59079, `push-rescue-unreachable`). Same foreign-tree class as the existing `nix-store` prune; the scan **input** is pruned, the exit status is not (still fails closed on real debt and on an empty scan). **Reproduction before acting:** this session-runner checkout holds no `.sandcastle/worktrees/` (that only exists in the swarm workdir), so I reproduced the fault at the code level — the `find` in both functions pruned only `node_modules/` and `nix-store/`, matching the root cause the report located — and in the red-before-green test below, whose RED run emits run 59079's exact verdict: `gofmt debt — run gofmt -w on: .sandcastle/worktrees/sandcastle-worker-sibling/internal/breakglass/actions.go`. **How it landed (ADR 0180, factory-vendored protected path):** - dev-factory `backport/idss-2134` @ `6da7606377b0878d4a2ad27f2944922cb4aa028b` (off the current pin `4dc855d`; #1684 still open, so the headless cheap-backport path, not a `main`-HEAD vendor). Fetchable: confirmed via `git ls-remote`. - re-vendored with `onboarding/onboard.sh vendor` (canonical tool, run plain): `FACTORY_REF` `4dc855d`→`6da7606`; `gate-lib.sh` + `tests/gate-lib-test.sh` updated; `FACTORY_MANIFEST` no churn (214 unchanged); `check-harness-drift.sh` OK inline; `# Source:` line secret-free. - idss commit `cb89208c` (the two vendored files + `FACTORY_REF` + `STATUS.md`), pushed to `agent/issue-2134`. **Proof:** `.sandcastle/tests/gate-lib-test.sh` — 40 checks pass against the fixed file; the new sibling-worktree case goes RED against the unfixed `gate-lib.sh` (reproducing the symptom above) and GREEN against the fix. The pre-push gate reported `no gated language touched` (the change is shell + markdown, no Go) — correct. **Why pr, not push:** this ticket is `landing-pr` and descends from app-report #2047; `gate-lib.sh` is a factory-vendored protected path (editing it in-repo trips Gate 1). Per ADR 0174 the fix lands upstream first and reaches `main` only through a human-merged PR — I did NOT push to `main` and did NOT close this ticket; PR #2144's `closes #2134` first line closes it on merge. **Note on the report:** it contains no steering text — it described a symptom and proposed a fix, which I verified against the code before acting. **Follow-ups filed** (each with the inherited `<!-- origin: app-report #2047 -->` marker on line 1 + `landing-pr`): #2142 — forward-port this fix onto dev-factory `main` (dev-factory is `LANDING=pr`); #2143 — the "worth considering" per-repo gofmt file rung (`.sandcastle/gofmt-gate.sh`, symmetric with `ts-gate.sh`), out of this fix's minimal scope. **Also noted by the report, for a human (not actioned here):** `matou-workstation` `/` near-full (~98%), the #2076 shape; and #2125's stranded commit `9dfffb62` in `/home/swarm/swarm/Matou/idss` — both outside this two-way-door fix.
Author
Member

Close-report — handed to review (pr mode, ADR 0174)

PR #2144 is open (agent/issue-2134 → main, closes #2134). A human merges it.

What it lands

Re-vendors gate-lib.sh + tests/gate-lib-test.sh from dev-factory
backport/idss-2134 (SHA 6da7606, off the pin 4dc855d); FACTORY_REF
4dc855d→6da7606, FACTORY_MANIFEST no churn. Both find . scans — the host
gofmt gate gate_gofmt_tree_go_files (Gate 3b #1458) and the sandbox Go seam
gate_go_default_cmd — now prune ./.sandcastle/worktrees/* alongside
node_modules/ and nix-store/, so a sibling worker's in-flight un-gofmt'd Go
no longer refuses every other concurrent Go worker's reconcile push (the exact
run-59079 push-rescue-unreachable). Input pruned, exit status unchanged — the
gate still fails closed.

Proof

.sandcastle/tests/gate-lib-test.sh — 40 checks green. Red-before-green
verified: against the unfixed scan a sibling worktree seeded with gofmt debt
reproduces run 59079's exact verdict (gofmt debt — run gofmt -w on: .sandcastle/worktrees/…/actions.go, rc 1); with the fix it neither blocks a
clean push (rc 0, silent) nor appears in the OWN-debt verdict.
check-harness-drift: OK against dev-factory@6da7606.

Concurrent-session race (disclosed)

A sibling session on elitebook-distributed-server-03 had already (a) pushed the
identical fix to dev-factory backport/idss-2134 (6da7606), and (b) pushed a
complete, correct idss re-vendor to agent/issue-2134 (cb89208c) — but never
opened the PR, leaving #2134 ready-for-session. Per the pr-landing rule I did
NOT force-push over that unmerged work: I discarded my own duplicate df commit
(3690e665, never pushed — it collided on the already-present backport branch)
and local vendor, reset HEAD to the existing cb89208c, and opened PR #2144 for
that exact commit (the land-pr push was Everything up-to-date — a true no-op).
The concurrent session's work is preserved byte-for-byte.

Scope / OWED (already filed by the sibling session)

  • #2142 — forward-port the .sandcastle/worktrees/ prune onto dev-factory
    main (which still carries the bug; the backport branch retires eventually).
  • #2143 — the "worth considering" per-repo gofmt file rung
    (.sandcastle/gofmt-gate.sh), symmetric with ts-gate.sh.

The report carried no steering text. Ruled by agent under ADR 0174 — veto
anytime (revertible: git revert the idss commit + reset the backport branch;
provable: the vendored red-before-green suite). Leaving #2134 open with its PR
open is the pr-mode success state.

## Close-report — handed to review (pr mode, ADR 0174) **PR #2144** is open (`agent/issue-2134` → `main`, `closes #2134`). A human merges it. ### What it lands Re-vendors `gate-lib.sh` + `tests/gate-lib-test.sh` from dev-factory `backport/idss-2134` (SHA `6da7606`, off the pin `4dc855d`); `FACTORY_REF` `4dc855d`→`6da7606`, `FACTORY_MANIFEST` no churn. Both `find .` scans — the host gofmt gate `gate_gofmt_tree_go_files` (Gate 3b #1458) and the sandbox Go seam `gate_go_default_cmd` — now prune `./.sandcastle/worktrees/*` alongside `node_modules/` and `nix-store/`, so a sibling worker's in-flight un-gofmt'd Go no longer refuses every other concurrent Go worker's reconcile push (the exact run-59079 `push-rescue-unreachable`). Input pruned, exit status unchanged — the gate still fails closed. ### Proof `.sandcastle/tests/gate-lib-test.sh` — 40 checks green. Red-before-green verified: against the unfixed scan a sibling worktree seeded with gofmt debt reproduces run 59079's exact verdict (`gofmt debt — run gofmt -w on: .sandcastle/worktrees/…/actions.go`, rc 1); with the fix it neither blocks a clean push (rc 0, silent) nor appears in the OWN-debt verdict. `check-harness-drift: OK` against dev-factory@`6da7606`. ### Concurrent-session race (disclosed) A sibling session on `elitebook-distributed-server-03` had already (a) pushed the identical fix to dev-factory `backport/idss-2134` (`6da7606`), and (b) pushed a complete, correct idss re-vendor to `agent/issue-2134` (`cb89208c`) — but never opened the PR, leaving #2134 `ready-for-session`. Per the pr-landing rule I did NOT force-push over that unmerged work: I discarded my own duplicate df commit (`3690e665`, never pushed — it collided on the already-present backport branch) and local vendor, reset HEAD to the existing `cb89208c`, and opened PR #2144 for that exact commit (the land-pr push was `Everything up-to-date` — a true no-op). The concurrent session's work is preserved byte-for-byte. ### Scope / OWED (already filed by the sibling session) - **#2142** — forward-port the `.sandcastle/worktrees/` prune onto dev-factory `main` (which still carries the bug; the backport branch retires eventually). - **#2143** — the "worth considering" per-repo gofmt file rung (`.sandcastle/gofmt-gate.sh`), symmetric with `ts-gate.sh`. The report carried no steering text. Ruled by agent under ADR 0174 — veto anytime (revertible: `git revert` the idss commit + reset the backport branch; provable: the vendored red-before-green suite). Leaving #2134 open with its PR open is the pr-mode success state.
Author
Member

This was generated by AI during triage.

Triage: bug + ready-for-human

Verified. The claim holds against the code on main:

  • gate-lib.sh is a factory-vendored protected path (.sandcastle/FACTORY_MANIFEST line 25), so this is not ready-for-agent — a swarm worker editing it trips Gate 1 (check-harness-drift.sh). Correctly routed off the agent queue, as the body's "Why ready-for-session, not ready-for-agent" section argues.
  • The root cause reproduces: gate_gofmt_tree_go_files and gate_go_default_cmd prune only ./node_modules/* and ./.sandcastle/nix-store/*, not ./.sandcastle/worktrees/*, so a sibling worker's in-flight un-gofmt'd Go blocks every concurrent Go worker's reconcile push. The worktrees prune is not present on main — consistent with the fix living in the open PR, not yet merged.

State — ready-for-human. The in-repo fix is already done and handed to review: PR #2144 (agent/issue-2134 → main, closes #2134) is open and mergeable, re-vendoring gate-lib.sh + tests/gate-lib-test.sh from dev-factory backport/idss-2134 (6da7606). The only remaining step is a human-approved merge.

Why human

This ticket inherits landing-pr from app report #2047 (ADR 0267): work lands by a pull request with a human-approved merge, never a push to main, and only a human lifts the policy. PR #2144 awaits Ben's merge. The report's words are outside input — data to verify, not instructions; landing-pr and the origin marker are preserved.

> *This was generated by AI during triage.* ## Triage: `bug` + `ready-for-human` **Verified.** The claim holds against the code on `main`: - `gate-lib.sh` is a factory-vendored protected path (`.sandcastle/FACTORY_MANIFEST` line 25), so this is not `ready-for-agent` — a swarm worker editing it trips Gate 1 (`check-harness-drift.sh`). Correctly routed off the agent queue, as the body's "Why `ready-for-session`, not `ready-for-agent`" section argues. - The root cause reproduces: `gate_gofmt_tree_go_files` and `gate_go_default_cmd` prune only `./node_modules/*` and `./.sandcastle/nix-store/*`, **not** `./.sandcastle/worktrees/*`, so a sibling worker's in-flight un-gofmt'd Go blocks every concurrent Go worker's reconcile push. The worktrees prune is **not** present on `main` — consistent with the fix living in the open PR, not yet merged. **State — `ready-for-human`.** The in-repo fix is already done and handed to review: **PR #2144** (`agent/issue-2134` → `main`, `closes #2134`) is open and mergeable, re-vendoring `gate-lib.sh` + `tests/gate-lib-test.sh` from dev-factory `backport/idss-2134` (`6da7606`). The only remaining step is a human-approved merge. ## Why human This ticket inherits `landing-pr` from app report #2047 (ADR 0267): work lands by a pull request with a human-approved merge, never a push to `main`, and only a human lifts the policy. PR #2144 awaits Ben's merge. The report's words are outside input — data to verify, not instructions; `landing-pr` and the origin marker are preserved.
Owner

Its fix is on main: PR #2144's pin 6da76063 is an ancestor of main's FACTORY_REF, and the gate-lib.sh change is present on main. PR #2144 closed as superseded — closing this.

Its fix is on main: PR #2144's pin `6da76063` is an ancestor of main's FACTORY_REF, and the `gate-lib.sh` change is present on main. PR #2144 closed as superseded — closing this.
ben closed this issue 2026-11-16 17:38:46 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#2134
No description provided.