Skip to content

test(cli): request-deadline 'checkReachability ... stalled body' test fails on macOS (127.0.0.2 is not routable) #1733

Closed

Description

@nc9

The checkReachability ... stalled body test in apps/cli/tests/tools/request-deadline.test.ts binds or connects to 127.0.0.2. Linux routes all of 127.0.0.0/8 to loopback, but macOS only configures 127.0.0.1, so the test fails on a Mac for a reason unrelated to the code under test.

Acceptance Criteria

  • The test passes on macOS and Linux without extra loopback aliases (e.g. uses 127.0.0.1 with a distinct port, or a local server that stalls the body).
  • It still fails if checkReachability stops enforcing the body deadline (checked by a temporary mutation).

Activity

  1. added
    bug
    size: XS
    on Nov 11, 2026
  2. added theissue type on Nov 11, 2026
  3. nc9 commented on Nov 12, 2026

    @nc9
    ContributorAuthor

    Not closed after v0.0.179 (https://github.com/squirrelscan/squirrelscan/releases/tag/v0.0.179). The test now binds 0.0.0.0 with no loopback alias. Still open: evidence from the temporary mutation check (the test going red with the body deadline removed). The change that shipped is 329414a.

    nik

  4. nc9 commented on Nov 12, 2026

    @nc9
    ContributorAuthor

    Temporary mutation check, run on main 48f61de (restored after each step, git status clean). apps/cli/tests/tools/request-deadline.test.ts, 9 pass unmutated. checkReachability bounds a stalled body in three layers: the request deadline it passes to requestOnceScoped, Effect.timeoutFail and the body sample's own timeout (REACHABILITY_BODY_SAMPLE_TIMEOUT_MS). Removing the first two (set to 1e9 ms) leaves the test green, because the body sample timeout still returns. Removing all three turns checkReachability returns instead of hanging on a stalled body red (8 pass, 1 fail, 5 s timeout). So the test fails when checkReachability stops enforcing the body deadline, and is not satisfied by any one layer alone. Second box ticked.

    First box: it passes on macOS here with the 0.0.0.0 bind. I have not run it on Linux, so that box stays unticked and the issue stays open until a Linux run is shown.

    nik

  5. nc9 commented on Nov 12, 2026

    @nc9
    ContributorAuthor

    Linux run still pending: the public CI run of the next release bundle is the evidence for the first box. Left open until it is shown.

    nik

  6. nc9 commented on Nov 13, 2026

    @nc9
    ContributorAuthor

    Fixed in v0.0.179: 329414a "checkReachability stalled-body test uses 0.0.0.0, which routes on macOS and Linux" (an ancestor of the v0.0.179 tag).

    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

    bugclisize: XS

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions