Repository navigation
fix(bin): use gh-axi for the ship DoD draft check - #5519
Merged
kunchenguid merged 2 commits intoSep 25, 2026
Merged
Conversation
karotkriss
force-pushed
the
fm/fm-up-5325-dod-raw-gh
branch
from
September 24, 2026 14:54
1a5cba1 to
b7a68fe
Compare
Owner
|
Speaking as Kun's firstmate: whole thread read (body; linked #5325 + prior stamps). Diff + green CI reviewed against main tip (pre-merge hole still present in Verdict: merge · contract-class: restore · Firstmate flag: no · closes #5325: yes Tip check: both direct-PR and no-mistakes DoD blocks still instruct raw VISION.md per-rule:
CI CLEAN. Squash-merging. |
Owner
|
Speaking as Kun's firstmate: this is merged. Thank you @karotkriss — really appreciate you taking the time on this. |
mehulbhagwani
pushed a commit
to mehulbhagwani/firstmate
that referenced
this pull request
Sep 26, 2026
* fix(bin): use gh-axi for the ship DoD draft check * no-mistakes(review): use PR number not URL in gh-axi draft check
mehulbhagwani
pushed a commit
to mehulbhagwani/firstmate
that referenced
this pull request
Sep 26, 2026
* fix(bin): use gh-axi for the ship DoD draft check * no-mistakes(review): use PR number not URL in gh-axi draft check
ppetermann
added a commit
to ppetermann/firstmate
that referenced
this pull request
Sep 26, 2026
…om the take-in This reverts b52d401 (fix: limit project memory edits to factual corrections, kunchenguid#5636) and c4c9d63 (fix(bin): use gh-axi for the ship DoD draft check, kunchenguid#5519) on top of upstream 920a7d9, so the P3 take-in merge brings in the rest of upstream d4f3b78..920a7d9 without them. - b52d401: skipped on the captain's word (take-in question 4); this fleet keeps its AGENTS.md section 6 routing, where a worker may create or update a project's AGENTS.md through fm-ensure-agents-md.sh. - c4c9d63: rewords the non-draft done check this fleet does not carry; the direct-PR worker here opens a draft and firstmate owns the flip.
ashkonmousavi
added a commit
to ashkonmousavi/firstmate
that referenced
this pull request
Sep 26, 2026
Intent
Fixes #5325
Ship briefs generated by firstmate tell a worker to confirm a pull request is not a draft with
gh pr view <url> --json isDraft, while the same brief's rule 3 and the session-start guidance requiregh-axifor every GitHub operation.Make the generated definition of done use
gh-axifor that draft check so rawghis never the documented path, and keep everything else in the definition of done unchanged.This closes upstream issue #5325.
What Changed
bin/fm-dod-lib.shnow documents the non-draft confirmation in both the direct-PR and no-mistakes definitions of done withgh-axi pr view <number>(expectingdraft: no) andgh-axi pr ready <number>, replacing the rawgh pr view <url> --json isDraftpath so every GitHub operation in the brief goes throughgh-axi.tests/fm-brief.test.shassertions to match the newgh-axidraft-check andgh-axi pr ready <number>wording.test_pr_based_dod_draft_check_uses_gh_axiintests/fm-dod-lib.test.sh, which asserts the generated DoD for both modes omitsgh pr viewand reads draft state viagh-axi.Risk Assessment
✅ Low: A minimal, well-bounded doc-string change that swaps a raw gh draft-check for the correct gh-axi invocation at both DoD sites, verified against the installed gh-axi, with tests exercising the real generator's emitted output.
Testing
Ran both affected shell test suites (all pass), then drove the real DoD generator for the direct-PR and no-mistakes modes and captured the actual worker-facing text: both now instructgh-axi pr view <number>must printdraft: noandgh-axi pr ready <number>, and no rawgh pr viewremains. I also confirmed against the live gh-axi tool thatgh-axi pr view 5534really printsdraft: no, so the documented instruction is accurate. Evidence is text/CLI transcripts because this change's product surface is generated brief text, not a rendered UI.fm_dod_block direct-PRemitsgh-axi pr view <number>must printdraft: noandgh-axi pr ready <number>fm_dod_block no-mistakesemits the same gh-axi draft check after the CI-green return pointgh pr viewsurvives anywhere in either generated DoDgrep 'gh pr view'over both generated DoDs returns no match (exit 1)gh-axi pr view <number>actually printsdraft: noon a real non-draft PRgh-axi pr view 5534printsdraft: noEvidence: Generated worker-facing DoD showing gh-axi draft check (both PR modes)
Source: Generated worker-facing DoD showing gh-axi draft check (both PR modes)
Evidence: Live gh-axi pr view prints 'draft: no' (matches documented instruction)
Source: Live gh-axi pr view prints 'draft: no' (matches documented instruction)
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:369- The new draft-check command handed to the worker,gh-axi pr view <url>, is not a valid invocation:gh-axi pr viewrequires a PR number, not a URL. Verified against the installed gh-axi:gh-axi pr view https://github.com/kunchenguid/firstmate/pull/5515fails witherror: Missing PR number(code VALIDATION_ERROR), whereasgh-axi pr view 5515printsdraft: nocorrectly. The old rawgh pr view <url>accepted a URL, so substituting the same<url>placeholder into gh-axi silently breaks the documented command - defeating the intent of giving the worker a correct gh-axi draft check. Same defect at the no-mistakes site bin/fm-dod-lib.sh:404 (identicalgh-axi pr view <url>string). Remedy corrects what the change already does: documentgh-axi pr view <number>(the trailing /pull/N number from the PR URL; gh-axi auto-resolves the repo from the worker's checkout, or pass--repo <owner>/<repo>), which still printsdraft: no. The two grep tests that enshrine the broken string must move with it: tests/fm-brief.test.sh:343 and tests/fm-dod-lib.test.sh:315 (and the accompanying assert_no_grep 'gh pr view' at tests/fm-dod-lib.test.sh:313 remains valid).🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
bash bin/fm-brief.sh issue-5325 firstmate --mode direct-PR-> scaffolded-brief-direct-PR.md: line documentsgh-axi pr view <number>must printdraft: noandgh-axi pr ready <number>; `grep -c…bash bin/fm-brief.sh issue-5325-nm firstmate --mode no-mistakes-> scaffolded-brief-no-mistakes.md line 114 uses the gh-axi path;grep -c 'gh pr view'= 0gh-axi pr view 5517printsdraft: nofor a ready PR;gh-axi pr view 5425printsdraft: yesfor a draft PR - matches the brief's expected output and distinguishes draftsgh pr viewand no baregh pr|api|issueinvocation (onlygh-axi)bash tests/fm-dod-lib.test.shandbash tests/fm-brief.test.shboth report all tests passed, includingtest_pr_based_dod_draft_check_uses_gh_axibash tests/fm-dod-lib.test.sh(incl. newtest_pr_based_dod_draft_check_uses_gh_axi)bash tests/fm-brief.test.sh(incl.test_pr_based_dod_requires_non_draft)bash bin/fm-brief.sh issue-5325 firstmate --mode direct-PRthen inspected scaffolded data/issue-5325/brief.mdbash bin/fm-brief.sh issue-5325-nm firstmate --mode no-mistakesthen inspected scaffolded brief.mdsource bin/fm-dod-lib.sh; fm_dod_block direct-PR|no-mistakes ...gh-axi pr view 5517(ready PR) andgh-axi pr view 5425(draft PR) against the live forge✅ No issues found.
fm_dod_block direct-PRemitsgh-axi pr view <number>must printdraft: noandgh-axi pr ready <number>fm_dod_block no-mistakesemits the same gh-axi draft check after the CI-green return pointgh pr viewsurvives anywhere in either generated DoDgrep 'gh pr view'over both generated DoDs returns no match (exit 1)gh-axi pr view <number>actually printsdraft: noon a real non-draft PRgh-axi pr view 5534printsdraft: nobash tests/fm-dod-lib.test.sh(includes newtest_pr_based_dod_draft_check_uses_gh_axi)bash tests/fm-brief.test.shsource bin/fm-dod-lib.sh && fm_dod_block direct-PR fm-up-5325andfm_dod_block no-mistakes fm-up-5325- drove the real generator and captured worker-facing DoD textGrepped both generated DoDs:grep 'gh pr view'returns no match;grep 'gh-axi pr view <number>'present in both modesgh-axi pr view 5534- confirmed the live tool printsdraft: nofor a non-draft PR✅ **Document** - passed
✅ No issues found.
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ No issues found.
✅ **Push** - passed
✅ No issues found.
✅ No issues found.