[ISS-2] Agent job container has no PostgreSQL and no repo .env — the entire Scrum4Us test suite cannot run #78

Open
opened 2026-09-09 20:05:07 +02:00 by janpeter · 0 comments
Owner

Beheerd door Scrum4Me — wijzigingen hier worden overschreven. Bron: https://thuis.jp-visser.nl/issues/cmtudd9kl000756og18p48v4g

Status: new · Severity: s3_major · Gemeld door: agent-container:claude-opus-5 · Occurrences: 1 (laatst: 2026-09-09T17:25:37.077Z) · Aangemaakt: 2026-09-09T17:25:37.077Z

Registratie

Observed in job cmtucwrt601dfdp7r90844x4v (SPRINT_IMPLEMENTATION, Scrum4Us sprint run cmtucwrsy01dedp7r8vhw1uhe), container hostname c9e6a781839d, worktree /home/agent/.scrum4me-agent-worktrees/cmtucwrt601dfdp7r90844x4v.

FINDING
The container cannot run the Scrum4Us test suite at all:

  • No PostgreSQL server and no client binaries: psql, pg_ctl, initdb all absent, /usr/lib/postgresql does not exist, and connecting to 127.0.0.1:5432 gives ECONNREFUSED.
  • No docker binary, so a database cannot be started from inside the job either.
  • The repository checkout has no .env (only .env.example), so nothing supplies DATABASE_URL / MIGRATE_DATABASE_URL to the suite.
  • The container environment does carry a DATABASE_URL, but it points at the scrum4me platform database (100.118.195.120:5432/scrum4me). That is the wrong database and must NOT be used: the Scrum4Us suites TRUNCATE between runs (CLAUDE.md "Verification"), so pointing them at the platform DB would destroy live data. It was not used.

WHY THIS BLOCKS EVERYTHING
Scrum4Us runs one vitest project with fileParallelism: false because "suites share one database", plus a globalSetup (tests/global-setup.ts) that needs a live DB. So a missing database does not merely skip the DB-backed cases — it fails the whole npm run test, and with it test:rls-pool2, test:ppe, preflight:migrations:verify and audit:ledger, i.e. seven of the ten stages of npm run verify. Only lint, lint:english and typecheck can run here.

CONSEQUENCE FOR SPRINT WORK
Any task whose plan says "RED FIRST, run the suite, then green" is unexecutable as written in this container. In the run above, T-529 (a pure Zod-contract task) could only be tested by hand-rolling a temporary root vitest config scoped to packages/shared/tests to bypass globalSetup, and T-531 (a handler with a recursive CTE, verified by DB-backed tests) cannot be built to plan at all. The Scrum4Us Definition of Done item 2 ("npm run verify && npm run build is green, run twice") is unreachable from this container.

WHAT WOULD FIX IT
Either provision a throwaway PostgreSQL 17 for the job container (a sidecar, or postgres installed in the image plus an initdb/start in the job entrypoint) and write a repo .env pointing DATABASE_URL/MIGRATE_DATABASE_URL at it with the runtime/owner role split the RLS suite requires, or route Scrum4Us sprint jobs to a host that already has one. Whatever is chosen, it must be a database the suite is allowed to truncate — never the platform DB.

Onderzoek

Nog geen onderzoek.

Oplossing

Nog geen oplossing.

> Beheerd door Scrum4Me — wijzigingen hier worden overschreven. Bron: https://thuis.jp-visser.nl/issues/cmtudd9kl000756og18p48v4g Status: new · Severity: s3_major · Gemeld door: agent-container:claude-opus-5 · Occurrences: 1 (laatst: 2026-09-09T17:25:37.077Z) · Aangemaakt: 2026-09-09T17:25:37.077Z ## Registratie Observed in job cmtucwrt601dfdp7r90844x4v (SPRINT_IMPLEMENTATION, Scrum4Us sprint run cmtucwrsy01dedp7r8vhw1uhe), container hostname c9e6a781839d, worktree /home/agent/.scrum4me-agent-worktrees/cmtucwrt601dfdp7r90844x4v. FINDING The container cannot run the Scrum4Us test suite at all: - No PostgreSQL server and no client binaries: `psql`, `pg_ctl`, `initdb` all absent, /usr/lib/postgresql does not exist, and connecting to 127.0.0.1:5432 gives ECONNREFUSED. - No `docker` binary, so a database cannot be started from inside the job either. - The repository checkout has no `.env` (only `.env.example`), so nothing supplies DATABASE_URL / MIGRATE_DATABASE_URL to the suite. - The container environment does carry a DATABASE_URL, but it points at the scrum4me platform database (100.118.195.120:5432/scrum4me). That is the wrong database and must NOT be used: the Scrum4Us suites TRUNCATE between runs (CLAUDE.md "Verification"), so pointing them at the platform DB would destroy live data. It was not used. WHY THIS BLOCKS EVERYTHING Scrum4Us runs one vitest project with `fileParallelism: false` because "suites share one database", plus a `globalSetup` (tests/global-setup.ts) that needs a live DB. So a missing database does not merely skip the DB-backed cases — it fails the whole `npm run test`, and with it `test:rls-pool2`, `test:ppe`, `preflight:migrations:verify` and `audit:ledger`, i.e. seven of the ten stages of `npm run verify`. Only lint, lint:english and typecheck can run here. CONSEQUENCE FOR SPRINT WORK Any task whose plan says "RED FIRST, run the suite, then green" is unexecutable as written in this container. In the run above, T-529 (a pure Zod-contract task) could only be tested by hand-rolling a temporary root vitest config scoped to packages/shared/__tests__ to bypass globalSetup, and T-531 (a handler with a recursive CTE, verified by DB-backed tests) cannot be built to plan at all. The Scrum4Us Definition of Done item 2 ("npm run verify && npm run build is green, run twice") is unreachable from this container. WHAT WOULD FIX IT Either provision a throwaway PostgreSQL 17 for the job container (a sidecar, or postgres installed in the image plus an initdb/start in the job entrypoint) and write a repo `.env` pointing DATABASE_URL/MIGRATE_DATABASE_URL at it with the runtime/owner role split the RLS suite requires, or route Scrum4Us sprint jobs to a host that already has one. Whatever is chosen, it must be a database the suite is allowed to truncate — never the platform DB. ## Onderzoek _Nog geen onderzoek._ ## Oplossing _Nog geen oplossing._ <!-- s4m:issue:cmtudd9kl000756og18p48v4g -->
Sign in to join this conversation.
No labels
severity/s3
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
janpeter/scrum4me-docker#78
No description provided.