Repository navigation
Reply to Activity sign-in before copying starter references; log auth timings - #55
Merged
Merged
Conversation
…auth timings Activity sign-in in a new server fails with HTTP 502 and an unreadable body from the proxy, while invalid exchanges through the same proxy get JSON in under half a second. The exchange route copied the 33 starter reference images (checksum, normalize, store, one transaction) before it replied, and the server logged nothing per request, so the slow step could not be seen. Start the starter copy after the session is created, at most once per server at a time, and log its outcome and duration. A failed copy no longer fails sign-in. Log every /api/auth request and every 5xx with status, duration and request ID, and per-stage timings for the Activity exchange, without tokens, bodies or member data. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
Activity sign-in in a new server (Rogue's Community Server) fails with:
The 502 has a non-JSON body and a Cloudflare ray as its reference, so it came from a proxy, not from TypeCheck (every TypeCheck error is JSON). Invalid exchanges through the same Discord proxy and directly against GoDaddy return JSON 401 in 0.16–0.4 s, and the PUBLISH process has not restarted since the 19:03 deploy. Only a real exchange fails, and for a server's first sign-in that request also copied 33 starter reference images (checksum, normalize, store, one transaction) before replying. The server logged nothing per request, so the slow step could not be confirmed from logs.
Change
starter_references_seedwith outcome and duration. A failed copy no longer fails sign-in./api/auth/*request and every 5xx (http_request/http_error: status, duration, request ID), plus per-stage timings for the Activity exchange (auth_stages: discord_oauth, settings, authority, session). No tokens, bodies or member data.Validation
npm run checkclean;npm test380/380 pass; the new test fails on the previous code.SHA256SUMSrefreshed and verified.If sign-in still fails after this deploys, the
auth_stagesandhttp_requestlines will show which stage is slow.🤖 Generated with Claude Code