Skip to content

cli: name a next step in refusal messages and drop the baseline fragments - #11713

Merged
EffortlessSteven merged 7 commits into
mainfrom
cli-refusals
Nov 1, 2026
Merged

EffortlessSteven merged 7 commits into
mainfrom
cli-refusals

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Requested by Steven · project thread

Governing issue or accepted claim: #11539
Acceptance delta (one sentence): The CLI-layer error and refusal messages that named a failure without a next step now name one, and their baseline fragments are removed.

Rewrites CLI refusal and error messages so each names a next step, and removes the baseline fragments under policy/refusal-next-step.d/ that no longer offend (follow-up to #11539 / #11590).

Local proof: cargo test -p ripr --test refusal_next_step passes (3 tests) on the rebased tree; cargo check -p ripr --lib clean; RIPR_PRUNE_REFUSAL_BASELINE=1 pruned nothing further. Not run locally: cli_smoke, cli_help_hierarchy, cargo xtask precommit (shared target lock contention); hosted CI is the full runner.


Generated by Claude Code

@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!

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 31, 2026 14:50
@coderabbitai

coderabbitai Bot commented Oct 31, 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 22 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 149 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: e467bcff-0ee8-4d7e-bb70-7b9dc1fce33f
Commits

Reviewing files that changed from the base of the PR and between 9e23542 and d2378ac.

Files selected for processing: 78
  • changelog.d/11539-refusal-next-step-cli.md
  • crates/ripr/src/cli/agent.rs
  • crates/ripr/src/cli/command.rs
  • crates/ripr/src/cli/commands.rs
  • crates/ripr/src/cli/commands/agent.rs
  • crates/ripr/src/cli/commands/agent_card.rs
  • crates/ripr/src/cli/commands/baseline.rs
  • crates/ripr/src/cli/commands/cache.rs
  • crates/ripr/src/cli/commands/capabilities.rs
  • crates/ripr/src/cli/commands/check.rs
  • crates/ripr/src/cli/commands/check_argv_refusal_tests.rs
  • crates/ripr/src/cli/commands/check_fanout.rs
  • crates/ripr/src/cli/commands/ci_packet.rs
  • crates/ripr/src/cli/commands/ci_summary.rs
  • crates/ripr/src/cli/commands/config.rs
  • crates/ripr/src/cli/commands/context.rs
  • crates/ripr/src/cli/commands/doctor.rs
  • crates/ripr/src/cli/commands/feedback.rs
  • crates/ripr/src/cli/commands/gate.rs
  • crates/ripr/src/cli/commands/init.rs
  • crates/ripr/src/cli/commands/pilot.rs
  • crates/ripr/src/cli/commands/policy/parse.rs
  • crates/ripr/src/cli/commands/policy/reports.rs
  • crates/ripr/src/cli/commands/pr_comments_github.rs
  • crates/ripr/src/cli/commands/receipt.rs
  • crates/ripr/src/cli/commands/review_comments.rs
  • crates/ripr/src/cli/commands/swarm/ingest.rs
  • crates/ripr/src/cli/commands/swarm/queue.rs
  • crates/ripr/src/cli/commands/task_first.rs
  • crates/ripr/src/cli/commands_agent_support.rs
  • crates/ripr/src/cli/commands_context.rs
  • crates/ripr/src/cli/commands_numeric.rs
  • crates/ripr/src/cli/commands_timestamps.rs
  • crates/ripr/src/cli/execute.rs
  • crates/ripr/src/cli/help/overview.rs
  • crates/ripr/src/cli/help_json.rs
  • crates/ripr/src/cli/interrupt.rs
  • crates/ripr/src/cli/mod.rs
  • crates/ripr/src/cli/parse.rs
  • crates/ripr/src/cli/parse/value.rs
  • crates/ripr/src/cli/rerun.rs
  • crates/ripr/tests/cli_help_hierarchy.rs
  • crates/ripr/tests/cli_smoke.rs
  • crates/ripr/tests/cli_smoke/baseline_path_values.rs
  • crates/ripr/tests/cli_smoke/cli_value_contracts.rs
  • policy/refusal-next-step.d/crates__ripr__src__cli__agent.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__command.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__commands__agent.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__commands__agent_card.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__commands__baseline.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__commands__cache.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__commands__capabilities.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__commands__check.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__commands__check_fanout.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__commands__ci_packet.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__commands__ci_summary.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__commands__config.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__commands__doctor.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__commands__feedback.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__commands__gate.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__commands__init.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__commands__pilot.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__commands__policy__parse.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__commands__policy__reports.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__commands__pr_comments_github.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__commands__receipt.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__commands__review_comments.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__commands__swarm__ingest.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__commands__swarm__queue.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__commands__task_first.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__commands_agent_support.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__commands_context.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__commands_numeric.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__help_json.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__interrupt.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__mod.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__parse__value.rs.txt
  • policy/refusal-next-step.d/crates__ripr__src__cli__rerun.rs.txt
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@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!

@github-actions github-actions Bot left a comment

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.

Decision

  • Needs verification checks before upstream.

Verification questions

  • Confirm exact-string assertions and consumers outside the shown tests may require coordinated updates when refusal text changes.
  • Confirm the cited local proof covers only three refusal-next-step tests, while this diff changes exact output across many CLI modules and deletes 40 baseline files; those focused assertions do not prove the broader regression surface.
  • Confirm deleting every refusal-next-step baseline fragment assumes the policy scanner no longer treats an unchanged semantic prefix as an offense.
  • Confirm deleting every refusal-next-step baseline fragment is a large overclaim risk because the diff also changes help text and adds some messages outside the baseline-covered set.

Refuted

  • The cited focused refusal-next-step test proves the newly deleted policy baselines are all obsolete.; refuted because: That test exercises three policy cases, while dozens of baseline files are deleted across many distinct CLI refusal families; focused success alone is not a complete oracle for those deletions.
  • The change requires a new architecture-level abstraction for all refusal remediation text.; refuted because: The smallest complete boundary is already present for generic missing-value and numeric parsing, while command-specific remedies depend on local semantics; a global remedy model would enlarge scope without establishing a concrete defect.

Parked follow-ups

  • Many repeated next-step phrases bypass the existing shared value/numeric helpers, creating drift risk without changing semantics.

Evidence gaps

  • Removing all listed refusal-next-step policy fragments may hide a remaining source route whose new error still lacks a usable next step.
  • Model proof intent was rejected by deterministic validation.
  • The late cargo-test receipt is still absent from the supplied packet, and the RIPR sensor failed with exit code 2, so the broad changed-behavior oracle cannot yet be treated as confirmed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmp1dk37XMDiDt4z11j

@github-actions github-actions Bot left a comment

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.

Verification questions

  • Confirm the diff changes many user-visible exact error strings and deletes dozens of policy baselines, but no completed broad test receipt is available to prove all affected consumers and policy expectations remain green.
  • Confirm deleting every refusal-next-step baseline is not proven by the cited three-test refusal_next_step target; the diff spans many distinct refusal families.
  • Confirm the diff changes command-facing error strings and removes refusal policy baselines, so downstream consumers matching exact messages may require coordinated updates.
  • Confirm the deleted policy baselines are a compatibility-sensitive surface because they encode accepted refusal prefixes across many command families.
  • Confirm the cited refusal-next-step test covers only three policy cases while this diff rewrites many distinct CLI refusal families and deletes dozens of baseline fragments.
  • Confirm the change applies next-step guidance directly in many command modules rather than through a single boundary formatter.
  • Confirm deleting all refusal-next-step baseline files lacks a demonstrated broad policy oracle.

Evidence gaps

  • The changed refusal paths update exact assertions, but the supplied cargo-test receipt is absent.
  • The late cargo-test receipt is absent, and the ripR sensor failed with exit code 2, so repository-wide compile/test and policy evidence is currently incomplete.
  • RIPR sensor evidence is incomplete: ripr failed and cargo-test was scheduled without a completed receipt, so broader route and baseline validity are not fully proven.
  • The source-route scan completed, but the required cargo-test receipt is not present in the supplied evidence.
  • Model proof intent was rejected by deterministic validation.

…ame a next step (#11539)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmp1dk37XMDiDt4z11j
… wording (#11539)

first-pr option errors are reworded in the output-layer PR, which updates these two expectations.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmp1dk37XMDiDt4z11j

Copy link
Copy Markdown
Member Author

Review of record, head a129c93 (main merged in).

Angles and findings:

  • Correctness: 78 files; CLI refusal messages across cli/* and cli/commands/* gain a next step, and the baseline fragments for those modules are removed. The non-string edits I checked are .ok_or_else / .map_err closures and Err(...) re-wrapping that preserve the error value and exit path; no control-flow change found.
  • Tests: cli_smoke.rs, cli_smoke/baseline_path_values.rs, cli_smoke/cli_value_contracts.rs, cli_help_hierarchy.rs and check_argv_refusal_tests.rs are updated for the new text, and the refusal_next_step guard fails if a deleted fragment line returns.
  • Contract: changelog fragment present; body carries the governing-issue and acceptance lines (PR was admitted on its previous head).
  • Limit of this review: the diff is large and mostly strings. I checked the shape of the non-string edits and the test updates but did not run the suite; the hosted Rust gates and test shards are the proof, and a pinned old string elsewhere would surface there as a test failure.

Threads: none open. Merge is gated on Ripr Rust Small Result success on this exact head.


Generated by Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmp1dk37XMDiDt4z11j

@github-actions github-actions Bot left a comment

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.

Decision

  • Needs reviewer attention before upstream: findings remain.

Confirmed findings

  • The acceptance claim that obsolete refusal policy fragments were removed is not backed by completed broad evidence in this packet.

Verification questions

  • Confirm the help overview now embeds remediation wording in a machine-catalog description line, which is visible prose rather than a stable machine-readable field.
  • Confirm the shared expect_value helper changes every missing-value message routed through it, creating a broad exact-text compatibility change beyond the locally asserted examples.
  • Confirm the diff also changes help and non-baseline-covered messages, so baseline deletion alone does not establish that every changed refusal names a valid next step.
  • Confirm the 40 deleted policy baselines encode accepted offense prefixes across many command families; deleting them is only safe if the policy scanner proves each rewritten refusal now supplies a next step.
  • Confirm deleting every refusal-next-step baseline is broader than the cited focused oracle, so obsolete-baseline claims require the broad policy scan rather than three tests alone.

Parked follow-ups

  • Guidance is duplicated directly across parser and runtime modules rather than normalized at a boundary, creating future drift risk across error sites.

Evidence gaps

  • The PR changes many exact user-visible error strings, but the cited focused refusal test cannot establish compatibility for every changed consumer or for all deleted policy fragments.
  • Model proof intent was rejected by deterministic validation.
  • Deleting the refusal-next-step baselines is broader than the cited three-test refusal_next_step proof and lacks a completed broad policy-oracle receipt.
  • The public output contract changes broadly across many exact-string consumers, but the available packet does not include a completed broad Rust test receipt.

@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.

Independent review (fresh-context reviewer, head 90dd2fe): REVIEW_INCOMPLETE

Inspected:

  • Head metadata and the authoritative PR file list via pulls/11713/files: 78 files = 37 CLI source files, 4 test files, 1 changelog fragment, and 40 deleted policy/refusal-next-step.d/crates__ripr__src__cli__*.txt baseline fragments. mergeable=true, mergeable_state=blocked.
  • The candidate's own commits (6): 0b9dd000 (the change), 2f68f86b (changelog), 58eb9d87 + 90dd2fed (merges of main), 6268a7b3 + a129c933 (exact-message test updates). The only delta since the previously reviewed head a129c933 is the two main merges; main moved 51 commits underneath this branch. The PR's own change content is unchanged since that review.
  • The guard that owns the deleted baselines, read as source rather than inferred from the artifacts: crates/ripr/tests/refusal_next_step.rs:1-24 states the rule the whole diff depends on - "A new message without a cue fails; a fragment entry whose message now has a cue (or was deleted) also fails, so fixing a message means deleting its line." That makes fragment deletion a two-sided discriminator: keep the line and the guard fails it as stale; delete the line while the literal still lacks a cue and the guard fails it as a new offense. The 40 deletions are therefore the sanctioned mechanism, not an unproven coverage gap, and the PR body records that RIPR_PRUNE_REFUSAL_BASELINE=1 pruned nothing further.
  • The producers behind the changed text, not the diff alone: crates/ripr/src/cli/parse/value.rs now emits missing value for {flag}; pass a value right after it; crates/ripr/src/cli/commands/gate.rs now emits gate could not resolve --out: {err}; pass a path whose directory exists, such as --out target/ripr/gate.json``. Both carry an action cue in the guard's ACTION_OPENERS set at a clause start, so the guard stops treating them as offenses.
  • Every added line in the 78-file patch that is not a string literal: 43 such lines, all of them return Err(...), let x = ....map_err(...) or .ok_or_else(...) re-wraps. The let before / let after / let leaf bindings in crates/ripr/src/cli/commands/agent.rs are pre-existing bindings the diff reformats into closures, not new logic. No new function, error variant, exit code, or control-flow branch was introduced anywhere in the diff.
  • The exact-string oracle: crates/ripr/tests/cli_smoke.rs, cli_help_hierarchy.rs, cli_smoke/baseline_path_values.rs, cli_smoke/cli_value_contracts.rs and crates/ripr/src/cli/commands/check_argv_refusal_tests.rs all carry the new text, and cli_smoke.rs gains a newly asserted --seam-id refusal case. A pinned old string elsewhere would fail loudly rather than pass vacuously.
  • Hosted proof on this exact head: Ripr Rust Small on GitHub Hosted / Rust gates is still in_progress (at step 15 of 42, User-text goldens judged by the merge-base matcher). Steps 16-42 have not run, including Base still merges cleanly (29) and Required Rust tests (30). Rust-only feature lane succeeded on the merge-ready event; the 21:17 run group is entirely skipped.

Blocking:

  • None found.

Non-blocking:

  • Hosted Rust proof is incomplete for this head, so the ceiling is REVIEW_INCOMPLETE rather than REVIEW_READY. The gap is missing observation, not a red lane; nothing here argues against landing once Required Rust tests reports on 90dd2fed.
  • Merge-order coupling with #11716, which touches the same two test files with the opposite expectation. The first-pr/start-here --gap-ledger refusal is produced by crates/ripr/src/output/first_pr/options.rs::non_empty_arg, a different function from crates/ripr/src/cli/parse/value.rs::expect_value. This PR does not touch output/first_pr/options.rs, so its assertion "missing value for --gap-ledger" matches its own tree. #11716 does touch that producer and asserts the suffixed form. If #11716 lands first and this PR lands second, the merged tree pairs the suffixed producer with this PR's unsuffixed assertion in crates/ripr/src/cli/mod.rs and crates/ripr/src/cli/execute.rs, and execute(CliCommand::FirstPr(args(&["--gap-ledger"]))) fails. Landing this PR first is safe; landing it second needs the two assertions taken from #11716's side.
  • The per-file fragment retention is precise rather than blanket: at this head no crates__ripr__src__cli__* fragment remains, while the output__* and app__* fragments are untouched, which is consistent with this PR's CLI-only scope.

Not run:

  • No Rust build, test, lint, or cargo xtask gate was executed. The Rust toolchain on this host is not on PATH, and the shared tree must not be built while concurrent agents hold it. Every source conclusion above is from reading the head SHA through the GitHub API.
  • The Rust gates lane was still executing when this review was written, so Required Rust tests, Golden output contracts and Base still merges cleanly are unobserved on this head.

Reviewed by an independent Mavis review agent on behalf of the maintainer; bound to head 90dd2fedec2ee66d56257d54757a3e2d68a05c14. Not an approval.

Copy link
Copy Markdown
Member Author

Shard 1 on head 90dd2fed fails analysis::language::python::guard_activation::tests::compare_literal_values_fails_open_on_undecoded_literals. This PR does not touch analysis/language/python; the test came in with #11842, which broke main. Fix of record is #11918 (still open). Once it lands I'll merge main here, update the --gap-ledger expectations if #11716 has landed first, and re-run.


Generated by Claude Code

@github-actions github-actions Bot left a comment

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.

Decision

  • Needs verification checks before upstream.

Verification questions

  • Confirm the shared expect_value rewrite broadens missing-value diagnostics across every caller, making downstream exact-text consumers a compatibility surface.
  • Confirm help text and some changed refusals are outside the deleted baseline set, so baseline deletion alone cannot establish the full acceptance claim.
  • Confirm deleting all refusal-next-step baseline fragments is a policy-wide compatibility change; the available focused test claim does not independently prove every removed fragment is obsolete.
  • Confirm the rewritten diagnostics consistently name an actionable next step, including the shared missing-value and numeric-parser routes.
  • Confirm deleting all 40 refusal-next-step baseline files is not proven by the cited three-test refusal_next_step target, which covers only three policy cases.

Evidence gaps

  • The packet lacks completed broad Rust proof for a large user-visible exact-string change and 40 policy-baseline deletions.
  • Model proof intent was rejected by deterministic validation.
  • The deleted policy baselines are not fully proven obsolete by the focused test oracle.
  • The available packet has no completed broad cargo-test receipt, so it cannot prove all exact-output consumers and all deleted policy fragments remain compatible.
  • The packet lacks completed broad Rust proof: RIPR failed with exit code 2, while cargo-test is still receipt-absent despite being scheduled.

Copy link
Copy Markdown
Member Author

Review of record, head d2378acabdcc5d074decf8904803e518764d1a55

Angles: message quality (each rewritten CLI refusal names its reason and a concrete next step); baseline bookkeeping (40 cli/** fragments removed, refusal_next_step guard fails on both new offenders and stale entries); test oracle (about 27 exact-message assertions updated, limited to the failing functions); merge-order coupling with #11716 on the --gap-ledger expectations in cli/execute.rs and cli/mod.rs; the two bot reviews and the independent review on 90dd2fed.

Findings: none blocking. The ub-review points ask for broad-suite evidence, which this head now has. The independent review on 90dd2fed found no blockers; the only delta since then is the merge of main. The --gap-ledger coupling is resolved by landing this first and having #11716 update those lines when it merges main.

Evidence on this exact head: Ripr Rust Small Result success, test shards 1 to 4 and verify success, Rust gates success, Rust-only feature lane success, admission success, mergeable_state clean. The earlier red results were the Python guard test from #11842 (fixed by #11918, merged into this branch).


Generated by Claude Code

@EffortlessSteven
EffortlessSteven merged commit 9e01e37 into main Nov 1, 2026
63 checks passed
@EffortlessSteven
EffortlessSteven deleted the cli-refusals branch November 1, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants