feat(dev-ports): 485 — derive every dev port from the branch name - #102
Open
randomdevpete wants to merge 3 commits into
Open
feat(dev-ports): 485 — derive every dev port from the branch name#102randomdevpete wants to merge 3 commits into
randomdevpete wants to merge 3 commits into
Conversation
…t from the module Ticket: 485
…t scheme Ticket: 485
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.
Summary
Adopts
<root>/TODOS/DEV-SERVERS.md's port scheme in jarl. One module (scripts/devPorts.mts)derives every dev/preview/e2e port from the worktree's branch name; every Vite server, the
Playwright fixture and the docs custom SSR dev server now read from it instead of a hardcoded
port.
npm run portsprints the block (--write-envwrites gitignored.env.ports).Confirmed ordinal and block: jarl is row 2 of
board/projects.md(PROJECT_ORDINAL = 2),giving
masterthe block 9970–9979 with 9960–9969 reserved (the oldintegrationblock) —matches both
board/projects.md'sdev port blockcolumn andDEV-SERVERS.md's worked table.scripts/__tests__/devPorts.test.mtsassertsdevPortBase(-1) === 9970with no ordinal argumentpassed, so a copy-paste of headrooms'
PROJECT_ORDINAL = 1fails the suite rather than silentlycolliding with headrooms' own
master.Offset map (this worktree's block,
base= the block above):+0npm run dev)+5npm run docs:preview)+6e2e/fixture-app, dialled bye2e/playwright.config.ts)No dev-server port literal survives: swept the branch with
rg '4173|4321|:3000|--port|strict-port|strictPort|baseURL|webServer|localhost|127\.0\.0\.1'and every remaining hit is either a derived value, a production port (see Exceptions), or
prose/test assertions against
baseURLpassed in by Playwright.Exceptions
Four deliberate deviations, called out here rather than silently applied:
-2/integrationmapping.parseTaskIdnever produces-2from a branch name;devPortBase(-2)still computes the reserved slot if ever passed explicitly. This divergesfrom headrooms' reference
devPorts.ts, which still has anintegrationcase — that module isstale against
DEV-SERVERS.md("-2stays reserved and unassigned") and TODOSCLAUDE.md("There is no
integrationbranch"). Tracked as ticket 877; not fixed here.3000literals survive, both outside any dev-server path:infra/lib/jarl-stacks.ts'sssrPort(written into thejarl-ssrsystemd unit'sEnvironment=PORT=) and the matchingcurl http://localhost:3000/healthzin.github/workflows/ci.yml's deploy job.packages/docs/src/prod-server.tsnow requiresPORTand throws without it — safe, because the systemd unit always sets it.
npm testis nowvitest run && npm run test --workspaces --if-present, with a newroot
vitest.config.tsscoped toscripts/**/__tests__/**/*.test.mtsonly — it does notre-collect
packages/jarl-atoms/packages/jarl-react's own workspace-scoped vitest configs..mtsrather than.tsfor the newscripts/modules, because jarl's rootpackage.jsonhas no
"type": "module". Roottsconfig.jsonincludesscripts/**/*.mts;tsconfig.base.jsongainsallowImportingTsExtensions, which is inert under its existingnoEmit: true.Test plan
oxfmt --checkclean over every file the branch touches (run frommaster's binary againstabsolute paths — this worktree has no
node_modules)ci) — watching after this PR opens