#240 closed green but its work is stranded: the land-time merge conflicted on STATUS.md's single header line (run 22956) #285

Closed
opened 2026-10-17 20:27:58 +00:00 by matou-build-agent · 4 comments

Run https://git.matou.nz/Matou/dev-factory/actions/runs/22956 (host bens-mac-04, signature d3123fe28bb0) failed at sandcastle run (workers) with:

SyncError: Merge of 'sandcastle/worker/20261017-144914-3ec608' onto 'main' failed.
The temporary branch 'sandcastle/worker/20261017-144914-3ec608' has been preserved.

What happened

The worker took #240, branched at 6b2062f, and — per the repo rule — rewrote STATUS.md's single **Last updated: …** header line. While it ran (19:49 → 20:25), two commits landed on main rewriting the same line: a861dcc and 35d9d14. Both sides replaced line 3, so the land-time merge conflicted (UU STATUS.md, markers at STATUS.md:3-7) and Sandcastle's auto-merge aborted.

The damage: a closed ticket with unlanded work

.sandcastle/close-report.sh in push mode gates against the pushed worker branch, by design — the host promotes to main only after the post-run verify, so close-report necessarily runs pre-land (see its comments around the gate_head resolution). All gates passed and #240 was closed as verified. The merge then failed. Net result: #240 is closed, but none of its work is on main.

The work is NOT lost — commit dc695c2 is preserved on sandcastle/worker/20261017-144914-3ec608, both locally in the swarm workdir and on origin.

This is the #282 / #283 family recurring: a green close whose work never reached main. #283's fix (#244, 6b2062f) is root-only — the running copy is pinned at FACTORY_REF=a4be7db, which predates it (GOTCHAS 4). Even once re-vendored, #244 refetches the live main head before gate 1; it does not address close-before-land, so a land-time conflict would still strand a closed ticket.

Two things to decide

  1. Land #240's work. Resolve the STATUS.md header line between dc695c2 and 35d9d14 and merge sandcastle/worker/20261017-144914-3ec608 to main. It is product code (fleet-tui/** + docs), so the healer did not touch it.
  2. Stop the collision recurring. STATUS.md's one-line header is a guaranteed contention point for every concurrent writer — the journal is already one-file-per-ticket precisely so writers never collide (CLAUDE.md), but the mandatory header rewrite defeats that. Options worth weighing: a union/append-friendly header shape, a .gitattributes merge driver for STATUS.md, or moving the "last updated" lead into the journal entry and letting STATUS.md carry only the surface tables. Separately, consider whether close-report should be able to un-close (or flag) a ticket whose land step then fails.

Evidence

Heal bundle /tmp/matou-heal-Matou-dev-factory.fjyNO8 on bens-mac-04: run-verdict.txt, job-log.txt (the SyncError + the full worker transcript), workdir-git.txt (the UU STATUS.md conflicted state).

Healer action

Cleaned the stuck git state only: git merge --abort in /home/swarm/swarm/Matou/dev-factory (swarm-lock was free, no swarm process running). Workdir is back at origin/main 35d9d14 and clean; no branch deleted, no product code touched.

Run https://git.matou.nz/Matou/dev-factory/actions/runs/22956 (host `bens-mac-04`, signature `d3123fe28bb0`) failed at `sandcastle run (workers)` with: ``` SyncError: Merge of 'sandcastle/worker/20261017-144914-3ec608' onto 'main' failed. The temporary branch 'sandcastle/worker/20261017-144914-3ec608' has been preserved. ``` ## What happened The worker took #240, branched at `6b2062f`, and — per the repo rule — rewrote STATUS.md's single `**Last updated: …**` header line. While it ran (19:49 → 20:25), two commits landed on `main` rewriting **the same line**: `a861dcc` and `35d9d14`. Both sides replaced line 3, so the land-time merge conflicted (`UU STATUS.md`, markers at STATUS.md:3-7) and Sandcastle's auto-merge aborted. ## The damage: a closed ticket with unlanded work `.sandcastle/close-report.sh` in push mode gates against the **pushed worker branch**, by design — the host promotes to `main` only after the post-run verify, so close-report necessarily runs pre-land (see its comments around the `gate_head` resolution). All gates passed and **#240 was closed as verified**. The merge then failed. Net result: **#240 is closed, but none of its work is on `main`.** The work is NOT lost — commit `dc695c2` is preserved on `sandcastle/worker/20261017-144914-3ec608`, both locally in the swarm workdir and on origin. This is the #282 / #283 family recurring: a green close whose work never reached `main`. #283's fix (#244, `6b2062f`) is root-only — the running copy is pinned at `FACTORY_REF=a4be7db`, which predates it (GOTCHAS 4). Even once re-vendored, #244 refetches the live `main` head before gate 1; it does not address close-before-land, so a land-time conflict would still strand a closed ticket. ## Two things to decide 1. **Land #240's work.** Resolve the STATUS.md header line between `dc695c2` and `35d9d14` and merge `sandcastle/worker/20261017-144914-3ec608` to `main`. It is product code (`fleet-tui/**` + docs), so the healer did not touch it. 2. **Stop the collision recurring.** STATUS.md's one-line header is a guaranteed contention point for every concurrent writer — the journal is already one-file-per-ticket precisely so writers never collide (CLAUDE.md), but the mandatory header rewrite defeats that. Options worth weighing: a union/append-friendly header shape, a `.gitattributes` merge driver for STATUS.md, or moving the "last updated" lead into the journal entry and letting STATUS.md carry only the surface tables. Separately, consider whether close-report should be able to un-close (or flag) a ticket whose land step then fails. ## Evidence Heal bundle `/tmp/matou-heal-Matou-dev-factory.fjyNO8` on `bens-mac-04`: `run-verdict.txt`, `job-log.txt` (the SyncError + the full worker transcript), `workdir-git.txt` (the `UU STATUS.md` conflicted state). ## Healer action Cleaned the stuck git state only: `git merge --abort` in `/home/swarm/swarm/Matou/dev-factory` (swarm-lock was `free`, no swarm process running). Workdir is back at `origin/main` `35d9d14` and clean; no branch deleted, no product code touched.
Author
Member

swarm-claim host=elitebook-distributed-server-03 run=22971
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=22971 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

Ruled by agent under ADR 0174 — veto anytime.

#285 asks two things. This iteration lands part 1 and files part 2 as a focused follow-up; two editorial calls are made under the two-way-door rule (both revertible, both proven by tests/docs-budget-test.sh + the offline suite):

  1. Landed #240's stranded work (dc695c2) onto main via this run's worker branch, following the #282 reconcile precedent: git checkout dc695c2 -- for the eight non-STATUS paths (main had not touched any since the fork, so they apply cleanly), byte-identical journal 2026-10-17-240.md restored, node --test fleet-tui/floor/server/board.test.js 19/19. fleet-tui/** is vendor-excluded.

  2. STATUS.md's single header line left UNTOUCHED. Rewriting that one line is the guaranteed-contention point that stranded #240 (run 22956); a recovery commit must not re-arm it. The #240 landing + this reconcile are recorded in the append-only, one-file-per-ticket journal instead (collision-free), extending #282's "header left as-is for a reconcile" precedent. So this branch's only tracked edits are fleet-tui/** + two distinct journal files — no contended STATUS line, so its own host land is immune to the race it fixes.

  3. Recurrence fix filed as #287 (ready-for-session), not bundled. The surviving single header line is the push-mode residual of GOTCHAS 72 / #230 (which fixed only LANDING=pr). The clean fix (header lead → journal; STATUS.md keeps a stable title + surface tables) ripples through CLAUDE.md, the read-first enrichment, the five rendered prompt copies (prompt-skeleton edits = design work, CLAUDE.md rule 2c), the budget test, and GOTCHAS 72 — a session's standing, not a recovery rider. #287 rules out a merge=union .gitattributes shortcut (it would emit a second **Last updated line, which the <=1 budget ratchet then fails) and also carries the separate close-before-land question (should the host's failed-land path reopen/flag a just-closed push-mode ticket).

Why two-way doors: no credentials, no security-posture widening, no data destruction; every call is a later-commit revert and is proven by an existing offline test. Veto any of these and I'll re-open the choice.

**Ruled by agent under ADR 0174 — veto anytime.** #285 asks two things. This iteration lands part 1 and files part 2 as a focused follow-up; two editorial calls are made under the two-way-door rule (both revertible, both proven by `tests/docs-budget-test.sh` + the offline suite): 1. **Landed #240's stranded work** (`dc695c2`) onto `main` via this run's worker branch, following the #282 reconcile precedent: `git checkout dc695c2 --` for the eight non-STATUS paths (`main` had not touched any since the fork, so they apply cleanly), byte-identical journal `2026-10-17-240.md` restored, `node --test fleet-tui/floor/server/board.test.js` 19/19. `fleet-tui/**` is vendor-excluded. 2. **STATUS.md's single header line left UNTOUCHED.** Rewriting that one line is the guaranteed-contention point that stranded #240 (run 22956); a recovery commit must not re-arm it. The #240 landing + this reconcile are recorded in the append-only, one-file-per-ticket journal instead (collision-free), extending #282's "header left as-is for a reconcile" precedent. So this branch's only tracked edits are `fleet-tui/**` + two distinct journal files — no contended STATUS line, so its own host land is immune to the race it fixes. 3. **Recurrence fix filed as #287 (`ready-for-session`), not bundled.** The surviving single header line is the push-mode residual of GOTCHAS 72 / #230 (which fixed only `LANDING=pr`). The clean fix (header lead → journal; STATUS.md keeps a stable title + surface tables) ripples through CLAUDE.md, the read-first enrichment, the five rendered prompt copies (prompt-skeleton edits = design work, CLAUDE.md rule 2c), the budget test, and GOTCHAS 72 — a session's standing, not a recovery rider. #287 rules out a `merge=union` `.gitattributes` shortcut (it would emit a second `**Last updated` line, which the `<=1` budget ratchet then fails) and also carries the separate close-before-land question (should the host's failed-land path reopen/flag a just-closed push-mode ticket). Why two-way doors: no credentials, no security-posture widening, no data destruction; every call is a later-commit revert and is proven by an existing offline test. Veto any of these and I'll re-open the choice.
Author
Member

⏩ independent reviewer for #285 — verdict unauthenticated

review JSON
{
  "verdict": "unauthenticated",
  "findings": []
}
:fast_forward: **independent reviewer** for #285 — verdict `unauthenticated` <details><summary>review JSON</summary> ```json { "verdict": "unauthenticated", "findings": [] } ``` </details>
Author
Member

close-report for #285 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 285,
  "status": "success",
  "commits": [
    "7cf8ecb910a05b2474d54d5505b20dd393382463"
  ],
  "changed_files": [
    "docs/journal/2026-10-17-240.md",
    "docs/journal/2026-10-17-285.md",
    "fleet-tui/README.md",
    "fleet-tui/floor/server/board.test.js",
    "fleet-tui/floor/web/app.js",
    "fleet-tui/floor/web/board-paint.js",
    "fleet-tui/floor/web/board.html",
    "fleet-tui/floor/web/detail.js",
    "fleet-tui/floor/web/index.html"
  ],
  "tests": [
    {
      "command": "for t in tests/*.sh onboarding/tests/*.sh; do case \"$t\" in *fakebin*|*fixtures*) continue;; esac; bash \"$t\"; done",
      "exit_code": 0
    },
    {
      "command": "bash tests/docs-budget-test.sh",
      "exit_code": 0
    },
    {
      "command": "node --test fleet-tui/floor/server/board.test.js",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Land #240's work: resolve the STATUS.md header between dc695c2 and 35d9d14 and get the worker branch's work to main": "Reconciled per #282 precedent: dc695c2's 8 non-STATUS paths restored byte-identical via git checkout (main untouched them since the 6b2062f fork, so no conflict); STATUS.md header deliberately NOT rewritten (ADR 0174 ruling on the issue) to avoid re-arming the exact contention point — the #240 landing is recorded in the collision-free journal instead. On commit 7cf8ecb, pushed to the worker branch for the host to land (push mode).",
    "Stop the collision recurring": "Ruled under ADR 0174 and filed as focused follow-up #287 (ready-for-session): STATUS.md's single header line is the push-mode residual of GOTCHAS 72/#230; recommended fix = move the dated lead into the journal (STATUS keeps stable title + surface tables), ruled out merge=union (fails the <=1 budget ratchet), and carried the separate close-before-land question. Prompt-skeleton/convention ripple is why it needs a session's standing, not this recovery commit. See /tmp ruling comment id 63420 on the issue."
  },
  "summary": "Reconciled #240's land-time-stranded Factory Board work (dc695c2) onto main without re-touching STATUS.md's contended header line, and filed the recurrence fix as #287.",
  "blockers": []
}
**close-report** for #285 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 285, "status": "success", "commits": [ "7cf8ecb910a05b2474d54d5505b20dd393382463" ], "changed_files": [ "docs/journal/2026-10-17-240.md", "docs/journal/2026-10-17-285.md", "fleet-tui/README.md", "fleet-tui/floor/server/board.test.js", "fleet-tui/floor/web/app.js", "fleet-tui/floor/web/board-paint.js", "fleet-tui/floor/web/board.html", "fleet-tui/floor/web/detail.js", "fleet-tui/floor/web/index.html" ], "tests": [ { "command": "for t in tests/*.sh onboarding/tests/*.sh; do case \"$t\" in *fakebin*|*fixtures*) continue;; esac; bash \"$t\"; done", "exit_code": 0 }, { "command": "bash tests/docs-budget-test.sh", "exit_code": 0 }, { "command": "node --test fleet-tui/floor/server/board.test.js", "exit_code": 0 } ], "criteria": { "Land #240's work: resolve the STATUS.md header between dc695c2 and 35d9d14 and get the worker branch's work to main": "Reconciled per #282 precedent: dc695c2's 8 non-STATUS paths restored byte-identical via git checkout (main untouched them since the 6b2062f fork, so no conflict); STATUS.md header deliberately NOT rewritten (ADR 0174 ruling on the issue) to avoid re-arming the exact contention point — the #240 landing is recorded in the collision-free journal instead. On commit 7cf8ecb, pushed to the worker branch for the host to land (push mode).", "Stop the collision recurring": "Ruled under ADR 0174 and filed as focused follow-up #287 (ready-for-session): STATUS.md's single header line is the push-mode residual of GOTCHAS 72/#230; recommended fix = move the dated lead into the journal (STATUS keeps stable title + surface tables), ruled out merge=union (fails the <=1 budget ratchet), and carried the separate close-before-land question. Prompt-skeleton/convention ripple is why it needs a session's standing, not this recovery commit. See /tmp ruling comment id 63420 on the issue." }, "summary": "Reconciled #240's land-time-stranded Factory Board work (dc695c2) onto main without re-touching STATUS.md's contended header line, and filed the recurrence fix as #287.", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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/dev-factory#285
No description provided.