Skip to content

test(proof): discriminate unknown Cargo option decline - #1446

Merged
EffortlessSteven merged 1 commit into
fix/cargo-selection-guardfrom
codex/cargo-unknown-option-test
Oct 14, 2026
Merged

EffortlessSteven merged 1 commit into
fix/cargo-selection-guardfrom
codex/cargo-unknown-option-test

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

An otherwise complete locked Cargo package/test selection could lose its defensive unknown-option decline without any existing native test failing. Add one fixture test that isolates this arm and preserves ordinary, harness-terminator, selector-value, and feature-context boundaries. Production and conservative selection semantics are unchanged.

Closes #1444; test companion to #1417. #1429 tests the separate metadata containment predicate. The upstream approved-command resolver already rejects arbitrary unknown options, so this is adapter regression coverage, not a newly reachable production defect.

Policy receipts

No new controlled surfaces, policy changes, lint suppression, analyzer pins, workflows or gate changes. Only src/proof/cargo_selection/tests.rs changes.

Verification

All commands used Rust 1.95.0 and --locked where applicable; experiments used isolated /workspace/unknown-option-target.

  • Compiling one-line mutant: unknown_option = true -> false in the unknown-option match arm. Existing cargo test --workspace --locked cargo_selection: 9 passed, zero ignored. Existing cargo test --test cli_run --locked: 4 passed.
  • Exact final test plus mutant: cargo test --workspace --locked unknown_options_decline_only_before_the_harness_terminator fails101 at unknown-long; unresolved=false versus expected=true. It actually reaches Cargo (exit1) rather than truthful nonexecution. Mutant final tree abd43eecd32d840bd4f4fc3245577ccf5a1b4fcc; frozen-head mutant tree 13e5ea0c3bbeb919b61ba572d029a3ae63657673.
  • Production restored: cargo test --workspace --locked cargo_selection: 10 passed, zero ignored. Five controls: ordinary pass, unknown long/short skipped/no-exit/zero-duration/no-timeout/zero executor calls, passes -- --exact pass, --features proof conservative decline. Complete package and test selector values remain real fixture declarations; retained argv is checked.
  • cargo test --workspace --all-targets --locked passes: 1146 binary tests plus all other targets; one existing ignored integration test.
  • Format, workspace/all-target check, Clippy with -D warnings, docs and policy-check pass. Docs retains one existing link warning; policy retains existing overdue receipt warnings.
  • Staged cargo xtask precommit --staged: zero blockers; cargo-allow, ripr, unsafe-review and ast-grep missing; actionlint skipped for unchanged workflows. These missing sensors are not claimed as passing hosted checks.
  • Independent exact-commit source/receipt review found no material issue; reviewer did not independently execute tests or inspect authenticated PR review threads.

CI budget

Default; no new lanes.

Exact identities and limits

Base: b19edcbeaedd84274514e6a5633aa42a3394e7cb
Base tree: 45fc64f2cb6b28959ce04e155218fd2a39f909b7
Head: 3a6d2af105cff7887813bb71c44d5aaf49a5d571
Head tree: 91c4a4009cdf88c62d535d894c4912e4790f30ca
Production blob unchanged: 6b1f2c70543834689ad50edea6bf3d9014088a0b

Targets fix/cargo-selection-guard, whose remote frozen head was verified unchanged after owned branch push. Keep Draft. Validation covers this frozen companion tree; current-main composition, hosted required gates, Ready/merge and parent integration remain unestablished. This does not clear all198/max0 rows or activate deferred #1309. No merge, release or deployment.

Canonical contract/linkage evidence: EffortlessMetrics/ripr-swarm#4478 (comment). Both earlier named input lists have independent decline reasons; missing ensure! macro support is not the explanation.

Local raw receipts are retained at /workspace/unknown-option-evidence (not hosted artifacts). Final red log SHA256 78be7e19e93cd5ff652d771e0170738e41f2c1d98488087be07d1346bafaff06; workspace green log SHA256 5b8ba0d3d43639b370664a35a4789fb58172d4aef1a39f4d30a013bfa140f9ce.

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 0f66527b-38cf-4a99-8d72-5dbf5cd193b0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • 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.

Independent post-handoff review: no material correctness findings in this bounded test companion.

Reviewed head 3a6d2af105cff7887813bb71c44d5aaf49a5d571, tree 91c4a4009cdf88c62d535d894c4912e4790f30ca, direct parent/PR base b19edcbeaedd84274514e6a5633aa42a3394e7cb (base tree 45fc64f2cb6b28959ce04e155218fd2a39f909b7). Connected GitHub verified PR1446 is Draft targeting fix/cargo-selection-guard; PR1417 still has that exact head. Read AGENTS, native workflow/review-change instructions, #1444, PR handoff, adapter contract and canonical linkage comment6157739305. Authenticated reviews and review threads were empty; head/base and empty threads rechecked before submission.

The entire companion delta is 46 added lines in src/proof/cargo_selection/tests.rs. Production blob remains 6b1f2c70543834689ad50edea6bf3d9014088a0b. Package alpha and integration target plain_probe are real fixture declarations, and --locked plus complete selectors prevent missing/mixed selection from independently declining the unknown cases. invoke uses native metadata and the real Cargo executor, not a success stub.

Independent Linux Rust/Cargo1.95.0 reproduction in detached /workspace/review-1446, with RUSTUP_HOME=/workspace/.rustup, CARGO_HOME=/workspace/.cargo, PATH prefixed /workspace/.cargo/bin and dedicated CARGO_TARGET_DIR=/workspace/review-1446-target:

  • Pristine cargo test --workspace --locked --offline cargo_selection: 10 passed, zero ignored.
  • Isolated one-line mutation _ if arg.starts_with('-') => unknown_option = true to false compiled. cargo test --workspace --locked --offline cargo_selection -- --skip unknown_options_decline_only_before_the_harness_terminator: all 9 older tests passed. cargo test --test cli_run --locked --offline: all 4 passed.
  • Same mutant, cargo test --workspace --locked --offline unknown_options_decline_only_before_the_harness_terminator: exit101, one test failed at tests.rs:258, unknown-long unresolved=false versus true. Receipt shows actual Cargo execution, failed/exit1, no timeout; this is the intended assertion failure, not tool/fixture setup failure.
  • Restored exact production and reran the pristine selection command: 10 passed, zero ignored. cargo fmt --all -- --check and git diff --check passed; tracked source restored, no author branch changes.

Boundary/oracle challenge: ordinary passes is a filter, not an option; --locked and consumed -p/--test values establish supported ordinary parsing. The harness row passes --exact after the terminator and requires one executor invocation with exit0; treating that flag as an unknown pre-terminator option would fail the row. The known passes fixture test makes this positive control non-vacuous on this source, although exit0 alone is not general assertion-execution authority. Unknown long/short rows require zero runner calls and skipped/no-exit/zero-duration/not-timed-out receipts, retaining argv and avoiding a fabricated absent-target reason. The feature-value row uses a declared feature and preserves conservative context decline; it does not prove feature activation or independently isolate value consumption. The mutation run stops at unknown-long, so I do not claim a separately observed mutant failure for every later row. Upstream approved-command parsing already refuses arbitrary unknown flags; this remains defensive adapter coverage, not a newly demonstrated reachable defect.

Feature-base integration is exact: local git merge-tree --write-tree b19edcbeaedd84274514e6a5633aa42a3394e7cb 3a6d2af105cff7887813bb71c44d5aaf49a5d571 gives the reviewed tree. GitHub refs/pull/1446/merge is adde422c86d91c36b651b1a15dde336bc107fccc, parents exactly that base/head, same reviewed tree. Thus native execution on candidate tree also covers this feature-base merge tree; this does not establish a hosted job's actual checkout.

Separate current-main source compatibility: fetched main 3dbcc2be9768b082c0896dc2360e950ffbd56a65; since the earlier 2b8e66e baseline its only delta is src/gate_truth.rs diagnostic/test wording. git merge-tree --write-tree origin/main HEAD merges cleanly to tree 651025e1d175f1f5504e68191ed916af6cd2629f. No native execution of that composition is claimed.

Local raw evidence retained at /workspace/review-1446-evidence. SHA256: red.log 07913ca0a6829d96e9a61cfed73147cb11738c4d49e89a68f4ef68353e53dfa7; restored.log 30735a14df9d33c75ad3627af68986a5e93e45c16ddbd170b73c002f67447b1a. These are local receipts, not hosted artifacts.

Scope ends at independent source/native regression review. Author full-workspace/Clippy/docs/policy receipts were not independently rerun; hosted gates, all198/max0 clearance, analyzer adoption and #1309 activation remain unestablished. No Ready, merge, release/deployment, gate changes, production edits or parent-branch changes.

Copy link
Copy Markdown
Member Author

Coordinator CI checkpoint at head 3a6d2af: independent exact-head review5511954012 reproduced the intended compiling mutant witness and all10 restored selection tests. Hosted independent-baseline run38494530250 failed in a different CLI test, doctor_require_core_tools_fails_stale_actionlint_version, with Text file busy (os error26); library1146/1146 passed, CLI59 passed/1 failed/1 ignored. Exact log: https://github.com/EffortlessMetrics/ub-review/actions/runs/38494530250/job/115627170886. This resembles the existing doctor fixture reliability work tracked by #1401, but this receipt alone does not establish identical cause. Requested one failed-job retry for the unchanged candidate, preserving the original failure. A green retry will not by itself establish that the underlying race is fixed. Required gate and bounded companion integration remain pending; no parent #1417 gate clearance or migration activation.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 14, 2026 01:22

Copy link
Copy Markdown
Member Author

Qualification update: fresh independent review5511954012 confirms native red/green and exact feature-base composition. Initial gate run38494530252 passed at actual checkout adde422 (parents b19edcb and3a6d2af105cff7887813bb71c44d5aaf49a5d571, reviewed tree91c4a4009cdf88c62d535d894c4912e4790f30ca). The unchanged-head independent-baseline retry passed; original ETXTBSY failure remains recorded in comment6158727291 and is not claimed fixed. Marked Ready to start the final transition checks. This qualifies only the bounded test companion into fix/cargo-selection-guard after all required checks remain green; it does not qualify #1417 for main or clear its retained analyzer gaps.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

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 373769c into fix/cargo-selection-guard Oct 14, 2026
29 of 31 checks passed
EffortlessSteven added a commit that referenced this pull request Oct 31, 2026
Co-authored-by: Steven Zimmerman <steven@stevenzim.com>
EffortlessSteven added a commit that referenced this pull request Nov 1, 2026
Co-authored-by: Steven Zimmerman <steven@stevenzim.com>
EffortlessSteven added a commit that referenced this pull request Nov 1, 2026
Co-authored-by: Steven Zimmerman <steven@stevenzim.com>
EffortlessSteven added a commit that referenced this pull request Nov 1, 2026
Co-authored-by: Steven Zimmerman <steven@stevenzim.com>
EffortlessSteven added a commit that referenced this pull request Nov 1, 2026
Co-authored-by: Steven Zimmerman <steven@stevenzim.com>
EffortlessSteven added a commit that referenced this pull request Nov 1, 2026
Co-authored-by: Steven Zimmerman <steven@stevenzim.com>
EffortlessSteven added a commit that referenced this pull request Nov 1, 2026
Co-authored-by: Steven Zimmerman <steven@stevenzim.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant