Repository navigation
feat(dev): per-worktree serve port and a preview tab - #6
Merged
Merged
Conversation
`nextup serve` defaults to 4177 — and on the mac that port is held permanently by the LaunchAgent dev.hansenexus.nextup-serve. So an Orca lane running the default does not just risk colliding with a sibling lane; it fights the machine's own long-running server. Verified the LaunchAgent was holding 4177 while writing this. scripts/dev-port.sh gives each worktree a slot (0..15, stable hash of its absolute path, probing past slots siblings already claimed); the port is `4177 + slot*100`. The main checkout stays slot 0 = 4177, which is correct: lanes are not the main checkout, and the LaunchAgent's port is not something a lane should ever take. The `preview` tab is on-demand — it prints this lane's URL and the serve command and boots nothing. Verified in a live lane: it resolved 5677, `bun cli.ts serve --port 5677` came up and answered 200, and the LaunchAgent kept 4177 untouched throughout. shellcheck clean; orca.yaml validated with hn-infra/scripts/orca/check-orca-yaml.sh (defaultTabs(3)) — the first time this file has been run through Orca's own parser, since the repo was never registered. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Why
nextup servedefaults to 4177 — and on the mac that port is held permanently by the LaunchAgentdev.hansenexus.nextup-serve. I verified it was holding the port while writing this. So an Orca lane on the default doesn't just risk colliding with a sibling lane; it fights the machine's own long-running server.What
scripts/dev-port.sh— slot per worktree (0–15, stable path hash, probes past claimed slots); port is4177 + slot*100. Main checkout stays slot 0 = 4177, which is right: lanes aren't the main checkout, and the LaunchAgent's port isn't one a lane should ever take.previewtab: prints this lane's URL and the serve command, boots nothing.Verified
Live lane, not a desk check:
bun cli.ts serve --port 5677/harnesslistedcurlthat portshellcheckcheck-orca-yaml.shok … setup archive issueCommand defaultTabs(3)That last one is worth noting: this is the first time this repo's
orca.yamlhas been through Orca's own parser. It was stamped by the setup-repo skill but the repo was never registered with Orca, so nothing had ever verified it — and a parse error silently disables every hook. It parses clean, and its existing tab commands (lint,typecheck,test) all exist inpackage.json.Registering the repo on both Orca runtimes is a separate step, done outside this PR.
🤖 Generated with Claude Code