Repository navigation
Conversation
pawbana
force-pushed
the
pawel/aigov-615-reverse-proxy-handler-with-recorder-lifecycle-and-key-8
branch
9 times, most recently
from
September 29, 2026 22:46
b62dd7e to
09ec334
Compare
pawbana
force-pushed
the
pawel/aigov-615-reverse-proxy-handler-with-recorder-lifecycle-and-key-9
branch
from
September 30, 2026 08:53
f421249 to
8406598
Compare
pawbana
force-pushed
the
pawel/aigov-615-reverse-proxy-handler-with-recorder-lifecycle-and-key-9
branch
from
September 30, 2026 09:14
8406598 to
16539ac
Compare
pawbana
force-pushed
the
pawel/aigov-615-reverse-proxy-handler-with-recorder-lifecycle-and-key-8
branch
from
September 30, 2026 09:18
09ec334 to
5341ac5
Compare
pawbana
force-pushed
the
pawel/aigov-615-reverse-proxy-handler-with-recorder-lifecycle-and-key-9
branch
5 times, most recently
from
October 1, 2026 07:07
fd534b6 to
a5d87a9
Compare
This was referenced Oct 1, 2026
pawbana
force-pushed
the
pawel/issue-29726-forwarding
branch
from
November 2, 2026 15:26
f46556c to
caef5d9
Compare
pawbana
force-pushed
the
pawel/aigov-615-reverse-proxy-handler-with-recorder-lifecycle-and-key-9
branch
from
November 2, 2026 15:26
8b1502c to
aba43ac
Compare
pawbana
force-pushed
the
pawel/issue-29726-forwarding
branch
from
November 2, 2026 15:58
caef5d9 to
670f139
Compare
pawbana
force-pushed
the
pawel/aigov-615-reverse-proxy-handler-with-recorder-lifecycle-and-key-9
branch
2 times, most recently
from
November 3, 2026 10:07
104c3bb to
c80231e
Compare
pawbana
force-pushed
the
pawel/issue-29726-forwarding
branch
from
November 3, 2026 10:07
670f139 to
2a1d514
Compare
pawbana
force-pushed
the
pawel/aigov-615-reverse-proxy-handler-with-recorder-lifecycle-and-key-9
branch
from
November 3, 2026 10:32
c80231e to
998377f
Compare
pawbana
force-pushed
the
pawel/issue-29726-forwarding
branch
from
November 3, 2026 10:32
2a1d514 to
8329a86
Compare
pawbana
force-pushed
the
pawel/aigov-615-reverse-proxy-handler-with-recorder-lifecycle-and-key-9
branch
from
November 3, 2026 10:47
998377f to
fdb903b
Compare
pawbana
force-pushed
the
pawel/issue-29726-forwarding
branch
2 times, most recently
from
November 3, 2026 11:19
5a267cc to
d1599a5
Compare
pawbana
force-pushed
the
pawel/aigov-615-reverse-proxy-handler-with-recorder-lifecycle-and-key-9
branch
from
November 3, 2026 11:19
fdb903b to
c6f166c
Compare
pawbana
force-pushed
the
pawel/issue-29726-forwarding
branch
from
November 3, 2026 13:42
d1599a5 to
77bcf5f
Compare
pawbana
force-pushed
the
pawel/aigov-615-reverse-proxy-handler-with-recorder-lifecycle-and-key-9
branch
2 times, most recently
from
November 3, 2026 14:11
1e82141 to
f646a8e
Compare
pawbana
force-pushed
the
pawel/issue-29726-forwarding
branch
2 times, most recently
from
November 3, 2026 14:47
ac92712 to
f2c474f
Compare
pawbana
force-pushed
the
pawel/aigov-615-reverse-proxy-handler-with-recorder-lifecycle-and-key-9
branch
2 times, most recently
from
November 3, 2026 15:13
e7a7633 to
e2dae58
Compare
pawbana
force-pushed
the
pawel/issue-29726-forwarding
branch
2 times, most recently
from
November 3, 2026 15:56
77da38a to
5937625
Compare
pawbana
force-pushed
the
pawel/aigov-615-reverse-proxy-handler-with-recorder-lifecycle-and-key-9
branch
from
November 3, 2026 15:56
e2dae58 to
00195a8
Compare
pawbana
force-pushed
the
pawel/issue-29726-forwarding
branch
from
November 4, 2026 13:04
5937625 to
f12f7bd
Compare
pawbana
force-pushed
the
pawel/aigov-615-reverse-proxy-handler-with-recorder-lifecycle-and-key-9
branch
2 times, most recently
from
November 4, 2026 14:01
cabb446 to
3d1ec95
Compare
ssncferreira
approved these changes
Nov 17, 2026
ssncferreira
left a comment
Collaborator
There was a problem hiding this comment.
Overall LGTM 👍 not sure if some comments will be addressed on a follow-up, so approving to non-block
Record the interception start synchronously before the circuit breaker and return 500 without forwarding when it fails. After the breaker, record the end with the categorized error, the upstream error status, and the last pooled key used, then wait for the record before releasing the request. Model, session ID, and token accounting remain unset. Generated by Coder Agents.
ssncferreira
approved these changes
Nov 18, 2026
ssncferreira
left a comment
Collaborator
There was a problem hiding this comment.
LGTM 🌟 thanks for addressing the comments
| err := fr.err | ||
|
|
||
| // Prioritize context cancellation over the errForwardingAborted sentinel. | ||
| if canceled := context.Cause(ctx); canceled != nil && errors.Is(err, errForwardingAborted) { |
Collaborator
There was a problem hiding this comment.
nit: Are we testing this? Would it be possible to add a test where the client cancels mid-stream and assert ErrorMessage is context canceled?
|
|
||
| // TruncateMessage caps msg at the size persisted on the interception record, | ||
| // dropping any multi-byte character split by the cut. | ||
| func TruncateMessage(msg string) string { |
Collaborator
There was a problem hiding this comment.
nit: Should we also add a test for TruncateMessage?
This branch had an error being deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Persist interception starts before forwarding. If start recording fails, return 500 without contacting upstream.
Record the final outcome asynchronously with a five-second timeout. The end record carries the categorized error (for upstream error statuses, the response body truncated to 1024 bytes, or the status text when empty) and the last pooled key used. Response completion does not wait for recording. Graceful shutdown waits for inflight recordings.
Model, session ID, and token accounting remain unset.
Generated by Coder Agents on behalf of @pawbana.