Repository navigation
feat(check): honor #[mutants::skip] as a disclosed owner opt-out (#13819) - #13874
Conversation
) A changed Rust owner function or method that carries cargo-mutants' `#[mutants::skip]` (directly or via `#[cfg_attr(<predicate>, mutants::skip)]`) is now an explicit owner opt-out. The facts normalizer (`test_styles`) recognizes the attribute next to the proof-harness recognizer; the Rust adapter pairs each finding with its probe owner and reports the opt-outs; `app::check` withholds them through the same model as `--suppression-policy` (findings stay in `findings[]`, class buckets are decremented, triage and GitHub annotations skip them) and discloses the count and the `owner_mutants_skip` reason in human, JSON and GitHub output. No class changes, nothing is reclassified as exposed, and no runtime claim is made. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLVgsAoVNNE3QCRRqXo
…tests SARIF drops findings whose changed owner carries #[mutants::skip] and discloses the count as runs[0].properties.withheld_by_owner_opt_out. The diff-scope ripr/ripr+ badges no longer count them as unsuppressed gaps or calibrated unknowns; a matching explicit suppression still wins. cfg_attr paths accept a leading `::` (`#[cfg_attr(test, ::mutants::skip)]`). Tests: mixed skipped/unskipped run, same-name module and impl negatives, GitHub annotation skipping and denominator notice, SARIF result omission and badge gap count, each shown failing without its fix where applicable. Docs name exactly which surfaces withhold; LSP, MCP, ripr explain and repo scope still report. Process allowlist entry for the test's binary spawn; FindingMarks groups the JSON per-finding markers (clippy). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLVgsAoVNNE3QCRRqXo
|
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 40 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! |
ripr static exposure checkCommit Took 220s. |
…adge unknown filter A cfg_attr owner opt-out is now read from the parser's attribute metadata instead of a hand-rolled quote mask, so raw (r"..", r#".."#), byte (b"..", br"..") and escaped-quote literals stay opaque and cannot expose a `mutants::skip` path. An attribute that does not parse cleanly is never a skip (fail closed). The proof-harness helper keeps its literal-free split. ripr+ now takes its calibrated-unknown headline from the same owner-filtered count as RIPR 0 (headline_calibrated_unknown_count), so a withheld unknown no longer returns to the ripr+ headline under include_unknowns. Tests: raw/byte/escaped literal negatives and positives, an end-to-end raw-doc negative that still reports in JSON, and a badge test covering both kinds with a withheld static_unknown and include_unknowns on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLVgsAoVNNE3QCRRqXo
`--format missed-txt` (#13666, merged from main) now skips findings whose changed owner carries #[mutants::skip], the same as human, JSON, GitHub and SARIF, and counts them once in its leading "not listed" comment under the owner_mutants_skip reason. A policy suppression of the same finding wins. Tests: missed-txt unit test (skip, disclosure, suppression precedence) and an end-to-end mixed-run test. Docs and changelog name missed-txt among the withholding surfaces. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLVgsAoVNNE3QCRRqXo
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY
Head e30508a.
Review history
- An independent fresh-context reviewer read the full diff (9fe4da8), then each repair delta: 3bf0325, then e067267 and e30508a.
- It found no wrong-owner matching, misparse or double counting.
- Its first-pass items are fixed: SARIF/badge consistency, mixed-run and same-name oracles, and the docs scope.
- Devin's two real bugs (the raw-string
cfg_attrfalse positive and the ripr+ unknown count) are fixed with fail-first tests. - The last pass traced the new ra_ap_syntax
CfgAttrMetareader against adversarial spellings (macros, nestedcfg_attr,= "x", comments,::variants). It is fail-closed, with no false-positive path. - Merging main brings in the missed-txt
is_json_requestfix (#13848). missed-txt now withholds, with the same disclosure text as GitHub.
Local proof: cargo xtask precommit exit 0 on e30508a; --test mutants_skip_owner_opt_out 16/16; focused lib tests 23/23; check-traceability and check-covered-by pass.
Known bounds, documented: LSP, MCP, ripr explain and repo scope still report skipped owners; nested cfg_attr and impl/module-level skips are not read; findings stay reported in each of those cases.
Cosmetic nit left in place: the missed-txt withheld count includes exposed findings, matching JSON and GitHub counts.
Not established yet: hosted CI on this head.
Generated by Claude Code
…build (#13912) Main's lib-test build is broken by a CheckOutput literal in human.rs that predates the owner_opt_outs field (#13874); #13912 carries the same fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLT7GmsrcnDimRnGeLh
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmqN1rzMu1Vno6ATvBw
…itializer Ports the human.rs line from #13912 so this branch's feature lane builds; #13874 added CheckOutput::owner_opt_outs and left this initializer stale. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUGWB1o9vpixujro7H
…e in the LSP disk-equality tests (#13912) * fix(output): add owner_opt_outs to the #13618 nested-package render test so lib tests compile #13874 added CheckOutput::owner_opt_outs while #13758 added a test initializer without it; main's lib-test build fails with E0063 at output/human.rs:9236. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLSoNkcHb5xqvctzMo3 * test(lsp): stop disk-equality test resets from clearing the shared digest cache reset_disk_equality_read_cache_for_tests cleared the process-wide digest cache. The lib tests run in parallel, so one test's reset could evict another test's entry between its two lookups: same_length_buffer_checks_read_unchanged_disk_once then counted 2 reads instead of 1 (seen on #13885 and #13856 hosted lanes). Each test digests its own per-thread temp path, so the reset now clears only this thread's read counter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLSoNkcHb5xqvctzMo3 --------- Co-authored-by: Claude <noreply@anthropic.com>
…eral so lib tests compile Same one-line fix as open #13912 (main is red after #13874 + #13758); carried here so #13882's lanes can run. Identical change, so it folds away when #13912 lands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLVQSCbyFaLivW3cMnj
main added CheckOutput.owner_opt_outs (#13874); the unit test literal from #13636-A predates it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLStdGD5SFJiwnVQVRW
…ation source (#13736) (#13784) * fix(analysis): treat files of an exact #[cfg(kani)] module as verification source (#13736) The module-composition owner (facts/role_composition.rs), which already resolves out-of-line `#[cfg(test)] mod tests;` children, now records files whose every admitted module owner is an exact `#[cfg(kani)]` declaration, and files below them, in RustIndex::cfg_kani_module_files. The verification-erased owner reads it: such a file seeds no production probe and its changed lines count into verification_only_change, the same as the body of an inline `#[cfg(kani)] mod`. cfg(not(kani)), cfg(any(kani, ..)), exclusive cfg(kani)/cfg(not(kani)) alternatives and an ungated `mod kani_proofs;` keep production probing; no module or file name is matched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUGWB1o9vpixujro7H * fix(analysis): key cfg guards per declaration and refuse Kani-only with invisible owners (#13736) Review repairs for the cfg(kani) module verdict: - Simple cfg guards are keyed by (file, mod line, declaration text), so `#[cfg(kani)] mod proofs; mod helpers;` on one line no longer makes the ungated helpers.rs Kani-only. Conflicting guards for one key grant nothing. The exclusive-alternative check reads the same keyed guards. - A new fail-closed check (facts/invisible_owners.rs) refuses the Kani-only verdict for any module edge whose child could have an owner the parser producer does not capture: masked `mod name;` and `#[path]` text over the child's package on disk must match the captured declarations, and a macro-generated `mod $`, a non-literal or cfg_attr path, an unreadable or non-UTF-8 file, or an unresolved include refuses it. - Tests for the same-line sibling, a second cfg / cfg_attr, a second crate root, an owner inside a macro token tree, a declared-and-included file, and a positive include-parent fragment. - Changelog narrowed to the out-of-line and nested cases; SPEC-0373 Known Limits record new-side classification and the package-scoped scan. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUGWB1o9vpixujro7H * fix(analysis): scope invisible-owner include and cfg_attr checks precisely (#13736) - An unresolved include in the child's package refuses the Kani-only verdict unless it is an inline-module include of a literal `.rs` file of the same package whose text declares no `mod <name>;` (that text is already in the package scan). Includes in other packages are out of the package-scoped check. - A `path = ..` refuses only inside a `cfg_attr(..)`; named format arguments (`format!("{path}", path = p)`) no longer read as a conditional path, which had refused the verdict for every file of the ripr package. - Test for the nested-include allowance and its refusal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUGWB1o9vpixujro7H * fix(analysis): judge cfg(kani) module owners from the index snapshot (#13736) Replace the working-tree walk in the invisible-owner check with reads the index snapshot already holds: - compare masked `mod name;` / `#[path]` text with captured declarations per file, so a surplus in one file cannot cancel a deficit in another; - read discovered package files the index did not take in (build scripts, examples, narrowed files) through committed_source and refuse when one could own the child; unreadable or unaccountable text refuses the package; - cache package inputs and per-file text once per composition pass. Adds committed-mode, per-file mismatch and unindexed-owner tests and the cross-crate/proc-macro and cost Known Limits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUGWB1o9vpixujro7H * fix(analysis): refuse cfg(kani) verdicts reachable through discovery-skipped entries (#13736) Discovery skips ignored-name directories (target, fixtures, ..) and symlinks, yet rustc compiles files there when a visible declaration names them. List the package tree without following links and refuse when a visible `mod <name>` could resolve to such an entry, or a `#[path]` literal names one, is absolute, is not a `.rs` file, or leaves the package. A captured literal whose exact target is an inert regular leaf (no `mod <name>;`, no `#[path]`) is allowed, which keeps ripr's own tests/kani_guard_transition_inputs.rs from refusing the package. Test fixtures now index through the real discovery path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUGWB1o9vpixujro7H * fix(analysis): refuse include! leaves and `..` after hidden #[path] components (#13736) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUGWB1o9vpixujro7H * fix(analysis): refuse include! shapes the cfg(kani) owner check cannot follow (#13736) - an unindexed package file that invokes include! refuses the verdict: the include resolver only visits indexed files, so no edge exists for it; - a nested-module include target must hold no #[path] literal and no further include!, since only its mod <name>; text is credited; - test fixtures: PROOF_FILE moves into a raw string so the Kani lane's harness discovery skips it, and a fixture attribute no longer spells an allow attribute. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUGWB1o9vpixujro7H * chore(traceability): list the #13736 include refusal tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUGWB1o9vpixujro7H * fix(test): add owner_opt_outs to the lang-python human render test initializer Ports the human.rs line from #13912 so this branch's feature lane builds; #13874 added CheckOutput::owner_opt_outs and left this initializer stale. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUGWB1o9vpixujro7H --------- Co-authored-by: Claude <noreply@anthropic.com>
… red on main's breakage - lsp_lifecycle: read the repair start from stdout after #13873 (the identical hunk from #13933). - human.rs: drop the duplicate owner_opt_outs test initializer left by the #13912 + #13874 composition (the identical hunk from #13938). Both hunks match the open fix PRs so the later merge of main resolves cleanly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLTspfjTaY9Zf61HjPz
Requested by Steven Zimmerman · project thread
Governing issue or accepted claim: #13819
Acceptance delta (one sentence): When a changed Rust owner fn carries
#[mutants::skip](orcfg_attr(..., mutants::skip)),ripr checkwithholds its findings from human, JSON, GitHub, SARIF and diff-scope badge output with a disclosed count andowner_mutants_skipreason, never reclassifying them.What
attributes_define_mutants_skipinanalysis/facts/test_styles.rs(exact path,cfg_attrform, literals blanked, leading::accepted).analysis/owner_opt_out.rsmatches findings to the parser-indexedFunctionFact.idof their owner (not by name).app/check.rs::apply_owner_opt_outs, after policy suppression, mirroring it (no double count; buckets + suppressed + withheld = findings). Renderers readCheckOutput::withheld_finding_ids().findings[].withheld_by, top-levelowner_opt_outs,summary.withheld_by_owner_opt_out(schema updated); human disclosure block; GitHub notice; SARIFruns[0].properties.withheld_by_owner_opt_out.ripr explain, repo scope still report these findings; impl/module-level skip not read.Proof
crates/ripr/tests/mutants_skip_owner_opt_out.rs: positive, no-attribute,#[inline], sibling skip, cfg_attr, impl method, policy-wins, mixed run (only the skipped owner withheld), same-name module/impl negatives, GitHub annotation/notice, SARIF and badge, schema declaration.cfg_attrcases.cargo xtask precommitexit 0 on 3bf0325 (-j 1, after two OOM/disk infra failures).Review
Independent fresh-context review of 9fe4da8 found no wrong-owner, misparse or double-count bugs; its should-fix items (SARIF/badge inconsistency, missing mixed-run and same-name oracles, docs overclaim) are repaired in 3bf0325, which is under re-review.
Generated by Claude Code