Repository navigation
Conversation
Contributor
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — The change alters the production startup contract: supplied bootstrap descriptors now must produce a valid envelope, and failures prevent server initialization instead of falling back. It also changes the default bootstrap wait from 1 second to 30 seconds, making this a product-default and runtime behavior change. You can add or adjust custom eligibility rules. Learn more. |
2 tasks done
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A desktop backend launched with
--bootstrap-fdcan miss its bootstrap envelope and silently start in web mode without the desktop credential. The desktop then receivesinvalid_credentialand cannot recover through the renderer's retry controls.Fixes #17367.
Change
Require a decoded envelope whenever
--bootstrap-fdorT3CODE_BOOTSTRAP_FDis supplied. Give the read a bounded 30-second deadline instead of one second. An unavailable fd, empty input, read/decode failure, or timeout now fails startup with a typed error, so the existing desktop supervisor can restart the backend. Release the reader on completion and interruption, and handle errors forwarded by readline.The shared server startup path covers the primary desktop backend's fd 3 and the WSL backend's stdin. Launches without a bootstrap fd retain their existing defaults. No client UI, provider adapter, or wire-contract changes are needed; local, remote, and tunnel clients all benefit from the backend starting with its intended configuration.
Scope and approval
This fixes the single bootstrap-loss defect established in maintainer triage, using the suggested server-side failure and longer-wait directions. It does not change the error-screen recovery flow or the separate WSL port-collision issue.
Verification
vp test run apps/server/src/bootstrap.test.ts apps/server/src/cli/config.test.ts— all 32 tests passed. A controlled Node stream and virtual clock verify delivery after the former one-second deadline, the bounded timeout, EOF without an envelope, read errors, and interruption cleanup. Existing real-fd reads and config precedence checks also pass.BootstrapFdStatError; empty--bootstrap-fd 0input exits with code 1 andBootstrapEnvelopeMissingError. Neither launch creates its isolated server home.vp run --filter t3 typecheck), server-only export check (vp exec knip --workspace apps/server --exports --preprocessor ./scripts/knip-schemas.ts --no-config-hints), andgit diff --checkpassed.Implemented with gpt-6.1-sol (xhigh) through the Codex harness in T3 Code.