Skip to content

perf(ci): separate the workflow and agent-skill policy checks from the RIPR product build #7158

Closed

Description

@EffortlessSteven

Consumes the existing product-gate plan in docs/ci/PRODUCT_GATE_PLAN.md and the existing repository-policy implementations. Cadence and runner migration remain #4986 / #4987 / #4988 under #1029.

Verified source problem

At main@344bf737c93f7583fe828d73bb1a4a522088d708, xtask/Cargo.toml depends unconditionally on the production ripr crate and ra_ap_syntax. Even an administrative subcommand starts through that package's build graph.

The routed docs job runs cargo xtask precommit plus cargo xtask check-agent-skills; the shared Rust job also starts repository-policy work through xtask. A docs-only label or a small command does not make its bootstrap product-independent.

Bounded first slice

Give workflow-policy and agent-skill policy checks a product-independent execution path, using their existing implementations and command semantics. Integrate those two checks into the maintained early-feedback path so their actual defects can be reported before the production build.

This first slice does not claim that the entire docs precommit table is product-free. Other commands may genuinely need product types or analysis; preserve them and their coverage.

Design

  • Trace the two selected command dispatches, policy inputs and nested calls before extraction. Record their exact current producer, command IDs, failure behavior and callers.
  • Place their common implementation in the smallest coherent Rust package boundary with no normal/build dependency on ripr or the product parser stack. Reuse an existing suitable package if present. A new bin inside the unchanged heavy xtask package is not sufficient.
  • Keep one implementation. Existing xtask commands delegate to it; the lightweight front door uses it directly. Do not port policy into a competing shell/Python checker or introduce a second gate registry.
  • Select a single early invocation for each obligation on a given execution path. Explicitly reconcile any nesting under precommit: do not retain a permanent duplicate execution merely to get another visible step. Preserve public/local precommit's complete policy contract.
  • Change only these selected command call sites and their necessary build/metadata wiring. If preserving the complete precommit contract requires a broader redesign, keep this leaf at the independently useful affected-policy front door and record the remaining consumer cutover rather than claiming full docs-lane migration.
  • Bind any retained reusable executable to its source/toolchain identity. A cached old policy binary cannot validate new policy code unnoticed. Keep writable build state private.

Acceptance and falsifiers

  • Both selected commands execute their existing real positive/negative fixtures through the lightweight front door.
  • A deliberately malformed workflow and an actual agent-skill contract violation fail before a RIPR production build is allocated.
  • Old xtask and new front-door results agree for valid, invalid, missing-input and unreadable-input fixtures; path ordering does not change meaning.
  • The resolved normal/build dependency graph and a cold-build compiler trace prove the selected executable does not build RIPR or its language analyzers.
  • A moved function, a new bin name, or a warm-cache run without graph evidence cannot satisfy the dependency-cut claim.
  • There is one implementation and one intended execution of each selected proposition per migrated path; runtime/behavioral tracing confirms the nested call graph.
  • Remaining precommit, nextest, doctest, all-feature, golden and fixture obligations are unchanged and still reachable.
  • Wrong/stale executable, failed bootstrap or missing required input cannot become success.
  • Report cold/warm time and build work for the selected commands separately from whole-job time. No whole-CI savings claim from a helper-only benchmark.
  • Existing command catalogue, workflow-contract and repository-policy checks are reconciled; tests run in an existing lane rather than a new expensive workflow.

Rollout and rollback

This is independent of live merge-queue activation and may proceed without waiting for #4838. Coordinate shared workflow edits with #4986/#4988. The deciding criterion is a real, used product-independent policy path with unchanged failure semantics, not maximum extraction in one PR.

Rollback restores the former delegates and their call sites together. Retain the single policy implementation. No live settings, runner credentials, test-feature removal, broad precommit rewrite, public CLI compatibility promise, release or publication operation.

Completion

Implemented and merged in #7256, squash 300f4d579de0653716d23d665700a6ae3bcad06d at 2026-10-10 17:36:12 UTC. One unpublished product-independent implementation serves the lightweight Cargo front door and retained xtask delegates; real required/docs callers use preflight plus identity-bound receipt verification without duplicate policy execution. Cold graph and compiler traces exclude RIPR/parser compilation; bounded cold/warm, compiled work and output measurements are recorded separately in the PR.

Required source-b518 run completed SUCCESS (Result 114271603203): 14,160 tests run and passed, two separately skipped, including all 43 helper tests and all required selected-lane contracts. Actual executed checkout 4d98c4952ebc46203fa387403de6ceb9c4db060a combines b518 with main fbf103c7d3c1e771a341870e91964d27bf644b73. Landed tree 6db13d41f15ee4d028d515ce436db4e5d88671b2 combines later main ac16f4329d1728117e359ee55e079471cf962372; it matches the clean independently reviewed preview, with extraction implementation and governing inputs unchanged, and is not claimed as an executed combined tree. All 11 review threads were resolved before merge.

Remaining limits are outside this completed bounded slice: advisory test-efficiency/test-oracle roots omit helper tests; Windows selector remains NOT_PROVEN under its 128 MiB evidence budget (no staging or selector journeys); runner cadence/profile tuning and the rest of product-dependent precommit remain their existing owners' work. Generated targets must stay outside the helper package to avoid whole-package identity self-invalidation; future policy input roots require updating the existing identity owner. No whole-CI savings ratio, Windows selector qualification or advisory analytics repair is claimed.

Activity

  1. EffortlessSteven commented on Oct 10, 2026

    @EffortlessSteven
    MemberAuthor

    #7158 is repaired and published in PR #7256 at 21fada8b88428a0ea90216e590dd3304fcbec1f1. Disposition: REPAIR_REQUIRED: a new manifest-only check-fast selector finding remains unresolved, independently confirmed at this head.

    The previous required run 38037666970 at fa68 passed the extracted workflow and agent checks in 5 seconds. Full precommit separately failed after 395 seconds: two Command::new calls exceeded the existing allowance of one. Downstream required checks did not run. Cache ENOENT was not the failing gate. Local runtime tests and Clippy had missed the affected static allowance; prior d902 aggregate evidence did not prove the changed fa68 harness. The guard failure was reproduced before this repair.

    The two-file successor shares one fresh fixture command builder, preserving the Cargo-selected artifact, working directory, inherited environment, RUSTC override and receipt refusal semantics. The allowance remains one. build-candidate step 12 now requires the existing process-policy guard before aggregate validation for process and harness changes. No profile, manifest or product changes, and no allowance weakening.

    Exact-head native passes: 34 library and 7 frontdoor tests; strict helper Clippy; formatting; eight affected policy checks; the compiler-selected xtask process guard; and policy preflight. check-fast passed in 836.4046 seconds, with 36 paths independently reconciled, 14 gates run and one fixture gate correctly skipped. Full precommit passed in 198.1652 seconds, verifying both extracted checks without duplicate execution and reaching the passing process gate. Its v2 receipt binds this head, base 331176, and digest 126067c2ac3ab7e75eafd9990735b1b8df79879e7f5096eb06d5818c46cc10ae. Fresh independent review found no blocking source or local-qualification issue. The initial cold xtask native exit remains NOT_ESTABLISHED after session loss; the Finished terminal, warm native pass and selected artifact hash establish actual CLI proof.

    Fresh helper costs: workflow 10.7948 seconds cold / 0.9680 warm; agent 9.2858 cold / 0.2148 warm. Each cold run compiled 21 units, each warm run rebuilt zero. Normal/build dependencies exclude RIPR, RA and OXC. Policy stdout is 57/63 bytes, separate from workflow compiler JSON of 18,969/18,948 bytes and agent compiler JSON of 18,843/18,822 bytes. These are offline, one-job measurements with a populated download cache; no total-CI speedup is claimed.

    Immutable current repair proof supplements prior extraction proof, applicable only to unchanged dimensions. Executable archives passed restoration verification. Source and proof pushes were read back at their exact heads; both owned idle checkouts and private targets are released. Output cleanup reclaimed 4,081,025,928 bytes; reports and verified executable archives remain retained. Shared checkout, toolchain, caches, other owners and prior archives are preserved.

    PR state is Ready. The remaining native Draft→Ready transition was accepted at this exact head under current user-confirmed controls; no half-cycle was repeated. Required run 38048340195 is in progress and will be preserved to terminal. No repeated toggle, manual dispatch, broad label or merge.

    New source finding 4237031739 is valid: helper Cargo.toml and Cargo.lock alone leave the check-fast Rust category false; the strict wrapper calls and validates the same classifier. Precommit_v2 handles manifests on a separate dispatch path and does not refute this defect. Existing 36-path qualification remains valid for its workload but did not discriminate manifest-only selection. A narrow existing-classifier repair and manifest/lock receipt controls are required; no executed red/green pair is claimed yet. The review is now REPAIR_REQUIRED and the thread remains open. A green current-head required run cannot resolve this source finding.

    Current-head natural Rust-only job114180787967 succeeded on integration5fd291a77187ebe9c733b9d6055589975ec4b0ba (parents9cb17eb+21fada8b); actual logs are retained. Predecessor CI is not substituted. Review-protection read returned403; the active-rules endpoint is unavailable through the current fetch tool. These are merge-rule evidence gaps. Windows selector remains NOT_PROVEN under the inherited128MiB admission failure; UB remains NOT_PROVEN under sensor/publication limits despite green advisory jobs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions