Repository navigation
fix(bin): preflight PR evidence bodies - #37
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Workers keep publishing PR descriptions the evidence check rejects. Observed 2026-09-25 on six PRs in one session: quota-axi PR 19, firstmate PRs 33 and 35, and jorgsupercore PRs 544 (twice) and 546. Each failed bin/fm-dod-lib.sh evidence validation only at registration, after the PR was already published, and each needed a manual correction round.
The failures were: missing evidence-artifact lines; "live" labels on mocked-fetch runs; non-ISO evidence-captured times such as "2026-09-25 08:39:26 UTC"; artifacts outside the worktree or task temp dir; and duplicate metadata blocks. The checker accepts exactly one evidence-artifact, one evidence-command and one evidence-captured line in the whole body, while workers naturally write one block per claim. The no-mistakes-generated "N of M scenarios driven live" line itself triggers the claim detector.
Fix idea: have the worker, or the no-mistakes PR step via the brief, run the same evidence validation on the body before publishing, and put the exact line format, the one-block rule and the artifact-location rule in the brief's reporting section.
What Changed
Risk Assessment
✅ Low: The change is bounded to pre-publication evidence validation, brief instructions, and executable-interface coverage; no source-verifiable defects or intent contradictions were found.
Testing
Ran the preflight and brief-generation CLIs against synthetic local fixtures covering missing and bullet-prefixed metadata, mocked-fetch labels, non-ISO timestamps, outside artifacts, duplicate blocks, valid pipeline-shaped bodies, and a simulated published-body correction flow. After publication, a GitHub readback of this PR exposed missing evidence metadata in the generated description; the description was corrected before reporting ready.
bash tests/fm-pr-body-preflight.test.sh; PR-body preflight evidencebash tests/fm-brief.test.sh; Brief rendering evidenceThe initial published-body readback was refused by the shared evidence validator.
evidence-artifact: /tmp/fm-firstmate-pr-evidence-format-recurring-c1/initial-forge-readback-validation.txt
evidence-command: { gh-axi pr view 37 -R jazz127/firstmate --hostname github.com --full; bin/fm-pr-body-preflight.sh --gh-url #37 '/tmp/fm-firstmate-pr-evidence-format-recurring-c1/initial-pr-body.md' '/Users/jarad/.treehouse/firstmate-570371/4/firstmate' '/tmp/fm-firstmate-pr-evidence-format-recurring-c1'; } > '/tmp/fm-firstmate-pr-evidence-format-recurring-c1/initial-forge-readback-validation.txt' 2>&1
evidence-captured: 2026-09-25T10:21:05Z
Evidence: PR-body preflight evidence
Source: PR-body preflight evidence
Evidence: Brief rendering evidence
Source: Brief rendering evidence
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
bash tests/fm-pr-body-preflight.test.sh; PR-body preflight evidencebash tests/fm-brief.test.sh; Brief rendering evidencebash tests/fm-pr-body-preflight.test.shbash tests/fm-brief.test.shCaptured both command outputs under~/.no-mistakes/evidence/01M3C08SB9JXHE7RGYCNW204TGVerified the worktree remained unchanged withgit status --short✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.