Repository navigation
fix(cli): preserve committed selector recovery scope - #9015
Conversation
|
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 13 minutes. View limit details
Comment |
EffortlessSteven
left a comment
There was a problem hiding this comment.
Author exact-source inspection — REVIEW_INCOMPLETE.
Reviewed head27629e1736e625d08703930c77053c1aac8ffccd against basea816499ecf9544fe49f3c3ca4d4964584ab02f70, all six changed paths. Semantic owner is app/navigation.rs list_prefix construction. Inspected fresh explain/context app and CLI consumers, check's effective worktree_run producer, artifact prefixes and human recovery/restart consumers. The check-only flag is accepted by check and never added to explain/context. Root/base/mode/quoting assembly stays shared; supplied diff/worktree routes remain distinct. No analyzer/schema/dependency/process policy changes.
Oracle challenge: tests-only ancestorb017fc2bd rejected the actual emitted command selecting the opposing worktree finding; worktree and saved-diff recovery had already passed for both siblings. Repaired source passes four CLI controls. Final-head library-test executable from check-fast passes all nine navigation tests and the single help-parity test. Earlier CLI binary carries the b017+dirty build stamp; its source applicability is recorded, not relabeled as a final-head executable. Full commands/counts are in the PR body.
No scoped material source/oracle defect found in this author inspection. Missing: reviewer16's independent exact-candidate replay, terminal final-head check-fast/precommit results, actual required hosted qualification and integration judgment. At this review, check-fast has passed file-policy and reached workspace/all-targets Clippy; it is still running and is not counted as an overall pass. Gemini/CodeRabbit quotas are missing provider review, not a clean result. No native Windows, full suite, package, release or protected-landing claim. Draft remains in flight; only the parent's named integration lanes may merge.
There was a problem hiding this comment.
Decision
- Needs one verification check before upstream.
Verification questions
- Confirm default check list_args pinned to --committed only when no worktree/diff/git-candidate pin exists; pinned branch pushes ' --committed' onto list_args and explain/context prefixes remain unaffected.
Refuted
- Could the guard fire when the user supplied --diff / --git-candidate, contaminating committed recovery with the supplied input?; refuted because: Condition conjuncts
diff_file.is_none() && git_candidate.is_none()exclude supplied-diff and explicit git-candidate paths; --worktree is also excluded by!worktree. The fixture's three-row tuple ('worktree', 'supplied diff', 'committed') cross-checks replay assertions including excluded identity.
Parked follow-ups
- Red source retained in ancestor b017fc2 per PR body; new test file did not exist there, so red proof depends on re-adding the file against unfixed nav. Lane cannot directly verify reapplication without rebuilt red head; parked.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
|
Final local receipt for exact head {
"schema_version": "0.2",
"composition": "local_precommit",
"status": "pass",
"failure_kind": null,
"repository_root": "$REPO",
"head_sha": "27629e1736e625d08703930c77053c1aac8ffccd",
"merge_base_ref": "origin/main",
"merge_base_sha": "a816499ecf9544fe49f3c3ca4d4964584ab02f70",
"change_set": {
"changes": [
{
"kind": "added",
"path": "changelog.d/7328-selector-recovery-committed-scope.md",
"old_path": null,
"origins": [
"committed"
]
},
{
"kind": "added",
"path": "crates/ripr/tests/cli_smoke/selector_recovery_scope.rs",
"old_path": null,
"origins": [
"committed"
]
},
{
"kind": "modified",
"path": ".ripr/traceability.toml",
"old_path": null,
"origins": [
"committed"
]
},
{
"kind": "modified",
"path": "crates/ripr/src/app/navigation.rs",
"old_path": null,
"origins": [
"committed"
]
},
{
"kind": "modified",
"path": "crates/ripr/tests/cli_smoke.rs",
"old_path": null,
"origins": [
"committed"
]
},
{
"kind": "modified",
"path": "docs/specs/RIPR-SPEC-0003-agent-context.md",
"old_path": null,
"origins": [
"committed"
]
}
],
"complete": true,
"limitations": []
},
"impact_plan": {
"impacted_packages": [
"ripr",
"xtask"
],
"workspace_clippy": false,
"workspace_widening_reason": null,
"skipped_reason": null
},
"commands": [
{
"command": "cargo metadata --format-version 1 --no-deps --manifest-path $REPO/Cargo.toml",
"outcome": "pass",
"detail": null,
"diagnostic": null
},
{
"command": "existing repository policy precommit",
"outcome": "pass",
"detail": null,
"diagnostic": null
},
{
"command": "git diff --check a816499ecf9544fe49f3c3ca4d4964584ab02f70...HEAD",
"outcome": "pass",
"detail": null,
"diagnostic": {
"program": "git",
"argv": [
"-C",
"$REPO",
"diff",
"--check",
"a816499ecf9544fe49f3c3ca4d4964584ab02f70...HEAD"
],
"outcome": "pass",
"status": "exit status: 0",
"exit_code": 0,
"elapsed_ms": 100,
"elapsed_scope": "runner_start_to_observed_exit_excluding_pipe_drain",
"cargo_progress": null
}
},
{
"command": "git diff --cached --check",
"outcome": "pass",
"detail": null,
"diagnostic": {
"program": "git",
"argv": [
"-C",
"$REPO",
"diff",
"--cached",
"--check"
],
"outcome": "pass",
"status": "exit status: 0",
"exit_code": 0,
"elapsed_ms": 100,
"elapsed_scope": "runner_start_to_observed_exit_excluding_pipe_drain",
"cargo_progress": null
}
},
{
"command": "git diff --check",
"outcome": "pass",
"detail": null,
"diagnostic": {
"program": "git",
"argv": [
"-C",
"$REPO",
"diff",
"--check"
],
"outcome": "pass",
"status": "exit status: 0",
"exit_code": 0,
"elapsed_ms": 102,
"elapsed_scope": "runner_start_to_observed_exit_excluding_pipe_drain",
"cargo_progress": null
}
},
{
"command": "cargo clippy --manifest-path $REPO/Cargo.toml -p ripr --all-targets -- -D warnings",
"outcome": "pass",
"detail": null,
"diagnostic": {
"program": "cargo",
"argv": [
"clippy",
"--manifest-path",
"$REPO/Cargo.toml",
"-p",
"ripr",
"--all-targets",
"--",
"-D",
"warnings"
],
"outcome": "pass",
"status": "exit status: 0",
"exit_code": 0,
"elapsed_ms": 906,
"elapsed_scope": "runner_start_to_observed_exit_excluding_pipe_drain",
"cargo_progress": null
}
},
{
"command": "cargo clippy --manifest-path $REPO/Cargo.toml -p xtask --all-targets -- -D warnings",
"outcome": "pass",
"detail": null,
"diagnostic": {
"program": "cargo",
"argv": [
"clippy",
"--manifest-path",
"$REPO/Cargo.toml",
"-p",
"xtask",
"--all-targets",
"--",
"-D",
"warnings"
],
"outcome": "pass",
"status": "exit status: 0",
"exit_code": 0,
"elapsed_ms": 234996,
"elapsed_scope": "runner_start_to_observed_exit_excluding_pipe_drain",
"cargo_progress": {
"compiling_lines": null,
"checking_lines": 22,
"fresh_lines": null
}
}
}
],
"skipped": [],
"limitations": [],
"report_digest": "sha256:f883afe95e711f206a584cc5ddbf0715c546c48abc160578d8215e3d1e316494"
}Review disposition for automated review5593662825:
|
EffortlessSteven
left a comment
There was a problem hiding this comment.
Independent exact-head source/runtime review: no actionable findings emitted for the bounded selector-recovery repair. Source/runtime review is non-blocking and supports the parent's normal hosted qualification request. Overall disposition remains REVIEW_INCOMPLETE for hosted qualification and final integration judgment; this is not merge clearance.
reviewed_head_sha: 27629e1736e625d08703930c77053c1aac8ffccd
integration_basis: exact branch ancestor a816499ecf9544fe49f3c3ca4d4964584ab02f70; current GitHub target/base snapshot main / 6be02b0bff14fe4729fdb6a39072d7ee4e9ee427. Candidate head was reread unchanged immediately before submission. No restack or combined-tree qualification is claimed.
claim_boundary: recovery listings for committed explain/context retain the committed finding set when tracked staged/unstaged edits produce a conflicting nonempty set. Explicit worktree and supplied-diff routes retain their sources. Lineage #7328/#7537.
Inspected surfaces and authority: complete six-path diff (navigation, CLI regression/module registration, spec, traceability, changelog), fresh explain/context app and CLI routing, check's effective diff-source choice, shared human/triage listing consumers, artifact/repair prefixes and host-aware test command parser. Only list_args changes; args used by explain/context is built before it and remains unchanged. Guard is exactly !worktree && input.diff_file.is_none() && input.git_candidate.is_none(). --committed is accepted by check; it never contaminates drill-in prefixes, explicit worktree or supplied-diff arguments. Existing root/base/mode/quoting assembly is retained. Spec and traceability name the actual registered regression. No analyzer/schema/dependency/pin/workflow/global-policy change.
Observed independent installed-CLI proof:
- Narrow
cargo install --path crates/ripr --debug --locked --offline --root /workspace/selector-review-9015-install --target-dir /workspace/selector-review-target -j 2, pinned Rust1.95, CARGO_PROFILE_DEV_DEBUG=0: native0,44.13s. Reused inactive review-owned dependency state; only ripr compiled. No broad test/build or hosted CI duplication. - Actual installed executable
/workspace/selector-review-9015-install/bin/riprreports full27629 head; SHA25669833cb729751b31d5bce93dc8929b8e98cfd9c21f9735edf2b40203df11dea2. These are this reviewer's rebuilt bytes, distinct from the author's b5a4046f executable; no artifact-identity substitution. - Replayed the retained independent opposing-source driver from the baseline review. Strengthened the scope assertion to require expected-ID presence and opposite-ID absence. Selects exactly the predicate with the independently specified expression, avoiding arbitrary findings[0]. Same-file fixture is deliberately different from the author's two-file regression.
- Literal committed predicate
amount >= threshold=probe:src_lib.rs:predicate:8056f203; dirty predicateamount < threshold=probe:src_lib.rs:predicate:5d681768. Both inventories nonempty and disjoint; plain check's dirty-default control also verified. - Fresh baseline negative: same strengthened driver on retained installed a816 binary, staged edits, native1. It reaches both intended committed-listing scope failures; remaining6/8 controls pass. Baseline SHA256
199aef379a090d5cc4079718636399ab4b0de2bb76efc400cbd10ae1bf3dfc14. - Candidate unstaged: strict driver native0,8/8 scope controls;40 retained command rows (32 exit0,8 intended selector-refusal exit2).
- Candidate staged: strict driver native0,8/8 scope controls;41 retained command rows (33 exit0,8 intended selector-refusal exit2). The extra row stages the edit, not an extra product test.
The driver executes each exact emitted command through Bash, including spaced root/diff paths from a foreign cwd with this installed binary first on PATH. First committed listing now contains --committed, returns8056f203 and excludes5d681768. Exact additional --worktree listings return5d681768; both actual printed worktree retries succeed. Explicit --worktree and saved --diff misses preserve the correct opposite nonempty sets. Clean-tree misses reach selection and omit dirty-tree advice. Successful committed/worktree drill-in hits also execute for both siblings. Thus replay reaches real producer -> rendered command -> shell/CLI consumer -> selected findings; source-text checks alone are not the proof.
Review/receipt disposition: current inline-thread inventory is empty; submitted reviews and Conversation comments were inspected, including raw final precommit receipt. That receipt names this exact head/base, the same six changed paths, complete change set, pass outcomes and no outer limitations/skips. It is author-published evidence inspected here, not an independently rerun policy gate. Author-reported4CLI/9navigation/1help/check-fast/precommit passes retain their stated identities; no fresh independent Rust test run is claimed. Goldens were explicitly skipped by their selector, not credited as passed.
The automated concern that the test did not exist at tests-only red ancestor is source-refuted: git show b017fc2bd6b9cbb490fbefe547c970790eacbfe2:crates/ripr/tests/cli_smoke/selector_recovery_scope.rs contains the full regression, and a816..b017 navigation diff is empty. This confirms the source relationship; my independent baseline runtime negative above supplies separately observed discrimination.
Remote snapshot: CodeRabbit status success does not overcome its quota-limited review; Gemini quota likewise remains missing provider review. Available PR-run metadata shows Source of Truth success and several skipped Rust/security/paste/platform workflows, not a complete required matrix. Wheel/ub-review aggregate successes were not inspected as semantic evidence and are not credited. The workflow wrapper is first-page/PR-only, so no exhaustive all-event inventory claim.
blocking_findings: none in scoped source/runtime review.
non_blocking_suggestions: none.
proof_or_review_missing: parent's required hosted qualification, complete current findings/check/protection reconciliation and final combined-tree/integration judgment; native Windows execution and full-suite/package/release proof not run here.
affected_currentness_dimensions: production listing, test stimulus/oracle, public spec/traceability, exact candidate executable and head inspected.
residual_assumptions_and_non_claims: bounded Linux/Bash command-replay proof; no general shell encoder, artifact replay, analyzer accuracy, native-Windows, full-suite or landing qualification. No approval/check bypass, Ready/qualification-label transition or merge performed. Only named integration lanes may merge.
Retained review-owned artifacts: /workspace/selector-review-9015-evidence/ (run.py, install.log, baseline and candidate staged/unstaged raw results/summaries/logs); installed baseline/candidate witnesses remain separate. Review tree is clean; all owned command drivers are terminal. No implementation edits. Parent integrator owns the next hosted/merge transition.
|
Integration coordination for the existing #9015/#9034 owners; no competing repair. Source/oracle review at #9015 27629e1 and #9034 bb262ca found contradictory defaults: #9034 makes dirty, no-scope explain/context use the worktree, while selector_recovery_scope in #9015 treats no-scope --base HEAD~1 as committed and expects committed identity plus check --committed recovery. This is a source-supported composition concern, not an executed failure. Please replay the existing opposing-nonempty committed/worktree fixture on the exact joined tree: execute no-scope explain/context misses and their emitted check commands, then drill-ins emitted by check --committed while the tree remains dirty. Preserve supplied-diff, explicit-worktree and artifact controls. Do not blindly add --committed to explain/context: the current explain parser does not accept that check-only flag. Reconcile the intended default and matching test oracle before accepting the composition. The member-root and target/CACHEDIR.TAG repairs already present in #9034 are acknowledged; this does not repeat the older findings as unrepaired. Canonical writers retain ownership. |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Confirmed execution follow-up to the #9015/#9034 composition concern. Existing navigation authors retain the repair; no competing production changes were made. This blocks newer-main qualification of #9064. Frozen subjects: actual main Two distinct observations:
Passing controls: explicit-worktree printed explain/context 0/0; saved supplied-diff printed explain/context 0/0; artifact explain/context for committed, worktree and supplied-diff inputs 0/0 each. Supplied-diff preserves the committed predicate identity; its complete finding list differs (one predicate versus committed's predicate+return), so no full-inventory equality is asserted. Geometry API tests pass 3/3 on this composition and on the older pinned integration; those gitless API tests do not cover these CLI defaults. Source identity: Git blobs Owner handoff / resume: please reconcile the intended committed-check journey and stale no-scope oracle in the existing navigation lane, then return a frozen repair SHA, owning PR and focused replay results. #9064 remains Draft, with no new hosted campaign or merge. Resume only after the accepted repair reaches the integration basis, the actual merge subject is verified, and affected navigation controls pass. Do not add unsupported check-only flags to explain/context. The previously repaired member-root and target-marker findings are not being reopened. Recoverable synthetic evidence driver (save as replay.py)Run import pathlib, subprocess, json, shlex, hashlib, sys
out=pathlib.Path(sys.argv[2]).resolve(); out.mkdir(exist_ok=True)
root=out/'fixture'; (root/'src').mkdir(parents=True,exist_ok=True)
binary=str(pathlib.Path(sys.argv[1]).resolve())
rows=[]
def run(label,args,cwd=root):
p=subprocess.run(args,cwd=cwd,text=True,capture_output=True)
(out/(label+'.stdout')).write_text(p.stdout); (out/(label+'.stderr')).write_text(p.stderr)
rows.append(dict(label=label,args=args,exit=p.returncode)); return p
def git(*args):
p=run('git-'+str(len(rows)),['git',*args]); assert p.returncode==0,p.stderr
(root/'Cargo.toml').write_text('[package]\nname="selector-replay"\nversion="0.1.0"\nedition="2024"\n')
(root/'src/lib.rs').write_text('mod committed;\nmod worktree;\n')
def write(name,op): (root/f'src/{name}.rs').write_text(f'pub fn {name}(n: i32) -> bool {{\n n {op} 10\n}}\n')
write('committed','>'); write('worktree','>')
git('init'); git('config','user.name','Navigation replay'); git('config','user.email','replay@localhost'); git('add','.'); git('commit','-m','base')
write('committed','>='); git('commit','-am','committed boundary')
patch=root/'saved.patch'; patch.write_text(run('patch',['git','diff','HEAD~1','HEAD']).stdout)
write('committed','>'); write('worktree','>=')
ids={}; scope={'committed':['--base','HEAD~1','--committed'],'worktree':['--base','HEAD~1','--worktree'],'supplied':['--diff',str(patch)]}
for label,flags in scope.items():
args=[binary,'check','--root',str(root),*flags]
artifact=out/(label+'.artifact.json')
p=run(label+'-json',args+['--json','--write-artifact',str(artifact)]); assert p.returncode==0,p.stderr
d=json.loads(p.stdout); ids[label]=[f['id'] for f in d['findings']]; assert ids[label]
p=run(label+'-human',args); assert p.returncode==0,p.stderr
commands=[x.strip() for x in p.stdout.splitlines() if x.strip().startswith(('ripr explain ','ripr context '))]
assert commands,(label,p.stdout)
for i,command in enumerate(commands):
parsed=shlex.split(command); parsed[0]=binary
run(label+'-printed-'+str(i),parsed)
for command in ['explain','context']:
selector=['--at',ids[label][0]] if command=='context' else [ids[label][0]]
run(label+'-artifact-'+command,[binary,command,'--root',str(root),'--from',str(artifact),*selector])
assert ids['committed']!=ids['worktree'] and ids['supplied'][0]==ids['committed'][0],ids
summary={'binary':binary,'binary_sha256':hashlib.sha256(pathlib.Path(binary).read_bytes()).hexdigest(),'ids':ids,'runs':rows}
(out/'receipt.json').write_text(json.dumps(summary,indent=2))
print(json.dumps({'ids':ids,'outcomes':[{k:r[k] for k in ['label','exit']} for r in rows if not r['label'].startswith('git-')],'binary_sha256':summary['binary_sha256']},indent=2)) |
Governing issue or accepted claim: delegated selector recovery follow-up to #7328 / #7537; existing contract RIPR-SPEC-0003.
Acceptance delta (one sentence): committed explain/context selector recovery keeps committed history when tracked worktree edits select an opposing nonempty finding set.
Problem and repair
Explain/context default to committed history but recovered with plain check, whose dirty-repository default reads the worktree. The shared navigation owner now adds
--committedto committed listing commands only. Explain/context prefixes retain their accepted flags; explicit worktree, supplied diff and artifact drill-in input retain their routes. Six focused files: shared navigation, real-CLI regression/module registration, spec, traceability and canonical Fixed changelog. No analyzer, schema, dependencies, pins, workflows, global policy, collision-lexical protection or release changes. Rollback is an ordinary source revert.Head
27629e1736e625d08703930c77053c1aac8ffccd, branchcodex/selector-recovery-committed, basea816499ecf9544fe49f3c3ca4d4964584ab02f70. No stack/prerequisite. All-state finding-specific searches found no equivalent implementation; nearby #8849/#8650 retain their owners. Historical #7328 remains closed/accepted.Executed proof
Linux/Bash, pinned Rust1.95, jobs2, incremental off, dev debug0.
b017fc2bdretained. One intended test/native101: actual emitted command selectedprobe:src_worktree.rs:predicate:70c58575instead ofprobe:src_committed.rs:predicate:cccbf91e. Both explain/context explicit-worktree and supplied-diff recovery controls had passed before that assertion.b5a4046fe0829bd33e4108f494e0309fd4e96e2f38331d140625e7758c8db1f9. Selected test source is unchanged from the preceding formatted-source green; the reused test driver is not claimed to have been freshly rebuilt for this replay.precommit-v2.jsonpass at exact27629 head/basea816, all six committed paths, complete change set, no limitations or outer skipped commands. Both ripr/xtask all-targets strict Clippy pass. Inner policy fixture contracts pass, closing the check-fast skip. Inner goldens are explicitly skipped by its selector (no output-surface or golden file changed); no golden-drift pass is claimed. Report digestsha256:f883afe95e711f206a584cc5ddbf0715c546c48abc160578d8215e3d1e316494.The regression extracts the first real backtick-delimited recovery listing from stderr, decodes its emitted argv with the retained host-aware parser, executes the actual CLI, and checks expected/excluded finding identities. Fixture setup asserts opposing nonempty committed/worktree findings and the dirty-default control before recovery. Existing worktree drill-in, dirty-miss hint and malformed-location/supplied-diff scope controls also run.
cargo test --locked -p ripr --test cli_smoke -- selector_recovery_scope:: selector_location_misses_explain_syntax_and_preserve_retry_scope check_worktree_drill_in_commands_reach_the_uncommitted_finding explain_context_miss_names_the_worktree_route_when_uncommitted_edits_exist --test-threads=1 cargo xtask check-fast cargo xtask precommitFirst GREEN preceded the final commit and is retained with its original b017+dirty executable identity; the later actual final-product-head replay above supplies fresh behavior evidence without relabeling that earlier run. These are component/local policy proofs, not whole-suite, native-Windows, package, release, hosted or protected-landing qualification.
Review and continuation
Independent reviewer16 baseline reproduction; exact-source author COMMENT5593630930. All six paths and app/CLI/check-effective-source/human consumers inspected; no scoped material source/oracle finding in author inspection. Gemini/CodeRabbit quota responses are missing provider review, not clean reviews.
Draft / PR_IN_FLIGHT / REVIEW_INCOMPLETE. Parent resumes existing reviewer16 against this exact candidate, then the integration lanes request normal required hosted qualification and make the integration judgment. Only the parent's two named integration lanes merge, preserving approvals/checks/holds. No qualification label, Ready transition, auto-merge, merge queue or merge requested here.
Local receipts:
/tmp/selector-recovery-evidence(236KiB: red/green/final-head replay, final policy reports, source inspection and resource admission). Published source and red ancestor are independently retrievable. The source checkout and mutable target are retained for active candidate review; inherited build/cache state is awaiting owner verification and was not deleted. About27GiB remains free, within the original8GiB additional-generation budget. No frozen-executable custody/restore claim.Spec/test/code mapping: RIPR-SPEC-0003 and traceability entry;
cli_smoke/selector_recovery_scope.rs;app/navigation.rs.