Skip to content

engine: carried pages earn passes for info-only rules that a full audit scores as nothing (capped re-audit still 1 point high after #2099) #2167

Closed as not planned

Description

@nc9

On a capped re-audit, carried pages earn a pass for rules whose checks are all info, which a full audit of the same site scores as nothing. In packages/audit-engine/tests/capped-rescore.test.ts, content/word-count credits each of 57 carried pages one pass, so the re-audit scores 47 against the full audit's 46. That is why the test keeps a tolerance of 1.

This is the second cause found while fixing #2099. #2099 fixed the first (carried pages passing checks they skipped, such as perf/ttfb without timing) with a per-page "not evaluated" record. An info result counts as evaluated, so that record does not cover this case.

Where it comes from: score rebuilding gives a carried page at least one check per rule. For a rule that scored nothing in this run, that one check becomes a pass. Possible directions, to be settled when this is picked up:

  • carried pages get no checks for a rule whose checks are all info severity, decided from rule metadata;
  • or no checks for a rule that scored nothing in this run.

Either changes the capped-publish per-check counts the CLI sends to the cloud, so check that CLI and cloud versions stay compatible both ways.

Acceptance Criteria

  • A capped re-audit and a full audit of the same unchanged site score the same, and capped-rescore.test.ts asserts score equality instead of a tolerance of 1.
  • Rules whose checks are all info add no passes for carried pages, on both the single-POST and chunked publish paths.
  • The per-check counts the CLI sends on a capped publish are checked against the cloud: an older CLI publishing to a newer cloud, and the reverse, both still score without errors (tests named in the PR).

nik

Activity

  1. added
    bug
    size: M
    engine
    on Nov 20, 2026
  2. added theissue type on Nov 20, 2026
  3. nc9 commented on Nov 20, 2026

    @nc9
    ContributorAuthor

    Investigated in #2171, which is closed unmerged. Keeping this open for a decision on option B below.

    • No severity in the merge's rule meta: RuleMetaLite (packages/core-contracts/src/index.ts:593-606) has no check-severity field.
    • Rule severity isn't enough: a rule with severity info still scores passes and fails; only its warns are advisory.
    • Tallies drop silent rules: CheckTally omits a rule that scored nothing. A rule missing from the tallies therefore looks the same as a scored rule that matched no page in a capped crawl.
    • Mostly a fixture case: the real content/word-count emits warn or info depending on the page. The all-info case is mostly the test fixture's.
    • The only exact fix (B): the CLI sends a tally entry for every rule that ran, including zero-scored ones. That is a wire change and a JSON schema change.
    • Until then: the 1-point tolerance in the re-audit equality test (fix(audit-engine): record not-evaluated page checks so carried pages score as in a full audit #2099 #2170) stays, with a comment pointing here.

    nik

  4. nc9 commented on Nov 21, 2026

    @nc9
    ContributorAuthor

    Closing as a known gap. The only exact fix is for the CLI to send a result entry for every rule that ran, even one that scored nothing. That is a change to what the CLI sends to the cloud plus its JSON schema, and the real content/word-count rule also emits warnings, so in practice the free pass comes mostly from the test fixture. The 1-point tolerance in capped-rescore.test.ts stays, with its comment pointing here.

    nik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugengineneeds-decisionsize: M

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions