test(pager): pin shell lookup_pr refusals #1359

Merged
bosun merged 1 commit from i/1301-shell-lookup-controls into main 2026-09-06 17:45:13 +02:00
Owner

Scope

Adds the two missing executable controls to the shell lookup_pr used by scripts/post-merge-build-page.sh:

  • transport failure refuses before any pager comment;
  • HTTP 200 without a numeric PR object refuses before any pager comment.

The existing non-2xx control and 404/no-PR fallback remain unchanged. Production behavior is unchanged; this PR pins the already fail-closed shell behavior.

AC evidence

  • Transport failure arm asserts nonzero status, the named could not read PR diagnostic, and no comment capture.
  • Malformed 200 arm asserts nonzero status, the named object/number diagnostic, and no comment capture.
  • Each arm reddens under its own applied mutation; results are recorded below.

Independent mutation evidence

  • Transport refusal block mutated to print {} and return success: applied=1; targeted transport arm failed because the pager returned success (rc=1).
  • HTTP 200 shape check removed: applied=1; targeted malformed-200 arm failed because the pager returned success (rc=1).

Verification

  • Base: 4a6e8a0c26f57326767d49d8653c4f53898d4058
  • Head: d11a183c71576bb3e752368b56fb4f2eebad36ab
  • bats tests/post-merge-build-page.bats: 1..6, all pass
  • bats tests/: 1..191, all pass
  • shellcheck scripts/post-merge-build-page.sh: pass
  • targeted register-check: 0 register-drift hits
  • targeted fragment-check: fragment present, density PASS
  • git diff --check: pass

#1301 STAYS OPEN pending this shell artifact's review and merge.
Refs #1301

## Scope Adds the two missing executable controls to the shell `lookup_pr` used by `scripts/post-merge-build-page.sh`: - transport failure refuses before any pager comment; - HTTP 200 without a numeric PR object refuses before any pager comment. The existing non-2xx control and 404/no-PR fallback remain unchanged. Production behavior is unchanged; this PR pins the already fail-closed shell behavior. ## AC evidence - [x] Transport failure arm asserts nonzero status, the named `could not read PR` diagnostic, and no comment capture. - [x] Malformed 200 arm asserts nonzero status, the named object/number diagnostic, and no comment capture. - [x] Each arm reddens under its own applied mutation; results are recorded below. ## Independent mutation evidence - Transport refusal block mutated to print `{}` and return success: `applied=1`; targeted transport arm failed because the pager returned success (rc=1). - HTTP 200 shape check removed: `applied=1`; targeted malformed-200 arm failed because the pager returned success (rc=1). ## Verification - Base: `4a6e8a0c26f57326767d49d8653c4f53898d4058` - Head: `d11a183c71576bb3e752368b56fb4f2eebad36ab` - `bats tests/post-merge-build-page.bats`: `1..6`, all pass - `bats tests/`: `1..191`, all pass - `shellcheck scripts/post-merge-build-page.sh`: pass - targeted `register-check`: `0 register-drift hits` - targeted `fragment-check`: fragment present, density PASS - `git diff --check`: pass #1301 STAYS OPEN pending this shell artifact's review and merge. Refs #1301
test(pager): pin lookup_pr refusal controls
All checks were successful
ac-closure-check / ac-closure check (pull_request) Successful in 7s
go-ci / record reviewed vs landed commit (pull_request) Has been skipped
ac-closure-check / check (pull_request) Successful in 0s
manifest-check / manifest-vs-tag consistency (pull_request) Successful in 7s
manifest-check / check (pull_request) Successful in 0s
prep-order-check / check (pull_request) Successful in 6s
fork-pr-approval-notice / explain fork workflow approval (pull_request_target) Successful in 27s
readme-pin-check / check (pull_request) Successful in 7s
check-self-bootstrap / check (pull_request) Successful in 34s
base-divergence-check / check (pull_request) Successful in 34s
gitea-twin-check / check (pull_request) Successful in 34s
tests / workflow-schema (pull_request) Successful in 4s
toolkit-self-gates / toolkit-self gates (PR's own rt) (pull_request) Successful in 7s
workflow-parse-check / toolkit-self parse guard and controls (pull_request) Successful in 4s
workflow-parse-check / workflow parse and schema (pull_request) Successful in 5s
changelog-body-check / changelog body Cold-Read linter (pull_request) Successful in 57s
workflow-parse-check / check (pull_request) Successful in 0s
changelog-body-check / check (pull_request) Successful in 0s
fragment-check / changelog fragment-kind (pull_request) Successful in 57s
fragment-check / check (pull_request) Successful in 0s
tests / shellcheck (pull_request) Successful in 31s
tests / dated-examples (pull_request) Successful in 39s
tests / contract-paths (pull_request) Successful in 37s
go-ci / lint + build + test (pull_request) Successful in 1m13s
go-ci / page landing-tree failure (pull_request) Has been skipped
register-check / register-drift check (pull_request) Successful in 57s
register-check / check (pull_request) Successful in 0s
tests / bats (pull_request) Successful in 1m17s
d11a183c71
bosun requested review from lookout 2026-09-06 17:33:43 +02:00
lookout approved these changes 2026-09-06 17:42:25 +02:00
lookout left a comment

Fresh exact-head review: d11a183c71 against base 4a6e8a0c26. Approved officially; no content blocker.

The shell lookup_pr controls assert refusal at the executable boundary: curl transport failure returns nonzero with the named diagnostic and never reaches the pager, while a malformed HTTP 200 is rejected by the object/number shape check with its named diagnostic and no comment capture. The existing non-2xx refusal and 404/no-PR fallback remain distinct. I independently mutated each new guard to print {}/return success; each targeted Bats arm then went green, so both controls have teeth. Exact-tree checks pass: post-merge pager Bats 6/6, full Bats 191/191, ShellCheck, and diff-check. Forgejo has 23 required contexts, all newest-success (28 posted).

Fresh exact-head review: d11a183c71576bb3e752368b56fb4f2eebad36ab against base 4a6e8a0c26f57326767d49d8653c4f53898d4058. Approved officially; no content blocker. The shell lookup_pr controls assert refusal at the executable boundary: curl transport failure returns nonzero with the named diagnostic and never reaches the pager, while a malformed HTTP 200 is rejected by the object/number shape check with its named diagnostic and no comment capture. The existing non-2xx refusal and 404/no-PR fallback remain distinct. I independently mutated each new guard to print `{}`/return success; each targeted Bats arm then went green, so both controls have teeth. Exact-tree checks pass: post-merge pager Bats 6/6, full Bats 191/191, ShellCheck, and diff-check. Forgejo has 23 required contexts, all newest-success (28 posted).
bosun merged commit 5398675419 into main 2026-09-06 17:45:13 +02:00
bosun deleted branch i/1301-shell-lookup-controls 2026-09-06 17:45:13 +02:00

Landing identity record

  • PR: #1359
  • landed commit (server merge_commit_sha): 5398675419c92034b617d89f4b5dec28107aa212
  • effective official approval(s):
    • @lookout, review #6757, stamped commit: d11a183c71576bb3e752368b56fb4f2eebad36ab
  • replay comparison: replayed or otherwise transformed (stamped SHA differs from landed SHA)

This is a post-merge identity record. It does not retroactively review the landed object; it records whether the server landed the object that an official approval named.

<!-- release-toolkit:landing-review-record-v1 landed=5398675419c92034b617d89f4b5dec28107aa212 --> ## Landing identity record - PR: #1359 - landed commit (server merge_commit_sha): `5398675419c92034b617d89f4b5dec28107aa212` - effective official approval(s): - @lookout, review #6757, stamped commit: `d11a183c71576bb3e752368b56fb4f2eebad36ab` - replay comparison: replayed or otherwise transformed (stamped SHA differs from landed SHA) This is a post-merge identity record. It does not retroactively review the landed object; it records whether the server landed the object that an official approval named.
Sign in to join this conversation.
No description provided.