Repository navigation
fix: require local suite evidence when CI is unavailable - #57
Merged
Merged
Conversation
…ks-green-on-a-project-e4
levelupself
pushed a commit
that referenced
this pull request
Aug 16, 2026
origin/main advanced by two commits while this branch waited on a merge decision: #55 (render fleet panes to drawn geometry) and #57 (require local suite evidence when CI is unavailable). The opencode primacy-probe fix (#54) was already an ancestor of this branch. One conflict, in bin/fm-brief.sh, and it lands on a file this branch had already resolved once. #57 replaces the literal no-mistakes deliverable sentence with a $READY_DELIVERABLE variable selected by whether the repository can demonstrate a working CI check gate. The incoming variable is kept, because that feature is the point of #57 - but both of its definitions reintroduced "This project ships", silently reverting the per-task noun this branch had unified across the direct-PR, local-only and no-mistakes blocks. The noun is re-applied to both definitions, so the generated brief stays internally consistent. The other four files touched by the incoming work had also been resolved once on this branch (AGENTS.md, bin/backends/herdr.sh, docs/herdr-backend.md, tests/fm-brief.test.sh). Each auto-merged, and each round-one decision was re-verified as still present rather than assumed.
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
Prevent no-mistakes workers from reporting done on repositories where no meaningful CI tests ran. Detect repository condition rather than project name: preserve the existing 'done: PR {url} checks green' ready signal when GitHub Actions is enabled and the default-branch head has observed test-oriented GitHub Actions check runs, but require the full local suite result, exact 40-character final head SHA, clean-tree confirmation, observed pass/fail counts, and proof-file list when Actions are disabled or no test check runs exist. Any detection failure or uncertainty must choose that stricter local-suite gate. Scoped runs may be reported only as scoped and never as an unobserved full pass. Prove both real-CI and no-working-CI behavior with meaningful RED-first behavioral tests. This complements the already-landed commit-bound suite-evidence contract rather than replacing it. Merge current main into the branch when the pending upstream catch-up lands; never rebase it by hand. Pipeline-authored risk rationales, fix summaries, and PR bodies must use role-neutral prose with no second person and no captain, user, firstmate, or crewmate role nouns; this does not apply to product code, prompts, or user-facing copy.
What Changed
Risk Assessment
✅ Low: The authoritative default-branch lookup and encoded check-run query fail closed on uncertainty, preserve the checks-green path only with recognized GitHub Actions test checks, and the fallback brief carries all required local-suite evidence fields.
Testing
The targeted fm-brief behavioral suite passed, and an end-to-end CLI fixture demonstrated both real-CI checks-green reporting and fail-closed disabled-Actions reporting with exact SHA, counts, clean-tree, proof-file, scoped-run, and unobserved-pass requirements; reviewer-visible transcripts and generated briefs were captured, with no source-tree residue.
Evidence: End-to-end terminal-contract transcript
Evidence: Working-CI generated worker brief
Evidence: Disabled-Actions generated worker brief
Evidence: Observed GitHub API probes
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 1 issue found → auto-fixed (2) ✅
bin/fm-brief.sh:269- The required criterion says the checks-green signal is preserved only when “the default-branch head has observed test-oriented GitHub Actions check runs” and any uncertainty must use the stricter gate, but this hunk derives the default branch from the checkout’s locally cachedorigin/HEAD. That symbolic ref can remain onmainafter GitHub’s default changes to another branch; if stalemainhas a matching check, the script incorrectly emitsdone: PR {url} checks green. Resolvedefault_branchfrom the repository API and fail closed if it cannot be observed, then query that returned ref; add a behavioral case where localorigin/HEADdisagrees with GitHub metadata.🔧 Fix: Use authoritative GitHub default branch for CI readiness
1 error still open:
bin/fm-brief.sh:274-default_branchis validated as a Git ref but interpolated into the API URL without percent-encoding. Valid branch names can contain URL delimiters such as#; for a default branch likemain#release, the request can resolve as/commits/main, allowing checks from the wrong commit to produce the forbidden checks-green signal. Encode the branch as one path segment—or resolve its exact SHA through an encoded API request—then query check runs by SHA; add a behavioral regression using such a valid default-branch name.🔧 Fix: Encode default branch in CI check API paths
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
bash tests/fm-brief.test.sh/tmp/no-mistakes-evidence/01M04A2BD7J8B3HA07TF9R8400/capture-brief-evidence.sh— generated briefs for working-CI and disabled-Actions states through the public CLIReviewedend-to-end-transcript.txtto confirm the two terminal contracts and repository API probesgit status --short— confirmed testing left no working-tree artifacts✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.