Two residues from #2414/#2432, which fixed the firewall verbs to resolve their port through the same resolver the endpoint binds on. Both were disclosed rather than folded in, and both are now visible instead of silent — which is why neither is urgent.
1. An in-place upgrade of a moved-port box opens the wrong port for one cycle
install-darling.ps1 runs --configure-firewall at line 521 and Start-Service at line 534. The firewall is therefore configured before the service has started, which is correct on a fresh install — config_service is seeded from darling.json, so the file is the control plane's future answer and cannot be wrong.
It is not correct on an upgrade of a box whose port was later changed in the Viewer. There the store already holds a different port, the service is stopped, and --configure-firewall falls back to the file. So the rule lands on the old port for one cycle.
This was true before #2432 as well; what changed is that the fallback now says so, and the service's own start-up check WARNs the exact command to fix it. So it self-heals with one operator action rather than silently persisting.
Two ways to close it properly, and the choice is a real trade:
- Call
--configure-firewall again after Start-Service. Simple and correct, but the service's first start on a fresh install takes roughly two minutes (managed PostgreSQL bootstrap), so the installer either blocks on that or fires the second call without knowing the store is up.
- Have the service reconcile its own firewall rule at start-up, once it has bound and therefore knows the true port. It already WARNs the exact command; doing it would need elevation the service does not have, which is precisely why the verb exists — so this probably ends as "keep warning", but it is worth deciding deliberately rather than by default.
2. A rule is opened for a surface whose store flag says disabled
PlanFirewallRules still opens a rule for an exposed surface even when the store's mcp_enabled / web_enabled is false.
That may be deliberate — a rule made ready for when the surface is enabled, so enabling it in the Viewer does not also require an elevated prompt. But it is the same shape as the stale rule #2432 just fixed: a firewall hole on a port nothing is serving. The difference is only that this one is on a port that might serve later.
Worth deciding explicitly. If it stays, the reasoning belongs in a comment where the next reader of PlanFirewallRules will find it, because the sweep logic right beside it now argues the opposite way.
Two residues from #2414/#2432, which fixed the firewall verbs to resolve their port through the same resolver the endpoint binds on. Both were disclosed rather than folded in, and both are now visible instead of silent — which is why neither is urgent.
1. An in-place upgrade of a moved-port box opens the wrong port for one cycle
install-darling.ps1runs--configure-firewallat line 521 andStart-Serviceat line 534. The firewall is therefore configured before the service has started, which is correct on a fresh install —config_serviceis seeded from darling.json, so the file is the control plane's future answer and cannot be wrong.It is not correct on an upgrade of a box whose port was later changed in the Viewer. There the store already holds a different port, the service is stopped, and
--configure-firewallfalls back to the file. So the rule lands on the old port for one cycle.This was true before #2432 as well; what changed is that the fallback now says so, and the service's own start-up check WARNs the exact command to fix it. So it self-heals with one operator action rather than silently persisting.
Two ways to close it properly, and the choice is a real trade:
--configure-firewallagain afterStart-Service. Simple and correct, but the service's first start on a fresh install takes roughly two minutes (managed PostgreSQL bootstrap), so the installer either blocks on that or fires the second call without knowing the store is up.2. A rule is opened for a surface whose store flag says disabled
PlanFirewallRulesstill opens a rule for an exposed surface even when the store'smcp_enabled/web_enabledisfalse.That may be deliberate — a rule made ready for when the surface is enabled, so enabling it in the Viewer does not also require an elevated prompt. But it is the same shape as the stale rule #2432 just fixed: a firewall hole on a port nothing is serving. The difference is only that this one is on a port that might serve later.
Worth deciding explicitly. If it stays, the reasoning belongs in a comment where the next reader of
PlanFirewallRuleswill find it, because the sweep logic right beside it now argues the opposite way.