Repository navigation
fix(explain): suggest check --format json in selector hints (#11570 item 4) - #11844
Conversation
…tem 4) Explain miss and recovery messages now rewrite scoped list commands to use the documented `--format json` spelling instead of the `--json` alias. Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 9 minutes. View limit details
|
EffortlessSteven
left a comment
There was a problem hiding this comment.
Self-review (REVIEW_READY)
Scope: #11570 item 4 only — crates/ripr/src/app/explain.rs.
Inspected: Fresh explain path, artifact --from path, no_finding_matched helpers, and unit tests. Fenced surfaces (check.rs, help/core.rs, context.rs) intentionally unchanged.
Behavior: explain_navigation_list_command rewrites navigation list_command() suffix --json → --format json, preserving scoped args. Artifact path no longer hardcodes a bare ripr check --json.
Tests: Added rewrite unit test; fixture miss test asserts --format json and rejects bare --json` in list hint.
Proof run locally: cargo test -p ripr --lib 'app::explain::tests::', cargo xtask precommit.
Residual: context.rs and navigation.rs still emit --json on non-explain surfaces (out of slice).
There was a problem hiding this comment.
Decision
- Needs verification checks before upstream.
Verification questions
- Confirm existing tests cover the core suffix rewrite but not every navigation.list_command() shape or spacing variant.
- Confirm artifact explain paths reuse the same rewritten navigation helper, but their rendered output lacks a dedicated regression assertion.
- Confirm the rewrite is suffix-specific and leaves commands unchanged unless their exact tail is ' --json'; other list-command spellings or argument orders require verification outside this diff.
Refuted
- The helper changes only explain output, not the global --json alias or other navigation surfaces, matching the stated item-4 scope; a broader expectation of repository-wide --json removal would be a false premise.
Parked follow-ups
- The seeded thread explicitly parks context.rs and navigation.rs, whose other-surface --json output is outside item 4; broadening this PR would mix unrelated surfaces.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
- The scheduled cargo-test task has no completed receipt in the available evidence, so execution of the claimed focused test remains unverified.
- The changed unit test proves suffix rewriting, but the provided sensor packet has no successful ripr or cargo-test receipt, so the PR body's claimed 10-test execution is not independently evidenced here.
|
merge-ready |
EffortlessSteven
left a comment
There was a problem hiding this comment.
Independent review (fresh-context reviewer, head 205c106): REPAIR_REQUIRED
Inspected:
- The candidate's own change is a single file:
crates/ripr/src/app/explain.rs(+58/-14). It addsEXPLAIN_JSON_FORMAT_SUFFIX(explain.rs:135) andexplain_list_command(explain.rs:138-145), which rewrites a trailing--jsonon a navigation list command to--format json, and threads that through every explain-surface emission: the committed list command, the worktree list command, the ambiguous-match refusal, the selector-limitation refusal, the fresh-run no-match, and the artifact-path arms. - The rewrite is semantically correct.
crates/ripr/src/cli/commands/check.rs:850-857parses--format <value>throughparse_format(crates/ripr/src/cli/parse/format.rs), andcheck.rs:842-847accepts--jsonas the alias selecting the sameOutputFormat::Json;select_output_format(check.rs:531-545) refuses only a conflicting pair, not the alias.--format jsonis therefore a validripr checkspelling, and it is the documented one (README.md,crates/ripr/src/cli/help/swarm.rs,docs/SEMVER.md). - The rewrite is complete for the surface it targets.
crates/ripr/src/app/navigation.rs:461-463is the only producer of the command being rewritten —list_command()isformat!("{} --json", self.list_prefix)— so--jsonis always the final token andstrip_suffix(" --json")always fires. The producer keeps its canonical--jsonform and only the explain surface rewrites it, which is the right seam for a slice-scoped change. - Hosted proof at this head. The
Rust-only feature laneis RED in two separate runs (job 124659895208 in run 41242770235; job 124650414965 in run 41239562785). The failing step is substantive, not infrastructural: step 9, "Test --no-default-features --features lang-rust", ends witherror: 1 target failed: -p ripr --test cli_smokeandProcess completed with exit code 101. - The failing test target.
crates/ripr/tests/cli_smoke.rsreportstest result: FAILED. 616 passed; 2 failed, and the two failures are named:check_worktree_drill_in_commands_reach_the_uncommitted_findingandselector_location_misses_explain_syntax_and_preserve_retry_scope. - The mechanism, read from the log's own assertion messages.
cli_smoke.rs:2577-2581builds the expected listing asformat!("ripr check --root {} --diff {} --json", ...), and the second failure expects the worktree formripr check --root ... --base HEAD --worktree --json(the same shape is asserted atnavigation.rs:768and:787). The production output at this head is the same command with--format json, which the log shows verbatim: "unmatched explain must name the scoped listingripr check --root .../ripr-worktree-drill-in-...-111079-268 --base HEAD --worktree --format json" and "runripr check --root .../ripr-selector-location-recovery-...-111079-592 --diff .../change.diff --format jsonto list available finding ids". - Attribution. The PR base
7eb558fb4727298c7da10702496c6b2f385f08bdis green for the same lanes:Rust-only feature lane= success,Ripr Rust Small Result= success,Ripr Rust Small on GitHub Hosted / Rust gates= success. The head is red on the lane whose only candidate change is the string this PR rewrote, and the two failing assertions encode the pre-change spelling. This is candidate-attributable, not a base or runner condition. - The PR's own added oracle, and its gap.
explain.rs:700-712adds a discriminator that the finding-id miss message contains--format jsonand does not contain a bare--json`, andexplain.rs:738-747addsexplain_list_command_rewrites_json_alias_suffix. Both are unit oracles inside the file under change. The two integration oracles that assert the same user-facing string from outside the module were not updated, and they are the ones that fail. - Prior review evidence. The only prior review by
EffortlessStevenon this PR is the author's own self-review (828 characters, no head SHA cited, no disposition header). It states "Tests: Added rewrite unit test; fixture miss test asserts--format jsonand rejects bare--jsonin list hint" and "Residual:context.rsandnavigation.rsstill emit--jsonon non-explain surfaces (out of slice)". This review is the first independent review bound to this head.
Blocking:
- The change breaks a hosted lane and leaves the repository's own integration oracle asserting the pre-change behavior. The
Rust-only feature lanefails atcli_smokewith exit 101, and the two failing assertions are exactly the strings this PR changes. The repair is to update the two expected listings to the--format jsonspelling —cli_smoke.rs:2577-2581inselector_location_misses_explain_syntax_and_preserve_retry_scope, and the worktree listing incheck_worktree_drill_in_commands_reach_the_uncommitted_finding(cli_smoke.rs:27457onward). I would also add the inverse discriminator the PR currently lacks at the integration level: assert the emitted hint contains--format jsonand does not contain the bare--jsonalias. Today only the in-module unit oracle checks that, so an integration-level regression back to the alias would pass the integration suite. Until the two expectations are updated the lane is red and the change cannot land.
Non-blocking:
crates/ripr/src/app/explain.rs:266still documents the worktree retry asripr check --worktree --jsonin a doc comment on the very function whose emitted command now says--format json. That is a doc/behavior mismatch inside the file this PR edits and is worth aligning in the same change.crates/ripr/src/app/navigation.rs:457likewise describes the producer's canonical form as "Theripr check --jsoncommand" — that one is the producer's own form and is correct as written.- The rewrite is a positional string operation on a rendered command. It is correct for the only producer (
navigation.rs:461-463), whose--jsonis always the last token, andexplain.rs:745-746covers the idempotent case. I found no shape where--jsonis present but not final, so no surface is missed here; I note it because the coupling is positional rather than typed, so a future change tolist_command()that moved--jsonoff the end would silently stop the rewrite. - The
ripr explainsurface is not the only one that prints a list command. The author's own self-review records thatcontext.rsandnavigation.rsstill emit--json, out of this slice. I did not verify whether every non-explain surface falls inside #11570's slice; if any of them also carries the "suggest the documented spelling" obligation, this slice leaves it open. Flagging as a scope question, not a defect in this change. - The four
Rust tests shard N of 4jobs and theRust test shards verifyjob arecancelledat step 7, "Warm the cargo builds the policy tests spawn", with steps 8-11 skipped. The substantive step is cancelled and the later steps never ran, so those shards are unobserved — missing proof, not green and not red. TheRipr Rust Small Resultjob failed at step 2, "Recheck initially admitted eligibility", which is the eligibility-shaped failure seen elsewhere in this campaign and is consistent with runner exhaustion rather than a source defect. Neither changes the disposition, which rests on the Rust-only lane.
Not run:
- No local build, test, clippy or fmt: this host has no Rust toolchain (
rustc,cargo,rustupare absent from PATH), and the working checkout is shared with concurrent agents, socargo xtask precommit,cargo xtask check-pr,cargo test -p ripr --no-default-features --features lang-rustandcargo test -p ripr --test cli_smokewere not executed here. The failure is read from the hosted job log, not reproduced locally. - The candidate's claim of a local
cargo xtask precommitrun was not re-executed and cannot be verified from this repository. Note that a localprecommitpass would not have caught this: the failing assertions live incrates/ripr/tests/cli_smoke.rs, an integration target that a lib-scoped policy run does not exercise. - The full
Rust gateslane was stillin_progressat this head, andwindows-advisory-subsetwas in progress. The full workspace proof is therefore not established at this head beyond the lane cited above.
Conclusion: the change itself is correct and well-scoped — --format json is the documented, valid spelling, the rewrite reaches every explain-surface emission, and the producer always places --json last so the rewrite cannot miss a surface. The defect is that the repository's own integration oracle for the changed string was not updated, and the hosted Rust-only lane is red as a direct result, with the base green for that same lane. The disposition is REPAIR_REQUIRED.
Reviewed by an independent Mavis review agent on behalf of the maintainer; bound to head 205c106fa846585f2dda0aa7d0c79c5ba8bb8e8d. Not an approval.
…int (ported from #11982, main red) (#11844) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmmtS6TLb59cjpSU9tX
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmmtS6TLb59cjpSU9tX
… LSP order, selector tests) (#11995) * test(cli): selector recovery tests accept the --format json listing hint (#11844) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmqSMojp5pTTpGza5qp * fix(lsp): canonical-group order follows stable keys, not snapshot order #11862 replaced the string-keyed group map with a union-find keyed by root index, so group order silently followed the order findings are listed in. list_actionable_items_names_gaps_the_actionable_profile_hides (which documents canonical-group key order) then failed deterministically on main. Order groups by the lowest pre-merge key among their members (canonical:<gap> / raw:<anchor>). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmqErVsKLf9se9gRSKv * fix: repair main after #11950 (verdict-corpus expected rows) Bless the two Rust verdict-corpus rows that moved limited to gap after inline test use super::* stopped demoting binding arms (PR 11950). Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com> * fix(process-policy): drop the orphaned run_chain.rs import entry (same change as #11975) #11924 widened the std::process import in run_chain.rs, orphaning the `use std::process::Command` allowlist row. Carrying #11975's one-line removal here so a single PR turns both main-red steps green. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJr6YizPnC777wfxAd9ubU * test(verdict-corpus): label the eq-divert cases from a reachable mutant, not the equivalent edit The earlier arm or return shadows both compared constants (5 and 6), so moving 5 to 6 never changes any output: the edit is behavior-preserving and the recorded mutant (the edit itself) was equivalent, not 'not equivalent'. Re-derive truth from a mutant of the same line that is observable (constant 2) and that the single diverted row cannot notice; relabel replays all four cases with 0 drift and verdict-corpus check scores 0/5 false verdicts. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJr6YizPnC777wfxAd9ubU --------- Co-authored-by: t <a@b> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
) * feat(check): hint the .gitignore entry on a first check when the artifact root is unignored (#11879) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmmtS6TLb59cjpSU9tX * test(check): drive the real binary for the first-check .gitignore hint (#11879) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmmtS6TLb59cjpSU9tX * chore(policy): allowlist the first-check hint integration test's process spawns (#11879) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmmtS6TLb59cjpSU9tX * test(cli): selector recovery tests accept the --format json listing hint (ported from #11982, main red) (#11844) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmmtS6TLb59cjpSU9tX * Revert the ported cli_smoke hunks; #11982 owns that fix (#11844) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmmtS6TLb59cjpSU9tX --------- Co-authored-by: Claude <noreply@anthropic.com>
Summary
Explain selector miss, ambiguous, and limitation messages now suggest listing findings with
ripr check … --format jsoninstead of the--jsonalias, matchingripr check --help. Scoped commands (root, diff/base,--worktree, mode) keep their navigation args; only the JSON output flag spelling changes on the explain surface.Advances #11570 (item 4 only; does not close the umbrella issue).
Source-of-truth Links
Governing issue or accepted claim: #11570
Acceptance delta (one sentence): Item 4 — explain recovery hints document
--format jsonrather than--json.Swarm / Source Boundary
ripr-swarmProof
cargo test -p ripr --lib 'app::explain::tests::'(10 tests)cargo xtask precommitProof establishes explain list-command hints use
--format jsonand unit tests cover the rewrite plus fixture miss paths.Proof does not establish:
ripr context, navigation.rs defaults, MCP, or other #11570 items.Non-goals
check.rs/ fenced surfaces)help/core.rs)--jsonalias behavior in CLI