Repository navigation
fix(baseline): make the printed --candidate-tree recovery command runnable - #11928
Conversation
…nable
--candidate-tree takes an object id, so the literal HEAD^{tree} the
--from-check refusals and help printed failed with 'malformed object ID'
when copied. Print $(git rev-parse HEAD^{tree}) instead.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YVdGzSXu1ugFXtRKmsp92t
|
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 10 minutes. View limit details
|
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Decision
- Needs verification checks before upstream.
Verification questions
- Confirm the changed assertion is red/green-sensitive to the output-text fix but does not prove the advertised command is runnable.
- Confirm the acceptance claim that the printed recovery command can be copied and run is consistent with the diff, but the failed ripr sensor leaves stale sibling text unproven.
Evidence gaps
- Automated cargo-test completion cannot be established from the provided review packet because its receipt is absent.
- The claimed shell-copy behavior has no completed automated receipt in the supplied evidence; the PR body reports only manual verification.
- Model proof intent was rejected by deterministic validation.
- The patch does not provide an executable automated proof that the printed command resolves a tree ID and is accepted by
--from-check; the PR body reports manual verification, while the ripr sensor failed and cargo-test receipt is absent.
|
CI note: Generated by Claude Code |
There was a problem hiding this comment.
Independent review (fresh-context reviewer, head ac36bb7): REVIEW_INCOMPLETE
Inspected:
- PR #11928 (open, not draft,
merge-readyapplied 2026-10-31T22:47:09Z), headac36bb7223b3afa7c5e9a8d246aa3541326edb2f, basefa621a32eaf4c3dc6c17119021ea943641696aef. 6 files, +19/-14. One review already exists on this PR (id 5725259336), bound to this same head. - Governing issue #11206 (open, "adoption: misconfigured baseline-check is a bare config_error with no way forward for a first-time team"); item 3 of it is the whole-repository baseline route this command serves. The premise still holds at this base:
--candidate-treetakes an immutable tree object (docs/CONFIGURATION.md:212), so the literalHEAD^{tree}was never a valid argument and the printed recovery command was not runnable. - Semantic owners: the refusal strings live in
crates/ripr/src/output/baseline.rs(baseline_create_report_from_check_json:119-129,check_findings_as_decisions:150-210); the CLI-level recovery sentence isCHECK_ARTIFACT_RECOVERYincrates/ripr/src/cli/commands/baseline.rs:30-33; the help text isBASELINE_HELPincrates/ripr/src/cli/help/policy.rs:113-132(--from-checkblock at :123-128). The PR rewrites all of them and touches no analysis, classification or output-schema code, so the product's finding vocabulary and every machine format are untouched. - The corrected command is semantically right, not cosmetically different:
--candidate-treetakes a tree OID and--candidate-basedefaults to the repository's empty tree (docs/CONFIGURATION.md:212-213), which is exactly the artifact shape the refusals demand (output/baseline.rs:199-204requires an emptybase_tree), and the repository's own workflow doc already used the runnable form (docs/BASELINE_LEDGER_WORKFLOW.md:127:ripr check --candidate-tree "$(git rev-parse HEAD^{tree})" --format json > check.json). The PR's form matches it apart from the quoting. - Completeness of the fix: I checked the other user-facing surfaces at this head —
cli/help/core.rs,cli/suggest.rs,app/timeout_refusal.rs,app/navigation.rs,app/diff_source.rs,cli/commands/check.rs,cli/commands/check_argv_refusal_tests.rs,config.rs,docs/CONFIGURATION.md,docs/BASELINE_LEDGER_WORKFLOW.md— and none prints the literalHEAD^{tree}command; every other occurrence of that string in the tree is a correctgit rev-parse 'HEAD^{tree}'invocation inside scripts, workflows and xtask. No golden file records the old text. - Oracle strength: the unit test
whole_repo_check_refuses_scoped_incomplete_or_foreign_artifacts(output/baseline.rs:707-754) asserts the new command text for six of its seven refusal cases, and the CLI smoke test (crates/ripr/tests/cli_smoke.rs:17487-17493) asserts it on the refusal a user actually sees. A site left on the old literal fails both, so the change is genuinely covered rather than only re-described. - Repo conventions:
changelog.d/11206-from-check-candidate-tree-command.mdadds a<!-- section: Fixed -->fragment, and the pendingchangelog.d/11206-baseline-create-from-check.mdfragment is corrected in the same change. - Hosted evidence for head
ac36bb72: "Rust-only feature lane" (run 41246685439, 22:06:50Z) is green on this exact head and runscargo test --no-default-features --features lang-rust, so the updated unit and CLI-smoke assertions have a hosted receipt. The 22:47:09Z CI run (41249716626) is still running its Rust lane, and the merge-ready request run 41249716570 still has "Ripr Rust Small on GitHub Hosted / Rust gates"in_progress.
Blocking:
None proven in the source. The gap to REVIEW_READY is hosted proof: the required status check Ripr Rust Small Result for head ac36bb72 was still running when this review was written ("Ripr Rust Small on GitHub Hosted / Rust gates", run 41249716570). The green "Rust-only feature lane" is a real receipt for the changed assertions, but it is not the required gate.
Non-blocking:
- The recovery command has ten copies and no single owner, and this PR had to edit all of them: nine separate format strings in
output/baseline.rs(:122, :156, :159, :163, :174, :184, :192, :200, :207) plusCHECK_ARTIFACT_RECOVERYincli/commands/baseline.rs:33. The defect being fixed is precisely the kind that drifts — one missed copy tells a user to run a command that cannot work — and the CLI module already models the right shape with a const. A shared const in the owning module plus one reference from the CLI would make the next correction a one-site change. Worth doing while these strings are being touched; not a defect in this candidate. - The acceptance is "can be copied and run as written", and the only proof of runnability is the author's manual run on a scratch repo. No test executes the printed command, so a later edit that reintroduced a non-runnable form would still satisfy the string assertions. A CLI-level test that extracts the command out of a refusal and runs it — the
cli_smokeharness already spawns the built binary — would close the acceptance directly rather than by proxy. - The printed form omits the quoting the repository's own workflow doc uses (
docs/BASELINE_LEDGER_WORKFLOW.md:127writes"$(git rev-parse HEAD^{tree})"). Both work in bash, zsh and PowerShell; matching the documented form would leave one spelling in the tree. Also worth recording:$(...)is not expanded bycmd.exe, so the printed command is not runnable in a Windows cmd shell. That is consistent with the repo's POSIX-oriented command style, but it should be known before this text is quoted to a Windows-only user. - Changelog hygiene: the
#11206feature is unreleased at this base —CHANGELOG.mdatfa621a32contains no--from-checkoccurrence at all — so the new "Fixed" fragment describes a correction to text no user has seen, while the pending "Added" fragment is corrected in the same change. The same release will therefore carry an "Added" entry with the correct command and a "Fixed" entry explaining that the earlier, never-shipped text was wrong. Keeping the correction on the record is defensible; folding it into the pending fragment alone is the alternative. - Minor: the unit test excludes the "not json" case from the recovery-command assertion (
output/baseline.rs:747-752), but that refusal does carry the command (output/baseline.rs:122), so the exclusion is unnecessary and could be dropped to cover all seven cases.
Not run:
- The Rust toolchain on this host is not on
PATH, so I could not runcargo test,cargo fmt --check,cargo xtask precommit,cargo xtask goldens checkor any other repo-native gate, and I did not execute the printed command against a built binary. The PR body's "cargo xtask precommit: exit 0" and the by-hand scratch-repo verification are the author's; I did not reproduce them. My verification of the fix is source-level — the argument semantics againstdocs/CONFIGURATION.md:212-213and the empty-tree requirement inoutput/baseline.rs:199-204. - The PR body records that the local lib-test build was OOM-killed, so the hosted "Rust-only feature lane" is the only execution receipt for the changed assertions; the required gate had not finished when this review was written, so the head's required-test receipt is unobserved rather than green.
Reviewed by an independent Mavis review agent on behalf of the maintainer; bound to head ac36bb7223b3afa7c5e9a8d246aa3541326edb2f. Not an approval.
|
CI follow-up: the shard-1 failure repeated on Generated by Claude Code |
|
The failures on d7bb43f are main drift, not this PR's change. I diagnosed all of them from job logs and a local run of
I'll wait for those to merge, then merge main in and re-request CI once with Generated by Claude Code Generated by Claude Code |
There was a problem hiding this comment.
Reporter summary
The patch consistently replaces the invalid literal HEAD^{tree} with the shell-resolved $(git rev-parse HEAD^{tree}) across recovery messages, help, changelog entries, and assertions, and no lane found a concrete correctness defect; the reported manual verification supports the copy-and-run behavior. However, the assertions only prove text presence: they do not execute the advertised command, and the only automated receipts are failed (ripr) or timed out (cargo-test), so the acceptance claim lacks completed automated end-to-end proof. This is a verification gap rather than evidence that the fix is wrong; it warrants a focused shell-executed integration test and a successful test receipt, while recognizing that cmd.exe is outside the demonstrated POSIX-shell workflow.
There was a problem hiding this comment.
Independent review (fresh-context reviewer, head d7bb43f): REVIEW_INCOMPLETE
Inspected:
- Subject: PR #11928, head
d7bb43f99131cf1d2ae2f604b26862d7632220ff, earlier reviewed headac36bb7223b3afa7c5e9a8d246aa3541326edb2f, recorded base56d273dc243879405f064ae21867740242d4491a. Governed by issue #11206. 6 files. - What moved: one commit,
d7bb43f9 Merge branch 'main' into claude/candidate-tree-command-runnable. The branch was behind main (its merge base was7118be731018c6fae55e71542638bb6cc6b702f5at the earlier head,56d273dc243879405f064ae21867740242d4491anow) and the head is a main merge. The candidate's proposed content did NOT change, and I verified that rather than accepting the bundle's classification:- Five of the six contribution paths are byte-identical between the two heads:
changelog.d/11206-baseline-create-from-check.md,changelog.d/11206-from-check-candidate-tree-command.md,crates/ripr/src/cli/commands/baseline.rs,crates/ripr/src/cli/help/policy.rs,crates/ripr/src/output/baseline.rs- same blob SHA atac36bb72and atd7bb43f9(checked through the contents API at both refs). - The sixth,
crates/ripr/tests/cli_smoke.rs, has different blob SHAs (prevadfbd67a4a0ee3b37c5b0eeca01ce2781af03d55, head449c60e9b817bf406a4cf91108627028709703c5), which is why the delta bundle marks it CHANGED. It is not an author edit. The directcompare/ac36bb72...d7bb43f9diff for that file shows exactly one hunk, and it is main's: theinit_ci_github_writes_non_blocking_report_workflowassertion'sconcurrency:group string. The candidate's own hunk - the assertion atcli_smoke.rs:17487-17493that now expects--candidate-tree $(git rev-parse HEAD^{tree})instead of--candidate-tree HEAD^{tree}- is present and unchanged at both heads. Measured against its merge base, the candidate's proposal is the same six-file, same-line-count change at both heads.
So this head move was a base move, not a content change; the candidate contribution is byte-identical to the earlier reviewed head. Nothing in the candidate's proposal needed a fresh substantive pass, and I did not manufacture one.
- Five of the six contribution paths are byte-identical between the two heads:
- Semantic owner, re-verified at THIS head rather than carried over: the refusal strings live in
crates/ripr/src/output/baseline.rs(baseline_create_report_from_check_json:119-129,check_findings_as_decisions:150-210), the CLI-level recovery sentence isCHECK_ARTIFACT_RECOVERYincrates/ripr/src/cli/commands/baseline.rs:30-33, and the help text isBASELINE_HELPincrates/ripr/src/cli/help/policy.rs:113-132. Atd7bb43f9all nine format strings inoutput/baseline.rs(:122, :156, :159, :163, :174, :184, :192, :200, :207) printripr check --candidate-tree $(git rev-parse HEAD^{tree}) --format json > check.json, the unit test at:749asserts that text, and the old literal--candidate-tree HEAD^{tree}is gone from the file. - The corrected command is still semantically right at this head:
docs/CONFIGURATION.md:212defines--candidate-tree TREEas "Analyze exactly this immutable Git tree object" and:213gives--candidate-base BASEthe default "repository's empty tree" - exactly what the refusal atoutput/baseline.rs:200demands.git rev-parse HEAD^{tree}produces a tree OID, so the printed command yields the artifact shape the refusal asks for. The PR touches no analysis, classification or output-schema code, so the product's finding vocabulary and every machine format are untouched. - Oracle strength is unchanged: the unit test pins the command text for six of its seven refusal cases (
output/baseline.rs:707-754) and the CLI smoke test pins it on the refusal a user actually sees (cli_smoke.rs:17487-17493).
Earlier findings re-bound (all five earlier non-blocking findings STILL HOLD; the candidate contribution is unchanged, so nothing was repaired):
- STILL HOLDS - the recovery command has ten copies and no single owner (nine format strings in
output/baseline.rsplusCHECK_ARTIFACT_RECOVERYincli/commands/baseline.rs:33) and this PR had to edit all of them. A shared const in the owning module plus one reference from the CLI would make the next correction a one-site change. Worth doing while these strings are being touched; not a defect in this candidate. - STILL HOLDS - the acceptance is "can be copied and run as written", and the only proof of runnability is the author's manual run on a scratch repo. No test executes the printed command, so a later edit that reintroduced a non-runnable form would still satisfy the string assertions. A CLI-level test that extracts the command out of a refusal and runs it - the
cli_smokeharness already spawns the built binary - would close the acceptance directly rather than by proxy. - STILL HOLDS - the printed form omits the quoting the repository's own workflow doc uses (
docs/BASELINE_LEDGER_WORKFLOW.md:127writes"$(git rev-parse HEAD^{tree})"); both work in bash, zsh and PowerShell, and matching the documented form would leave one spelling in the tree.$(...)is also not expanded bycmd.exe, so the printed command is not runnable in a Windows cmd shell - consistent with the repo's POSIX-oriented command style, but worth knowing before this text is quoted to a Windows-only user. - STILL HOLDS - the
#11206feature is unreleased at this base, so the new "Fixed" fragment describes a correction to text no user has seen while the pending "Added" fragment is corrected in the same change: one release will carry an "Added" entry with the correct command and a "Fixed" entry explaining that the never-shipped text was wrong. Keeping the correction on the record is defensible; folding it into the pending fragment alone is the alternative. - STILL HOLDS (minor) - the unit test excludes the "not json" case from the recovery-command assertion (
output/baseline.rs:747-752), but that refusal does carry the command (output/baseline.rs:122), so the exclusion could be dropped to cover all seven cases.
Blocking:
None proven in the source. The gap to REVIEW_READY is hosted proof: the required lane for this head is red, on an inherited base failure (attribution below), and the head's required-test receipt is therefore not green.
Non-blocking:
- Hosted state at this head, newest run wins. Run 41253886635 ("CI") is failure: "Rust-only feature lane" (job 124692848224) failed at step 9 "Test --no-default-features --features lang-rust" - the
riprlib target reports12884 passed; 1 failed; 1 ignoredwith the single failurelsp::backend::list_actionable_items_tests::list_actionable_items_names_gaps_the_actionable_profile_hidesatcrates/ripr/src/lsp/backend.rs:12891(left: ["probe:pricing:94:predicate", "probe:pricing:98:predicate"]vsright: ["probe:pricing:98:predicate", "probe:pricing:94:predicate"]), and thecli_smoketarget reports619 passed; 2 failed; source-identity, Perl and release proof, msrv, vscode and ci-result are skipped. Run 41253886642 ("Merge-ready request d7bb43f...") is failure: "Route Ripr Rust Small", "Detect Docs-Only Surface" and "Admit PR Candidate" are success; "Ripr Rust Small on GitHub Hosted / Rust gates" (job 124693018980) failed at step 16 "Repository policy preflight" withcheck-process-policyreporting that thecrates/ripr/src/output/first_pr/run_chain.rsallowlist entry foruse std::process::Commandis orphaned (max_count=1, pattern not found in any tracked file), and the gate summary recordsPROCESS_POLICY_RESULT: skippedandCLIPPY_RESULT: skipped; "Ripr Rust Small Result" (124694990498) is failure; the sharded test lane and the CX lanes are skipped. "Security" (41253886641), "Printed Command Paste" (41253886633), "Merge-ready Conflict Notice" (41253886981), "Windows Advisory" (41253888778), "ub-review" (41253877452) and "Qualify ripr-rs Python Wheel (read-only)" (41253877477) are success; Coverage, Test Analytics, Future Clippy (advisory), macOS Advisory and the first CI/advisory generation are skipped. - Attribution for both red lanes: main-red, not this candidate, and established by a direct source-level causal chain plus a base comparison rather than by base-lane colour alone. (a) The process-policy orphan: the gate names
crates/ripr/src/output/first_pr/run_chain.rsand the allowlist entrypolicy/process_allowlist.d/11720-first-pr-run-chain.txt. At the base tip56d273dcAND at this head,run_chain.rsis the same blobf3313cabdb06- whose import is the grouped formuse std::process::{Child, Command, ExitStatus, Stdio};, so the literaluse std::process::Commandthe allowlist entry requires no longer exists and the entry is orphaned - and the allowlist fragment is the same blob63db01ce12. Neither file is in this six-file proposal, so the orphan pre-exists in the candidate's tree exactly as in the base tree; main tipc5fa19fd9051f00a9195b37af9c78e5028b6982ffails the same gate with the identical message (job 124702518162). (b) The LSP ordering assertion and the twocli_smokefailures are outside this PR - it touches no file undercrates/ripr/src/lsp/orcrates/ripr/tests/cli_smoke.rsbeyond the one assertion listed above. The base tree itself carries the failing combination: at56d273dc,crates/ripr/src/lsp/diagnostics.rsis blobeedf4d52(the #11796 union-findcanonical_group_members, which changed group ordering from string-key order to union-find root-index order) whilecrates/ripr/src/lsp/backend.rsis blob5a98e4c3, whose test still asserts the old order[:98, :94]; the head carries the same two blobs. Main pusha7431a52dfails the same test at the same place with the identical left/right flip and the same twocli_smokefailures at the same 619/2 counts (job 124698136286). - The earlier pass's observation that the green "Rust-only feature lane" at the earlier head was a real receipt for the changed assertions no longer holds at this head: the same lane is now red on an unrelated LSP test, and the lane that would carry the required receipt stopped at the policy preflight before "Strict workspace Clippy" and "Required Rust tests". The changed assertion in
cli_smoke.rsis inside that lane'scli_smoketarget, which is one of the two failing targets in this run - so this head has no green receipt for the changed assertion. - Efficiency: the candidate contribution is unchanged from the earlier reviewed head, so it adds no runtime cost to review. It touches refusal-message construction only: nine format strings in
output/baseline.rsand one const incli/commands/baseline.rs, all on error paths that run once per refused artifact. The new text is a longer literal than the old one (a$(git rev-parse HEAD^{tree})invocation instead of a bareHEAD^{tree}), so the refusal strings grow by a few dozen bytes per refusal; there is no new I/O, no subprocess spawned by ripr itself, no scan, no cache, and no allocation on a hot path. The printed command is a suggestion for the user to run, not something ripr executes, so thegit rev-parsecost is the user's, incurred once, on a refusal. I did not profile, and I make no claim about the absolute size of the error strings beyond the literal text change.
Not run:
- The Rust toolchain on this host is not on
PATH: nocargo test,cargo fmt --check,cargo xtask precommit,cargo xtask goldens checkor any other repo-native gate was executed, and no local Rust receipt is claimed. Every Rust-level statement above comes from reading source at this head or at the base, or from hosted job logs at this head. - I did not execute the printed recovery command against a built binary, so the "can be copied and run as written" acceptance is still verified only at the argument-semantics level (against
docs/CONFIGURATION.md:212-213and the empty-tree requirement inoutput/baseline.rs:200), not by running it. - The PR body's "
cargo xtask precommit: exit 0" and its by-hand scratch-repo verification are the author's; I did not reproduce them. - No combined-tree compile of the current main tip with this head, and no run of this head's CI against the current main tip; the lanes here ran against the merge with main as of 2026-10-31T23:43.
Reviewed by an independent Mavis review agent on behalf of the maintainer; bound to head d7bb43f99131cf1d2ae2f604b26862d7632220ff. Not an approval.
|
Review of record, head 569206c. Disposition: REVIEW_READY (COMMENT on author PR). Inspected: full diff. The printed recovery command Generated by Claude Code |
Governing issue or accepted claim: #11206
Acceptance delta (one sentence): The recovery command that
ripr baseline create --from-checkprints and documents in its help can be copied and run as written.Summary
Found while adopting ripr from scratch in a scratch repo.
ripr check --candidate-tree HEAD^{tree}fails withmalformed object ID "HEAD^{tree}": expected 40 or 64 hexadecimal characters, because--candidate-treetakes an object id. #11646 printed the literal form in every--from-checkrefusal, inbaseline create --help, and in its changelog fragment (the workflow doc already used"$(git rev-parse HEAD^{tree})", which works).CHECK_ARTIFACT_RECOVERY, and help now print--candidate-tree $(git rev-parse HEAD^{tree}).baseline create --from-checkaccepts (2 entries on the scratch repo); the literal form reproduces the error.Proof
cargo xtask precommit: exit 0 (the only failure line in its log is the known localowner_return_pin_fallible_literalfixture preparation note)Generated by Claude Code