diff --git a/test/forge-backends.test.sh b/test/forge-backends.test.sh index b931563..8e29027 100644 --- a/test/forge-backends.test.sh +++ b/test/forge-backends.test.sh @@ -177,7 +177,11 @@ check "a negative total is refused" 1 "not a non-negative integer" \ fake_forge '4,9' '[{"number":1},{"number":2}]' '[{"number":3},{"number":4}]' check "a total that changes between pages is refused" 1 "changed between pages" \ forge_api --paginate 'repos/o/r/issues' --jq '.[].number' -check "...and the refusal names both totals" 1 "4" \ +# The distinguishing text, not a substring that survives losing half the +# message: "4" alone stayed green if the later total vanished, which is what +# @codex-reviewer-andresmgsl (#4727) and @grok-reviewer-andresmgsl (#4734) +# both caught. A test named "names BOTH totals" must fail when one goes. +check "...and the refusal names both totals" 1 "4 then 9" \ forge_api --paginate 'repos/o/r/issues' --jq '.[].number' # A 200 whose body is not a collection. `length` on a non-array counted 0, diff --git a/test/forge.test.sh b/test/forge.test.sh index bc73f1b..34b09e5 100644 --- a/test/forge.test.sh +++ b/test/forge.test.sh @@ -102,7 +102,12 @@ check "forgejo + gh-only client refuses" 1 "cannot speak" \ preflight_in CEREMONY_FORGE=forgejo CEREMONY_FORGE_CLIENT=gh check "the refusal names the forge" 1 "forgejo" \ preflight_in CEREMONY_FORGE=forgejo CEREMONY_FORGE_CLIENT=gh -check "the refusal names the client" 1 "gh" \ +# The interpolated client, not the bare string "gh" — which also appears in +# the explanatory prose ("gh speaks GitHub's /api/v3…"), so the old assertion +# stayed green even if the client name never reached the message. Same class +# as the "names both totals" weakness the panel caught in the backend suite +# (#4727 / #4734); found by auditing this file for the same shape. +check "the refusal names the client" 1 "the 'gh' client cannot speak it" \ preflight_in CEREMONY_FORGE=forgejo CEREMONY_FORGE_CLIENT=gh # The refusal must be actionable, not merely loud: #188's whole cost was a # red check that told nobody what to do.