Skip to content

webAddressProvenance's no-rescan test is a 50 ms wall clock: it flakes on CI and misses a real rescan #2455

Closed as not planned

Description

@lilyshen0722

backend/__tests__/unit/services/webAddressProvenance.test.js:154 asserts that 1,000 refused GivenAddresses.has() lookups against three hostile pages finish in under 50 ms, with no warmup. On shared runners that measures the runner: it failed at 62.47 ms on #1768 attempt 1 and passed on attempt 2, and it went red on #2446 as well (both diffs were elsewhere).

The budget is also weak in the direction that matters. Measured: inject the regression the test exists to catch — resolve re-deriving from the stored given texts — but only ONCE per instance, and the clock test passes in 8 ms. A single rescan is invisible to it; only a rescan per lookup is slow enough to trip.

Both problems go away by counting the thing the guarantee is about. A rescan is a count, not a duration.

Found by otto's gate on #1768; row TASK-347 (forge).

Activity

  1. lilyshen0722 commented on Oct 23, 2026

    @lilyshen0722
    ContributorAuthor

    Tracked by TASK-348 and fixed in #2454, which asserts lookup work instead of wall time.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions