Repository navigation
Fix npx serve bug (port-in-use detection) - #20
Merged
Merged
Conversation
skapoor8
commented
Aug 21, 2026
skapoor8
left a comment
Contributor
Author
There was a problem hiding this comment.
Draft review of the port-in-use detection added to ui up. The main concern is that the success/failure decision is made from pid liveness (isAlive) rather than from the actual spawned child, which leaves two TOCTOU windows where the CLI reports the wrong outcome. See inline comments.
skapoor8
marked this pull request as ready for review
August 21, 2026 07:54
skapoor8
commented
Aug 21, 2026
skapoor8
commented
Aug 21, 2026
startUi now exposes the spawned child; upAction decides success/failure from child.exitCode instead of isAlive(), closing the zombie TOCTOU where an unreaped dead child was reported alive. Distinguish a foreign port owner from an app that crashed after serving, and add an e2e test for the port-conflict branch.
skapoor8
force-pushed
the
fix/npx-serve-bug
branch
from
August 21, 2026 09:01
d77e13b to
d3afab7
Compare
Contributor
Author
|
Addressed the home.ts thread: the ensureHome doc block was shortened in d3afab7 — it now describes the tree/seeding and idempotency in four lines instead of the original paragraph. |
|
🎉 This PR is included in version 0.17.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Follow-up to merged PR #19. Adds port-in-use detection so
diffwiki ui upfails fast with guidance instead of reporting a false success.Changes:
fix(cli): fail ui up when port already in use(db7474d)Notable: