Repository navigation
Conversation
vonovak
added this pull request to stack #142
October 9, 2026 07:50
During parallel native builds, another worktree can claim a detached child's initial port before its Metro starts. The parent previously accepted that foreign server's ready response and reported success while its own build continued. Follow the child's lock throughout the readiness wait, cancel the old status request when the port changes, and reject explicit project-root mismatches. Keep one timeout budget, preserve child-failure reporting and older Metro versions without a root header, and honor --wait-ready when reusing an existing server. Final status checks also reject a foreign root. Validation: all 4,785 unit tests pass; all 27 detached-start end-to-end tests pass, including real HTTP/lock-socket port changes and cancellation of an obsolete request. Typecheck, build, formatting and lint pass (existing warnings outside changed files). Place immediately after #132 and before #133. The regression tests reproduce the false success against the original implementation. Native command-connection cleanup is separate Expo work.
vonovak
force-pushed
the
codex/detached-own-metro-ready
branch
from
October 9, 2026 08:18
3d8a01e to
7a1db8a
Compare
vonovak
marked this pull request as ready for review
October 9, 2026 15:33
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.
During parallel native builds, another worktree can claim a detached child’s initial port before its Metro starts.
dev --detach --wait-readypreviously accepted that foreign server’s ready response and reported success while its own build continued.Follow the child’s lock throughout readiness, cancel the old status request when its port changes, and reject explicit project-root mismatches. Reusing an existing server now also honors
--wait-ready, and final status checks reject a foreign root. The wait keeps one timeout budget, preserves child-failure reporting, and retains compatibility with older Metro versions without a root header.This layer sits after #132 and before #133. Native command-connection cleanup remains separate Expo work.
Validation: