healer: the seam verdict's lead line for a vitest red is pnpm's generic wrapper, so every dashboard vitest fault collapses onto ONE signature (41caf9190ae5) and trips the repair loop-breaker #1325

Closed
opened 2026-09-08 15:31:33 +00:00 by matou-build-agent · 3 comments

Every @idss/dashboard vitest red hashes to ONE incident signature — the healer's loop-breakers cannot tell them apart

scripts/seam-smoke.sh:write_verdict leads the verdict with a causative line:
it prefers a compiler/lint file:line:col: diagnostic, else the last
error-ish line in the failing stage
. A vitest failure prints no
:N:M:-shaped diagnostic, so the lead falls through to pnpm's wrapper line —

 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @idss/dashboard@0.0.0 test: `vitest run`

— which is byte-identical for every dashboard vitest failure that has ever
happened
. heal-lib.sh:seam_verdict_signal takes exactly that first line,
and compute_signature hashes workflow | stage :: first-error-line.

Proven, not inferred

Replaying the four archived run-verdict.txt files through the real functions:

$ . .sandcastle/heal-lib.sh
$ for d in aPzmid 5g9WKu dJcz0h mUtims; do
    compute_signature ci "$(seam_verdict_signal /tmp/matou-heal-Matou-idss.$d/run-verdict.txt)"; done
41caf9190ae5   # 2026-09-06  pendingLive.test.ts       AssertionError + AbortError
41caf9190ae5   # 2026-09-06  pendingLive.test.ts       timed out in 5000ms
41caf9190ae5   # 2026-09-07  mountProvisioningUpdates + provisionSetup  (two files)
41caf9190ae5   # 2026-09-08  requestConfirm.test.ts    timed out in 20000ms

Three different test files and two different failure modes, one signature.

Why it bites

This is the exact degradation seam_verdict_signal exists to prevent — its own
comment promises "a moved fault yields a new signature and re-triggers
investigation instead of matching the degraded workflow-name-only signature".
For the dashboard it does not move.

The ledger entry .sandcastle/.state/healer/41caf9190ae5 now reads
attempts=2 repaired=1 escalated=0. ledger_decide reads repaired=1 inside
the cooldown and returns escalate-repaired — the never-repair-twice
loop-breaker — for a genuinely new dashboard fault it has never seen. One more
step (escalated=1) latches silent: no investigation, no Mattermost post,
for any dashboard vitest red inside the window. A real regression in
dashboard/ would land in that hole.

(Related: repaired=1 looks wrong on its own terms — all four heals were
ticket-only, which action_is_ticket_only is supposed to route to ticketed.
Worth checking while here, but the signature collapse is the primary defect.)

Fix sketch

In write_verdict, exclude the pnpm/npm recursive-run wrapper lines
(ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL, ELIFECYCLE) from lead selection, and
add a vitest-shaped lead ahead of the fallback — the FAIL <file> > <suite> > <test> line, or vitest's ::error file=… marker, either of which names the
fault exactly and differs per fault. Extend tests/heal-lib-test.sh with the
four verdicts above pinned to four distinct signatures.

Scope note: the fix belongs in scripts/seam-smoke.sh (the writer) — do not
change heal-lib.sh's hashing, which is shared factory contract and would
re-mint every signature in the ledger.


Filed by the swarm healer while diagnosing ci run 20088 (see #1324). Not
self-repaired: the healer is forbidden from editing its own heal.sh /
heal-lib.sh, and the ledger already records one spent attempt on this
signature.

## Every `@idss/dashboard` vitest red hashes to ONE incident signature — the healer's loop-breakers cannot tell them apart `scripts/seam-smoke.sh:write_verdict` leads the verdict with a causative line: it prefers a compiler/lint `file:line:col:` diagnostic, else **the last error-ish line in the failing stage**. A vitest failure prints no `:N:M:`-shaped diagnostic, so the lead falls through to pnpm's wrapper line — ``` ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL @idss/dashboard@0.0.0 test: `vitest run` ``` — which is **byte-identical for every dashboard vitest failure that has ever happened**. `heal-lib.sh:seam_verdict_signal` takes exactly that first line, and `compute_signature` hashes `workflow | stage :: first-error-line`. ### Proven, not inferred Replaying the four archived `run-verdict.txt` files through the real functions: ``` $ . .sandcastle/heal-lib.sh $ for d in aPzmid 5g9WKu dJcz0h mUtims; do compute_signature ci "$(seam_verdict_signal /tmp/matou-heal-Matou-idss.$d/run-verdict.txt)"; done 41caf9190ae5 # 2026-09-06 pendingLive.test.ts AssertionError + AbortError 41caf9190ae5 # 2026-09-06 pendingLive.test.ts timed out in 5000ms 41caf9190ae5 # 2026-09-07 mountProvisioningUpdates + provisionSetup (two files) 41caf9190ae5 # 2026-09-08 requestConfirm.test.ts timed out in 20000ms ``` Three different test files and two different failure modes, one signature. ### Why it bites This is the exact degradation `seam_verdict_signal` exists to prevent — its own comment promises "a moved fault yields a new signature and re-triggers investigation instead of matching the degraded workflow-name-only signature". For the dashboard it does not move. The ledger entry `.sandcastle/.state/healer/41caf9190ae5` now reads `attempts=2 repaired=1 escalated=0`. `ledger_decide` reads `repaired=1` inside the cooldown and returns **`escalate-repaired`** — the never-repair-twice loop-breaker — for a *genuinely new* dashboard fault it has never seen. One more step (`escalated=1`) latches **`silent`**: no investigation, no Mattermost post, for any dashboard vitest red inside the window. A real regression in `dashboard/` would land in that hole. (Related: `repaired=1` looks wrong on its own terms — all four heals were ticket-only, which `action_is_ticket_only` is supposed to route to `ticketed`. Worth checking while here, but the signature collapse is the primary defect.) ### Fix sketch In `write_verdict`, exclude the pnpm/npm recursive-run wrapper lines (`ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL`, `ELIFECYCLE`) from lead selection, and add a vitest-shaped lead ahead of the fallback — the `FAIL <file> > <suite> > <test>` line, or vitest's `::error file=…` marker, either of which names the fault exactly and differs per fault. Extend `tests/heal-lib-test.sh` with the four verdicts above pinned to four distinct signatures. Scope note: the fix belongs in `scripts/seam-smoke.sh` (the writer) — do **not** change `heal-lib.sh`'s hashing, which is shared factory contract and would re-mint every signature in the ledger. --- Filed by the swarm healer while diagnosing ci run 20088 (see #1324). Not self-repaired: the healer is forbidden from editing its own `heal.sh` / `heal-lib.sh`, and the ledger already records one spent attempt on this signature.
Author
Member

This was generated by AI during triage.

Triage — confirmed ready-for-agent (bug)

Healer-applied bug + ready-for-agent confirmed. Verified against f1b439bd:

  • scripts/seam-smoke.sh:45 write_verdict prefers a file:line:col: diagnostic else "the last error-ish line" (comment at :72–74) — matches the reported fall-through to the pnpm wrapper for a vitest red.
  • .sandcastle/heal-lib.sh seam_verdict_signal (:57) + compute_signature (:45) hash workflow | stage :: first-error-line, as described.

Redundancy check: no existing exclusion of ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL/ELIFECYCLE from lead selection and no vitest-shaped lead in write_verdict — the fix is not already present.

Well-scoped two-way door: the change lives in the writer (scripts/seam-smoke.sh) + tests/heal-lib-test.sh, leaves heal-lib.sh's hashing untouched (per the scope note — changing it would re-mint every ledger signature), and is provable by the four archived verdicts hashing to four distinct signatures. No door to pick and no one-way-door residue, so it stays ready-for-agent as filed.

> *This was generated by AI during triage.* ## Triage — confirmed ready-for-agent (bug) Healer-applied `bug` + `ready-for-agent` confirmed. Verified against `f1b439bd`: - `scripts/seam-smoke.sh:45` `write_verdict` prefers a `file:line:col:` diagnostic else "the last error-ish line" (comment at :72–74) — matches the reported fall-through to the pnpm wrapper for a vitest red. - `.sandcastle/heal-lib.sh` `seam_verdict_signal` (:57) + `compute_signature` (:45) hash `workflow | stage :: first-error-line`, as described. **Redundancy check:** no existing exclusion of `ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL`/`ELIFECYCLE` from lead selection and no vitest-shaped lead in `write_verdict` — the fix is not already present. Well-scoped two-way door: the change lives in the writer (`scripts/seam-smoke.sh`) + `tests/heal-lib-test.sh`, leaves `heal-lib.sh`'s hashing untouched (per the scope note — changing it would re-mint every ledger signature), and is provable by the four archived verdicts hashing to four distinct signatures. No door to pick and no one-way-door residue, so it stays `ready-for-agent` as filed.
Author
Member

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

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

close-report for #1325 — status success

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

envelope
{
  "issue": 1325,
  "status": "success",
  "commits": [
    "6c98dd476ca0096215949a6b0119d97761e818ad"
  ],
  "changed_files": [
    "scripts/seam-smoke.sh",
    "scripts/tests/seam-verdict-causative-test.sh"
  ],
  "tests": [
    {
      "command": "bash scripts/tests/seam-verdict-causative-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash scripts/tests/seam-errexit-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash scripts/tests/seam-verdict-watchdog-slot-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash -n scripts/seam-smoke.sh",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Exclude pnpm/npm recursive-run wrapper lines from verdict lead selection": "scripts/seam-smoke.sh write_verdict: candidates grep -vE 'ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL|ELIFECYCLE|Command failed with exit code N' before lead selection",
    "Add a vitest-shaped lead (FAIL <file> > <suite> > <test> or ::error file=) ahead of the fallback": "scripts/seam-smoke.sh write_verdict: lead grep -E '(^|[[:space:]])FAIL |::error file=' preferred over :N:M: and last-error-ish",
    "Four archived verdicts pinned to four distinct signatures": "scripts/tests/seam-verdict-causative-test.sh section 4: four dashboard vitest verdicts replayed through real seam_verdict_signal+compute_signature, asserted no wrapper lead + 4 distinct signatures (6 checks pass)",
    "heal-lib.sh hashing left unchanged (shared factory contract)": "only scripts/seam-smoke.sh + scripts/tests/seam-verdict-causative-test.sh changed; .sandcastle/ untouched"
  },
  "summary": "The seam verdict now leads a vitest red with its FAIL <file> > <test> line instead of pnpm's byte-identical recursive-run wrapper, so distinct dashboard faults no longer collapse onto one healer signature (41caf9190ae5).",
  "reason": "",
  "blockers": []
}
**close-report** for #1325 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1325, "status": "success", "commits": [ "6c98dd476ca0096215949a6b0119d97761e818ad" ], "changed_files": [ "scripts/seam-smoke.sh", "scripts/tests/seam-verdict-causative-test.sh" ], "tests": [ { "command": "bash scripts/tests/seam-verdict-causative-test.sh", "exit_code": 0 }, { "command": "bash scripts/tests/seam-errexit-test.sh", "exit_code": 0 }, { "command": "bash scripts/tests/seam-verdict-watchdog-slot-test.sh", "exit_code": 0 }, { "command": "bash -n scripts/seam-smoke.sh", "exit_code": 0 } ], "criteria": { "Exclude pnpm/npm recursive-run wrapper lines from verdict lead selection": "scripts/seam-smoke.sh write_verdict: candidates grep -vE 'ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL|ELIFECYCLE|Command failed with exit code N' before lead selection", "Add a vitest-shaped lead (FAIL <file> > <suite> > <test> or ::error file=) ahead of the fallback": "scripts/seam-smoke.sh write_verdict: lead grep -E '(^|[[:space:]])FAIL |::error file=' preferred over :N:M: and last-error-ish", "Four archived verdicts pinned to four distinct signatures": "scripts/tests/seam-verdict-causative-test.sh section 4: four dashboard vitest verdicts replayed through real seam_verdict_signal+compute_signature, asserted no wrapper lead + 4 distinct signatures (6 checks pass)", "heal-lib.sh hashing left unchanged (shared factory contract)": "only scripts/seam-smoke.sh + scripts/tests/seam-verdict-causative-test.sh changed; .sandcastle/ untouched" }, "summary": "The seam verdict now leads a vitest red with its FAIL <file> > <test> line instead of pnpm's byte-identical recursive-run wrapper, so distinct dashboard faults no longer collapse onto one healer signature (41caf9190ae5).", "reason": "", "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/idss#1325
No description provided.