fix(audit): a README that disclaims a capability is not claiming it#1606
Merged
Merged
Conversation
The feature audit matched capability keywords anywhere in the prose, so the
honest sentence
**No GPU in the published wheels.** The `gpu` Cargo feature exists but is
not enabled by `[tool.maturin]`; it requires building from source.
registered `gpu` as a documented capability. The audit then looked for it in
the Python API, did not find it, and reported the crate as MISSING a feature
whose absence its README had just spelled out.
That penalises exactly the disclosure this audit exists to encourage: the more
honest a README is about what it does not ship, the more gaps it invents.
The check is now scoped to a window BEFORE the keyword rather than the whole
line — the same shape as `check-promise-contract.py`'s `_is_negated`. A
line-wide test is too blunt in the other direction: "GPU acceleration is
enabled by default and needs no extra build step" is a real claim, and the
trailing "no" must not erase it. Both cases are pinned by a test; the second
one failed on the first attempt at this fix, which is why it is here.
Found by the guard-contract job added in #1595 turning red on the
documentation branch — the gate catching a defect in its own checker.
Up to standards ✅🟢 Issues
|
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.
Found by the guard-contract job added in #1595 turning red — the gate catching a defect in its own checker.
The feature audit matched capability keywords anywhere in the prose, so this honest sentence:
registered
gpuas a documented capability. The audit then looked for it in the Python API, did not find it, and reported the crate as MISSING a feature whose absence its README had just spelled out.That penalises exactly the disclosure this audit exists to encourage: the more honest a README is about what it does not ship, the more gaps it invents.
Fix
Scoped to a window before the keyword rather than the whole line — the same shape as
check-promise-contract.py’s_is_negated, which already drew this distinction.A line-wide test is too blunt in the other direction:
is a real claim, and the trailing
nomust not erase it. The first attempt at this fix did exactly that, which is why both cases are pinned by a test rather than one.Verification
test_disclaimed_capability_is_not_a_claim— red before, green aftertest_a_real_claim_is_still_detected— the guard must not become a way to hide an unbacked claimcheck-feature-claims.pystill exits 0 ondevelopWorth flagging separately
With the false positive removed, the documentation branch (#1593) still reports three genuine gaps it introduced —
column_storeandstreamingpresent in the API but undocumented,streamingclaimed but absent elsewhere.developis clean. Those belong to that PR, not this one.