feat(ci): ripr wrapper --base + policy-report projection (#182 follow-up)#231
Conversation
…on} projection (#182 follow-up) Brings `cargo xtask ripr-pr` and `.github/workflows/ripr.yml` up to the PR 1 spec that #230 partially shipped. Two surfaces change: 1. `cargo xtask ripr-pr [--base <ref>]`. Defaults to `origin/main`. The flag is currently forward-looking: `ripr pilot` operates on the working tree and has no `--base` flag, so the wrapper acknowledges and ignores non-default values today. The shape is stable for the eventual switch to `ripr check --base <ref>` once that format contract is something Shipper wants to consume. 2. Projection step after `ripr pilot` writes its native outputs: target/ripr/pilot/pilot-summary.md -> target/policy/ripr-report.md target/ripr/pilot/pilot-summary.json -> target/policy/ripr-report.json So ripr's report sits alongside the other policy reports in `target/policy/` and a future `policy-report` integration can read it without crawling into ripr's per-mode directory layout. Each side is best-effort: a missing source is a quiet skip, not a wrapper failure. The JSON source is `pilot-summary.json` (~13 KB), not `repo-exposure. json` (~53 MB) or `agent-seam-packets.json` (~34 MB) which would be too heavy to republish as a CI artifact. The comment in `ripr.rs` records the choice. 3. `.github/workflows/ripr.yml`: - `cargo xtask ripr-pr --base origin/main` (explicit form for log legibility) - artifact upload glob expands from `target/ripr/` to `target/ripr/` + `target/policy/ripr-report.*` Tests: ripr::tests::install_hint_mentions_pinned_version (pre-existing) ripr::tests::install_hint_pinned_version_matches_workflow (pre-existing) ripr::tests::project_one_skips_missing_source (new) ripr::tests::args_default_base_is_origin_main (new) 19/19 tests passing (15 no_panic + 4 ripr). Clippy and fmt clean.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Droid finished @EffortlessSteven's task —— View job Review Validation — PR #231 ✅Status: Approved — no candidates emitted. Inspected surfaces
Lenses applied
Validation checks
Why no commentsThis PR touches only xtask infrastructure (CI wrapper, no publish-state or registry-truth surface). The Residual risk
Security reviewNo security-relevant surface touched. This PR is purely CI/workflow infrastructure. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c30d933d67
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if !src_path.exists() { | ||
| // Quiet skip — ripr may not have written this output (e.g. it | ||
| // bailed early). The CI workflow uploads target/ripr/ either way. | ||
| return Ok(()); |
There was a problem hiding this comment.
Clear stale reports when ripr omits outputs
Failure mode: when ripr pilot exits before writing pilot-summary.*, this quiet skip leaves any existing target/policy/ripr-report.* in place; observed the CI workflow caches target and now uploads target/policy/ripr-report.*, so a restored or previous report can be published as the current run's evidence. Fix direction: remove the destination before returning on a missing source (and before copying) or write an explicit current-run placeholder. Validation: cargo test -p xtask project_one_skips_missing_source -- --exact plus a test that seeds a stale destination and verifies it is removed. Confidence: high.
Useful? React with 👍 / 👎.
* feat(ci): mutation testing PR-time lane + cargo xtask mutants-pr (#182 PR 3) Adds a label-gated PR-time mutation lane and the xtask wrapper it invokes, keeping mutation off every PR's hot path while making it cheap to opt in when warranted. cargo xtask mutants-pr --changed [--base origin/main] [--dry-run] is a thin wrapper around `cargo-mutants` that: 1. Refuses to run without `--changed`. Whole-workspace mutation is intentionally not part of the PR-time lane — that lives in the weekly schedule (see docs/ci/test-evidence-lanes.md). 2. Computes `git diff <base>...HEAD --name-only -- '*.rs'`, filters out `tests/` and `benches/` paths (cargo-mutants only mutates production source). 3. Runs `cargo mutants --no-shuffle --file <each-path>` (or `--list` when `--dry-run` is passed). 4. If `cargo-mutants` is missing locally, prints install instructions and exits advisory-success rather than erroring. CI installs the tool before invoking. 5. Surfaces `cargo mutants` non-zero exit codes — surviving mutants are load-bearing failures, unlike ripr's purely advisory findings. `.github/workflows/mutation.yml` adds the `mutants-pr` job alongside the existing `mutants-weekly` job. The PR job's gate: if: github.event_name == 'pull_request' && ( contains(github.event.pull_request.labels.*.name, 'mutation') || contains(github.event.pull_request.labels.*.name, 'full-ci') ) The weekly job's crate list stays unchanged (shipper-duration, shipper-types, shipper-config). Expanding it to the full trust-critical surface (shipper-core, shipper-encrypt, etc.) is too expensive for a 60-minute job and is its own future rollout step; the policy stays about routing, not coverage scope. xtask/src/mutants.rs new — 3 unit tests xtask/src/main.rs `mutants-pr` subcommand wiring .github/workflows/mutation.yml two-job split (mutants-weekly + mutants-pr) docs/ci/test-evidence-lanes.md advisory-routed table + targeted mutation section updated CHANGELOG.md Added entry Tests: mutants::tests::install_hint_mentions_cargo_install (new) mutants::tests::args_defaults_are_explicit (new) mutants::tests::changed_requires_the_flag (new) 24/24 tests passing. Refs #182 (this is the third PR in the #182 sequence: advisory lane in #230, --base + projection in #231, badges in #232, mutation scoping here). * fix(xtask): wrap mutants-pr doc-comment Behaviour block in fenced code `<REF>` inside a doc comment is parsed by rustdoc as an invalid HTML tag under `-D rustdoc::invalid-html-tags` (implied by RUSTDOCFLAGS=-D warnings on the CI Documentation job). Wrap the whole Behaviour block in a ```text fence so the angle brackets are literal.
Summary
Brings
cargo xtask ripr-prand.github/workflows/ripr.ymlup to the PR 1 spec that #230 partially shipped.--base <ref>flag oncargo xtask ripr-pr(defaultorigin/main). Currently forward-looking:ripr pilotoperates on the working tree and has no--baseflag, so the wrapper acknowledges and ignores non-default values today. The shape is stable for the eventual switch toripr check --base <ref>.target/policy/ripr-report.{md,json}projection — afterripr pilotwrites its native outputs, the wrapper copiestarget/ripr/pilot/pilot-summary.{md,json}intotarget/policy/ripr-report.{md,json}so a futurepolicy-reportintegration can pick it up without crawling ripr's per-mode directory layout. Each side is best-effort (a missing source is a quiet skip).pilot-summary.json(~13 KB), notrepo-exposure.json(~53 MB on the Shipper workspace) oragent-seam-packets.json(~34 MB) — those would be too heavy as CI artifacts. Comment inripr.rsrecords the choice.target/ripr/totarget/ripr/+target/policy/ripr-report.*.Test plan
cargo build -p xtask— cleancargo test -p xtask— 19/19 passing (15 no_panic + 4 ripr, two new:project_one_skips_missing_sourceandargs_default_base_is_origin_main)cargo clippy --workspace --all-targets -- -D warnings— cleancargo fmt --all -- --check— cleancargo xtask ripr-prlocally — projects 5 KBripr-report.md+ 13 KBripr-report.jsonintotarget/policy/Followups deferred
badges/ripr.json+badges/ripr-plus.json+cargo xtask repo-ripr-badge-artifacts+ README links).mutation/full-cilabel gates.Refs #182.