Skip to content

fix(auth): suppress auth-no-alternative when fetches fail from network errors#86

Merged
dacharyc merged 1 commit intomainfrom
fix/auth-no-alternative-false-positive
May 2, 2026
Merged

fix(auth): suppress auth-no-alternative when fetches fail from network errors#86
dacharyc merged 1 commit intomainfrom
fix/auth-no-alternative-false-positive

Conversation

@dacharyc
Copy link
Copy Markdown
Member

@dacharyc dacharyc commented May 2, 2026

Summary

Test plan

  • New unit test in test/unit/checks/auth-alternative-access.test.ts simulates the all-fetch-errors details shape from the issue and asserts the check skips
  • Full test suite passes (1290/1290) and tsc --noEmit is clean
  • Manually verified against https://rapidocweb.com (the original reproducer): auth-alternative-access now returns skip with the expected message and auth-no-alternative is no longer in the diagnostics list

…s from fetch errors

When all pages fail to fetch (DNS NXDOMAIN, network error, etc.),
auth-gate-detection returns 'fail' with details containing fetchErrors
but no gated/accessible counts. auth-alternative-access then computed
gatedCount=0 and falsely reported "no alternative access paths,"
triggering the auth-no-alternative critical diagnostic for sites that
were simply unreachable rather than auth-gated.

Skip auth-alternative-access when gatedCount === 0 && fetchErrors > 0.
This combination uniquely identifies the network-error case, since
every other non-pass path through auth-gate-detection produces
gatedCount > 0. The no-viable-path diagnostic continues to fire
correctly for unreachable sites since it is driven by separate signals.

Fixes #85
@dacharyc dacharyc merged commit 739eee7 into main May 2, 2026
2 checks passed
@dacharyc dacharyc deleted the fix/auth-no-alternative-false-positive branch May 2, 2026 20:28
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.

auth-no-alternative fires as false positive when pages fail to fetch due to network errors

1 participant