fix(gateway): surface delayed fetch timeouts#84836
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 1, 2026, 2:49 AM ET / 06:49 UTC. Summary PR surface: Source +105, Tests +182. Total +287 across 11 files. Reproducibility: yes. for the source-level path: current main computes and logs delayed timeout drift, while the diagnostic event union has no Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land a refreshed, listener-safe delayed-timeout diagnostic event that omits raw URL data or fully redacts path-embedded secrets, keeps low-cardinality projections, and has maintainer-accepted event shape plus real diagnostic proof. Do we have a high-confidence way to reproduce the issue? Yes for the source-level path: current main computes and logs delayed timeout drift, while the diagnostic event union has no Is this the best way to solve the issue? No as submitted. Emitting from the timeout helper is the right seam, but the raw event must be listener-safe, the public event shape needs maintainer acceptance, proof needs a real diagnostic surface, and the branch needs a refresh. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b2355ef6a226. Label changesLabel justifications:
Evidence reviewedPR surface: Source +105, Tests +182. Total +287 across 11 files. View PR surface stats
Security concerns:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
|
it looks like the test errors are unrealted the the actual cahnges. could it be that the test are touteded / relay on a older llm model api ? |
Summary
fetchWithTimeoutdetects late timeout timers, but event-loop starvation evidence is only attached to the warning log.fetch.timeout.delayeddiagnostic event whenever the timeout fires late enough to produce the starvation hint.timeoutMs,elapsedMs,timerDelayMs,eventLoopDelayHint, and sanitized operation/url context; the existing timeout test now verifies the event.Motivation
Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Real behavior proof (required for external PRs)
fetchWithTimeouttimers now emit a structured diagnostic event instead of only a warning log field.node scripts/run-vitest.mjs src/utils/fetch-timeout.test.tsfetch.timeout.delayeddiagnostic event containingtimeoutMs=25,elapsedMs=2025,timerDelayMs=2000, the starvation hint, operation, and sanitized URL.Root Cause (if applicable)
Regression Test Plan (if applicable)
src/utils/fetch-timeout.test.tsfetch.timeout.delayeddiagnostic event is emitted with sanitized context.buildTimeoutAbortSignal/abortDueToTimeout.User-visible / Behavior Changes
Diagnostics consumers can observe
fetch.timeout.delayedevents for delayed timeout timers. Fetch timeout behavior and log output stay the same.Diagram (if applicable)
Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain risk + mitigation: N/ARepro + Verification
Environment
Steps
node scripts/run-vitest.mjs src/utils/fetch-timeout.test.ts.Expected
fetch.timeout.delayedwith sanitized operation/url context.Actual
Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
git diff --check; Codex autoreview reported no accepted/actionable findings.Review Conversations
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoRisks and Mitigations
sanitizeTimeoutLogUrloutput as the existing warning log, and the regression test asserts the sanitized URL.