Skip to content

feat: improve request diagnostics and preserve upstream HTTP bodies - #524

Merged
yyyr-p merged 8 commits into
Menci:mainfrom
yyyr-p:codex/request-diagnostics
Sep 23, 2026
Merged

yyyr-p merged 8 commits into
Menci:mainfrom
yyyr-p:codex/request-diagnostics

Conversation

@yyyr-p

@yyyr-p yyyr-p commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Capture upstream HTTP request bodies and raw responses before SSE parsing, including per-exchange status, headers and completeness. Accept Chat Completions EOF without requiring [DONE] while retaining actual stream errors.

Add searchable request history, compact payload navigation, highlighted per-event blocks, and individual/batch export as JSON or separate files in a tar archive.

Based directly on Menci/Floway:main; only request-diagnostics changes are included. The upstream-body migration is 0084.

Validation: full pnpm run verify passed, including 6,144 tests, installer checks and production build. Desktop/mobile flows were manually checked with large payloads, malformed SSE, multiple attempts, pagination and a 47-event stream.

Translated turns (anthropic-messages-via-*, openai-* via-*, gemini-*-via-*)
only recorded their post-translation downstream frames in the per-request
dump, so operators debugging translation defects could not see what the
upstream actually sent before Floway translated it.

traverseTranslation now tees the original target-protocol frames (events
path) and the verbatim upstream api-error envelope (api-error path) into the
dump accumulator before trip.events / trip.apiError rewrite them. Every
traverseTranslation call site passes captureFromDump(ctx.dump, targetApi);
native turns and api-key-opt-out turns pay nothing. DumpMetadata gains a
nullable targetApi so the dashboard can render the upstream view with the
target protocol's serializer (the client path names the source protocol).

The upstream body spills to its own file under a resp.up side; migration
0089 adds the nullable descriptor column and rebuilds the 0066 spilled-files
validate/adopt/retire triggers to cover it. The dashboard's request detail
gains an 'Upstream (pre-translation) body' section mirroring the existing
collected+events response-body view.
@yyyr-p
yyyr-p force-pushed the codex/request-diagnostics branch 2 times, most recently from 19be4c7 to 875648c Compare September 22, 2026 20:50
@yyyr-p
yyyr-p marked this pull request as ready for review September 22, 2026 20:54
@yyyr-p
yyyr-p merged commit 911b253 into Menci:main Sep 23, 2026
8 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.

1 participant