-
Notifications
You must be signed in to change notification settings - Fork 0
Add native Postgres multi-session coverage for dispatch admission #101
Copy link
Copy link
Open
Labels
area:control-planeRun state, events, locking, and persistence.Run state, events, locking, and persistence.area:infraCI, deployment, databases, and local development infrastructure.CI, deployment, databases, and local development infrastructure.area:loopsLoop registry, manifests, and execution stages.Loop registry, manifests, and execution stages.area:validationTests, typecheck, linting, a11y, security, and release gates.Tests, typecheck, linting, a11y, security, and release gates.priority:p1High priority after P0 work.High priority after P0 work.
Milestone
Description
Metadata
Metadata
Assignees
Labels
area:control-planeRun state, events, locking, and persistence.Run state, events, locking, and persistence.area:infraCI, deployment, databases, and local development infrastructure.CI, deployment, databases, and local development infrastructure.area:loopsLoop registry, manifests, and execution stages.Loop registry, manifests, and execution stages.area:validationTests, typecheck, linting, a11y, security, and release gates.Tests, typecheck, linting, a11y, security, and release gates.priority:p1High priority after P0 work.High priority after P0 work.
Projects
StatusShow more project fields
Todo
Summary
PR #100 added durable dispatch admission with a persistent group-guard row selected
FOR UPDATE, plus PGlite integration coverage for capacity deferral and issue exclusivity. PGlite validates the SQL, transactions, and persisted invariants, but its embedded execution model cannot prove real PostgreSQL lock waiting across independent sessions.Add a native PostgreSQL integration lane that deterministically overlaps dispatch transactions and proves the production concurrency contract.
Why this belongs in M3
This is the remaining verification boundary for the durable-loop admission behavior delivered by #96 and PR #100. It is not general test-harness cleanup: M3 should not close without direct evidence that the database lock used to enforce
maxInFlightbehaves correctly under real multi-session contention.The existing
seeded-postgres-e2eCI job already provisions PostgreSQL 17 and is the preferred infrastructure to extend or reuse.Scope
Acceptance criteria
maxInFlight: 1, two overlapping dispatches for distinct issues produce exactly onedispatchedrun with one acquired lease and onedeferredqueued run without a lease.DATABASE_URL; test cleanup cannot target a production database.bun run validatepass before review.Non-goals
References