Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .ripr/suppressions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11542,6 +11542,12 @@ finding_id = "probe:src_claim_graph.rs:301:side_effect"
owner = "ub-review/core"
reason = "RIPR false-negative (ripr-swarm#1055): side_effect probe on Vec::push in claim graph extraction logic (#669). The same-file tests claim_extraction_assigns_needs_evidence_when_evidence_present and claim_extraction_detects_cross_lane_conflicts pin the push results with exact assertions. Line-keyed id; re-verify after edits to claim_graph.rs."

[[suppressions]]
kind = "exposure_gap"
finding_id = "probe:xtask_src_main.rs:match_arm:4714c49d"
owner = "ub-review/core"
reason = "RIPR 0.10.0 cannot associate the direct ripr_install_hint_uses_the_content_addressed_identity_contract assertion with this install_hint match arm (#737). The test pins the exact remediation command; re-verify after semantic edits or RIPR upgrades."

[[suppressions]]
kind = "exposure_gap"
finding_id = "probe:src_claim_graph.rs:302:side_effect"
Expand Down
4 changes: 2 additions & 2 deletions docs/RUNNER_IMAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ where `UB_REVIEW_TOOL_DIR` defaults to `/opt/ub-review`. It uses
`go install` for `actionlint`, so the standard image build must provide Go.
`tokmd` defaults to version `1.12.0` because the Bun profile depends on the
current on-diff `bun-ub`, `cockpit`, and `context` command surfaces.
`cargo-allow` defaults to `0.1.8`; `ripr` defaults to `0.8.0`;
`cargo-allow` defaults to `0.1.8`; `ripr` defaults to `0.10.0`;
`unsafe-review` defaults to `0.3.4`; `actionlint` defaults to `v1.7.12`:

```bash
export UB_REVIEW_TOKMD_VERSION="1.12.0"
export UB_REVIEW_CARGO_ALLOW_VERSION="0.1.8"
export UB_REVIEW_RIPR_VERSION="0.8.0"
export UB_REVIEW_RIPR_VERSION="0.10.0"
export UB_REVIEW_UNSAFE_REVIEW_VERSION="0.3.4"
export UB_REVIEW_ACTIONLINT_VERSION="v1.7.12"
scripts/install-review-image-tools.sh
Expand Down
2 changes: 1 addition & 1 deletion docs/specs/UB-REVIEW-SPEC-0003-intelligent-ci-gate.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ this repository's own file is the production example):
Production status (#316 closed by #335): this repo configures
`[tools.ripr.gate] max_new_unsuppressed = 0` and the threshold evaluates
on every run that triggers the ripr sensor — the sensor runs
`ripr check --diff --mode ready --format badge-json` (ripr pinned 0.8.0
`ripr check --diff --mode ready --format badge-json` (ripr pinned 0.10.0
in the install script and doctor) and persists the verbatim stdout as
`sensors/ripr/gate-decision.json`; the threshold reads
`counts.unsuppressed_exposure_gaps`. First production evaluation: run
Expand Down
10 changes: 5 additions & 5 deletions docs/specs/UB-REVIEW-SPEC-0005-sensor-tool-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ of this repository and behind the Bun pin. The two gaps this spec
originally named closed together in #335 (#316): the ripr threshold
production-evaluates (`sensors/ripr/gate-decision.json` from badge-json
stdout, first evaluation run 27077206713, real blocks on PR #342/#346), and
the install script + doctor pin ripr 0.8.0 / unsafe-review 0.3.4 /
the install script + doctor pin ripr 0.10.0 / unsafe-review 0.3.4 /
actionlint 1.7.12. Named remaining gaps: ripr
has known matcher/reach false-negatives plus line-keyed suppression-id
instability upstream (ripr-swarm#1052/#1053/#1054) - the governance loop
has known matcher/reach false-negatives; content-addressed suppression IDs
follow code across line motion (ripr-swarm#1093) - the governance loop
(strengthen the genuine half, file upstream, suppress with an owned
receipt) is the supported answer, never loosening the threshold.

Expand Down Expand Up @@ -156,13 +156,13 @@ repository's `.ub-review.toml` makes the five non-tokmd core sensors
- `doctor --require-core-tools` (or `UB_REVIEW_STANDARD_IMAGE`): doctor
bails when a core tool is missing or a pinned version mismatches
(src/main.rs `cmd_doctor`). The pin table covers tokmd (`1.12.0`),
cargo-allow (`0.1.8`), ripr (`0.8.0`), unsafe-review (`0.3.4`),
cargo-allow (`0.1.8`), ripr (`0.10.0`), unsafe-review (`0.3.4`),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The indentation of this line was accidentally removed during the version update. It should be indented with two spaces to align correctly with the rest of the list item.

and actionlint (`1.7.12`) (src/post_run_utils.rs
`expected_standard_image_tool_version`); ast-grep remains unpinned.
- The action's sensor install step (scripts/install-gh-runner-tools.sh)
pins tokmd (default 1.12.0, `UB_REVIEW_TOKMD_VERSION`), cargo-allow
(0.1.8, `UB_REVIEW_CARGO_ALLOW_VERSION`), actionlint (v1.7.12,
`UB_REVIEW_ACTIONLINT_VERSION`), ripr (0.8.0, `UB_REVIEW_RIPR_VERSION`),
`UB_REVIEW_ACTIONLINT_VERSION`), ripr (0.10.0, `UB_REVIEW_RIPR_VERSION`),
and unsafe-review (0.3.4, `UB_REVIEW_UNSAFE_REVIEW_VERSION`).
- unsafe-review exit codes are classified by contract (#396): 0 and 1 both
mean the tool completed and emitted reviewability evidence (`status: ok`,
Expand Down
10 changes: 5 additions & 5 deletions docs/specs/UB-REVIEW-SPEC-0010-release-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ deliberately not an input and doctor does not check it
- `core`, `bun-fast`, and `full` all install the same six advisory sensors:
tokmd (pinned 1.12.0, override `UB_REVIEW_TOKMD_VERSION`), cargo-allow
(pinned 0.1.8, override `UB_REVIEW_CARGO_ALLOW_VERSION`), ripr
(pinned 0.8.0, override `UB_REVIEW_RIPR_VERSION`), unsafe-review
(pinned 0.10.0, override `UB_REVIEW_RIPR_VERSION`), unsafe-review
(pinned 0.3.4, override `UB_REVIEW_UNSAFE_REVIEW_VERSION`), ast-grep
(unpinned), actionlint (go install, pinned v1.7.12, override
`UB_REVIEW_ACTIONLINT_VERSION`);
Expand Down Expand Up @@ -224,7 +224,7 @@ doctor pins CORE_REVIEW_TOOLS = tokmd, cargo-allow, ripr,
unsafe-review, ast-grep, actionlint;
STANDARD_IMAGE_TOKMD_VERSION = 1.12.0;
STANDARD_IMAGE_CARGO_ALLOW_VERSION = 0.1.8;
STANDARD_IMAGE_RIPR_VERSION = 0.8.0;
STANDARD_IMAGE_RIPR_VERSION = 0.10.0;
STANDARD_IMAGE_UNSAFE_REVIEW_VERSION = 0.3.4;
STANDARD_IMAGE_ACTIONLINT_VERSION = 1.7.12
(src/main.rs)
Expand All @@ -246,7 +246,7 @@ doctor pins CORE_REVIEW_TOOLS = tokmd, cargo-allow, ripr,
is missing, or when a pinned tool's `--version` output does not contain
the pinned version token (`command_version_matches` tolerates `v`
prefixes and punctuation splits). The standard-image pin table covers
tokmd (`1.12.0`), cargo-allow (`0.1.8`), ripr (`0.8.0`),
tokmd (`1.12.0`), cargo-allow (`0.1.8`), ripr (`0.10.0`),
unsafe-review (`0.3.4`), and actionlint (`1.7.12`).
- `cache warm` never blocks; tools missing at warm time are recorded as
`status: missing` in the manifest.
Expand All @@ -270,7 +270,7 @@ doctor pins CORE_REVIEW_TOOLS = tokmd, cargo-allow, ripr,
- Honest gaps, where the surface does not fail closed today:
- ast-grep is NOT version-pinned: the install scripts take latest and
doctor's drift check does not cover it. The pins cover tokmd (1.12.0),
cargo-allow (0.1.8), ripr (0.8.0), unsafe-review (0.3.4), and
cargo-allow (0.1.8), ripr (0.10.0), unsafe-review (0.3.4), and
actionlint (1.7.12) in both the install script and doctor. Unpinned
ripr drift is how #316 stayed invisible until a local 0.5/0.8 mismatch
surfaced it.
Expand Down Expand Up @@ -379,7 +379,7 @@ This spec is docs-only; it routes open work:
naming the accepted values, matching the strict `install-mode`
validation.
4. DONE (#335 plus actionlint/cargo-allow drift guards): cargo-allow
(0.1.8), ripr (0.8.0), unsafe-review (0.3.4), and actionlint (1.7.12)
(0.1.8), ripr (0.10.0), unsafe-review (0.3.4), and actionlint (1.7.12)
are pinned in the install script and doctor
(`expected_standard_image_tool_version`); the ripr gate-decision receipt
landed under spec 0005. #318 covered the foreign-ledger skip path.
Expand Down
4 changes: 2 additions & 2 deletions docs/specs/UB-REVIEW-SPEC-0016-sensor-upstream-boundary.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ Some sensor limitations are known and tracked upstream without blocking

| Limitation | Upstream issues | Local impact |
|---|---|---|
| ripr line-keyed `finding_id`s rot on code motion | `ripr-swarm#1053` | suppression entries may go dead after extraction; re-verify after edits |
| ripr content-addressed `finding_id`s follow code across line motion | `ripr-swarm#1093` | re-verify suppressions after semantic edits and RIPR upgrades |
| ripr cannot trace cross-module test paths (false-negatives) | `ripr-swarm#1054` | some predicate probes need suppression with the test name as oracle witness |
| ripr suppressions schema rejects `created`/`review_after` fields | (ripr 0.8.0) | per-entry dating carried by the `non-rust-ripr-suppressions` receipt instead (#586) |
| ripr suppressions schema rejects `created`/`review_after` fields | #586 | per-entry dating carried by the `non-rust-ripr-suppressions` receipt instead |
Comment on lines +86 to +88

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Inconsistent issue-reference format in the instability table.

Row 88's upstream-issue column reads bare #586, while every sibling row uses an explicit repo prefix (ripr-swarm#1093, ripr-swarm#1054, ripr-swarm#1055). Since this doc's entire purpose is routing defects to the correct upstream repo, an unprefixed reference is ambiguous about whether #586 lives in ripr-swarm or in this repo.

✏️ Suggested clarification
-| ripr suppressions schema rejects `created`/`review_after` fields | `#586` | per-entry dating carried by the `non-rust-ripr-suppressions` receipt instead |
+| ripr suppressions schema rejects `created`/`review_after` fields | ub-review#586 | per-entry dating carried by the `non-rust-ripr-suppressions` receipt instead |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| ripr content-addressed `finding_id`s follow code across line motion | `ripr-swarm#1093` | re-verify suppressions after semantic edits and RIPR upgrades |
| ripr cannot trace cross-module test paths (false-negatives) | `ripr-swarm#1054` | some predicate probes need suppression with the test name as oracle witness |
| ripr suppressions schema rejects `created`/`review_after` fields | (ripr 0.8.0) | per-entry dating carried by the `non-rust-ripr-suppressions` receipt instead (#586) |
| ripr suppressions schema rejects `created`/`review_after` fields | #586 | per-entry dating carried by the `non-rust-ripr-suppressions` receipt instead |
| ripr content-addressed `finding_id`s follow code across line motion | `ripr-swarm#1093` | re-verify suppressions after semantic edits and RIPR upgrades |
| ripr cannot trace cross-module test paths (false-negatives) | `ripr-swarm#1054` | some predicate probes need suppression with the test name as oracle witness |
| ripr suppressions schema rejects `created`/`review_after` fields | `ub-review#586` | per-entry dating carried by the `non-rust-ripr-suppressions` receipt instead |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/specs/UB-REVIEW-SPEC-0016-sensor-upstream-boundary.md` around lines 86 -
88, Update the instability table row for the suppressions schema issue so its
upstream-issue reference uses the explicit `ripr-swarm#586` format, matching the
other rows and removing ambiguity.

| ripr `cfg(test)` skipping not implemented | `ripr-swarm#1055` | test-side probes need suppression twins |

These are not "filed and forgotten" — they are tracked here so local
Expand Down
2 changes: 1 addition & 1 deletion policy/allow.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ glob = ".ripr/suppressions.toml"
category = "configuration-and-policy"
language = "toml"
owner = "ub-review/core"
reason = "RIPR's durable suppression manifest; every entry carries owner and reason per the suppression-health contract, and suppressed findings stay visible as suppressed in the gate receipt. NOTE: ripr 0.8.0's suppressions schema does not support per-entry created/review_after fields (issue #586), so the dating obligation is carried by this receipt's review_after/expires rather than per-entry. The file's own header documents the rot risk (line-keyed ids break on code motion; >=6 rot instances recorded) and the upstream ripr-swarm#1053/#1054/#1055 work that would enable per-entry dating."
reason = "RIPR's durable suppression manifest; every entry carries owner and reason per the suppression-health contract, and suppressed findings stay visible as suppressed in the gate receipt. Content-addressed IDs follow code rather than source lines; the receipt's review_after/expires carries the dating obligation. Re-verify entries after semantic edits and RIPR upgrades."

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restore the line-keyed suppression caveat

When a suppressed finding's code moves, the current .ripr/suppressions.toml entries still use line-keyed selectors such as probe:src_config.rs:946:side_effect and the manifest itself still documents line-keyed rot. Replacing the policy receipt with “Content-addressed IDs follow code” makes the controlled-surface ledger bless those suppressions under a false premise, so future reviewers can skip the re-verification needed after line motion or RIPR upgrades; either migrate the suppression entries to the new stable IDs or keep the line-keyed warning here.

Useful? React with 👍 / 👎.

created = "2026-06-07"
review_after = "2026-07-22"
expires = "2026-12-22"
Expand Down
2 changes: 1 addition & 1 deletion scripts/install-gh-runner-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ case "$bundle" in
# Pinned so doctor --require-core-tools can detect image/local drift;
# versions move together with STANDARD_IMAGE_*_VERSION in src/post_run_utils.rs
# (#316 - unpinned installs let the gate-receipt subcommand drift apart).
install_cargo_bin ripr ripr "${UB_REVIEW_RIPR_VERSION:-0.8.0}"
install_cargo_bin ripr ripr "${UB_REVIEW_RIPR_VERSION:-0.10.0}"
install_cargo_bin unsafe-review unsafe-review "${UB_REVIEW_UNSAFE_REVIEW_VERSION:-0.3.4}"
install_npm_bin ast-grep @ast-grep/cli
install_go_bin actionlint github.com/rhysd/actionlint/cmd/actionlint "${UB_REVIEW_ACTIONLINT_VERSION:-v1.7.12}"
Expand Down
2 changes: 1 addition & 1 deletion scripts/install-review-image-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ mkdir -p "$prefix/bin"
# src/post_run_utils.rs and scripts/install-gh-runner-tools.sh (#610).
install_tool tokmd tokmd "${UB_REVIEW_TOKMD_VERSION:-1.12.0}"
install_tool cargo-allow cargo-allow "${UB_REVIEW_CARGO_ALLOW_VERSION:-0.1.8}"
install_tool ripr ripr "${UB_REVIEW_RIPR_VERSION:-0.8.0}"
install_tool ripr ripr "${UB_REVIEW_RIPR_VERSION:-0.10.0}"
install_tool unsafe-review unsafe-review "${UB_REVIEW_UNSAFE_REVIEW_VERSION:-0.3.4}"
install_tool ast-grep ast-grep
install_go_tool actionlint github.com/rhysd/actionlint/cmd/actionlint "${UB_REVIEW_ACTIONLINT_VERSION:-v1.7.12}"
Expand Down
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5532,7 +5532,7 @@ mod tests {
);
assert_eq!(
super::doctor_tool_install_hint("ripr"),
"cargo install ripr --locked --version 0.8.0 --force"
"cargo install ripr --locked --version 0.10.0 --force"
);
assert_eq!(
super::doctor_tool_install_hint("unsafe-review"),
Expand Down Expand Up @@ -5562,12 +5562,12 @@ mod tests {
super::doctor_tool_version_fix("actionlint", "1.7.12"),
"go install github.com/rhysd/actionlint/cmd/actionlint@v1.7.12; add $(go env GOPATH)/bin to PATH"
);
assert!(super::command_version_matches("ripr 0.8.0", "0.8.0"));
assert!(super::command_version_matches("ripr 0.10.0", "0.10.0"));
assert!(super::command_version_matches(
"actionlint version v1.7.12",
"1.7.12"
));
assert!(!super::command_version_matches("ripr 0.7.9", "0.8.0"));
assert!(!super::command_version_matches("ripr 0.9.9", "0.10.0"));
}

#[test]
Expand Down
2 changes: 1 addition & 1 deletion src/post_run_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ pub(crate) const STANDARD_IMAGE_CARGO_ALLOW_VERSION: &str = "0.1.8";
// dogfooded local ripr 0.5.0 lacked the subcommand the image's newer ripr
// accepted). Pins move together with scripts/install-gh-runner-tools.sh and
// scripts/install-review-image-tools.sh.
pub(crate) const STANDARD_IMAGE_RIPR_VERSION: &str = "0.8.0";
pub(crate) const STANDARD_IMAGE_RIPR_VERSION: &str = "0.10.0";
pub(crate) const STANDARD_IMAGE_UNSAFE_REVIEW_VERSION: &str = "0.3.4";
// The actionlint version deliberately omits the `v` prefix: the doctor
// version-matcher parses `actionlint version v1.7.12` and strips the `v`
Expand Down
16 changes: 10 additions & 6 deletions tests/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ fn review_image_tool_installer_uses_tool_dir_as_install_prefix() -> Result<()> {
)?;
assert!(script.contains("UB_REVIEW_TOKMD_VERSION:-1.12.0"));
assert!(script.contains("UB_REVIEW_CARGO_ALLOW_VERSION:-0.1.8"));
assert!(script.contains("UB_REVIEW_RIPR_VERSION:-0.8.0"));
assert!(script.contains("UB_REVIEW_RIPR_VERSION:-0.10.0"));
let github_runner_script = std::fs::read_to_string("scripts/install-gh-runner-tools.sh")?;
let doctor_source = std::fs::read_to_string("src/post_run_utils.rs")?;
assert!(github_runner_script.contains("UB_REVIEW_RIPR_VERSION:-0.10.0"));
assert!(doctor_source.contains("STANDARD_IMAGE_RIPR_VERSION: &str = \"0.10.0\""));
Comment on lines +35 to +38

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Relying on relative paths like scripts/install-gh-runner-tools.sh and src/post_run_utils.rs can make tests fragile if they are executed from a different working directory (for example, when running tests from a sub-crate or via certain IDE test runners). Using env!("CARGO_MANIFEST_DIR") ensures the paths are always resolved relative to the crate root.

Suggested change
let github_runner_script = std::fs::read_to_string("scripts/install-gh-runner-tools.sh")?;
let doctor_source = std::fs::read_to_string("src/post_run_utils.rs")?;
assert!(github_runner_script.contains("UB_REVIEW_RIPR_VERSION:-0.10.0"));
assert!(doctor_source.contains("STANDARD_IMAGE_RIPR_VERSION: &str = \"0.10.0\""));
let manifest_dir = std::path::Path::new(env!("CARGO_MANIFEST_DIR"));
let github_runner_script = std::fs::read_to_string(manifest_dir.join("scripts/install-gh-runner-tools.sh"))?;
let doctor_source = std::fs::read_to_string(manifest_dir.join("src/post_run_utils.rs"))?;
assert!(github_runner_script.contains("UB_REVIEW_RIPR_VERSION:-0.10.0"));
assert!(doctor_source.contains("STANDARD_IMAGE_RIPR_VERSION: &str = \"0.10.0\""));

Comment on lines +34 to +38

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider a dedicated test for the RIPR pin-alignment regression check.

This cross-file consistency assertion (comparing install-gh-runner-tools.sh and src/post_run_utils.rs against the RIPR version) is bundled into a test named for an unrelated concern (review_image_tool_installer_uses_tool_dir_as_install_prefix), and uses bare relative paths ("scripts/install-gh-runner-tools.sh", "src/post_run_utils.rs") instead of the env!("CARGO_MANIFEST_DIR") pattern used by the sibling assertions in the same function. A dedicated test would make the regression's intent explicit and keep path resolution consistent.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/cli.rs` around lines 34 - 38, Move the RIPR version alignment
assertions into a dedicated test named for that regression, separate from
review_image_tool_installer_uses_tool_dir_as_install_prefix. In the new test,
resolve scripts/install-gh-runner-tools.sh and src/post_run_utils.rs using
env!("CARGO_MANIFEST_DIR"), matching the sibling path-resolution pattern, then
retain assertions against the expected RIPR version values.

assert!(script.contains("UB_REVIEW_UNSAFE_REVIEW_VERSION:-0.3.4"));
assert!(script.contains(
"install_tool cargo-allow cargo-allow \"${UB_REVIEW_CARGO_ALLOW_VERSION:-0.1.8}\""
Expand Down Expand Up @@ -3442,10 +3446,10 @@ fn doctor_reports_advisory_stale_tool_fix_without_requiring_core_tools() -> Resu
.find(|line| line.trim_start().starts_with("ripr "))
.context("doctor output missing ripr tool row")?;
assert!(ripr_row.contains("version=ripr 0.7.9"), "{ripr_row}");
assert!(ripr_row.contains("expected=0.8.0"), "{ripr_row}");
assert!(ripr_row.contains("expected=0.10.0"), "{ripr_row}");
assert!(output.contains("Fixes:"), "{output}");
assert!(
output.contains("ripr version drift: cargo install ripr --locked --version 0.8.0 --force"),
output.contains("ripr version drift: cargo install ripr --locked --version 0.10.0 --force"),
"{output}"
);
assert!(!output.contains("required core review tool versions drifted"));
Expand Down Expand Up @@ -3526,7 +3530,7 @@ fn doctor_require_core_tools_fails_stale_cargo_allow_version() -> Result<()> {
&[
("tokmd", "1.12.0"),
("cargo-allow", "0.1.7"),
("ripr", "0.8.0"),
("ripr", "0.10.0"),
("unsafe-review", "0.3.4"),
("ast-grep", "0.0.0"),
("actionlint", "1.7.12"),
Expand Down Expand Up @@ -3574,7 +3578,7 @@ fn doctor_require_core_tools_fails_stale_actionlint_version() -> Result<()> {
&[
("tokmd", "1.12.0"),
("cargo-allow", "0.1.8"),
("ripr", "0.8.0"),
("ripr", "0.10.0"),
("unsafe-review", "0.3.4"),
("ast-grep", "0.0.0"),
("actionlint", "1.7.0"),
Expand Down Expand Up @@ -7129,7 +7133,7 @@ fn write_fake_core_review_tools(dir: &Path, tokmd_version: &str) -> Result<()> {
&[
("tokmd", tokmd_version),
("cargo-allow", "0.1.8"),
("ripr", "0.8.0"),
("ripr", "0.10.0"),
("unsafe-review", "0.3.4"),
("ast-grep", "0.0.0"),
("actionlint", "1.7.12"),
Expand Down
15 changes: 12 additions & 3 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ fn main() {
}
}

#[cfg(test)]
#[test]
fn ripr_install_hint_uses_the_content_addressed_identity_contract() {
assert_eq!(
install_hint("ripr"),
"cargo install ripr --locked --version 0.10.0 --force"
);
}

fn run() -> Result<()> {
let mut args = env::args().skip(1);
let command = args.next().unwrap_or_else(|| "help".to_owned());
Expand Down Expand Up @@ -435,7 +444,7 @@ fn install_hint(name: &str) -> &'static str {
match name {
"tokmd" => "cargo install tokmd --locked --version 1.12.0 --force",
"cargo-allow" => "cargo install cargo-allow --locked",
"ripr" => "cargo install ripr --locked --version 0.8.0 --force",
"ripr" => "cargo install ripr --locked --version 0.10.0 --force",
"unsafe-review" => "cargo install unsafe-review --locked --version 0.3.4 --force",
"ast-grep" => "npm install -g @ast-grep/cli",
"actionlint" => {
Expand Down Expand Up @@ -1265,7 +1274,7 @@ mod tests {
let reason = receipt.reason.as_deref().unwrap_or_default();
assert!(reason.contains("not installed"), "{reason}");
assert!(
reason.contains("cargo install ripr --locked --version 0.8.0 --force"),
reason.contains("cargo install ripr --locked --version 0.10.0 --force"),
"{reason}"
);
// A relevance skip stays success: true and missing: false - the two
Expand Down Expand Up @@ -1297,7 +1306,7 @@ mod tests {
("cargo-allow", "cargo install cargo-allow --locked"),
(
"ripr",
"cargo install ripr --locked --version 0.8.0 --force",
"cargo install ripr --locked --version 0.10.0 --force",
),
(
"unsafe-review",
Expand Down
Loading