Skip to content

Add seeded Postgres Playwright lane#83

Merged
ncolesummers merged 2 commits into
mainfrom
codex/82-seed-playwright
Jul 10, 2026
Merged

Add seeded Postgres Playwright lane#83
ncolesummers merged 2 commits into
mainfrom
codex/82-seed-playwright

Conversation

@ncolesummers

@ncolesummers ncolesummers commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • add a guarded seeded-Postgres Playwright lane for the five database-backed portal routes
  • make the default Playwright lane deterministic fixture-fallback coverage
  • add a dedicated PostgreSQL CI service job and document both workflows
  • preserve production fail-closed behavior and prevent unsafe migration or seed targets

Closes #82.

Why

The existing browser suite could pass entirely from fixtures, so it did not prove that migrations, deterministic seed reset, and portal database reads worked together. This adds a separate lane that prepares an isolated loopworks_e2e database before requiring exact Live database evidence.

Issue #80 remains out of scope and open.

Acceptance evidence

AC Evidence Result
Seeded five-route coverage DATABASE_URL=postgres://loopworks:loopworks@127.0.0.1:5432/loopworks_e2e bun run test:e2e:seeded All five routes report exact Live database.
Safe ordered preparation tests/unit/scripts/seeded-postgres-e2e.test.ts Migrate, reset, and Playwright run in order and stop on first failure.
Deterministic fallback bun run test:e2e 20/20 tests pass with exact Fixture fallback labels.
Local and CI separation Package/config contract tests plus workflow inspection Dedicated seeded-postgres-e2e job uses postgres:17-alpine.
Persisted content Seeded Playwright assertions Representative dashboard, catalog, loops, approvals, and settings data verified.
Responsive and a11y Both lanes at 390x844 plus light/dark axe scans including contrast Passed on all five database-backed routes.
Unsafe target prevention Safety matrix unit tests Production, malformed, remote, wrong-database, encoded-path, and credential-redaction cases pass without subprocess execution.

Validation

  • bun run build
  • bun run validate — 267 unit/integration tests and 20 fallback Playwright tests passed
  • seeded Playwright — 4/4 passed
  • adversarial QA/security review completed; encoded database-path and ambient fixture-mode issues were fixed and regression-tested
  • manual browser validation found no console errors or application-route network failures; the existing /favicon.ico request remains 404

Review focus

  • database target constraints in scripts/local-database-safety.ts
  • production fail-closed semantics for LOOPWORKS_PORTAL_DATA_MODE
  • CI isolation of the loopworks_e2e role/database
  • seeded representative-data assertions and mobile/a11y coverage

Screenshots

Seeded dashboard — light

seeded-dashboard-light.png

Seeded catalog — mobile

seeded-catalog-mobile.png

Seeded approvals — dark

seeded-approvals-dark.png

Fixture fallback dashboard

fallback-dashboard.png

Add guarded database preparation, deterministic seeded and fixture Playwright lanes, CI coverage, and acceptance documentation for issue #82.\n\nValidation: bun run build; bun run validate; DATABASE_URL=postgres://loopworks:loopworks@127.0.0.1:5432/loopworks_e2e bun run test:e2e:seeded.\n\nCo-authored-by: Codex (GPT-5) <codex@openai.com>
@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
loopworks Ready Ready Preview, Comment Jul 10, 2026 2:25am

Request Review

Prevent the dashboard workflow header from creating Linux Chromium horizontal overflow at the 390px acceptance viewport.\n\nValidation: bun run validate; bun run build; DATABASE_URL=postgres://loopworks:loopworks@127.0.0.1:5432/loopworks_e2e bun run test:e2e:seeded.\n\nCo-authored-by: Codex (GPT-5) <codex@openai.com>
@ncolesummers ncolesummers marked this pull request as ready for review July 10, 2026 02:47
Copilot AI review requested due to automatic review settings July 10, 2026 02:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@ncolesummers ncolesummers merged commit ac9b4d4 into main Jul 10, 2026
4 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Loopworks Backlog Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add seeded Postgres Playwright coverage for DB-backed portal pages

3 participants