Skip to content

Remove unverified PAT-renewal claims from HTTP errors - #2209

Merged
Tyrie Vella (tyrielv) merged 1 commit into
masterfrom
tyrielv/auth-failure-wording
Nov 20, 2026
Merged

Tyrie Vella (tyrielv) merged 1 commit into
masterfrom
tyrielv/auth-failure-wording

Conversation

@tyrielv

Copy link
Copy Markdown
Contributor

Problem and Context

HTTP authentication errors claim that GVFS successfully renewed a PAT when credential backoff becomes active.
Backoff only tracks failed attempts. It does not prove that the credential changed or that a server accepted it.
The message can direct users toward repository permissions without evidence.

Changes

  • Report authentication failures with the existing neutral HTTP error format, including the status code and original server message.
  • Remove credential-expiration and successful-renewal claims without changes to credential rejection, backoff, retries, or telemetry fields.
  • Add an internal HTTP-handler override so unit tests exercise the real request path without network access.
  • Make the test-only authentication initializer select authenticated requests.
  • Add unit tests for initial and repeated 401 responses, sign-in redirects, and auth-required 400 responses. The tests assert the message, credential rejection, backoff, and retry decisions.

Report authentication failures with the HTTP status and original server message. Backoff state does not establish credential renewal or repository access.

Add request-path tests for initial and repeated authentication failures. Keep credential rejection, backoff, and retry decisions unchanged.

Assisted-by: Copilot
Co-authored-by: Copilot <[email protected]>
Signed-off-by: Tyrie Vella <[email protected]>
@tyrielv
Tyrie Vella (tyrielv) marked this pull request as ready for review November 19, 2026 21:30
@KeithIsSleeping

Copy link
Copy Markdown

[KeithBot]: ✅ No issues found · iteration 1 (e77c37b)

Approach: Right layer: drops the backoff-based renewal guess at its only source, HttpRequestor.SendRequest, keeping status and server text; reject, backoff and retry untouched.

Validation

  • ⚠️ FT LocalComponents (all), head + base — partial
  • ✅ GVFS.UnitTests full suite, head + base
  • ✅ Http/Auth unit fixtures, head + base
  • ✅ Mutants vs the PR's new test
  • ✅ Loopback HTTP auth probes, base vs head
  • ✅ FT HttpResponseStreamTests, head + base
  • ✅ CI run 44603872064 (merge 2e8a3eb)
  • ⏭️ Mounted FTs / clone e2e locally — not run

Approving.

🤖 KeithBot · claude-opus-5.5, gpt-6.1-sol, gemini-4-argon + approach review · reply on a thread to dispute

@tyrielv
Tyrie Vella (tyrielv) merged commit c0eb21b into master Nov 20, 2026
40 checks passed
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.

2 participants