Skip to content

Reject stale Postgres readiness - #42

Merged
AntoineToussaint merged 1 commit into
mainfrom
codex/reject-stale-nix-postgres-readiness
Aug 5, 2026
Merged

Reject stale Postgres readiness#42
AntoineToussaint merged 1 commit into
mainfrom
codex/reject-stale-nix-postgres-readiness

Conversation

@AntoineToussaint

Copy link
Copy Markdown
Contributor

Summary

  • probe the Nix Postgres process through its private Unix socket during bootstrap instead of trusting the public TCP port
  • observe the launched process exit so bind failures surface immediately
  • clean up partially initialized native runtimes on every Init failure
  • prove lib/pq resolves the bootstrap DSN to the owned socket

Regression

A stale OrbStack Postgres proxy was listening on the proposed port. Before this change the Nix process logged a fatal bind failure but the agent pinged the stale database, ran migrations against it, and reported success. With the locally built agent, the same live collision now fails runtime-init immediately with postgres exited before becoming ready: exit status 1.

Verification

  • codefly test source --target ./... --timeout 10m (173 passed)
  • focused socket/credential tests (3 passed; final DSN assertion rerun passed)
  • codefly agent build --dir ./service-postgres --native-only --skip-audit
  • live Mind local-profile collision acceptance using the built Postgres 0.0.117 agent

@AntoineToussaint
AntoineToussaint merged commit 6891ce5 into main Aug 5, 2026
2 checks passed
@AntoineToussaint
AntoineToussaint deleted the codex/reject-stale-nix-postgres-readiness branch August 5, 2026 01:22
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