STATUS.md is at budget (16382/16384 B), so every writer must trim a shared row — the #287 "writers touch different rows" invariant no longer holds and concurrent state commits park on rescue branches #374

Closed
opened 2026-11-19 21:03:32 +00:00 by matou-build-agent · 4 comments

Filed by the swarm healer for run
https://git.matou.nz/Matou/dev-factory/actions/runs/28910 (signature
e9d7ba086503, host matou-dev-server-01, stage=reconcile push to main,
reason=push-parked-on-rescue). Not repaired — the fix is in factory source at
the repo root, which the healer charter forbids it to touch. A root fix does
not reach the running .sandcastle/ copy until a human re-vendors

(.sandcastle/FACTORY_REF is currently 9fd804b).

What happened

#373's worker ran 19:56–20:46Z on matou-dev-server-01 and committed
108baac. While it ran, 44e5984 (ci: #370 — a queued ci run that a newer push has overtaken…, a human push) landed on main. At 20:50:23Z reconcile
rebased and hit

Rebasing (1/1)Auto-merging STATUS.md
CONFLICT (content): Merge conflict in STATUS.md
error: could not apply 108baac... sandcastle: #373 — live dispatcher holds a host …

The #207 resolver ran (~20:50:23 → 20:57:31Z) and returned the ladder's
failed default, so the run parked 108baac on
sandcastle/rescue-20261119-205729, reopened #373, and exited 1.
No work is lost — the rescue branch carries the full commit (7 files,
fleet-dispatch-lib.sh, fleet-dispatch.sh, both tests, the deploy doc, the
journal entry, the STATUS.md row) and #373 is open again. The shared workdir's
diverged main self-heals: swarm.yml:269 hard-resets to origin/main every
run.

Root cause — STATUS.md has no headroom, so writers can no longer touch

different rows

git show of both sides shows one conflicting hunk, the same single line —
the #353 blocker row at @@ -35,7 +35,7 @@. Both sides rewrote it, and from
the worker's own log (worker-logs.txt:43):

STATUS.md is at 16381/16384 bytes — essentially no headroom. I must trim the
#353 row to afford the update.

tests/docs-budget-test.sh sets STATUS_MAX=16384; origin/main's STATUS.md is
16382 bytes — 2 bytes of headroom. The whole concurrency design rests on the
#287 invariant that STATUS.md "changes only via the surface rows below (writers
touch different rows)" — the very reason .gitattributes deliberately does NOT
give it merge=union the way #300 gave docs/GOTCHAS.md. At the byte ceiling
that invariant is unreachable: a writer cannot extend its own row without
trimming someone else's, so every state-changing commit is forced onto a
shared anchor and two concurrent writers produce divergent one-line edits that
no 3-way merge can resolve.

This is not a one-off. All four of today's rescue branches touch STATUS.md:
rescue-20261119-192442 (STATUS.md only — its commit 2205aec is literally
titled "status: trim the #353 row back under the docs budget"),
-202558, -204522, -205729. The 2205aec title shows the trimming is
already a recurring manual chore.

Exact precedent: #331 ("docs/GOTCHAS.md index is at budget (24445/24576 B) —
compact rows or raise GOTCHAS_MAX…"), closed. STATUS.md is now in the same
state.

Fault 2 (same chain) — the resolver prompt describes a STATUS.md that no

longer exists

landing_resolve_rebase_with_claude (landing-lib.sh:502) tells the resolver:

for STATUS.md keep both milestone-log entries (newest first) and merge the
one-line header so it reflects the newest state plus any facts only one side
carries

Since #196/#287 STATUS.md has no milestone log and no one-line header — the
milestone log moved to docs/journal/milestone-log.md and
tests/docs-budget-test.sh:91 asserts STATUS.md carries no **Last updated
lead at all. So on the one surface the prompt names, it describes the pre-#196
file and says nothing about what the resolver actually faces now: divergent
edits to one per-ticket blocker row, under a byte budget with 2 bytes spare.
Re-testing a resolution also runs docs-budget-test.sh, so a merge that keeps
both sides' text fails closed. Even a correct resolver is nearly unable to win
here, which is why this parks and pages rather than resolving.

Suggested scope

  1. Give STATUS.md real headroom — compact the blocker rows (the #305, #301
    and #353 rows are each ~2–4 KB of prose that reads like a journal entry,
    not a status surface; docs/journal/ is their home) and/or raise
    STATUS_MAX, the way #331 did for GOTCHAS_MAX. Decide which, with the
    #287 invariant stated as the acceptance criterion: a writer must be able to
    update its own row without touching another's.
  2. Update the resolver prompt's STATUS.md guidance to the post-#196/#287 shape
    (merge per-ticket rows, keep both sides' facts, re-trim to stay under the
    docs budget). Prompt text is high-blast-radius (CLAUDE.md) — treat as design
    work, root + vendored copy together.

Consider whether a budget floor check (fail CI when headroom drops below N
bytes) belongs here, so the surface can never silently reach the state where the
concurrency design stops holding.

Evidence

/tmp/matou-heal-Matou-dev-factory.rgGBoD on matou-workstation —
run-verdict.txt, job-log.txt (job 2), worker-logs.txt:43, workdir-git.txt.

Filed by the swarm healer for run https://git.matou.nz/Matou/dev-factory/actions/runs/28910 (signature `e9d7ba086503`, host `matou-dev-server-01`, `stage=reconcile push to main`, `reason=push-parked-on-rescue`). Not repaired — the fix is in factory source at the repo root, which the healer charter forbids it to touch. **A root fix does not reach the running `.sandcastle/` copy until a human re-vendors** (`.sandcastle/FACTORY_REF` is currently `9fd804b`). ## What happened `#373`'s worker ran 19:56–20:46Z on `matou-dev-server-01` and committed `108baac`. While it ran, `44e5984` (`ci: #370 — a queued ci run that a newer push has overtaken…`, a human push) landed on `main`. At 20:50:23Z reconcile rebased and hit ``` Rebasing (1/1)Auto-merging STATUS.md CONFLICT (content): Merge conflict in STATUS.md error: could not apply 108baac... sandcastle: #373 — live dispatcher holds a host … ``` The #207 resolver ran (~20:50:23 → 20:57:31Z) and returned the ladder's `failed` default, so the run parked `108baac` on `sandcastle/rescue-20261119-205729`, reopened `#373`, and exited 1. **No work is lost** — the rescue branch carries the full commit (7 files, `fleet-dispatch-lib.sh`, `fleet-dispatch.sh`, both tests, the deploy doc, the journal entry, the STATUS.md row) and `#373` is open again. The shared workdir's diverged `main` self-heals: `swarm.yml:269` hard-resets to `origin/main` every run. ## Root cause — STATUS.md has no headroom, so writers can no longer touch ## different rows `git show` of both sides shows **one** conflicting hunk, the same single line — the `#353` blocker row at `@@ -35,7 +35,7 @@`. Both sides rewrote it, and from the worker's own log (`worker-logs.txt:43`): > STATUS.md is at 16381/16384 bytes — essentially no headroom. I must trim the > `#353` row to afford the update. `tests/docs-budget-test.sh` sets `STATUS_MAX=16384`; `origin/main`'s STATUS.md is **16382 bytes — 2 bytes of headroom**. The whole concurrency design rests on the #287 invariant that STATUS.md "changes only via the surface rows below (writers touch different rows)" — the very reason `.gitattributes` deliberately does NOT give it `merge=union` the way #300 gave `docs/GOTCHAS.md`. At the byte ceiling that invariant is unreachable: a writer cannot extend its *own* row without trimming someone *else's*, so every state-changing commit is forced onto a shared anchor and two concurrent writers produce divergent one-line edits that no 3-way merge can resolve. This is not a one-off. **All four of today's rescue branches touch STATUS.md**: `rescue-20261119-192442` (STATUS.md only — its commit `2205aec` is literally titled *"status: trim the #353 row back under the docs budget"*), `-202558`, `-204522`, `-205729`. The `2205aec` title shows the trimming is already a recurring manual chore. Exact precedent: **#331** ("docs/GOTCHAS.md index is at budget (24445/24576 B) — compact rows or raise GOTCHAS_MAX…"), closed. STATUS.md is now in the same state. ## Fault 2 (same chain) — the resolver prompt describes a STATUS.md that no ## longer exists `landing_resolve_rebase_with_claude` (`landing-lib.sh:502`) tells the resolver: > for STATUS.md keep both milestone-log entries (newest first) and merge the > one-line header so it reflects the newest state plus any facts only one side > carries Since #196/#287 STATUS.md has **no milestone log and no one-line header** — the milestone log moved to `docs/journal/milestone-log.md` and `tests/docs-budget-test.sh:91` asserts STATUS.md carries no `**Last updated` lead at all. So on the one surface the prompt names, it describes the pre-#196 file and says nothing about what the resolver actually faces now: divergent edits to one per-ticket blocker row, under a byte budget with 2 bytes spare. Re-testing a resolution also runs `docs-budget-test.sh`, so a merge that keeps both sides' text fails closed. Even a correct resolver is nearly unable to win here, which is why this parks and pages rather than resolving. ## Suggested scope 1. Give STATUS.md real headroom — compact the blocker rows (the `#305`, `#301` and `#353` rows are each ~2–4 KB of prose that reads like a journal entry, not a status surface; `docs/journal/` is their home) and/or raise `STATUS_MAX`, the way #331 did for `GOTCHAS_MAX`. Decide which, with the #287 invariant stated as the acceptance criterion: a writer must be able to update its own row without touching another's. 2. Update the resolver prompt's STATUS.md guidance to the post-#196/#287 shape (merge per-ticket rows, keep both sides' facts, re-trim to stay under the docs budget). Prompt text is high-blast-radius (CLAUDE.md) — treat as design work, root + vendored copy together. Consider whether a budget *floor* check (fail CI when headroom drops below N bytes) belongs here, so the surface can never silently reach the state where the concurrency design stops holding. ## Evidence `/tmp/matou-heal-Matou-dev-factory.rgGBoD` on `matou-workstation` — `run-verdict.txt`, `job-log.txt` (job 2), `worker-logs.txt:43`, `workdir-git.txt`.
Author
Member

swarm-claim host=matou-dev-server-01 run=28948
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=28948 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

Ruled by agent under ADR 0174 — veto anytime.

Decision (scope item 1): give STATUS.md headroom by COMPACTING + a budget FLOOR, NOT by raising STATUS_MAX.

The ticket asks to decide between compacting the blocker rows and/or raising the ceiling the way #331 did for GOTCHAS_MAX. I ruled the two surfaces are opposites:

  • docs/GOTCHAS.md is append-only + merge=union (#300), so it cannot be safely compacted against concurrent appends — #331 correctly RAISED its ceiling.
  • STATUS.md is update-in-place and deliberately NOT merge=union (.gitattributes explains why: union would keep two divergent edits of one key as two rows). Raising STATUS_MAX here just lets journal-prose re-accrete into rows — the exact #196 anti-pattern.

So I kept STATUS_MAX=16384, compacted the blocker rows back to surface level (their detail already lives in the referenced journal entries), 16382 → ~12.9 KB, and added a headroom floor to tests/docs-budget-test.sh: STATUS_HEADROOM_MIN = LINE_MAX = 2048. STATUS.md must leave ≥ 2 KB under the ceiling, so any ONE writer can rewrite its own row to the full per-line budget without touching another's — the #287 invariant stated as the acceptance test, and the budget-floor check the ticket suggested.

Why this is a two-way door: fully revertible by a later commit (re-raise the ceiling / drop the floor), and provable by an existing test I can run (tests/docs-budget-test.sh, offline). Not on the one-way-door list. Scope item 2 (resolver prompt) carries no judgement call — it is the mechanical post-#196/#287 rewording the ticket specifies.

Ruled by agent under ADR 0174 — veto anytime. **Decision (scope item 1): give STATUS.md headroom by COMPACTING + a budget FLOOR, NOT by raising `STATUS_MAX`.** The ticket asks to decide between compacting the blocker rows and/or raising the ceiling the way #331 did for `GOTCHAS_MAX`. I ruled the two surfaces are opposites: - `docs/GOTCHAS.md` is **append-only + `merge=union`** (#300), so it cannot be safely compacted against concurrent appends — #331 correctly RAISED its ceiling. - `STATUS.md` is **update-in-place** and deliberately **NOT `merge=union`** (`.gitattributes` explains why: union would keep two divergent edits of one key as two rows). Raising `STATUS_MAX` here just lets journal-prose re-accrete into rows — the exact #196 anti-pattern. So I kept `STATUS_MAX=16384`, compacted the blocker rows back to surface level (their detail already lives in the referenced journal entries), 16382 → ~12.9 KB, and added a **headroom floor** to `tests/docs-budget-test.sh`: `STATUS_HEADROOM_MIN = LINE_MAX = 2048`. STATUS.md must leave ≥ 2 KB under the ceiling, so any ONE writer can rewrite its own row to the full per-line budget without touching another's — the #287 invariant stated as the acceptance test, and the budget-floor check the ticket suggested. **Why this is a two-way door:** fully revertible by a later commit (re-raise the ceiling / drop the floor), and provable by an existing test I can run (`tests/docs-budget-test.sh`, offline). Not on the one-way-door list. Scope item 2 (resolver prompt) carries no judgement call — it is the mechanical post-#196/#287 rewording the ticket specifies.
Author
Member

⏩ independent reviewer for #374 — verdict unauthenticated

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

close-report for #374 — status success

✅ close-report gates passed — every claim verified against the pushed worker branch sandcastle/worker/20261119210537-2901903 (pre-land — the host promotes it to main only after its post-run verify, #193/#283); issue closed.

envelope
{
  "issue": 374,
  "status": "success",
  "commits": [
    "f13714e"
  ],
  "changed_files": [
    "tests/docs-budget-test.sh",
    "STATUS.md",
    "landing-lib.sh",
    "tests/landing-lib-test.sh",
    "docs/journal/2026-11-19-374.md",
    "docs/gotchas/374-status-md-at-budget-breaks-the-per-row-invariant.md",
    "docs/GOTCHAS.md"
  ],
  "tests": [
    {
      "command": "bash tests/docs-budget-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash tests/landing-lib-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash tests/judgement-call-prompts-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash onboarding/tests/vendor-manifest-coverage-test.sh",
      "exit_code": 0
    }
  ],
  "criteria": {
    "STATUS.md gets real headroom so a writer updates its own row without touching another's (#287 invariant)": "STATUS.md compacted 16382->~12.9KB; tests/docs-budget-test.sh now asserts STATUS_HEADROOM_MIN=LINE_MAX=2048 bytes of headroom (f13714e)",
    "Decide compact vs raise STATUS_MAX, with the #287 invariant as acceptance criterion": "ruled under ADR 0174 (issue comment 75260): keep STATUS_MAX, compact + add a budget floor, because STATUS.md is update-in-place and NOT merge=union (opposite of #331's append-only GOTCHAS raise)",
    "Budget floor check: fail CI when headroom drops below N bytes": "STATUS_HEADROOM_MIN floor added to tests/docs-budget-test.sh with its own assertion",
    "Update the resolver prompt's STATUS.md guidance to the post-#196/#287 shape": "landing-lib.sh resolver prompt + comment reworded to per-ticket rows + per-change journal + stay under byte budget; no docs/ path (judgement-call-prompts #47); prompt stays leading positional (#364)",
    "Prompt change treated as design work, root + vendored copy together": "root landing-lib.sh changed; re-vendor owed and recorded (blocker in journal + #374 STATUS.md row); vendored .sandcastle/ copy is protected, re-vendored by a human (GOTCHAS 4)",
    "Every lib change updates its test in the same commit": "tests/landing-lib-test.sh gains #374 prompt asserts; tests/docs-budget-test.sh gains the floor assertion — same commit",
    "Hazard recorded": "docs/gotchas/374-*.md body + GOTCHAS index row #374; docs/journal/2026-11-19-374.md; STATUS.md surface row"
  },
  "summary": "STATUS.md kept its ceiling but gained a compaction + a headroom floor restoring the #287 per-row invariant, and the rebase-resolver prompt was corrected to the post-#196 STATUS.md shape.",
  "blockers": []
}
**close-report** for #374 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against the pushed worker branch `sandcastle/worker/20261119210537-2901903` (pre-land — the host promotes it to `main` only after its post-run verify, #193/#283); issue closed. <details><summary>envelope</summary> ```json { "issue": 374, "status": "success", "commits": [ "f13714e" ], "changed_files": [ "tests/docs-budget-test.sh", "STATUS.md", "landing-lib.sh", "tests/landing-lib-test.sh", "docs/journal/2026-11-19-374.md", "docs/gotchas/374-status-md-at-budget-breaks-the-per-row-invariant.md", "docs/GOTCHAS.md" ], "tests": [ { "command": "bash tests/docs-budget-test.sh", "exit_code": 0 }, { "command": "bash tests/landing-lib-test.sh", "exit_code": 0 }, { "command": "bash tests/judgement-call-prompts-test.sh", "exit_code": 0 }, { "command": "bash onboarding/tests/vendor-manifest-coverage-test.sh", "exit_code": 0 } ], "criteria": { "STATUS.md gets real headroom so a writer updates its own row without touching another's (#287 invariant)": "STATUS.md compacted 16382->~12.9KB; tests/docs-budget-test.sh now asserts STATUS_HEADROOM_MIN=LINE_MAX=2048 bytes of headroom (f13714e)", "Decide compact vs raise STATUS_MAX, with the #287 invariant as acceptance criterion": "ruled under ADR 0174 (issue comment 75260): keep STATUS_MAX, compact + add a budget floor, because STATUS.md is update-in-place and NOT merge=union (opposite of #331's append-only GOTCHAS raise)", "Budget floor check: fail CI when headroom drops below N bytes": "STATUS_HEADROOM_MIN floor added to tests/docs-budget-test.sh with its own assertion", "Update the resolver prompt's STATUS.md guidance to the post-#196/#287 shape": "landing-lib.sh resolver prompt + comment reworded to per-ticket rows + per-change journal + stay under byte budget; no docs/ path (judgement-call-prompts #47); prompt stays leading positional (#364)", "Prompt change treated as design work, root + vendored copy together": "root landing-lib.sh changed; re-vendor owed and recorded (blocker in journal + #374 STATUS.md row); vendored .sandcastle/ copy is protected, re-vendored by a human (GOTCHAS 4)", "Every lib change updates its test in the same commit": "tests/landing-lib-test.sh gains #374 prompt asserts; tests/docs-budget-test.sh gains the floor assertion — same commit", "Hazard recorded": "docs/gotchas/374-*.md body + GOTCHAS index row #374; docs/journal/2026-11-19-374.md; STATUS.md surface row" }, "summary": "STATUS.md kept its ceiling but gained a compaction + a headroom floor restoring the #287 per-row invariant, and the rebase-resolver prompt was corrected to the post-#196 STATUS.md shape.", "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#374
No description provided.