Skip to content

merge: a not-evaluated page's prior still resolves when the resolution signal is over budget, and on complete-store and local merges #508

Closed

Description

@nc9

Found while fixing #501.

A page check that was NOT evaluated this run (a skipped check such as scan-truncated from #501, perf/ttfb with no timing data, or no check emitted at all) is protected from a wrong resolve only by the publish resolution signal's notEvaluated list. Three paths still resolve a prior finding on such a crawled page:

  1. Signal budgets. When the check's key is dropped (more than RESOLUTION_SIGNAL_LIMITS.maxChecks keys) or its notEvaluated complement is over budget (maxHashesPerCheck / maxHashesTotal), the key is absent or listed in truncated. computeMerge (packages/audit-engine/src/merge-core.ts) then falls through to the pre-docs(rules): fix rule option tables #1185 rule, which resolves any prior on a crawled page with no fresh match. The builder's comments call this "degrades safely", but for a not-evaluated page it resolves rather than carries.
  2. Complete-store finalize. runCloudSmartAudits ignores the signal in complete mode, so a crawled page's prior resolves whenever the page has no fresh finding, skipped or not.
  3. CLI local merge. It passes no signal, and resolves the same way.

Codex reproduced (1) in memory with 2,000 preceding keys and with the 100,000-hash complement budget exhausted.

Acceptance Criteria

  • A prior finding on a crawled page whose check was skipped this run carries in the sampled publish merge even when the signal's key is absent or truncated
  • The same holds for the complete-store finalize and the CLI local merge, or the docs state where it does not and why
  • A crawled page whose check passed this run still resolves its prior (existing resolution tests pass)

Activity

  1. added
    bug
    P3
    size: M
    on Oct 6, 2026
  2. nc9 commented on Oct 11, 2026

    @nc9
    ContributorAuthor

    Checked against current main (ad95fb2): PARTLY FIXED ON MAIN, after 0.0.108.

    • Path 1 is half fixed by perf(publish): bound the resolution signal and pageStatuses to a 192 KiB budget (repo#2658) #641 (bf538db). When a signal is sent but the check's key is listed in truncated, or the page is not on a clipped list, computeMerge now carries the prior unless the payload has positive evidence that the page is clean: a passing check, a noindex verdict or a complete item list (packages/audit-engine/src/merge-core.ts:1050-1075).
    • A key dropped past maxChecks (2,000) is still the gap. The builder skips it with // dropped key = no signal (safe) (packages/rules/src/resolution.ts:194) and does not add it to truncated. The scan-truncated registration at line 168 has the same failing.size < limits.maxChecks limit. In the merge, a sent signal without that key is neither failingByCheck nor truncatedChecks, so it falls through to the "Re-crawled and the finding is no longer present → resolved" branch (merge-core.ts:1088-1095). That resolves the prior even when the page was skipped.
    • Path 2 is unchanged. merge-promise.ts:283-288 still treats the resolution signal as "MOOT" in complete-store mode.
    • Path 3 is unchanged. The CLI's local merge (apps/cli/src/audit/smart-audits.ts) passes no resolution signal.
  3. nc9 commented on Oct 22, 2026

    @nc9
    ContributorAuthor

    Status after #1010: the dropped signal key (past the key cap) in the sampled publish merge and the CLI local merge are fixed (the merge now carries on skip evidence read off the run's checks). A truncated key or an over-budget notEvaluated list already carried since #2658; #1010 adds tests. Still open: the complete-store finalize. It holds streamed findings, not checks, so it has no skip evidence; fixing it needs a producer wire change that ships the skipped page checks. The Smart Audits docs now say this case still closes the finding. Keeping this issue open for that half.

  4. nc9 commented on Oct 24, 2026

    @nc9
    ContributorAuthor

    Shipped in #1010 (released in v0.0.128). Checked on main:

    • AC1: done. The sampled publish merge carries a skipped check's prior finding when the signal's key is dropped, truncated or over budget (packages/audit-engine/tests/not-evaluated-carry-508.test.ts).
    • AC2: done. The CLI local merge is fixed. The complete-store finalize is unchanged, and docs/configuration/index.mdx (Smart Audits) says so and why: a cloud audit that streams its findings to the store never sees skipped checks.
    • AC3: done. A page whose check passed still resolves (same test file plus the existing merge suites).

    Closing.

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

    P3bugsize: M

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions