Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
auth-alternative-accesswhenauth-gate-detectionfails solely due to fetch errors (DNS NXDOMAIN, network error, etc.) rather than detected auth responsesauth-no-alternativecritical diagnostic from firing as a false positive on unreachable sites —no-viable-pathalready correctly captures the unreachability caseTest plan
test/unit/checks/auth-alternative-access.test.tssimulates the all-fetch-errors details shape from the issue and asserts the check skipstsc --noEmitis cleanhttps://rapidocweb.com(the original reproducer):auth-alternative-accessnow returnsskipwith the expected message andauth-no-alternativeis no longer in the diagnostics list