Repository navigation
Match 401/403 only in git's own phrasing when classifying a refused probe [patch] - #72
Merged
Merged
Conversation
…robe [patch] AdmissionGate matched bare "401" and "403" anywhere in git's output, and git echoes the repository URL, so a DNS or proxy failure for a repository whose URL contains those digits was reported as a refused credential, as was Azure DevOps's TF401019 "repository does not exist". The markers are now "returned error: 40x" and "HTTP 40x". Fixes #47 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JE3qjjjTXN28xUcTq2h6vD
|
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.



Fixes #47
Problem
AdmissionGate.Classifychecked git's lowercased stderr for the bare strings"401"and"403". Git echoes the repository URL in almost every failure, so these were all misreported as 401 "The upstream refused this credential":studio/game-401.git4401TF401019"repository does not exist" message, which should be 404Change
AuthenticationMarkers, the bare digits are replaced with git's own phrasing:"returned error: 401","returned error: 403","http 401"and"http 403". The phrase markers that were already there (authentication failed,could not read username, and so on) are unchanged.<remarks>explain why a status code is only matched in git's phrasing.NotFoundMarkersis left as it is. A URL can't contain a literal space, so"not found"can't come from the echoed URL.could not resolve hostdoesn't match it, and the existingAdmitAsync_WhenTheForgeIsUnreachable_StillRefusestest plus a new data row both check for 502.Tests
AdmitAsync_WhenTheForgeIsUnreachableAtAUrlContainingAStatusCode_Is502covers the issue'sCONNECT tunnel failedoutput forgame-401.git,Could not resolve hostforgame-403.git, and a connect failure on port4401.AdmitAsync_WhenGitReportsA401Or403_Is401coversThe requested URL returned error: 401and403(with GitHub'sPermission … deniedline), andRPC failed; HTTP 403.AdmitAsync_WhenAzureDevOpsReportsTF401019_Is404covers the Azure DevOps message.AdmissionGatechange stashed, the three 502 rows and the TF401019 test fail (4 failures). With it, the full suite passes: 241 of 241.🤖 Generated with Claude Code
https://claude.ai/code/session_01JE3qjjjTXN28xUcTq2h6vD
Generated by Claude Code