Skip to content

Enforce source-bound Fbuild PR gates - #1637

Merged
zackees merged 1 commit into
mainfrom
feat/bosn-gate-enforce
Oct 3, 2026
Merged

zackees merged 1 commit into
mainfrom
feat/bosn-gate-enforce

Conversation

@zackees

@zackees zackees commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Fbuild now has a proven source-bound local gate, but shadow mode still lets an unattested PR start its runner fan-out. Enforce the attestation before minimal-workflow jobs start. Non-PR events keep the verifier job successful, so default-branch and dispatch coverage continue.

The local gate runs the existing workflow-dispatch event to execute the same required Ubuntu workspace and ignored facade commands before stamping the tree. Its frozen proof now requires dispatch evidence; PR event records cannot substitute for that proof. Board, extended/full and other native coverage remain remote, and no quick-gate skipping is enabled.

Validation: regression failed on shadow mode, then 26 focused checks passed; Ruff and sole-primary review passed. Published bosn 0.1.11 executed the full declared gate in 224s (963a50d7-4f74-4fed-ace2-3cfaf2820bad). Real ci-lint local-gate verify --event pull_request rejects the unsigned head with exit 1 and accepts the stamped head. Only the existing ci-minimal workflow changes, through its generator.

Follows #1636 (merged at 8246c30). Refs #1635. Coordinated with forge-ci/ci.yml#259 (evidence update; follows #258). Full fleet migration and the 100% first-push target remain unproven.

Local-Gate: v1 tree=4d5064a4071a02518339cd4bad680249a56aa7d1 secs=224 lanes=linux-minimal:run
Ci-Attestation: {"at":1791024365,"gate":"general/all/ubuntu-ci-guards","host":"linux-x86_64","key":"b07767312a6d13ec17d1c7877ce534c14e61fea19376563dc4da6a657a6b905d","lane":"linux-minimal","parents":["8246c30990859bb41740215c0b075bc6fdb4e474"],"secs":224,"stamp":"4bc7f1d5a30c07a9521a238f2ed96a7e","tree":"4d5064a4071a02518339cd4bad680249a56aa7d1","v":1,"via":"run"}
Ci-Attestation: {"at":1791024365,"gate":"rust/x86_64-unknown-linux-gnu/workspace-clippy","host":"linux-x86_64","key":"b07767312a6d13ec17d1c7877ce534c14e61fea19376563dc4da6a657a6b905d","lane":"linux-minimal","parents":["8246c30990859bb41740215c0b075bc6fdb4e474"],"secs":224,"stamp":"88325819622c56a1f1397de84e4f7d16","tree":"4d5064a4071a02518339cd4bad680249a56aa7d1","v":1,"via":"run"}
Ci-Attestation: {"at":1791024365,"gate":"rust/x86_64-unknown-linux-gnu/workspace-test","host":"linux-x86_64","key":"b07767312a6d13ec17d1c7877ce534c14e61fea19376563dc4da6a657a6b905d","lane":"linux-minimal","parents":["8246c30990859bb41740215c0b075bc6fdb4e474"],"secs":224,"stamp":"0070b69664e8d2c24cb68afb9aa5d029","tree":"4d5064a4071a02518339cd4bad680249a56aa7d1","v":1,"via":"run"}
Ci-Attestation: {"at":1791024365,"gate":"rust/x86_64-unknown-linux-gnu/python-facade-test","host":"linux-x86_64","key":"b07767312a6d13ec17d1c7877ce534c14e61fea19376563dc4da6a657a6b905d","lane":"linux-minimal","parents":["8246c30990859bb41740215c0b075bc6fdb4e474"],"secs":224,"stamp":"c5d8cca98852c88db04e471c23f0c52e","tree":"4d5064a4071a02518339cd4bad680249a56aa7d1","v":1,"via":"run"}
@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: FastLED/fbuild/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b0d9a641-df73-4e5b-a47e-60863b90e331
📥 Commits

Reviewing files that changed from the base of the PR and between 8246c30 and d962b45.

📒 Files selected for processing (7)
  • .github/workflows/ci-minimal.yml
  • ci/README.md
  • ci/local_gate.py
  • ci/render_workflows.py
  • ci/test_fractional_workflows.py
  • ci/test_local_gate.py
  • local-gate.toml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The local gate changes from shadow mode to enforcement for PR attestations. Proof verification now requires the workflow_dispatch event, and CI runs the source-proof step only for pull requests.

Changes

Local gate enforcement

Layer / File(s) Summary
Proof event validation and dispatch
ci/local_gate.py, ci/test_local_gate.py
Run proofs now include the event. The local gate submits workflow_dispatch runs, and verification rejects proofs with another event.
PR gate workflow and configuration
local-gate.toml, ci/render_workflows.py, .github/workflows/ci-minimal.yml, ci/test_fractional_workflows.py, ci/README.md
The gate mode is now enforce. The generated and checked-in workflows limit source-proof verification to pull requests. Tests check the gate mode and workflow condition. The README documents the gate and the bosn runner requirement.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to d962b

The test still protects the shadow-mode reuse decision. The PR verifier is configured for pull requests, though its behavior when proof is missing was not established by the available evidence.

Security Architecture Review

Security architecture risk: 🔵 Low · up to d962b

The change tightens pull-request checks without adding verifier permissions or replacing remote tests. No introduced security vulnerability was established. Risk remains low rather than minimal because the separately supplied attestation verifier’s authentication, source-binding, and failure behavior could not be independently confirmed.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The directly affected security outcome is admission of this repository’s PR source into downstream CI execution. The visible change concerns runner authorization and proof eligibility, not a new production deployment or additional verifier privilege.

Trust Boundaries and Controls

  • observed — PR-controlled source and configuration are checked out before the pinned external verifier runs. The workflow establishes verification ordering, but the available source does not establish how that consumer authenticates attestations, handles altered configuration, or binds acceptance to the originating run and PR head.

Resilience and Maintainability Implications

  • observed — The local validator rejects nonterminal, failed, incomplete, dirty, mismatched, and wrong-event proof records. Local orchestration propagates wait failures and rechecks source state, but shows no explicit cancellation or locking. That lifecycle structure is unchanged; provider-side cleanup and atomic attestation publication remain outside the available evidence.

Hardening Proposals

  • proposed — Before broader rollout, establish an auditable end-to-end contract for the pinned verifier covering missing, altered, stale, wrong-SHA, and wrong-event proofs, plus interruption and concurrent-run attestation publication. This is an assurance proposal, not an observed bypass.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 4 files. (3 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: enforcing source-bound Fbuild gates for pull requests.
Full details: Docstring Coverage

Explanation

Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 4 files. (3 skipped: 3 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · 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

Comment @coderabbitai help to get the list of available commands.

@zackees
zackees merged commit 971efdf into main Oct 3, 2026
25 checks passed
@zackees
zackees deleted the feat/bosn-gate-enforce branch October 16, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant