Repository navigation
fix: require actual PR references in CI-ready ship notes - #7422
Conversation
|
The only red job, Behavior portable serial 3, passed all 29 tests; its timing-artifact upload then failed after five GitHub artifact-service request timeouts. Could a maintainer please re-run that job? |
|
Speaking as Kun's firstmate: thank you @ironerumi, both for the fix and for diagnosing the red job. I checked the log you pointed to. Behavior portable serial 3 ran every test with Review of the tip ( contract-class: restore. The CI-ready Status: waiting on the re-run. Nothing is needed from you. If it goes green and the PR stays mergeable, this is eligible to land. |
|
Speaking as Kun's firstmate: this is merged. Thank you @ironerumi — really appreciate you taking the time on this. |
Intent
The developer asked to offer the fix for upstream issue #6200 as an upstream pull request.
fm_dod_note_reports_ci_readyinbin/fm-dod-lib.shdecides whether a status note is the CI-ready ship report with the glob*PR*"checks green"*|*"checks green"*PR*, so an uppercasePRinside any word (PROD, PROPERTIES) makes a note such aspaused: PROD deploy watch, checks green on TESTcount as a CI-ready done report, turning a still-monitoring task into a completed one. The issue is labeled ready-for-pr. The developer’s fork already fixed this (commit 1885248 in ironerumi/firstmate): the note must contain "checks green" and an actual PR reference (fm_dod_note_has_pr_reference), not a bare substring.What Changed
PR.Risk Assessment
✅ Low: The change is narrowly scoped to requiring an explicit PR/MR reference for CI-ready notes and adding the supported Forgejo plural URL form, with behavior-focused coverage for the relevant accepted and rejected note shapes.
Testing
The focused fm-dod behavior suite passed; live executable checks reproduced the old false positive and verified the target rejects it while preserving valid PR/MR CI-ready reports and downstream gating. Evidence was saved as a reviewer-visible transcript.
bash tests/fm-dod-lib.test.shand the target-behavior section of the regression evidenceEvidence: CI-ready note regression evidence
Source: CI-ready note regression evidence
Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 1 issue found → auto-fixed ✅
bin/fm-dod-lib.sh:635- The new PR-reference matcher omits the supported Forgejo/Gitea/pulls/<n>URL form.forge=forgejois allowed for no-mistakes and existing callers use URLs such ashttps://git.example.org/team/repo/pulls/12; a legitimatedone: PR .../pulls/12 checks greentherefore failsfm_dod_note_has_pr_reference, causingfm_dod_should_gate_ship_doneto skip the named-head gate and accept an unpushed HEAD. Add the/pulls/[0-9]+form and cover it in the regression cases;tests/fm-dod-lib.test.sh:268-272currently only exercises singular/pull/and GitLab MR URLs.🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
bash tests/fm-dod-lib.test.shand the target-behavior section of the regression evidencebash tests/fm-dod-lib.test.shBase-revision behavior driven fromgit archive 4de02c06 binfor the reported PROD/PROPERTIES false positivesTargetfm_dod_note_reports_ci_readycases for invalid monitoring text and GitHub/GitLab PR or MR referencesTargetfm_dod_should_gate_ship_donecases for ordinary and genuine CI-ready done reports✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.
Issues
Closes #6200
Fixes #6200