Skip to content

Serialize the DB test files, and give the repo a STATE.md - #1

Merged
holzmanshmuel merged 1 commit into
mainfrom
chore/state-md-and-test-serialization
Sep 3, 2026
Merged

Serialize the DB test files, and give the repo a STATE.md#1
holzmanshmuel merged 1 commit into
mainfrom
chore/state-md-and-test-serialization

Conversation

@holzmanshmuel

Copy link
Copy Markdown
Owner

What

  1. vitest.config.tsfileParallelism: false. Nine test files talk to a real Postgres, and db.ts's query() opens its own BEGIN/COMMIT per call — so unlike the sibling torim repo there is no per-file transaction that gets rolled back, and those files clean up by hand with DELETEs. Run in parallel against one database, they race on shared fixture rows.

    Not hypothetical: HOLZMAN-89 recorded exactly this shape in the sibling family-calendar repo — 8/172 failures on one migrated database, 7/172 on another, different tests each run. Nothing here prevented it; the config set no parallelism knob and CI passed no flag. torim has carried fileParallelism: false for the same reason since its TRUNCATE test landed.

  2. STATE.md — the repo had none. Current-state only: what it is, the standing rules that are expensive to rediscover (never point DATABASE_URL at the owner role; FAMILY_BRANCHES is order-sensitive), where it stands, and today's entry.

Verification

CI is the verification: it spins its own postgres:16 service container, applies the migration chain, asserts the app role is neither superuser nor bypassrls, then lint → build → tsc --noEmitvitest run. The change can only make the suite more serialized, never less.

Found during the 2026-09-03 robustness sprint (session D).

🤖 Generated with Claude Code

https://claude.ai/code/session_018XJft41RGArnUbuq8R3syR

vitest.config.ts: fileParallelism: false. Nine test files talk to a real
Postgres, and db.ts's query() opens its own BEGIN/COMMIT per call — so unlike
the sibling torim repo there is no per-file transaction that gets rolled back,
and those files clean up by hand with DELETEs instead. Run in parallel against
one database they race on shared fixture rows.

That is not hypothetical: HOLZMAN-89 recorded exactly this shape in the sibling
family-calendar repo — 8/172 failures on one migrated database, 7/172 on
another, different tests each run. Nothing here prevented it; the config sets
no parallelism knob and CI passes no flag. torim has carried
fileParallelism: false for the same reason since its own TRUNCATE test landed.

STATE.md: the repo had none. Current-state only — what it is, the standing
rules that are expensive to rediscover (never point DATABASE_URL at the owner
role; FAMILY_BRANCHES is order-sensitive), where it stands, and today's entry.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018XJft41RGArnUbuq8R3syR
@holzmanshmuel
holzmanshmuel merged commit 734cd87 into main Sep 3, 2026
1 check passed
@holzmanshmuel
holzmanshmuel deleted the chore/state-md-and-test-serialization branch September 3, 2026 19:20
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