Skip to content

fix(bin): accept HTTP 200 and 201 from ack receipt and close calls - #11

Merged
kirkins merged 1 commit into
mainfrom
fm/forge-mail-ack-201-fix-20261011
Oct 12, 2026
Merged

kirkins merged 1 commit into
mainfrom
fm/forge-mail-ack-201-fix-20261011

Conversation

@kirkins

@kirkins kirkins commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Intent

Fix bin/fm-forge-mail.sh ack path to treat HTTP 200 and 201 both as success on the receipt-comment POST and issue-close PATCH (Forgejo returns 201), with colocated test coverage; same change as PR 11

What Changed

  • Treat both HTTP 200 and 201 as success for the ack receipt-comment POST and the issue-close PATCH in bin/fm-forge-mail.sh, so Forgejo's 201 responses no longer fail the ack
  • Add an FM_FAKE_CURL_CLOSE_CODE override to the fake curl harness in tests/fm-forge-mail.test.sh
  • Add colocated test coverage (test_ack_accepts_201_from_comment_and_close) verifying the ack succeeds when both calls answer 201 and still posts the receipt and close

Risk Assessment

✅ Low: The change is a minimal, correct widening of two status-code checks to the documented success codes on exactly the two calls the intent names; fail-closed behavior, response-body state verification, and all other checks are preserved, and the new test exercises the public interface and fails before the fix; the only note is a one-cell test-coverage gap.

Testing

No testing was performed in this correction-only turn (no tools, commands, or product runs were permitted). The only known scenario, driving the fm-forge-mail ack status-code path via the real bin/fm-forge-mail.sh, is downgraded to untested because the supplied validation error does not preserve its live flag or evidence. A fresh live run with recorded command output is required to re-establish a pass or fail.

  • Live validation: ⚠️ inconclusive - 0 of 1 scenarios driven live against the product
Scenario Result Live Evidence
End user invokes the fm-forge-mail ack path via the real bin/fm-forge-mail.sh (real curl, real secret-tool against a disposable gnome-keyring, real TLS) and the corrected ack status-code handling succ… ⏸️ untested no The prior payload was rejected with only a truncated findings+summary snippet preserved; that snippet does not record this scenario's live=true flag or non-empty evidence, so the prior payload did not…
  • Outcome: ⚠️ 1 warning across 1 run (30m40s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 1 info
  • ℹ️ tests/fm-forge-mail.test.sh:639 - The source change makes a comment-POST HTTP 200 a newly accepted success code (bin/fm-forge-mail.sh:664 previously rejected 200 via [ "$code" != 201 ]), but no test pins it: the new test and all pre-existing ack tests drive the POST with 201 (the fake default at tests/fm-forge-mail.test.sh:85) or 500, so reverting the POST check to 201-only would still pass the suite. The intent's "colocated test coverage" covers the 201-on-close regression (the new test does fail before the fix via the old [ "$code" != 200 ] close check), leaving only this one cell unpinned. Remedy: drive one ack test (e.g. test_ack_posts_receipt_then_closes or the new test) with FM_FAKE_CURL_COMMENT_CODE=200.
⚠️ **Test** - 1 warning
  • ⚠️ live validation verdict: inconclusive (0 of 1 scenarios were driven live against the product); untested: End user invokes the fm-forge-mail ack path via the real bin/fm-forge-mail.sh (real curl, real secret-tool against a disposable gnome-keyring, real TLS) and the corrected ack status-code handling succeeds observably
  • Live validation: ⚠️ inconclusive - 0 of 1 scenarios driven live against the product
Scenario Result Live Evidence
End user invokes the fm-forge-mail ack path via the real bin/fm-forge-mail.sh (real curl, real secret-tool against a disposable gnome-keyring, real TLS) and the corrected ack status-code handling succ… ⏸️ untested no The prior payload was rejected with only a truncated findings+summary snippet preserved; that snippet does not record this scenario's live=true flag or non-empty evidence, so the prior payload did not…
  • No tests executed in this correction-only turn (no tools, commands, or product runs were permitted); the prior claimed live run of bin/fm-forge-mail.sh (real curl, secret-tool, TLS) is not preserved in the supplied evidence and is not claimed as tested here
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

A live smoke test found the ack path failing after it had already posted
the receipt and closed the issue: Forgejo returns 201 (Created) for the
receipt POST and may return 201 for the issue-close PATCH, while the
script accepted only 200. Treat both 200 and 201 as success on both
calls; no other behavior changes. Extend the colocated tests with a
201-on-both-calls case and a fake-close-code override.
@kirkins kirkins changed the title fm-forge-mail: accept HTTP 201 as success on the ack comment and close fix(bin): accept HTTP 200 and 201 from ack receipt and close calls Oct 12, 2026
@kirkins
kirkins merged commit 13b702f into main Oct 12, 2026
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant