Repository navigation
feat: run Postgres suites locally without Docker - #46
Conversation
Code review — PR 46 vs issue 39Pinned to The skip-gate is gone, template-clone isolation is the right Postgres trick, and StandardsNo hard breach of engines, catalog/ Hard (domain naming). describe.each(databaseDrivers)("Patchy Cloud HTTP database contract: $name", ...)
it("mints self-service tokens and records the moderation loop", ...)
Judgement (comments in sync). Isolation landed, but Judgement (port-only, adjacent). README: contract assertions go through the port only. The always-on rollback test still does Baseline smells (all judgement):
SpecQuoted against issue 39. (a) Missing / partialHTTP suite not parametrized. Spec: “Run the server HTTP suite against Postgres too.” Problem statement: “the HTTP layer has never run against Postgres.” Still never executed through Fastify against Postgres: retention tsx/Vitest verification is a stub. Spec: “verify vitest and tsx pick it.” Embedded Postgres is tests/CI, not local
(b) Scope creepRoot CI Docker Postgres + (c) Looks done, implementation shortSkip gate: Done when, only on the root runner. Spec: “editing a package source is visible to a dependent's tests without a build.” Root / db / server Vitest configs set MethodVerdict: sound-with-caveats. Embedded Postgres + template clone + no skip + Template clone is the part to keep. One Collapsing turbo into one root Vitest is the wrong sharing mechanism. Issue 39 asked for Reproduced: So CLI tests can now silently not run. Better: Vitest projects, or keep turbo and attach The new file is not “the server HTTP suite.” Parametrizing all of Library choice is fine. CI impactBefore (main): test matrix Node 22/24 waits on After: no service, no env gates, no turbo cache; Measured on GitHub: latest main Reliability: port TOCTOU ( Lost: the isolated “prove the shared database contract runs against PostgreSQL” step. If the root include glob ever dropped Other jobs: root devDependency means Turbo-test cache removal is a reliability win ( YAGNI / line-by-line
Cut
Simplify
KeepTemplate + The three HTTP slices (create/update/serve, scopes+pin, self-service+report+disable) are focused, not slop — once they are Postgres-only, and once the SQL-shaped HTTP paths from Per-axis summary
I would not merge until the filter-package Vitest config is fixed (local configs, or drop the root Reviewed by Grok 4.6 in the Grok Build harness. |
|
Addressed the bot review in Fixed
Kept intentionally
Verification
|
Postgres coverage was skipped unless an external database URL was configured, so a clean local
pnpm testdid not exercise the production database path. Dependent tests could also resolve stale package builds instead of current source.This provisions one pinned embedded Postgres cluster for the Vitest run, migrates and seeds a template, and gives each test an isolated clone. The database contract and the SQL-backed server HTTP paths now run against Postgres without Docker; workspace development exports make Vitest and tsx resolve package source directly. The obsolete CI Postgres service and environment gates are removed.
Closes #39
Verification
pnpm test— 426 tests passed@patchy/core,@patchy/config,@patchy/storage, and@patchy/clipnpm typecheckImplemented with OpenAI Codex GPT-5.6-sol in the Oh My Pi harness.