Nodes always publish container port 8211/udp and only move the host side when servers share a node. PublicPort was an editable setting, so an owner could announce a port nobody can reach, and on a shared node the default 8211 announced the wrong one.
PublicPort is now '{PUBLIC_PORT_8211}' in defaultConfig (the port players actually reach) and is no longer in configSchema.
PublicPort is in unquotedKeys, so the INI gets a number, not a quoted string.
The startup command binds -port=8211 directly.
Note: servers whose stored config already holds PublicPort: 8211 keep that value, since stored config overrides defaults.
Nodes always publish container port `8211/udp` and only move the host side when servers share a node. `PublicPort` was an editable setting, so an owner could announce a port nobody can reach, and on a shared node the default 8211 announced the wrong one.
- `PublicPort` is now `'{PUBLIC_PORT_8211}'` in `defaultConfig` (the port players actually reach) and is no longer in `configSchema`.
- `PublicPort` is in `unquotedKeys`, so the INI gets a number, not a quoted string.
- The startup command binds `-port=8211` directly.
Note: servers whose stored config already holds `PublicPort: 8211` keep that value, since stored config overrides defaults.
Found by the `portSettings` draft check.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Nodes always publish container port 8211 and only move the host side. PublicPort (what the community server list announces) is now {PUBLIC_PORT_8211}, written unquoted, and the server binds -port=8211 directly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
None. The change is internally consistent and the reasoning is sound.
2. Non-blocking suggestions
Stored-config staleness (acknowledged in the PR, but worth tracking): As you note, existing deployments whose saved config already has PublicPort: 8211 will keep that value even on shared nodes where the published port differs. Since the key is now outside configSchema, the user has no UI path to correct it either. Consider whether a one-time migration (or a platform-level override that always injects the resolved PUBLIC_PORT_8211 into the rendered INI regardless of stored state) is warranted. If that's intentionally left to a follow-up, a tracking issue would prevent it from being lost.
RCONPort / RESTAPIPort in unquotedKeys: You added PublicPort because its value arrives as a template-substituted string. RCONPort: 25575 and RESTAPIPort: 8212 are plain integers in defaultConfig and presumably serialize unquoted already, so they're fine today. But if anyone ever changes them to template placeholders (e.g. {RCON_PORT_25575}), they'd hit the same quoting issue. A brief comment on the unquotedKeys list explaining why entries are there (template-resolved strings vs. native integers) could save a future reviewer the investigation.
Startup command port hardcoding is correct, but fragile if the container port ever changes:-port=8211 and defaultPorts: 8211:8211/udp and the PUBLIC_PORT_8211 placeholder all independently reference 8211. If the container-internal port ever needs to change (e.g. Palworld updates), all three spots must be updated together. Not something to fix now, but a short comment near defaultPorts noting the coupling could help.
3. Tests
The PR description mentions the change was surfaced by the portSettings draft check. Confirm that check now validates:
PublicPort is absent from configSchema (so it can't be user-edited).
PublicPort is present in defaultConfig with a PUBLIC_PORT_* template placeholder.
PublicPort is listed in unquotedKeys.
The startup command binds the container-internal port that matches defaultPorts.
If the draft.go / draft_test.go logic is what enforces this, a regression test asserting all four of the above for Palworld would guard against a future refactor silently dropping one of the pieces.
4. Overall assessment
Clean, well-scoped fix. Removing a user-editable setting that could only cause confusion (announcing an unreachable or wrong port) in favor of a platform-resolved template is the right call. The unquotedKeys addition prevents a subtle INI serialization bug. No blocking concerns — merge after confirming the draft-check test covers the four invariants listed above.
Automated review by AI Git Bot
## 🤖 AI Code Review
## Review
### 1. Blocking issues
None. The change is internally consistent and the reasoning is sound.
### 2. Non-blocking suggestions
- **Stored-config staleness (acknowledged in the PR, but worth tracking):** As you note, existing deployments whose saved config already has `PublicPort: 8211` will keep that value even on shared nodes where the published port differs. Since the key is now outside `configSchema`, the user has no UI path to correct it either. Consider whether a one-time migration (or a platform-level override that always injects the resolved `PUBLIC_PORT_8211` into the rendered INI regardless of stored state) is warranted. If that's intentionally left to a follow-up, a tracking issue would prevent it from being lost.
- **`RCONPort` / `RESTAPIPort` in `unquotedKeys`:** You added `PublicPort` because its value arrives as a template-substituted string. `RCONPort: 25575` and `RESTAPIPort: 8212` are plain integers in `defaultConfig` and presumably serialize unquoted already, so they're fine today. But if anyone ever changes them to template placeholders (e.g. `{RCON_PORT_25575}`), they'd hit the same quoting issue. A brief comment on the `unquotedKeys` list explaining *why* entries are there (template-resolved strings vs. native integers) could save a future reviewer the investigation.
- **Startup command port hardcoding is correct, but fragile if the container port ever changes:** `-port=8211` and `defaultPorts: 8211:8211/udp` and the `PUBLIC_PORT_8211` placeholder all independently reference `8211`. If the container-internal port ever needs to change (e.g. Palworld updates), all three spots must be updated together. Not something to fix now, but a short comment near `defaultPorts` noting the coupling could help.
### 3. Tests
- The PR description mentions the change was surfaced by the `portSettings` draft check. Confirm that check now validates:
- `PublicPort` is **absent** from `configSchema` (so it can't be user-edited).
- `PublicPort` is **present** in `defaultConfig` with a `PUBLIC_PORT_*` template placeholder.
- `PublicPort` is listed in `unquotedKeys`.
- The startup command binds the container-internal port that matches `defaultPorts`.
- If the `draft.go` / `draft_test.go` logic is what enforces this, a regression test asserting all four of the above for Palworld would guard against a future refactor silently dropping one of the pieces.
### 4. Overall assessment
Clean, well-scoped fix. Removing a user-editable setting that could only cause confusion (announcing an unreachable or wrong port) in favor of a platform-resolved template is the right call. The `unquotedKeys` addition prevents a subtle INI serialization bug. No blocking concerns — merge after confirming the draft-check test covers the four invariants listed above.
---
*Automated review by AI Git Bot*
None. The changes are correct and internally consistent.
2. Non-blocking suggestions
Stored-config override (acknowledged in PR description): You note that existing deployments with PublicPort: 8211 in their saved config will retain that value, overriding the '{PUBLIC_PORT_8211}' template. On non-shared nodes this is harmless (published port is 8211). On shared nodes it will announce the wrong port, and since the key is no longer in configSchema the user has no UI path to fix it. If the platform's config-merge logic always applies saved values over defaults, consider whether a one-time cleanup job (or a forced template re-injection for this key) is needed. If that's intentionally deferred, a tracking issue would be good.
Coupling between -port=8211, defaultPorts, and the PUBLIC_PORT_8211 placeholder name: All three reference 8211 independently. If the container-internal port ever changes, all three must be updated together. A brief inline comment near defaultPorts like # container port; also referenced in startup command and PUBLIC_PORT_8211 would save a future maintainer some grep. Optional.
3. Tests
The PR description mentions the portSettings draft check surfaced this. Worth confirming that draftchecks_test.go (or equivalent) now asserts all four invariants for Palworld:
PublicPort is absent from configSchema.properties.
PublicPort in defaultConfig matches the pattern '{PUBLIC_PORT_<containerport>}' where <containerport> equals the first element of defaultPorts.
PublicPort appears in configFormatOptions.unquotedKeys.
If the existing draft check only validates a subset, adding the missing assertions would prevent a future refactor from silently breaking one leg of the chain.
4. Overall assessment
Clean, minimal, well-reasoned fix. Removing a user-editable port setting that could only announce an unreachable address, replacing it with a platform-resolved template, and ensuring correct INI serialization via unquotedKeys — all correct. The -port=8211 startup flag correctly pins the container-internal listen port. No blocking concerns; ready to merge once the stored-config migration question is consciously decided (even if the decision is "handle in a follow-up").
Automated review by AI Git Bot
## 🤖 AI Code Review
## Review
### 1. Blocking issues
None. The changes are correct and internally consistent.
### 2. Non-blocking suggestions
- **Stored-config override (acknowledged in PR description):** You note that existing deployments with `PublicPort: 8211` in their saved config will retain that value, overriding the `'{PUBLIC_PORT_8211}'` template. On non-shared nodes this is harmless (published port *is* 8211). On shared nodes it will announce the wrong port, and since the key is no longer in `configSchema` the user has no UI path to fix it. If the platform's config-merge logic always applies saved values over defaults, consider whether a one-time cleanup job (or a forced template re-injection for this key) is needed. If that's intentionally deferred, a tracking issue would be good.
- **Coupling between `-port=8211`, `defaultPorts`, and the `PUBLIC_PORT_8211` placeholder name:** All three reference `8211` independently. If the container-internal port ever changes, all three must be updated together. A brief inline comment near `defaultPorts` like `# container port; also referenced in startup command and PUBLIC_PORT_8211` would save a future maintainer some grep. Optional.
### 3. Tests
The PR description mentions the `portSettings` draft check surfaced this. Worth confirming that `draftchecks_test.go` (or equivalent) now asserts all four invariants for Palworld:
1. `PublicPort` is **absent** from `configSchema.properties`.
2. `PublicPort` in `defaultConfig` matches the pattern `'{PUBLIC_PORT_<containerport>}'` where `<containerport>` equals the first element of `defaultPorts`.
3. `PublicPort` appears in `configFormatOptions.unquotedKeys`.
4. `defaultStartupCommand` contains `-port=<containerport>` matching `defaultPorts`.
If the existing draft check only validates a subset, adding the missing assertions would prevent a future refactor from silently breaking one leg of the chain.
### 4. Overall assessment
Clean, minimal, well-reasoned fix. Removing a user-editable port setting that could only announce an unreachable address, replacing it with a platform-resolved template, and ensuring correct INI serialization via `unquotedKeys` — all correct. The `-port=8211` startup flag correctly pins the container-internal listen port. No blocking concerns; ready to merge once the stored-config migration question is consciously decided (even if the decision is "handle in a follow-up").
---
*Automated review by AI Git Bot*
greg
merged commit d1505991e4 into main2026-10-26 00:40:34 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Nodes always publish container port
8211/udpand only move the host side when servers share a node.PublicPortwas an editable setting, so an owner could announce a port nobody can reach, and on a shared node the default 8211 announced the wrong one.PublicPortis now'{PUBLIC_PORT_8211}'indefaultConfig(the port players actually reach) and is no longer inconfigSchema.PublicPortis inunquotedKeys, so the INI gets a number, not a quoted string.-port=8211directly.Note: servers whose stored config already holds
PublicPort: 8211keep that value, since stored config overrides defaults.Found by the
portSettingsdraft check.🤖 Generated with Claude Code
Nodes always publish container port 8211 and only move the host side. PublicPort (what the community server list announces) is now {PUBLIC_PORT_8211}, written unquoted, and the server binds -port=8211 directly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>🤖 AI Code Review
Review
1. Blocking issues
None. The change is internally consistent and the reasoning is sound.
2. Non-blocking suggestions
Stored-config staleness (acknowledged in the PR, but worth tracking): As you note, existing deployments whose saved config already has
PublicPort: 8211will keep that value even on shared nodes where the published port differs. Since the key is now outsideconfigSchema, the user has no UI path to correct it either. Consider whether a one-time migration (or a platform-level override that always injects the resolvedPUBLIC_PORT_8211into the rendered INI regardless of stored state) is warranted. If that's intentionally left to a follow-up, a tracking issue would prevent it from being lost.RCONPort/RESTAPIPortinunquotedKeys: You addedPublicPortbecause its value arrives as a template-substituted string.RCONPort: 25575andRESTAPIPort: 8212are plain integers indefaultConfigand presumably serialize unquoted already, so they're fine today. But if anyone ever changes them to template placeholders (e.g.{RCON_PORT_25575}), they'd hit the same quoting issue. A brief comment on theunquotedKeyslist explaining why entries are there (template-resolved strings vs. native integers) could save a future reviewer the investigation.Startup command port hardcoding is correct, but fragile if the container port ever changes:
-port=8211anddefaultPorts: 8211:8211/udpand thePUBLIC_PORT_8211placeholder all independently reference8211. If the container-internal port ever needs to change (e.g. Palworld updates), all three spots must be updated together. Not something to fix now, but a short comment neardefaultPortsnoting the coupling could help.3. Tests
portSettingsdraft check. Confirm that check now validates:PublicPortis absent fromconfigSchema(so it can't be user-edited).PublicPortis present indefaultConfigwith aPUBLIC_PORT_*template placeholder.PublicPortis listed inunquotedKeys.defaultPorts.draft.go/draft_test.gologic is what enforces this, a regression test asserting all four of the above for Palworld would guard against a future refactor silently dropping one of the pieces.4. Overall assessment
Clean, well-scoped fix. Removing a user-editable setting that could only cause confusion (announcing an unreachable or wrong port) in favor of a platform-resolved template is the right call. The
unquotedKeysaddition prevents a subtle INI serialization bug. No blocking concerns — merge after confirming the draft-check test covers the four invariants listed above.Automated review by AI Git Bot
🤖 AI Code Review
Review
1. Blocking issues
None. The changes are correct and internally consistent.
2. Non-blocking suggestions
Stored-config override (acknowledged in PR description): You note that existing deployments with
PublicPort: 8211in their saved config will retain that value, overriding the'{PUBLIC_PORT_8211}'template. On non-shared nodes this is harmless (published port is 8211). On shared nodes it will announce the wrong port, and since the key is no longer inconfigSchemathe user has no UI path to fix it. If the platform's config-merge logic always applies saved values over defaults, consider whether a one-time cleanup job (or a forced template re-injection for this key) is needed. If that's intentionally deferred, a tracking issue would be good.Coupling between
-port=8211,defaultPorts, and thePUBLIC_PORT_8211placeholder name: All three reference8211independently. If the container-internal port ever changes, all three must be updated together. A brief inline comment neardefaultPortslike# container port; also referenced in startup command and PUBLIC_PORT_8211would save a future maintainer some grep. Optional.3. Tests
The PR description mentions the
portSettingsdraft check surfaced this. Worth confirming thatdraftchecks_test.go(or equivalent) now asserts all four invariants for Palworld:PublicPortis absent fromconfigSchema.properties.PublicPortindefaultConfigmatches the pattern'{PUBLIC_PORT_<containerport>}'where<containerport>equals the first element ofdefaultPorts.PublicPortappears inconfigFormatOptions.unquotedKeys.defaultStartupCommandcontains-port=<containerport>matchingdefaultPorts.If the existing draft check only validates a subset, adding the missing assertions would prevent a future refactor from silently breaking one leg of the chain.
4. Overall assessment
Clean, minimal, well-reasoned fix. Removing a user-editable port setting that could only announce an unreachable address, replacing it with a platform-resolved template, and ensuring correct INI serialization via
unquotedKeys— all correct. The-port=8211startup flag correctly pins the container-internal listen port. No blocking concerns; ready to merge once the stored-config migration question is consciously decided (even if the decision is "handle in a follow-up").Automated review by AI Git Bot