Skip to content

--port has no upper bound: b4 start --port 70000 crashes with Node's ERR_SOCKET_BAD_PORT instead of Invalid port (#1047) - #1062

Merged
blove merged 2 commits into
mainfrom
adopt/wo-f5fea70dc61c255a
Oct 21, 2026
Merged

blove merged 2 commits into
mainfrom
adopt/wo-f5fea70dc61c255a

Conversation

@blove

@blove blove commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Adopts the software factory's draft PR #1050 (work order wo-f5fea70dc61c255a) for #1047.

The first commit is the factory's, cherry-picked unchanged: the candidate a person approved as bundle
6b8ed3e4e23fb662dd635c901ec9975c8b872ebab93a22389166f4252fedaa13 (receipt rc-6be47ec5-38cd-4276-8f26-5fea54e4d863, verifier docker:b55af4c0a42e71485017db422dc6da02e46b8b291619b56d756415835bb80593), verified in the target's image at the pin and re-verified at approval.

The second commit is the adopter's: a changeset (.changeset/factory-wo-f5fea70dc61c255a.md) and the factory's independent check, promoted to packages/cli/test/port-parse.test.ts (translated from node:test; this PR's CI is its first run).

Closes #1047

b4dotrun Bot and others added 2 commits October 21, 2026 13:32
… with Node's `ERR_SOCKET_BAD_PORT` instead of `Invalid port`

Refs #1047

Work order wo-f5fea70dc61c255a, bundle 6b8ed3e4e23fb662dd635c901ec9975c8b872ebab93a22389166f4252fedaa13.
…e's `ERR_SOCKET_BAD_PORT` instead of `Invalid port` (#1047)

Adopted from the factory's draft PR #1050 (work order wo-f5fea70dc61c255a): the delivered commit, cherry-picked, plus a changeset (.changeset/factory-wo-f5fea70dc61c255a.md) and the factory's independent check as packages/cli/test/port-parse.test.ts.

Closes #1047
@vercel

vercel Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
b4-run Ready Ready Preview Oct 21, 2026 8:33pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
navlog-web Ignored Ignored Preview Oct 21, 2026 8:33pm UTC

Request Review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval for repository bookkeeping. The maintainer reviews and merges this PR.

@blove
blove temporarily deployed to vercel-preview October 21, 2026 20:32 — with GitHub Actions Inactive
@blove
blove merged commit a2d2ca3 into main Oct 21, 2026
31 checks passed
@blove
blove deleted the adopt/wo-f5fea70dc61c255a branch October 21, 2026 20:58
blove added a commit that referenced this pull request Oct 22, 2026
…ers' checks (#1075)

Follow-up polish to #1062 from the review of #1050:

- Fold the digits-only check and the range check into one condition in both
  parsers. After `/^\d+$/`, Number() can only return a non-negative integer or
  Infinity, so the separate `Number.isInteger` guard was redundant.
- An invalid `--port` now says what is accepted: `1 to 65535` for b4 dev and
  b4 inspect, `0 to 65535` for b4 start.
- Fix the stale "dev.ts's parsePort" comment in start.ts; the shared parser
  lives in lib/dev/parse-port.ts.
- Update the message assertions and cover `parsePort("0")`.

Co-authored-by: Claude Opus 5.5 <[email protected]>

This branch was successfully deployed

1 active and 1 inactive deployments
Preview – b4-run — 9ab2e949 Deployed Oct 21, 2026 by vercel[bot]
vercel-preview — 9ab2e949 Deployed Oct 21, 2026 by blove via vercel-native #3092
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--port has no upper bound: b4 start --port 70000 crashes with Node's ERR_SOCKET_BAD_PORT instead of Invalid port

1 participant