Skip to content

fix(ci): bind docs precommit to the admitted event base - #14488

Draft
EffortlessSteven wants to merge 2 commits into
mainfrom
fix/docs-gate-event-base
Draft

EffortlessSteven wants to merge 2 commits into
mainfrom
fix/docs-gate-event-base

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Summary

Bind the docs-gate precommit selector to the immutable event base rather than the checkout-time origin/main ref. This retains the full precommit table and 20-minute timeout.

The #14240 native group run 43156857731 had a two-line changelog-only B→G delta, but precommit selected Rust-covered_by builds (361s + 272s), output goldens, and Clippy against origin/main. It timed out at 20 minutes. This repairs selection, not timeout policy.

Swarm / Source Boundary

  • swarm-only CI, runner, routing, source-of-truth, or agent-operating surface

Source-of-truth Links

Proposal: none; bounded regression repair
Spec: existing native-event qualification and full precommit contract
ADR: none; no new authority
Plan item: docs-only queue-gate performance
Governing issue or accepted claim: #14240 docs-gate timeout on native merge group
Acceptance delta (one sentence): The docs gate retains all required checks but computes its precommit delta from the admitted event base and checked-out integration, not a moving local main ref.

Candidate Relationships

Candidate branch (GitHub PR head is authoritative after publication): fix/docs-gate-event-base
Stack parent or prerequisite PR (if any): none
Proposed replacement of PR (if any; not yet accepted): none
Acceptance retained from a replaced candidate (if any): none
Accepted winner and losing candidate disposition (when decided): none; not a replacement for #14240's rustix change

Scope and proof

  • Validate SHA shape, exact integration checkout and base ancestry before any Cargo step.
  • Update only the disposable job checkout's refs/remotes/origin/main, never the remote branch.
  • Keep cargo policy preflight and cargo xtask precommit unchanged.
  • Execute actual workflow Bash against controlled Git graphs and a Cargo scope witness: stale-main positive; malformed/missing base; wrong checkout; unrelated base; real Rust delta negative.
  • Red baseline: stale-main control fails before repair; invalid identity still reaches Cargo.
  • Green: 27 controls in test_history_sync_scope.py pass. jactionlint 2.5.0 pinned correctness/no-online passes with Node available. git diff --check passes.
  • Rust-owned cargo test --locked -p xtask --test hard_cut_admission_selftest history_sync_scope_real_bash_controls_pass -- --exact --nocapture passes: 1 selected control invokes all 27 Python controls (5m34s cold compile; 0.42s test). Isolated official Rust 1.95.0, two Cargo jobs, debug symbols disabled.
  • Exact current-head dependency-light Rust wrapper rerun (--no-default-features, same selected integration test) passes: 11.85s build +0.35s test; one selected Rust control executes all 27 Python controls. This is not full workspace coverage.
  • The dependency-free Rust workflow contract suite passes all 30 tests (0.40s execution), including the hosted-shards negative mutation control. It was compiled directly with the pinned rustc against this candidate's checked-in source, without claiming full Cargo workspace proof.
  • Worktree doctor, check-workflows, check-changelog-fragments and check-pr-shape all pass. No native hosted proof or sub-20-minute performance claim yet.
  • Full ci-policy exited1 after1338s: cargo test -p ripr --lib analysis::scip::admission::tests --no-run was terminated by SIGKILL9. Cause is not established as a kernel OOM; memory pressure was observed. This unrelated full library-test build remains unqualified locally, not silently skipped or reported green. A materially lower-memory isolated retry (one job, incremental compilation off, debug0) also failed with SIGKILL9 after362s. No further heavy local retry is planned on this host; hosted qualification is still required.
  • check-fast was not run after that expensive failure; the changed-surface checks above ran directly.
  • Published head: 625e4738e69a4b994b19216b0049b7f263289a21; four files, including the existing Rust test-count expectation updated from 22 to 27.

Review

Source and authority review found no permission/trigger/protection change, no remote-ref write, no check omission, and no handling of secrets. Actual Rust changes remain in the selected diff. SOURCE_REVIEW_READY for the bounded workflow/source change; overall REVIEW_INCOMPLETE for protected landing. Full local ci-policy is incomplete because of the SIGKILL above, and required native hosted proof is outstanding.

CI Economics

  • LEM impact: avoids inherited/out-of-scope compilation in docs jobs; measured savings pending.
  • Workflows touched: routed-rust.yml, docs-gate only.
  • Branch protection impact: none.
  • Failure mode caught: local origin/main differs from immutable event B.
  • Cheaper signal considered: executed Git/shell selector controls before hosted qualification.
  • Required lanes affected: docs-gate; same full precommit commands and 20-minute bound.
  • Advisory lanes affected: none.
  • On-demand/release lanes affected: none.
  • Labels that alter behavior: none added.
  • Artifact families affected: none.
  • Rollback path: revert this commit; previous selection behavior returns without settings changes.
  • Historical cost: failed docs job consumed about 20 runner-minutes; 10m33s in two covered_by builds alone. This is not measured candidate savings.

Changelog

changelog.d/docs-gate-event-base.md follows the Internal / CI section, bullet and trailing issue-reference format.

Claim Boundary

This establishes event-bound selection in controlled executions, not successful full hosted qualification or measured end-to-end latency. No npm/release/deployment changes.

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 10 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 145 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 1c36de0a-27eb-42cf-adaf-f1d23983f865
Commits

Reviewing files that changed from the base of the PR and between a4fc05e and 625e473.

Files selected for processing: 4

  • .github/actions/pr-candidate-admission/test_history_sync_scope.py
  • .github/workflows/routed-rust.yml
  • changelog.d/docs-gate-event-base.md
  • xtask/tests/hard_cut_admission_selftest.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Copy link
Copy Markdown
Member Author

Supporting evidence from a docs gate that passed, so this is not limited to #14240: run 43143833577 (Ripr Docs Gate, success) took 18.8 of its 20 minutes. Its precommit-v2.json shows merge_base_ref: origin/main at 13b2183 while the group head was 552db4d, so the change set picked up 10 Rust files from queue predecessors (TypeScript analysis, binding_predicate, fuzz_inprocess). That selected the covered_by test builds (267 s + 199 s) and Clippy on ripr (195 s) and xtask (140 s), about 13 minutes that a docs-only delta does not need. Every docs-only entry behind a code entry in the queue is close to the timeout until this lands. I am not opening a competing change; this PR owns the fix.


Generated by Claude Code

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SOURCE_REVIEW_READY

Reviewed commit 625e473, tree 65551301b5ddd9a860531dee19ebf4136d2f1f87. The event base and checkout are validated before binding only the disposable local origin/main ref; no remote refs, permissions, triggers, timeout or required commands change. Executed workflow controls reject stale-base selection, malformed/missing identities, wrong checkout and nonancestor bases; a real Rust delta remains selected. The existing Rust-owned wrapper executes all 27 controls and passes on this tree. Pinned semantic workflow lint and workflow/changelog/body policy checks pass. No material source defect found.

Full local ci-policy remains incomplete: the unchanged RIPR library-test compile was terminated by SIGKILL9 after the policy prefix passed. Details and non-claims are in the PR body. This source review does not establish native queue qualification, measured latency improvement, or permission to bypass required checks.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Evidence-only sweep triage: this PR currently conflicts with main (merge state CONFLICTING, stale since mid-November). An evidence-only head-exact review at the current head would be wasted work — the head must change to resolve the conflict, which invalidates any review posted now. Please rebase onto current origin/main and push; the evidence review lane will pick the refreshed head up from the sweep queue automatically. No defect is asserted — this is a landing-order state, not a code finding.

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