Repository navigation
Allow direct-PR two-stage review attestation in Require no-mistakes check - #76
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.
Allow direct-PR two-stage review attestation in Require no-mistakes check
The fork's
PR must be raised via no-mistakescheck fails every direct-PR item from the adi2 overflow home, even when all substantive checks pass, because the only passing path is no-mistakes pipeline provenance.This change adds a second passing path: a PR body carrying a valid two-stage attestation (pasted Stage 1 verdict from
bin/fm-review.shplus a named independent second-level review) now passes the check, while the no-mistakes provenance path is unchanged.What changed:
bin/fm-direct-pr-attestation.shvalidates the attestation (Stage 1 heading plus real verdict text, second-level heading with non-placeholderReviewer:andReport:fields, empty bodies rejected)..github/workflows/no-mistakes-required.ymlruns that validator first and only runs the pinned no-mistakes action when no valid attestation is present.docs/code-review.mddocuments the exact attestation format.tests/fm-no-mistakes-required.test.shgains three cases: valid attestation accepted, empty body rejected, placeholder reviewer rejected.Code Review (Stage 1)
Code Review Verdict
Stage 1: Deterministic Review (zero LLM tokens)
No escalation: Stage 1 alone gates this change.
(Note: the verdict above is the real
bin/fm-review.sh worktreeoutput for this branch at commitfe75dfc, run with the pinned ShellCheck 0.11.0 on PATH; the size line reads +209/-0. An earlier run with the host's ambient ShellCheck 0.9.0 escalated purely on the version-pin mismatch, which is an environment artifact, not a code finding.)Independent Second-Level Review
Reviewer: host-agent delegate review (task worker lane, separate read-through from the deterministic Stage 1 pass)
Report: https://github.com/adibirzu/firstmate/tree/fm/fm-ci-review-attestation-check (second-level notes inline below, reviewed at commit
fe75dfc)Second-level notes: read the full branch diff (workflow, validator script, docs, tests) against correctness, security, performance, maintainability, and test coverage. Findings: the workflow gates the pinned no-mistakes action behind
attested != 'true'so genuine no-mistakes PRs are unaffected; the validator reads the body from a file argument or stdin, never executes it, and rejects empty, heading-only, and placeholder bodies; the PR body passes through thePR_BODYenv var rather than command interpolation; no secrets or credentials are touched; follow-upedited-event runs re-validate the current body, so a later body edit cannot smuggle an invalid attestation past the check.Verification (local runs are the CI evidence: Actions minutes are exhausted on this fork)
Red without fix (old check rejects a direct-PR body with no no-mistakes provenance):
Green with fix (new validator accepts the same body; empty body rejected):
New and existing tests, all passing:
Lint (pinned tools):