Repository navigation
Conversation
T3 Connect returned the same managed_endpoint_provisioning_failed message for allocation, tunnel, DNS, and token failures because the HTTP mapper discarded ManagedEndpointProvisioningFailed.stage. Carry an optional provisioningStage through the shared error contract and web/mobile presenter. Preserve the existing reason, trace ID, and HTTP 503. Only expose the bounded stage; provider causes and identifiers stay private. Validation: reproduced the omission before the fix. After the change, 43 focused tests pass, including HTTP serialization, contract decoding, client presentation, older responses, and exclusion of provider secrets. Targeted lint, formatting, and contracts/client-runtime/relay typechecks pass on Node 24.13.1. This fixes diagnostic information loss, not the unconfirmed production provisioning cause. Relay operator trace inspection is still required. Refs: pingdotgg#14580, pingdotgg#14070
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a small, backwards-compatible diagnostic fix that carries an existing provisioning stage through the relay’s 503 error and displays it without changing provisioning behavior or exposing provider details. Production behavior is narrowly scoped and covered by HTTP, contract-compatibility, and presentation tests. Notes:
You can add or adjust custom eligibility rules. Learn more. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)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: 📒 Files selected for processing (6)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe relay now includes the failed managed-endpoint provisioning stage in the unavailable-link error response. The shared error contract accepts the optional field, and the client error message displays it when present. Tests cover HTTP response sanitization and compatibility with older responses. ChangesProvisioning error details
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Low Suggested reviewers: Merge Risk: ⚪ Minimal · up to This change adds the failed provisioning stage to link-failure errors and keeps older responses working. I found no merge-blocking risk. Clients only show the stage once the relay is deployed with this change. Security Architecture ReviewSecurity architecture risk: ⚪ Minimal · up to The change exposes a server-defined stage label in an existing error response without expanding permissions or returning provider secrets or resource identifiers. Older responses remain supported. No material security risk was found in the changed behavior. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Dismissing prior approval to re-evaluate c7723ef
|
Note Written by Hi! We are cleaning up open PRs, and this one appears to have been created with an older model ( |
|
Note Written by Reopening, this was closed by mistake. Sorry for the noise! |
T3 Connect collapses every
ManagedEndpointProvisioningFailedinto the same client error, discarding the stage needed to distinguish an allocation failure from a tunnel, DNS, or token failure.Preserve
stageas optionalprovisioningStagein the existing HTTP 503 error and append it to the shared web/mobile error message. Existing reason and trace ID remain intact. Older relay responses still decode and retain their existing message. Raw provider causes and resource identifiers are not returned.Closes #14580. Related to #14070.
Evidence
Reproduced on macOS with T3 Code 0.0.44, Settings → Connections → enable T3 Connect. The toggle returned to off with
managed_endpoint_provisioning_failedon both attempts:f8f444f3bf4f07fc4ff5aacb9243fcc9994fe515cbc487d7cf90d24637988a3cThe local relay-client status and link-proof generation succeeded. The hosted provisioning stage/cause is unavailable without relay operator access.
The HTTP regression test failed on the original mapper: its 503 body omitted the injected
ensure-tunnelstage. With this patch, the real HTTP API handler serializes the stage, the contract decodes it, and the shared presenter reports it. The exact body assertion verifies that a synthetic provider secret and tunnel identifier do not escape into the response. The provider failure is injected; no live Cloudflare allocation is created by these tests.Validation
Node 24.13.1, with the frozen upstream lockfile:
vp test run packages/contracts/src/relay.test.ts packages/client-runtime/src/relay/errorPresentation.test.ts infra/relay/src/http/Api.test.ts— 43 tests pass.vp lintandvp fmt --checkon the six changed files — pass.pnpm --filter @t3tools/contracts --filter @t3tools/client-runtime --filter t3code-relay run typecheck— pass.git diff --check— pass.This is a focused fix for observable diagnostic information loss, not a change to provisioning or recovery policy. It follows the small obvious-bug exception in CONTRIBUTING.md. It builds on the structured provider errors already present in the code.
Limit
This does not claim to resolve the hosted incident in #14070. A relay operator still needs to inspect the real traces and remedy their cause. The optional stage requires a relay deployment before clients can receive it; updating a local client alone cannot recover information discarded by the hosted relay. The installed desktop app and active environments were not replaced or restarted.
Model: GPT-6. Harness: Codex desktop.