Skip to content

Measure export body completion, errors and cancellation - #99

Merged
mzupan merged 1 commit into
mainfrom
codex/export-stream-health
Nov 15, 2026
Merged

mzupan merged 1 commit into
mainfrom
codex/export-stream-health

Conversation

@mzupan

@mzupan mzupan commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Stacked after #98. Merge in order #94, #95, #96, #97, #98, #99. This diff contains only this finding relative to its base.

Export handlers previously counted completion when response headers were ready, before a body could fail or time out. Mark export headers as response_ready and measure body EOF, errors, timeout and cancellation separately, with inflight, bytes and duration. Background artifact bodies use a separate fixed kind so their work is distinguishable from HTTP downloads. Serialized-row histograms cover both CSV/JSON generation, with buckets spanning the supported row/byte/time limits.

Body errors/timeouts release admission and drop the cursor immediately, even if a consumer retains the failed body. Add an explicitly named HTTP header-latency metric while retaining the existing metric, and normalize unknown HTTP methods to OTHER to prevent unbounded metric labels. Existing export/job/audit behavior is preserved.

Validation: library suite passed (789 passed, 14 isolated integration tests ignored), final governor tests passed (12/12), API binary tests passed (53/53). New regressions cover EOF/error/timeout/cancellation, immediate cursor release, artifact separation, actual serialized rows and method-label bounds. cargo fmt --check, git diff --check and cargo clippy --all-targets passed. Strict -D warnings is blocked by existing repository warnings.

@mzupan
mzupan changed the base branch from main to codex/notification-delivery-health November 15, 2026 22:06
@mzupan
mzupan added this pull request to stack #102 November 15, 2026 22:43
@mzupan
mzupan force-pushed the codex/export-stream-health branch 3 times, most recently from e7b7909 to 34cdd51 Compare November 15, 2026 22:45
Base automatically changed from codex/notification-delivery-health to main November 15, 2026 22:48
@mzupan
mzupan force-pushed the codex/export-stream-health branch from 34cdd51 to 80c299d Compare November 15, 2026 22:48
@mzupan
mzupan merged commit 25fc3c5 into main Nov 15, 2026
4 checks passed
@mzupan
mzupan deleted the codex/export-stream-health branch November 15, 2026 22:48
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