Repository navigation
test(owner-pin): a feature-gated test is refused for its attribute, not a macro rebinding (#8388) - #8937
Merged
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
EffortlessSteven
marked this pull request as ready for review
October 20, 2026 01:37
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
…ribute, not a macro rebinding (#8388) rand 94c9078 uniform_other.rs test_char_bad_deser is "assertion not credited" because it carries #[cfg(feature = "serde")], whose availability ripr cannot evaluate; no macro is rebound. Reproduced on a minimal crate: the same test without the gate is credited. The refusal is deliberate (analyzer limit, not a gap), so the guard is unchanged. A unit test pins the gated refusal, the credited ungated control and a still-refusing foreign glob. The misleading sentence was already made cause-neutral on main (#8920). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AUS4vFoCEv5DiNwucKqSbC
EffortlessSteven
force-pushed
the
claude/rand-char-bad-deser
branch
from
October 20, 2026 01:49
d796189 to
9825b15
Compare
Contributor
There was a problem hiding this comment.
Refuted
- Test pin is tautological because runs_body_unchanged already refuses every non-test attribute via TestAttribute, so the new test does not discriminate cfg(serde) from any other unknown attr; refuted because: Pin still discriminates #8388's hypothesis: it asserts (a) refusal reason is the specific cfg gate, (b) clause names that exact gate and the analyzer-limit language, and (c) the same body without the gate is credited and still refuses under a foreign glob. Together that is a three-way pin, not a generic attr-refusal hit.
- The test should live in a new sub-module to keep helpers private/clean; refuted because: Adjacent tests (an_outcome_settling_attribute_is_the_refusal_wherever_it_sits immediately above) already use the same weight_refusal + AssertionRefusal::describe pattern in this file; module boundary is consistent.
- Pinning this attribute cause is overclaiming because cfg(test) and cfg(feature="std") behave identically and the triage doc only mentions feature={}; refuted because: PR explicitly scopes to #8388 follow-up; the refusal is generic across cfg(*) per existing TestAttribute("#[cfg(feature="std")]") assertion; triage doc adds the attribute cause without dropping macro cause. Overclaim risk is low and admitting cfg(test) is parked as out-of-scope follow-up.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
…s controls (#8388) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AUS4vFoCEv5DiNwucKqSbC
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AUS4vFoCEv5DiNwucKqSbC
Contributor
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- Author admits: rebased head not rebuilt locally (host OOM); cargo xtask goldens check not run; only the new test name was locally green. Need hosted CI cargo-test receipt + goldens clean before full assurance.
Refuted
- Pin is tautological because runs_body_unchanged refuses every non-test attribute via TestAttribute, so the new test does not discriminate cfg(serde) from any other unknown attr; refuted because: Pin is three-way: (a) refuses for the specific cfg gate string, (b) same body ungated credited (None), (c) ungated under rayon glob still MacroBinding. Discrimination is across gate vs no-gate vs foreign-macro, not across arbitrary attrs.
- Test stays in the existing module next to
an_outcome_settling_attribute_is_the_refusal_wherever_it_sits; no new private sub-module is warranted for a single test using already-public helpers. - Helper promotes duplication risk because weight_refusal and weight_refusal_nth share setup; refuted because: Refactor is the smallest-complete fix: weight_refusal is now a 3-line wrapper calling weight_refusal_nth(.., 0); no fixture code duplicated; no new public API surface.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Steven · project thread
Governing issue or accepted claim: #8388 (follow-up to the merged #8529: the last remaining rand "not credited" row)
Acceptance delta (one sentence): The remaining rand
test_char_bad_deser"assertion not credited" row is diagnosed as a deliberate#[cfg(feature = "serde")]attribute refusal (not a macro rebinding) and pinned by a discriminating test; the guard is not loosened.Before: after #8529, rand
94c9078src/distr/uniform_other.rs:318 test_char_bad_deserstill reportedassertion not credited: ripr could not establish that it runs as the standard macro, which reads as a foreign/shadowed macro.After: analyzer behavior is unchanged. The cause is established and pinned. (The misleading sentence itself was already made cause-neutral on main by #8920, which also updated the triage row; this PR was rebased onto it and dropped its own doc edit.)
Cause (evidence): the test carries
#[test] #[cfg(feature = "serde")].runs_body_unchanged(analysis/syntax/owner_pin.rs) refuses every attribute other than#[test]and the serial/rstest/tokio forms, so the function-level refusal isAssertionContextRefusal::TestAttribute("#[cfg(feature = \"serde\")]"). The feature may be off in the build under analysis, so the test may not run; that is not a macro question. Reproduced on a minimal crate with the same assertion shape: the identical test with#[test]only is credited (strong exact value oracle); with#[cfg(feature = "serde")](or even#[cfg(test)]) it prints the "not credited" line. rand'score::simd::prelude::*globs are not involved (#8529 handled them). The refusal is an existing, tested design decision:is_analyzer_limitis true for it, so it withholds a gap rather than asserting one (see the existingTestAttribute("#[cfg(feature = \"std\")]")assertion inclassify/owner_pin/tests.rs).Decision: legitimately correct fail-closed behavior, so not loosened.
How: new unit test
a_feature_gated_test_is_refused_for_its_attribute_not_a_macro_rebindinginanalysis/classify/owner_pin/tests.rs: the gated test is refused asTestAttribute(...), is an analyzer limit, anddescribe()names the attribute; the same test without the gate is credited (None); an ungated test besideuse rayon::prelude::*;still refuses withMacroBinding(fail-closed control). Pluschangelog.d/8388-feature-gated-test-attribute-pin.md(Internal / CI). No stored facts change, so the file-fact cache schema is not bumped.Local verification: before the rebase onto #8920:
cargo test -p ripr --lib a_feature_gated_test_is_refusedpassed andcargo xtask precommitexit 0.Not verified: the rebased head was not rebuilt locally (the shared host OOM-killed the compile), so hosted CI is the proof for it;
cargo xtask goldens checknot run locally (no golden touched); full--libnot run. Items 2 and 3 of #8388 are untouched. Admitting known-enabled attributes such as#[cfg(test)]is not done here. No independent subagent review was possible (this session has no agent tool); the diff is one test, one fragment.🤖 Generated with Claude Code
https://claude.ai/code/session_01AUS4vFoCEv5DiNwucKqSbC