Skip to content

Refuse branch outcomes that claim passing checks the forge does not confirm - #291

Merged
trillium merged 3 commits into
mainfrom
fm/outcome-green-verify
Nov 4, 2026
Merged

trillium merged 3 commits into
mainfrom
fm/outcome-green-verify

Conversation

@trillium

@trillium trillium commented Nov 3, 2026

Copy link
Copy Markdown
Owner

What changes for a human

A recorded supervision-branch outcome can no longer say a PR's checks are passing unless the forge confirms it. Before, a worker's "PR ready" line (which only says the PR is open) was turned into "ready, all checks passing" even while required checks had not reported, and the guarded merge then refused.

Affected output: the outcome the branch records through bin/fm-branch-report.sh (what the main session and captain read). A passing-checks claim now needs the new read-only bin/fm-pr-ready-check.sh to confirm it; otherwise the report is refused with the missing required check named, and the branch reports what it actually verified. bin/fm-pr-merge.sh behaves exactly as before.

Evidence

flowchart LR
  subgraph Before
    W1[worker: PR ready] --> B1[branch summary: all checks passing] --> S1[(outcome store)] --> M1[main: merge refused, required checks unreported]
  end
  subgraph After
    W2[worker: PR ready] --> B2[branch summary] --> G{claims passing checks?}
    G -- no --> S2[(outcome store)]
    G -- yes --> C[fm-pr-ready-check.sh: same judgment as the merge]
    C -- confirmed --> S2
    C -- not confirmed --> R[report refused, names the unreported required check]
  end
Loading

Regression test (tests/fm-supervision-host-drain.test.sh) with a stubbed PR whose required ci check never reported:

ok - report surface: a passing-checks claim is recorded only when the forge confirms the required checks
  refused:  "all checks passing" -> required check 'ci' has not reported
  recorded: "ready for review, checks still pending"
  recorded: "all checks passing" once ci reports green

Disabling the guard makes this test fail ("a green claim with an unreported required check must be refused: expected exit 3, got 0").

Notes

  • The required-check judgment moved unchanged from fm-pr-merge.sh into fm-pr-github-ready-lib.sh, so the merge and the new check share one implementation. The full fm-pr-merge.test.sh suite passes (123 ok, 0 failing).
  • The branch prompt now says a ready line never means green checks.
  • Out of scope: the merge's own refusal behavior and CI workflows.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7f546283-c11c-440f-a8d9-afcdf422bc0c
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

… confirm

A worker's ready line says a PR is open, not that its checks pass, yet a
recorded branch outcome told the main session a PR was ready with all checks
passing while required checks had not reported, and the guarded merge refused.

fm-branch-report.sh now verifies a passing-checks claim against the PR before
recording it, through the new read-only fm-pr-ready-check.sh. The readiness
judgment moves unchanged from fm-pr-merge.sh into fm-pr-github-ready-lib.sh so
the merge and the check share one implementation. The branch prompt tells the
branch to report a ready PR without claiming green checks unless confirmed.
The report surface now refuses a summary that claims green checks the forge
does not confirm, and this fixture's example PR cannot be read from the forge.
@trillium
trillium force-pushed the fm/outcome-green-verify branch from 06adb87 to fe41069 Compare November 4, 2026 03:10
@trillium
trillium merged commit 6b63a26 into main Nov 4, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant