ceremony/test
cndgrr 13e8f54d60 fix(issueflow): a failed read never reaches a decision function
`gh api` prints a 5xx response body to stdout AND exits non-zero, and
GitHub's 5xx body is a JSON object. Inside the per-issue subshell that
payload passed `has("pull_request") | not`, emptied `.labels[]`, and
`queue_decision` — correct on the input it was handed — wrote
`needs-triage` onto a healthy epic. The run then logged `reconciled.`
and exited 0 (crew#329, #247).

errexit could not have caught it: a command whose status is tested by
`||` runs with errexit suppressed, and the suppression extends through
the whole subshell body, so the `|| log` handler is what disables the
errexit that would have aborted at the failed read. Removing the handler
revives errexit and loses #91's resilience, and an inline `set -e` does
not re-arm it. Explicit per-read checks are the mechanism.

Every read inside that subshell is now checked — the issue read on its
status AND on its payload shape (an HTTP 200 whose body is `null` exits
0 and empties the label set just the same), both reads in
`last_issue_activity`, and the comments read in
`issue_comment_has_marker`. On failure the issue is left exactly as it
is, the reason rides its own `#$n:` line, and the subshell exits with a
distinguished status the sweep counts, so a deliberate skip is not
reported as a crash and a genuine crash is still named byte-identically.

`read_failure_reason` moves to lib/read.sh beside a new `guarded_read`,
sourced by both reconcilers: labels-reconcile's copy was the only one,
and the issue surface needs the identical rule.

Refs #247
2026-08-03 18:01:58 +00:00
..
fixtures Merge pull request #29 from codex-bot-andresmgsl/build/4-changelog-section 2026-07-22 20:12:01 +01:00
changelog-armed.test.sh fix: the sentinel's one-line contract is checked on the file, not the $(cat) word 2026-07-25 13:29:02 +00:00
changelog-assemble.test.sh test: sentinel rows across the shape predicate, the armed guard, and the assembler 2026-07-25 13:12:30 +00:00
changelog-assembled.test.sh test: cover grouped anchored release replay 2026-07-24 16:17:02 +00:00
changelog-monotonic.test.sh test: changelog-monotonic contract suite — constructed git histories 2026-07-22 21:11:46 +00:00
changelog.test.sh fix: the sentinel's one-line contract is checked on the file, not the $(cat) word 2026-07-25 13:29:02 +00:00
decide.test.sh feat: lib/decide.sh — the merge door's decision, pure and exhaustively tested 2026-07-22 18:59:29 +00:00
docs-sync.test.sh fix: refuse non-regular nodes everywhere; machine-verify the mirror README 2026-07-22 21:59:37 +00:00
drill-recorded.test.sh feat: actions/drill-recorded — a release carries its evidence 2026-07-22 21:28:06 +00:00
facts.test.sh test: root-commit fixtures — (none) base, D2 loud-death pin, e2e chain 2026-07-24 12:16:04 +00:00
harness.sh ci: scaffold test and lint workspace 2026-07-22 16:56:25 +00:00
issueflow-reconcile.test.sh fix(issueflow): a failed read never reaches a decision function 2026-08-03 18:01:58 +00:00
labels-reconcile.test.sh test(labels): drive the fetch that feeds the grace, at the sweep level 2026-08-03 17:23:11 +00:00
labels-scope.test.sh fix(round): labeler.yml header tells the truth; labels-scope maps to scope:labels 2026-07-24 12:22:09 +00:00
labels-triggers.test.sh labels: detach the reconcile sweep from PR-triggered runs (#209) 2026-08-01 16:20:00 +00:00
labels.test.sh fix: refuse a bracket login that is not [A-Za-z0-9-] — round 1, codex 2026-08-02 14:13:25 +00:00
release-chain.test.sh test: root-commit fixtures — (none) base, D2 loud-death pin, e2e chain 2026-07-24 12:16:04 +00:00
ruling.test.sh fix: select the best-shaped escalation, not the earliest 2026-08-03 10:55:45 +00:00
run.sh ci: scaffold test and lint workspace 2026-07-22 16:56:25 +00:00
runner-isolated.test.sh test(guards): runner-isolated fixture matrix — 12 spec rows plus the block-sequence cases (#58) 2026-07-23 12:03:55 +00:00
self-ref.test.sh feat: the reusable release workflow — both doors, one implementation 2026-07-22 19:55:39 +00:00
version.test.sh feat: lib/version.sh — one version abstraction, two backends 2026-07-22 18:19:50 +00:00