fix(docs): correct os dev default port from 3002 to 3000 - #234
Merged
Conversation
`reference/cli.mdx:70` claimed `os dev` defaults to port 3002. PR #143 measured the real behavior (against @objectstack/cli 17.1.0) and landed it in quickstart.mdx: os dev asks for 3000, the same port os start uses, and binds the next free port on collision. Re-verified here against 17.2.0's shipped source (packages/cli/src/commands/dev.ts, `requestedPort = port ?? '3000'`) — the default and the collision/rebind behavior are unchanged. Corrects line 70's comment and adds a short note under the block carrying the collision behavior, since that is the part that surprises a reader running `os dev` alongside `os start`. Also updates the -p example on line 71 from 4002 to 4000, since 4002 read as "3002 plus a bit." Fixes #229
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.
Fixes #229
What changed
content/docs/reference/cli.mdx:70claimedos devdefaults to port 3002.content/docs/quickstart.mdx:200-203(landed by #143 from a real boot transcript) already says the opposite:os devasks for 3000, the same portos startuses, and binds the next free port on collision. This PR brings line 70 into agreement with the measured, reviewed value.The two calls the dispatch asked for
# port 3000 by default), matching this file's existing convention (os start's block reads# default port 3000,os serve's reads# port 3000— no comment in this file carries more than a few words). The collision/rebind behavior — the part that actually surprises someone runningos devnext toos start— goes in a short note line under the block instead. That's not a new pattern for this file:os start's block is immediately followed by an unfenced "HOME directory default:" note (lines 40-42) before the next heading, so a short prose line after a code block is already how this file handles "one more fact that doesn't fit in a comment." A two-sentence comment inside thebashfence would have broken the file's terse-comment convention for no reason the reader needs.os dev -p 4002→4000. Took it. 4002 read as "3002 plus a bit"; now that the default is corrected, 4000 pairs the same way. Minor note:os serve --port 4000 --no-ui(three lines up) already uses 4000 as its example port, so this introduces a duplicate value in the same file — different flag spelling (--portvs-p) and different command, so I judged it not worth picking a different number just to avoid the repeat, but flagging it since the dispatch asked me to say which way I went and why.Premise check (dispatch's assumption, tested)
Confirmed 3000-with-next-free-port is still current behavior, checked against
@objectstack/cli17.2.0 (currentlatest) in/home/user/objectstack, not just the 17.1.0 the quickstart measurement used:packages/cli/src/commands/dev.ts:const requestedPort = port ?? '3000';— default is still 3000.packages/cli/src/commands/serve.ts:680:port: Flags.string({ ..., default: readEnvWithDeprecation('OS_PORT', 'PORT', { silent: true }) ?? '3000' })— same default on the childserveboots.PORT_SEARCH_SPANcollision-search logic inserve.tsare unchanged in shape; the most recent CLI commit touching this area (4f9df8f, 17.2.0, #13120) only changed which number the three announcement channels report (the actually-bound port viaIHttpServer.getPort(), fixing a--port 0edge case) — it did not change the default or the collision behavior itself.No re-arm of #141 needed; this stays the card it was filed as.
Also re-ran the issue's own re-check command on
origin/main:cli.mdxwas the only English file still carrying the 3002 claim; the sevenquickstart.<locale>.mdxsiblings still carry it (correctly, per scope — left untouched) andquickstart.mdxitself was already correct (also left untouched).Scope
Only
content/docs/reference/cli.mdx, lines 70-71 plus the new note line. No locale siblings touched,quickstart.mdxuntouched, no neighbouring sections tidied.Verification (all from repo root, per dispatch)
All three exit 0 with clean verdict lines (captured before any pipe). Also spot-checked the actual Next.js build output (
apps/docs/.next/server/app/llms.mdx/docs/reference/cli.body) contains the corrected text, so this isn't just a source-file edit — it renders. No changeset needed (this repo has no changeset flow / nopackages/).This repo has no
skip-changesetlabel mechanism (that's anobjectstackconvention) and nopackages/, so nothing else to check there.Verified at commit
58f660a(current HEAD of this branch).Generated by Claude Code