Skip to content

S270: the documented HTTP port has never matched the shipped one - #102

Merged
detain merged 1 commit into
masterfrom
s270-http-port-truth
Aug 7, 2026
Merged

S270: the documented HTTP port has never matched the shipped one#102
detain merged 1 commit into
masterfrom
s270-http-port-truth

Conversation

@detain

@detain detain commented Aug 7, 2026

Copy link
Copy Markdown
Owner

config/server.php:7 hardcodes 8096. The docs referenced 32400 in ~30 files, and PHLIX_HTTP_PORT — documented as the way to change it — has zero hits in the server source.

The docs were never right

git log -L7,7:config/server.php returns exactly one commit: the initial project commit, which created 'port' => 8096. The line has never changed. So the hypothesis in the step (that 32400 is copied Plex boilerplate rather than a former Phlix default) is confirmed, not assumed.

⚠ It was not a blanket substitution — that was the trap

Three different ports were being conflated:

  • the listen port, 8096
  • the docker host port, 32400 — the shipped compose really does publish "32400:8096"
  • the port-forward port, 32400

56 lines across 8 files keep 32400, each now explained in place. A find-and-replace would have broken all three.

PHLIX_HTTP_PORT: removed, and the text says why

Zero git grep hits and zero commits from git log -S ... --all — it has never existed on any ref. All 8 mentions now state plainly that it was never implemented, so an operator who has it set in a .env finds out rather than continuing to believe it works. Not recommending it be implemented: install.sh --http-port already covers that case.

Routed defect (not fixed here)

PortForwardService.php:111 uses one value as both the external and the internal mapping port, defaulting to 32400 while the daemon binds 8096. Automatic port forwarding cannot have worked at defaults, and the hostname candidates advertised to the Hub are unreachable.

⚠ Correction to the step brief

The base SHA I gave was stale — origin/master is ca79f7a, not 40fd890; two Windows-doc commits landed after my snapshot. That moves the anchor baseline to 158 pages / 3454 links / 0 dead, not 3474. The −20 is entirely those two commits, confirmed by building both SHAs in clean worktrees.

Gates

Clean detached worktree, every exit code from its own $?: npm test 0 (85 tests), docs:build 0. Anchors: control ca79f7a 158/3454/0 → this branch 158/3454/0.

26 files.

🤖 Generated with Claude Code

…tire PHLIX_HTTP_PORT

The docs were never right. `git log -L7,7:config/server.php` in phlix-server
returns exactly ONE commit — `629348b3` "Step 1.1: Initialize Workerman project
structure", which created the file with `'port' => 8096`. The line has never been
changed. `git log -S"32400" --all` on phlix-server shows 32400 only ever entering
via port-forwarding code and docker port MAPPINGS, never as a listen port. So
32400 in the docs is copied Plex boilerplate, not a former Phlix default — the
hypothesis in the step text is confirmed, and no revision of these pages was ever
accurate.

`PHLIX_HTTP_PORT`: REMOVED FROM THE DOCS, not implemented. `git grep -F
PHLIX_HTTP_PORT` over phlix-server's tracked files returns zero hits, and
`git log -S"PHLIX_HTTP_PORT" --all` returns zero commits — the name has never
existed in any commit on any ref. It is not "unwired", it was never written. Every
page that mentioned it now says so in as many words, so an operator who has it in
a `.env` finds out that it is doing nothing rather than silently losing the row.
The real mechanisms are named instead: `server.port` in `config/server.php`, and
`scripts/install.sh --http-port PORT`.

NOT a blanket 32400 -> 8096 substitution. Three different ports were conflated:

  * listen port          8096   config/server.php `server.port`  (no env override)
  * docker HOST port    32400   docker/examples/*/docker-compose.yml `"32400:8096"`
  * port-forward port   32400   config/port-forward.php / PHLIX_EXTERNAL_PORT

32400 is kept, and now explained, where it means one of the latter two:
`install/docker.md` (the shipped compose really does publish on 32400),
`reference/cli.md` (`phlix portforward` output prints the port-forward port),
`reference/api.md` and `dev/pairing-protocol.md` (hostname candidates are built by
`PortForwardService::discoverHostnameCandidates()` from its own port), and
`install/kubernetes.md`'s `nodePort`.

Also documents a phlix-server defect found while establishing the above, rather
than papering over it: `PortForwardService` uses one value as BOTH the external
and the internal port of the UPnP/NAT-PMP mapping (`addPortMapping($gateway,
$this->port, $localIp, $this->port)`, :111), and that value defaults to 32400
while the server listens on 8096. Left at the shipped defaults the mapping points
at a port nothing is bound to, and the hostname candidates advertised to the Hub
are unreachable. `hub-admin/network.md`, `hub/remote-access.md` and
`reference/env-vars.md` now say to set `PHLIX_EXTERNAL_PORT=8096`.

Two adjacent fabrications removed while fixing the port mechanism they claimed to
be: `PHLIX_PORT` (`install/docker.md`, no such variable; the compose mapping sets
the published port) and `APP_URL` (`install/macos.md`, `install/windows.md`,
zero hits in phlix-server, named as the way to change the port).

26 files changed. Remaining `32400` occurrences: 56 lines across 9 files, every
one of them either a docker host-port mapping, the port-forwarding port, or new
prose explaining the distinction.

Gates, each read from its own `$?` on an unpiped command: `npm test` exit 0
(5 files, 85 tests); `npm run docs:build` exit 0, anchor gate 158 page(s),
3454 unique fragment links, 0 dead — byte-identical to the origin/master control.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 1 medium

Alerts:
⚠ 1 issue (≤ 0 issues of at least minor severity)

Results:
1 new issue

Category Results
ErrorProne 1 medium

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@detain
detain merged commit f1f942b into master Aug 7, 2026
2 of 3 checks passed
@detain
detain deleted the s270-http-port-truth branch August 7, 2026 22:28
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.

1 participant