Skip to content

ci: guard the test database, run Playwright in CI, and drop 25 MB of dead files - #162

Merged
snowopsdev merged 21 commits into
mainfrom
chore/tests-ci-hygiene
Nov 10, 2026
Merged

snowopsdev merged 21 commits into
mainfrom
chore/tests-ci-hygiene

Conversation

@snowopsdev

Copy link
Copy Markdown
Owner

The test suites could quietly wreck a working database, the Playwright suite ran nowhere, and the repo carried 25 MB of things nothing uses. This closes the test, CI and hygiene findings from the project audit (follow-up to #160).

Tests and CI

  • The CMS integration and Playwright suites refuse to start unless the DATABASE_URL database name contains test, or DATUM_TEST_DATABASE_OK=true is set. They rewrite workspace state and add append-only rows, and cms/.env (usually your working database) is loaded by default. A missing DATABASE_URL is refused too. If you run the suites against a per-worktree database whose name lacks test, rename it or set the opt-in.
  • New e2e CI job: migrate, seed (dev push off), install Chromium, run the 10 Playwright specs. CI databases are now datum_test.
  • CI cancels superseded runs only on pull requests, not on main.
  • The redirect spec asserts the 307 itself (it passed only by accident while signed out). The admin-performance and admin-nav specs wait for hydration before interacting; a click on a cold dev server was being lost. Four integration assertions that could not fail now can.

Hygiene

  • Removed: the vendored Cursor pstack plugin (vendor/claude-plugins, MIT, install it per user from upstream if wanted), the 96 audit screenshots and capture log (in history at 7bb204f), and the two shipped plans.
  • graphify-out/ is no longer tracked and .gitattributes (a merge driver only one machine had) is gone. After pulling, existing clones lose their local graph files; run graphify update . to rebuild. CONTRIBUTING now says not to run graphify hook install, which recreates that driver.
  • Media uploads accept raster images only (SVG or HTML uploads were served from the app origin).
  • Smaller: DESIGN.md scoped to the public reader, cms/.vscode paths fixed, dead and duplicate ops.css rules removed, narrower database reads on the setup hub and suggestion scan, stale "board" wording and configFingerprint docs corrected, docs/open-source-checklist.md removed.

Proof: typecheck, lint (0 warnings), pipeline 883/883, CMS integration 850/850 and npm run build --workspace cms on this branch; the full Playwright suite 59/59 against Playwright's own dev server on a freshly migrated and seeded test database, plus the admin and performance specs repeated cold with no retries. The guard's test fails with the guard disabled, and each strengthened assertion was shown to fail against broken code. The new e2e job itself first runs here.

Reviewed with sol-loop: 2 rounds with GPT-6.1 Sol. Sol verdict: approved. Each workstream was also reviewed by Claude Opus 5.5 before integration.

Created with Claude Opus 5.5 in Claude Code; workstreams implemented by Claude Sonnet 5.5 subagents.

🤖 Generated with Claude Code

snowopsdev and others added 21 commits November 10, 2026 01:10
The integration suite and Playwright's own server rewrite workspace state
and add rows that are never removed, and cms/.env is loaded by default.
Refuse unless the database name contains "test" or DATUM_TEST_DATABASE_OK=true.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- pipelineRun: close active runs before the onboarding-source check so the
  validation error is what is asserted, and require ActivePipelineRunError
  for the concurrent loser instead of any Error.
- dirtyGuard: a clean form's link click is asserted unprevented, not
  compared with itself.
- runPolling: spy on removeEventListener instead of relying on the stopped flag.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…equest runs

- New e2e job: migrate, seed, install Chromium, run the suite, upload the
  HTML report on failure. Required by the ci aggregate job.
- The integration and e2e jobs use a database named datum_test, which the
  new test-database guard requires.
- cancel-in-progress only for pull requests, so two close merges to main
  both keep their run.
- Playwright reports to the list and an HTML report that is never opened.
- Playwright's own server gets SITE_URL, which the JSON-LD spec needs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…poll

- redirects: ask for the first response (maxRedirects 0) and check the 307
  and the location header; signed out, the final URL is always /admin/login.
- adminPerformance: count only the evidence action's requests (the run bar
  also polls by POST every 15 s) and wait for hydration before clicking.
  The old spec failed with one extra POST when a poll landed in the window.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The E2E job's seed booted Payload with the dev schema push on, against a
migration-built database, where a drizzle prompt exits 0 without seeding.
Turn it off for the job, bump upload-artifact to v7, apply the test-database
guard whether or not TEST_BASE_URL is set (the specs write through Payload
either way), and wait for hydration before every interaction in the
performance spec, plus a short settle before its "loaded once" check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pstack is installed per user from upstream instead of vendored.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Delete the 2026-09-11 audit screenshots and capture tooling (kept in history
at 7bb204f), the shipped superpowers plans, and the open-source checklist
that RELEASING.md supersedes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Untrack the force-added graph files and the merge=graphify attribute whose
driver only existed in one machine's git config. Contributors build the graph
with graphify update . after cloning.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The admin's tokens live in ops.css and are checked by dsContrast.int.spec.ts.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
npm workspaces hoist both to the repo root.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Media is world-readable, so an SVG upload was served from the app origin.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ents

Merge the split form-message, tpl-new and table th blocks; drop the repeated
field input block, the pill restatement, the dead setup-row fallbacks and the
unused --ops-sky-deco token. No visual change intended.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The dashboard loaded the whole crawled JSON on every render just to take its
length.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ticles

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
NewContentView reads latestRun.status and nothing else; drop the other ten
fields and the relationship-id helper that fed them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
`graphify hook install` registers a merge driver and writes the
`.gitattributes` line this branch removes, so CONTRIBUTING now says not to
run it. Move `countSitePages` above the setup-hub loader so its doc comment
sits on the right function, and name the motion tokens the run bar uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first spec on a cold dev server clicked the nav toggler before React
attached its handler, so the close was lost and the test failed on its first
attempt in a full run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… URL

`gotoHydrated` lost its wait in an earlier edit, so the performance spec
still raced a cold dev server. The test-database guard also refuses a
missing `DATABASE_URL`: Payload would then connect with libpq's defaults,
which can name a working database.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 10, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 538a2187-ecca-4fe1-865c-4b7f43eeb1d4
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T06:26:11.544538Z 4bb9be9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@snowopsdev
snowopsdev merged commit ddd7a3f into main Nov 10, 2026
13 checks passed
@snowopsdev
snowopsdev deleted the chore/tests-ci-hygiene branch November 10, 2026 06:36
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