Skip to content

test: boot the Postgres suites in the house microVM with IntegreSQL - #13

Open
systemfsoftware-bot wants to merge 1 commit into
mainfrom
chore-restore-surface
Open

systemfsoftware-bot wants to merge 1 commit into
mainfrom
chore-restore-surface

Conversation

@systemfsoftware-bot

Copy link
Copy Markdown
Contributor

What

The Postgres suites now run on the house integration-database pattern instead of a service container.

  • Postgres and the digest-pinned IntegreSQL layer boot inside a hardware-isolated microVM on the runner's KVM device (@systemfsoftware/effect-microsandbox + @systemfsoftware/effect-readiness, the same fixtures timescale-drizzle uses).
  • Each case checks a database out of IntegreSQL and hands it back; the hand-back retries until that case's pooled connections drain, so cases that deliberately leave pools open still release cleanly.
  • EFFECT_AGENT_TEST_POSTGRES_URL still points the suites at a server you run yourself; unset, they boot the microVM.
  • CI gains the KVM grant and the ~/.cache/agent/integresql-layers cache, keyed on the fixture that pins the layer digest. The separate three-major Postgres job is removed: the node matrix now runs every suite, Postgres included.
  • maxWorkers: 1 for storage-postgres: each worker process acquires its own sandbox, and concurrent sandbox startup contends on the microsandbox state database.

Why

The restored Postgres suites need a live server. A service container is not how this fleet provisions integration databases, and it forced a separate job plus an env var just to find it.

Verification

Run with no server and no container on the machine:

suite result
pnpm --filter @systemfsoftware/agent-storage-postgres test 106/106, microVM booted, IntegreSQL checkouts
pnpm --filter @systemfsoftware/agent-testing exec vitest run test/certification-postgres.test.ts 1/1
pnpm --filter <pkg> typecheck (both) pass
pnpm exec effect-tsgo oxlint packages .github --type-aware pass

The Postgres suites ran against a service container that the test process had to
find through EFFECT_AGENT_TEST_POSTGRES_URL. They now follow the fleet's
integration-database pattern: Postgres and the digest-pinned IntegreSQL layer
boot inside a microVM on the runner's KVM device, each case checks its own
database out of IntegreSQL, and the hand-back retries until the case's pooled
connections drain. Nothing needs a Docker daemon, a service container, or a
shared server; EFFECT_AGENT_TEST_POSTGRES_URL still points the suites at a
server you run yourself.

CI gains the KVM grant and the IntegreSQL layer cache the other repositories
use, and the separate three-major job is gone: the node matrix now runs every
suite, including the Postgres ones.

Verified without any server or container: storage-postgres 106/106 and the
testing package's coordinator certification 1/1, both booting the microVM.
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