triage: #2036 — app-report gate/inherit leave a verdict on failure (consumer half) #2037

Closed
matou-build-agent wants to merge 1 commit from session/2036-forgejo-read-retry-verdict-heal into main

Advances #2036 (consumer-owned half). Does not close it — the factory-vendored half is routed to dev-factory (see the ticket).

What this lands

scripts/app-report-inherit.sh and scripts/app-report-gate.sh — the two triage-tick stages between git-setup.sh and run-triage.sh — now arm the verdict-lib.sh seam before their first read:

  • verdict_begin on the triage verdict path the healer reads (same repo-tagged formula heal.sh derives), verdict_stage markers per phase;
  • an EXIT-trap verdict_write "$ec" (armed early, tempfile cleanup ${var:-}-guarded);
  • die() records its own message via verdict_error.

So a failure in either script now leaves a triage verdict whose stage + error line are that script's own — the healer keys the real incident signature instead of degrading to the bare workflow-name signature (seam-degraded). This is ticket part 2 (AC2).

Proof

scripts/tests/app-report-gate-test.sh (12 groups) and scripts/tests/app-report-inherit-test.sh (6 groups): a sustained read failure reds AND writes the stage/error verdict (new groups). All consumer + workflow suites green:

app-report-gate-test: 12 groups passed
app-report-inherit-test: 6 groups passed
app-report-workflow-test: 1 group passed

Not in this PR (routed to dev-factory — the drift gate bars hand-edits here)

.sandcastle/forgejo-lib.sh (AC1 read-retry, reads only) and .sandcastle/heal.sh (AC3 hook-mode host line, AC4 job-log in the bundle) are FACTORY_MANIFEST-vendored. Ready-to-apply diffs + their vendored-test updates are attached to #2036 to land upstream and re-vendor.

Why a PR (not a push to main)

#2036 carries a false-positive origin: app-report marker: it quotes #1819's marker inside inline backticks, which body-marker-lib.sh reads as a real marker (inline code is not a fence). No untrusted operator content is actually present — but read through the lib the marker is present, so this lands by PR under ADR 0267, never a push to main.

Screenshots: none — harness/infra change, no UI surface.

Ruled by agent under ADR 0174 — veto anytime.

Advances #2036 (consumer-owned half). **Does not** close it — the factory-vendored half is routed to dev-factory (see the ticket). ## What this lands `scripts/app-report-inherit.sh` and `scripts/app-report-gate.sh` — the two triage-tick stages between `git-setup.sh` and `run-triage.sh` — now arm the `verdict-lib.sh` seam **before their first read**: - `verdict_begin` on the triage verdict path the healer reads (same repo-tagged formula `heal.sh` derives), `verdict_stage` markers per phase; - an EXIT-trap `verdict_write "$ec"` (armed early, tempfile cleanup `${var:-}`-guarded); - `die()` records its own message via `verdict_error`. So a failure in either script now leaves a triage verdict whose **stage + error line are that script's own** — the healer keys the real incident signature instead of degrading to the bare workflow-name signature (`seam-degraded`). This is **ticket part 2 (AC2)**. ## Proof `scripts/tests/app-report-gate-test.sh` (12 groups) and `scripts/tests/app-report-inherit-test.sh` (6 groups): a **sustained** read failure reds AND writes the stage/error verdict (new groups). All consumer + workflow suites green: ``` app-report-gate-test: 12 groups passed app-report-inherit-test: 6 groups passed app-report-workflow-test: 1 group passed ``` ## Not in this PR (routed to dev-factory — the drift gate bars hand-edits here) `.sandcastle/forgejo-lib.sh` (AC1 read-retry, reads only) and `.sandcastle/heal.sh` (AC3 hook-mode host line, AC4 job-log in the bundle) are `FACTORY_MANIFEST`-vendored. Ready-to-apply diffs + their vendored-test updates are attached to #2036 to land upstream and re-vendor. ## Why a PR (not a push to main) #2036 carries a false-positive `origin: app-report` marker: it quotes #1819's marker inside **inline backticks**, which `body-marker-lib.sh` reads as a real marker (inline code is not a fence). No untrusted operator content is actually present — but read through the lib the marker is present, so this lands by PR under ADR 0267, never a push to `main`. **Screenshots:** none — harness/infra change, no UI surface. Ruled by agent under ADR 0174 — veto anytime.
triage: #2036 — app-report gate/inherit leave a verdict on failure (consumer half)
All checks were successful
ci / seam (pull_request) Successful in 13m14s
ci / publish (pull_request) Has been skipped
ci / publish-broker (pull_request) Has been skipped
ci / deploy-broker (pull_request) Has been skipped
9505644774
triage run 37106 was lost to one transient DNS blip on a single forgejo_get
read in app-report-gate.sh. Two of the three faults the healer's report named
are factory-vendored (.sandcastle/forgejo-lib.sh read-retry; .sandcastle/heal.sh
hook-mode host line + job-log) and must land in dev-factory + be re-vendored —
the drift gate bars hand-edits here; their diffs are attached to #2036.

This commit lands the consumer-owned half: scripts/app-report-inherit.sh and
scripts/app-report-gate.sh now arm the verdict-lib.sh seam before their first
read, so a failure in either leaves a triage verdict whose stage + error line
are that script's own — the healer keys the real incident signature instead of
degrading to the bare workflow-name signature (seam-degraded). die() records its
message via verdict_error; an EXIT trap writes the verdict; verdict_stage marks
each phase.

Proof: scripts/tests/app-report-gate-test.sh + app-report-inherit-test.sh — a
sustained read failure reds AND writes the stage/error verdict (new groups).

Ruled by agent under ADR 0174 — veto anytime. Lands by PR (the ticket carries a
false-positive origin: app-report marker, read via body-marker-lib.sh).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Owner

Superseded — closing. Main landed the same consumer-half seam under #2048 (c6b9535a, 2026-10-16): both app-report-gate.sh and app-report-inherit.sh now verdict_begin at the repo-tagged triage verdict path before their first read, arm the EXIT-trap verdict_write, and have die() record verdict_error. This PR's remaining delta over main is only the finer per-phase verdict_stage markers; merging it would put two versions of one seam in each script. If the finer stages are still wanted, they are a small fresh change on top of #2048. Checked at Ben's request during a PR sweep. #2036 stays open for its factory-vendored half.

Superseded — closing. Main landed the same consumer-half seam under #2048 (c6b9535a, 2026-10-16): both `app-report-gate.sh` and `app-report-inherit.sh` now `verdict_begin` at the repo-tagged triage verdict path before their first read, arm the EXIT-trap `verdict_write`, and have `die()` record `verdict_error`. This PR's remaining delta over main is only the finer per-phase `verdict_stage` markers; merging it would put two versions of one seam in each script. If the finer stages are still wanted, they are a small fresh change on top of #2048. Checked at Ben's request during a PR sweep. #2036 stays open for its factory-vendored half.
ben closed this pull request 2026-11-16 17:47:04 +00:00
All checks were successful
ci / seam (pull_request) Successful in 13m14s
ci / publish (pull_request) Has been skipped
ci / publish-broker (pull_request) Has been skipped
ci / deploy-broker (pull_request) Has been skipped

Pull request closed

Sign in to join this conversation.
No reviewers
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!2037
No description provided.