DEV-1685 follow-up: never USE :5432 for the local server either (CodeRabbit) - #91
Conversation
Two 'comments failed to post' findings CodeRabbit could not attach inline (I had missed that section on the first pass): - build_local_otf_cache.sh defaulted PGPORT to :5432. Part B removed the only reason it was 5432 (OTF fingerprint parity), so it now just collides with the IAP tunnel. Default to :5435 (matching the script's own usage doc); PGPORT still overridable. - resolve_port() adopted a running cluster's port before checking _RESERVED_PORTS, so a legacy .local_pg cluster on :5432 would be adopted and exported, colliding with the tunnel. Now hard-fail on a reserved running port and require a stop+migrate. Regression test added. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
DEV-1685 Local postgres provisioner: auto-select a free port so the IAP tunnel can own :5432
ContextOpening a
Decisions:
Ops (out of scope for code, done by operator)sudo systemctl stop postgresql@16-main postgresql
sudo systemctl disable postgresql@16-main postgresqlCode — auto-port the local provisioner
No change to Verification
Branched off |
Follow-up to #90 (already merged) addressing two CodeRabbit "Comments failed to post" findings that were missed on the first pass — both enforce DEV-1685's core invariant that the self-hosted local server never touches the reserved
:5432(IAP tunnel).scripts/build_local_otf_cache.sh: defaultedPGPORTto:5432. Part B (this ticket) removed the only reason it was pinned there — the OTF cache fingerprint no longer embedshost:port:user— so it now just collides with the tunnel. Default to:5435(which the script's own usage doc already claims);PGPORTstill overridable.local_postgres.py::resolve_port: adopted a running cluster's port before checking_RESERVED_PORTS, so a legacy.local_pgcluster on:5432would be adopted and exported intoBIRD_PG_*, colliding with the tunnel. Now hard-fails on a reserved running port and requires a stop+migrate. Regression test added (test_resolve_port_rejects_reserved_running_cluster).Helper + provision test suites green (38 passed).
🤖 Generated with Claude Code