Skip to content

ci: the packed e2e from init to a served tier 1 patch; real-Postgres concurrency #208

Closed

Description

@allisonmahmood

Part of #193. Implements spec §13's CI paragraphs and the concurrency invariants under Testing Decisions; decisions the PGlite research (real-Postgres CI is mandatory) and the init prototype.

What to build

  • The packed e2e (scripts/packed-cli-e2e.mjs) gains one flow against a server started with fake Clerk keys and the dev seed: patchy init --tier 1 into a temp directory → patchy dev → one insert through the dev shell driven headless → patchy dev stop → patchy publish → the address answers 401 without a session and, with the seeded session, serves the bundle under the tier 1 CSP → one POST /api/runtime/call through the real shell returns the inserted row → patchy publish again with an added optional column reports it provisioned. Assert the --json documents and exit codes at each step.
  • The real-Postgres concurrency suite, one it.layer block over the migrated template, marked so it never runs on the PGlite layer: two first publishes for one company create one database; two publishes of one patch serialise whole and the second sees the first's inventory; a rollback racing a publish leaves the pointer on one and the inventory cumulative; an old bundle inserting during a column add succeeds; two insertMany under a unique index leave one winner; two puts of one file name leave one consistent row; a lost update through FOR UPDATE on the patch row.
  • A CI job that fails loudly when the e2e cannot start rather than skipping.

Done when

  • Both are required checks and green on main; pnpm test stays offline; docs/DEVELOPMENT.md § Test tiers names both.

Surfaces

The dev loop, docs/DEVELOPMENT.md, .github/workflows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions