Skip to content

fix(audit): a README that disclaims a capability is not claiming it#1606

Merged
cyberlife-coder merged 1 commit into
developfrom
fix/feature-claims-honours-disclaimers
Jul 26, 2026
Merged

fix(audit): a README that disclaims a capability is not claiming it#1606
cyberlife-coder merged 1 commit into
developfrom
fix/feature-claims-honours-disclaimers

Conversation

@cyberlife-coder

Copy link
Copy Markdown
Owner

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:

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.

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:

GPU acceleration is enabled by default and needs no extra build step.

is a real claim, and the trailing no must 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 after
  • test_a_real_claim_is_still_detected — the guard must not become a way to hide an unbacked claim
  • 37 guard-contract tests green; check-feature-claims.py still exits 0 on develop

Worth flagging separately

With the false positive removed, the documentation branch (#1593) still reports three genuine gaps it introduced — column_store and streaming present in the API but undocumented, streaming claimed but absent elsewhere. develop is clean. Those belong to that PR, not this one.

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

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@cyberlife-coder
cyberlife-coder merged commit 0ed6ca4 into develop Jul 26, 2026
34 checks passed
@cyberlife-coder
cyberlife-coder deleted the fix/feature-claims-honours-disclaimers branch July 26, 2026 14:57
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