Skip to content

fix(cli): preserve committed selector recovery scope - #9015

Merged
EffortlessSteven merged 2 commits into
mainfrom
codex/selector-recovery-committed
Oct 21, 2026
Merged

EffortlessSteven merged 2 commits into
mainfrom
codex/selector-recovery-committed

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

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 --committed to 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, branch codex/selector-recovery-committed, base a816499ecf9544fe49f3c3ca4d4964584ab02f70. 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.

  • RED: tests-only ancestor b017fc2bd retained. One intended test/native101: actual emitted command selected probe:src_worktree.rs:predicate:70c58575 instead of probe:src_committed.rs:predicate:cccbf91e. Both explain/context explicit-worktree and supplied-diff recovery controls had passed before that assertion.
  • GREEN at final product head: four focused CLI tests/native0, 596 filtered, none ignored, 3.20s. The existing compiled CLI-test driver was replayed against the actual CLI rebuilt by final-head policy preparation. Product version reports this full27629 head; executable SHA256 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.
  • Exact final-head unit executable: nine navigation tests/native0, 11,945 filtered, none ignored; single help-parity test/native0, 11,953 filtered. Preserves worktree, diff, artifact, explicit mode, root/input-file binding and repair navigation controls.
  • Final-head check-fast: native0;15 gates including workspace/all-targets Clippy; expected six changed paths; stable selector agrees with independent Git. One explicit skip: fixture contracts.
  • Final-head precommit: native0 and precommit-v2.json pass 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 digest sha256:f883afe95e711f206a584cc5ddbf0715c546c48abc160578d8215e3d1e316494.
  • Baseline driver/product-library compile and six selected baseline check-fast gates passed. Base merge-base/empty Git diff independently verified. Doctor reported only behind-main drift; relevant navigation source is unchanged, so no restack.
  • Source checkout is clean. All owned native drivers are terminal; no duplicate build/active local test remains.

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 precommit

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

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

@coderabbitai

coderabbitai Bot commented Oct 21, 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 13 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 71 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
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 5c1074af-7de0-4deb-9556-fadc3edc7fbe
📥 Commits

Reviewing files that changed from the base of the PR and between 6be02b0 and 27629e1.

📒 Files selected for processing: 6
  • .ripr/traceability.toml
  • changelog.d/7328-selector-recovery-committed-scope.md
  • crates/ripr/src/app/navigation.rs
  • crates/ripr/tests/cli_smoke.rs
  • crates/ripr/tests/cli_smoke/selector_recovery_scope.rs
  • docs/specs/RIPR-SPEC-0003-agent-context.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

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

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.

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

EffortlessSteven commented Oct 21, 2026 •

Copy link
Copy Markdown
Member Author

Final local receipt for exact head 27629e1736e625d08703930c77053c1aac8ffccd. Native precommit exit0; raw JSON is retained below for parent/reviewer verification rather than only a reported digest. Inner goldens were explicitly skipped by their selector; fixture contracts passed. Four final-product-head CLI controls and nine final-head navigation unit controls pass as recorded in the updated PR body. This does not change author REVIEW_INCOMPLETE: reviewer16 candidate replay and required hosted/integration qualification remain pending.

{
  "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:

  • Guard verification: source condition is exactly !worktree && input.diff_file.is_none() && input.git_candidate.is_none(); only list_args is changed. Fresh explain/context prefixes continue to use the earlier args. Final product-head real emitted-command controls pass for both siblings across committed/worktree/supplied-diff sources;9 navigation controls pass, including artifact and explicit mode preservation. No source repair needed for this question.
  • The parked assertion that the test file did not exist at red ancestor is source-refuted. Exact red file contains the full regression (91 lines before formatting). git show --stat b017fc2bd -- crates/ripr/tests/cli_smoke/selector_recovery_scope.rs shows that file added; git diff a816499ecf9544fe49f3c3ca4d4964584ab02f70 b017fc2bd -- crates/ripr/src/app/navigation.rs is empty. The red commit contains tests and preserves the unfixed production owner. No reapplication or source reconstruction is necessary.
  • Its deterministic proof-intent rejection is not counted as executable product evidence or a clean provider review. Independent reviewer16 candidate replay and hosted/integration qualification remain pending. No review thread was resolved (current inline inventory is empty); no approval or merge clearance is inferred.

@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 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/ripr reports full27629 head; SHA256 69833cb729751b31d5bce93dc8929b8e98cfd9c21f9735edf2b40203df11dea2. 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 predicate amount < 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.

Copy link
Copy Markdown
Member Author

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.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 21, 2026 01:24
@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!

@devin-ai-integration devin-ai-integration 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@EffortlessSteven
EffortlessSteven merged commit 8bb3399 into main Oct 21, 2026
56 checks passed
@EffortlessSteven
EffortlessSteven deleted the codex/selector-recovery-committed branch October 21, 2026 02:01

Copy link
Copy Markdown
Member Author

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 90e1df9c73797763f3a9bcabdf7b18e07c4602ac; local composition 44469733e15d17305a06504715cee6f3bea35d46, parents main + #9064 source 8be6865e327dd307298f8ad5446e2a698daf4e4d, tree b76138ebf445bad1e8a1e77fb6f828fef2f66bf8. The local composition commit is not claimed publicly fetchable: reproduce its tree with git merge-tree --write-tree 90e1df9c73797763f3a9bcabdf7b18e07c4602ac 8be6865e327dd307298f8ad5446e2a698daf4e4d. Navigation production/test blobs equal actual main. Native Linux/Bash, Rust 1.95.0, locked Cargo, incremental off, dev/test debug=0. Actual freshly built CLI SHA256 3d68221cb73ac700f057a20ce2f9001b9da26c0099f0def933d0424ce2a7e0d7.

Two distinct observations:

  1. Existing regression selects exactly one test and fails, native 101:
    cargo test --locked -p ripr --test cli_smoke selector_recovery_scope::selector_recovery_replays_committed_worktree_and_supplied_diff_scopes -- --exact.
    Failure: no-scope explain miss emits a worktree recovery listing although this test expects committed scope. This is the source/oracle contradiction.
  2. Independent real user journey: check --base HEAD~1 --committed succeeds and reports committed predicate probe:src_committed.rs:predicate:cccbf91e; the opposing dirty-worktree predicate is probe:src_worktree.rs:predicate:70c58575. Both nonempty inventories are verified. The actual printed drill-ins, with only the fixture-root literal normalized below, are:
    ripr explain --root "$fixture" --base 'HEAD~1' probe:src_committed.rs:predicate:cccbf91e
    ripr context --root "$fixture" --base 'HEAD~1' --at probe:src_committed.rs:predicate:cccbf91e
    Both exit 2, stderr names loading_input [worktree] and no finding matched "probe:src_committed.rs:predicate:cccbf91e", then recommends a check ... --worktree --json listing. Thus changing only the regression's oracle would leave an actual committed-check-to-drill-in scope failure.

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 app/navigation.rs=d11a11bf0ca4fbfad2984b77e87eac87e52fc04b, cli/commands.rs=eaa0b0c7811138cff2ed815df77442012e2bebe8, cli/commands/context.rs=6fa4f4d62b8384d8e8b0461e90da938e44efe005, tests/cli_smoke/selector_recovery_scope.rs=b1f1a24cfe6e3fb2a1bb1b2da81c1ecb66c0460c (all under crates/ripr/src except test). Raw failing-test log SHA256 b6c2816e6f0c82691b053743337057a140e266a230f2e69f76545a9e8c5fc62a; complete synthetic argv/stdout/stderr receipt SHA256 d87ef67f5fd9170285d34bcaefa107a8d00fd0924b0aa5bf2fb92d83a2c72849. Original raw evidence and actual executable are retained by #9064's delivery lane. The script below is a portable projection of that driver, not a byte-identical raw artifact.

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 python3 replay.py /absolute/path/to/qualified/ripr /fresh/output/directory. The driver creates its own tiny Git fixture, retains all command argv/exit/stdout/stderr, executes the commands actually printed by check, verifies nonempty opposing scope identities and writes receipt.json. Its process exit 0 means evidence collection completed; individual command exits in the receipt carry the observed failure.

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))

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.

1 participant