Repository navigation
fix(relay): keep mint budget below the relay request deadline - #12021
Adamulek123 wants to merge 2 commits into
Conversation
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — The relay’s production timeout default changes from 10 seconds to 7 seconds, affecting full environment connects and the existing health/status timeout path. The PR also adds a cross-layer timeout wrapper and changes which timeout response clients receive, so the operational behavior warrants human review. No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: pingdotgg/t3code/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between 79898b39d0648f75305b2927c2e176d8c40d77f5 and e7dc492. 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe environment connect flow now applies a 7,000 ms timeout to the full operation. The HTTP API applies the timeout before error mapping. Tests cover stalled proof, link, allocation, and mint steps. ChangesRelay timeout alignment
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant Client
participant dpopClientApi
participant EnvironmentConnector
participant EnvironmentServices
Client->>dpopClientApi: POST environment connect
dpopClientApi->>EnvironmentConnector: run timed connect effect
EnvironmentConnector->>EnvironmentServices: resolve and mint environment credential
EnvironmentConnector-->>dpopClientApi: credential or timeout error
dpopClientApi-->>Client: response with mapped error
Suggested reviewers: Merge Risk: ⚪ Minimal · up to The environment connect flow now times out at 7 seconds, before the relay deadline, with coverage for stalled stages. No merge-blocking risk remains identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
79898b3 to
e7dc492
Compare
This comment has been minimized.
This comment has been minimized.
|
Closing this after re-checking the premise against current The argument here is that the mint budget should stay under
A downstream budget that preempts the 9s deadline removes the child span from a completed 504 and reintroduces exactly the open-span trace loss the constant exists to prevent. So this isn't a stale reading — it's arguing against a documented decision without acknowledging it. On top of that, this branch no longer builds. #16138 ( I don't think the underlying latency concern is wrong — there may well be a real mint-timeout budget problem here. If so, the honest version is a small issue describing the user-visible symptom against the trace-loss tradeoff, so a maintainer can weigh in on which side wins. Happy to reopen as that if there's a concrete reproduction. |
Summary
Slow T3 Connect requests 504 at the relay's 9s request deadline before the 10s downstream mint timeout can fire, so clients get a generic deadline error instead of the typed endpoint timeout — and the extra downstream second is pure waste.
What changed
ENVIRONMENT_MINT_REQUEST_TIMEOUT_MS10s -> 7s, with a comment pinning the invariant againstRELAY_REQUEST_DEADLINE_MS.Validation
vp test run infra/relay/src/environments/EnvironmentConnector.test.ts— 19/19 pass (suite references the constant symbolically, no update needed).Summary by CodeRabbit