[codex] Preserve auth HTTP failure diagnostics - #3419
Closed
juliusmarminge wants to merge 2 commits into
Closed
Conversation
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
catchTagshandlingValidation
vp test apps/server/src/auth/http.test.ts apps/server/src/auth/EnvironmentAuth.test.tsvp check(passes with 20 pre-existing warnings)vp run typecheckStacked on #3240.
Note
Medium Risk
Touches auth HTTP 500 and logging paths where mishandling could hide real failures or leak data; changes are guarded by new tests and redacted API encoding.
Overview
Auth HTTP internal failures now keep the full underlying cause on a typed
EnvironmentHttpInternalError, while public JSON still encodes onlycode,reason, andtraceId(no raw errors in responses).Logging no longer dumps full
Cause/error objects. Request and operation failures log a boundedfailureTagplus reason/failure/defect/interruption counts. Request finalizers skip logging when the exit is interrupt-only.failEnvironmentInternalre-propagates nested interruption causes instead of turning them into synthetic 500s.browserSessioncookie handling usescatchTagsforCookieErroronly, passing the cause into internal failure handling.Reviewed by Cursor Bugbot for commit f0537a8. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Preserve auth HTTP failure diagnostics by summarizing causes instead of serializing them
failureTagand counts of failures, defects, and interruptions via a newfailureLogAttributeshelper.findInterruptCauseto detect nested interruption causes and re-propagate them directly, avoiding conversion into synthetic internal errors and suppressing redundant logs.EnvironmentHttpInternalErrorwith a boundedfailureTagfield and preserved original cause as a defect, replacing the generic internal error type.annotateEnvironmentRequestfinalizer so it skips logging entirely when the exit cause contains only interrupts.browserSessioncookie error catch to only handleCookieError, letting other errors fall through to upstream handling.Macroscope summarized f0537a8.