Repository navigation
docs(AGENTS.md): the dev-server port is a default, not hard-wired, and the three contributor lines agree with the code - #27094
Conversation
Three contributor lines now say what the code does. `pnpm run setup` is install plus the spec build only, and `pnpm dev`'s preflight wants a full `pnpm build` (scripts/check-dev-prereqs.mjs), so the line no longer calls it the first-time step. The dev-server row drops "Port must be 3000 (UI hard-wired)": `os dev` reads `--port`, then `OS_PORT`, then the legacy `PORT`, defaults to 3000 and shifts off a busy port (packages/cli/src/commands/dev.ts), and the Console dev proxy targets `DEV_PROXY_TARGET || http://localhost:3000` (ui/apps/console/vite.config.ts). The fast-iteration paragraph spells the documented `OS_PORT`. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYmhU5KEj1nukYhp1Tg
Contract reviewServed-tier: Read at 2026-10-28T05:34Z by the ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Implemented-by: VERDICT: PASS |
维护者速读 — 席位终稿 · PR #27094 · head
|
Fixes #26088
Clause-②: no
Metadata-protocol: none
维护者速读
pnpm run setup只装依赖并构建 spec,不是首次完整准备;前端快速迭代段改用文档名OS_PORT。pnpm run setup当作首次准备,随后pnpm dev因未构建被拒;README / CONTRIBUTING / getting-started 已在先前一单改好,这一单收尾 AGENTS.md。AGENTS.mdL138(开发服务表格那一行,改动最大的 hunk);其次 L40 与 L170–171。grep -n 'hard-wired\|PORT=3000\|pnpm run setup' AGENTS.md,预期只见 L40 新说明、L138 的「not hard-wired」与OS_PORT=3000、L170 的OS_PORT=3000,不再出现「must be 3000」。What changes
Three contributor lines in
AGENTS.md, each edited in place; no line added or removed (1112 lines before and after).pnpm run setup # first-time: install + build spec (...)pnpm run setup # install + build spec only; pnpm dev needs pnpm build (...)PORT=3000 pnpm dev· "Port must be 3000 (UI hard-wired)" ·PORT=3000 pnpm dev:crmOS_PORT=3000 pnpm dev· "Port 3000 is the default, not hard-wired: the Console dev proxy targets it unlessDEV_PROXY_TARGETsays otherwise, and a busy port shifts to the next free one, so read the port it prints (PORTis the legacy alias ofOS_PORT)" ·OS_PORT=3000 pnpm dev:crm... on :3000** (PORT=3000 pnpm dev for... on :3000** (OS_PORT=3000 pnpm devshowcase) and browse :5180 ...for showcase) and browse :5180 ...The code line that decided each fact:
package.json:18:"setup": "pnpm install && pnpm --filter @objectstack/spec build", so the line's "install + build spec" was accurate; "first-time" was not.pnpm devrunsscripts/check-dev-prereqs.mjs, which requires every workspace package's dist entry and prescribespnpm install && pnpm build(scripts/check-dev-prereqs.mjs:579), the same sequenceREADME.md,CONTRIBUTING.mdand getting-started give. The line now says whatsetupdoes and thatpnpm devneedspnpm build.packages/cli/src/commands/dev.ts:481readsflags.port ?? readEnvWithDeprecation('OS_PORT', 'PORT', { silent: true }),:537defaults it to'3000', and:562runsgetAvailablePortover the requested port: dev shifts off a busy port even when the port was asked for explicitly (serve.ts:2307, dev mode only). The Console dev server proxies/apitoprocess.env.DEV_PROXY_TARGET || 'http://localhost:3000'(ui/apps/console/vite.config.ts:1509). Nothing is hard-wired; 3000 is the default on both sides.OS_PORTis the documented name (--portflag help: "overrides $OS_PORT; $PORT is the legacy alias";content/docs/getting-started/index.mdx:211-212;CONTRIBUTING.md:70-71), so both AGENTS.md command spellings now use it.Left as is, on purpose: L145 "never run two backends on port 3000". It does not repeat the "hard-wired" claim. With auto-shift it still gives sound advice: a second backend would silently land on 3001 while the proxy keeps hitting the first.
Tests
Docs-only diff to one governed instruction file. No package code changed, so no package test or typecheck is owed and no ablation applies (no tested behaviour moved). Card acceptance grep at
596cd15e:grep -n 'PORT=3000\|OS_PORT\|npx create-objectstack\|npm create objectstack\|pnpm run setup' AGENTS.mdmatches only L40 (pnpm run setup, now described accurately), L138 and L170 (bothOS_PORT=3000); no barePORT=3000remains.Acceptance notes
examples/README.md:42carries the samepnpm run setup # first-time: install + build speclabel. It is outside this card's file surface (AGENTS.md only) and outside the card's acceptance grep. Noted here, not filed.ui/AGENTS.md:221(Tier H, outside this surface) still spells the legacyPORT=3000 pnpm dev/PORT=3000 pnpm dev:crm. The legacy alias still works (readEnvWithDeprecation), so this is a spelling drift, not a defect. Noted here, not filed.Verification
All local readings were taken at head
596cd15e(the final commit).Derived gates came from
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack, with no paths and a change set of 1 path vs merge basefbc16563a. It derived 15 gates, and every one exited 0. I also ran three named gates outside the derivation:check:doc-authoring,check-published-list-mirrorsand its--self-test.The
--ranreconciliation reports: 15 derived, 15 run, 0 NOT-MEASURED, 0 UNRUN. That zero is derived from recorded exit codes.pnpm check:pm-skill-ratchetexits 0. Its reading for AGENTS.md: "1112 lines (ceiling 1112; headroom 0)", "widest table row is 768 bytes (pin 768; headroom 0)", and every prose line is within the 120-byte budget.The CI families on this PR are not awaited by the author.
Gate exit codes (head 596cd15)
Session:
session_01QSeKYmhU5KEj1nukYhp1Tg(os-dev subagent,mode:subagent).Generated by Claude Code