Skip to content

fix: three test suites had been silently disabled - #9

Merged
lintdeveloper merged 1 commit into
mainfrom
fix/stale-test-script-paths
Aug 27, 2026
Merged

lintdeveloper merged 1 commit into
mainfrom
fix/stale-test-script-paths

Conversation

@lintdeveloper

Copy link
Copy Markdown
Owner

test:integration, test:perf and test:compat all pointed at pre-reorg paths and none ran in CI, so nothing reported it.

Worst case: test:compat cached its generated opossum shim, so it kept requiring dist/compat/opossum.cjs and reported 0 of 0 STALLED — the README's "362 of 362" claim was unverifiable. Now 362 of 362 again.

Root cause isn't the paths, it's that nothing executed them. All three now run in CI, plus pnpm test:paths to fail the build on any stale path in a package.json script.

Answering "do we have unit and e2e tests" turned up that three of them had not
run since the src/ reorganisation. All three fail the same way: a path moved,
nothing referenced the new location, and no CI job executed the script, so the
breakage was invisible.

  test:integration  → src/sql-integration.test.ts        (moved to scenarios/)
  test:perf         → src/limiter.simulation.test.ts     (moved to policies/)
  test:compat       → dist/compat/opossum.cjs            (moved to adapters/)

The compat one is the worst. Fixing the generator was not enough: the shim is
written into .opossum-compat/ and that directory is treated as a cache, so
every run kept using a shim generated before the move. The suite reported
0 of 0 STALLED for every file, which means the README's headline "362 of 362"
claim was unverifiable — and the harness said so out loud rather than passing
vacuously, which is the only reason it was recoverable. A generated file must
not be cached alongside downloaded ones; the shim is now rewritten every run.
362 of 362 again.

Root cause is not the paths, it is that nothing ran them. Coverage, smoke and
docs were all in CI and all survived the reorg; these three were not, and a
suite that never executes cannot be distinguished from one that passes. All
three now run in CI.

Plus scripts/check-test-scripts.mjs: every src/… path named in a package.json
script must exist. It runs first in `verify` so it fails in a second instead of
after a full coverage pass, and it fails if it ever matches zero paths, so it
cannot go inert the way the thing it guards did.
@lintdeveloper
lintdeveloper force-pushed the fix/stale-test-script-paths branch from 237e840 to f1617b8 Compare August 26, 2026 15:59
@lintdeveloper
lintdeveloper merged commit 48d89e2 into main Aug 27, 2026
11 checks passed
@lintdeveloper
lintdeveloper deleted the fix/stale-test-script-paths branch August 27, 2026 09:07
lintdeveloper added a commit that referenced this pull request Aug 27, 2026
Adding test:compat to CI in #9 turned an environment-sensitive check into a
required one, and it failed on the first PR after: 170 of 362, with test.js
reporting STALLED in CI while passing locally in 6 seconds.

Two problems behind that, both worth fixing regardless of which one it was.

The suite tracked opossum's main branch. .opossum-compat/ is not cached in CI,
so every run fetched afresh and the README's "362 of 362" was being measured
against whatever opossum had merged that morning. The expected value of a
required check must not be something upstream can change without us. It is now
pinned to decbedf6, and bumping it is a deliberate act.

And a stall reported only the word STALLED, discarding the child's stdout,
stderr and exit status. That is why the CI failure could not be diagnosed and
had to be guessed at — first as a 60s timeout, which the 16-second total run
already ruled out. It now prints the exit code, the signal, and the last twelve
lines the child produced, or says explicitly that there was none.

362 of 362 locally at the pin. Whether CI agrees is now something the output
will explain rather than something to infer.
lintdeveloper added a commit that referenced this pull request Aug 27, 2026
…ot (#11)

* fix: make the SQL integration suite runnable, and honest when it is not

Fixing the path in #9 only got the file found. Actually running it surfaced
two things.

The describe-level gate is `URL_ ? describe : describe.skip`, which tests
whether RESILIX_TEST_DATABASE_URL is SET — but `pnpm test:integration` always
sets it, defaulting to localhost:5459. So the script can never distinguish
"asked for integration tests" from "has a database", and without one the
failure was a bare AggregateError with two node:net frames and no indication of
what to do. It now names the URL it tried, carries the docker run line, and
points at `pnpm test` to skip.

Then it was run for real, against PostgreSQL 14.15, which had not happened
since the reorg: 13 of 13 pass. That is a second data point for classifySql —
the mappings were captured on PostgreSQL 16 and hold on 14 too.

One trap found while setting that up, now in CONTRIBUTING: initdb --auth=trust
makes the "bad password -> transient" case unfalsifiable, because a bad
password does not fail. It reports `NO THROW` until pg_hba.conf uses
scram-sha-256 for 127.0.0.1. Twelve of thirteen passing with the thirteenth
failing for a harness reason is exactly the shape that gets mistaken for a
library bug.

* fix: pin the opossum suite, and make a stall say why

Adding test:compat to CI in #9 turned an environment-sensitive check into a
required one, and it failed on the first PR after: 170 of 362, with test.js
reporting STALLED in CI while passing locally in 6 seconds.

Two problems behind that, both worth fixing regardless of which one it was.

The suite tracked opossum's main branch. .opossum-compat/ is not cached in CI,
so every run fetched afresh and the README's "362 of 362" was being measured
against whatever opossum had merged that morning. The expected value of a
required check must not be something upstream can change without us. It is now
pinned to decbedf6, and bumping it is a deliberate act.

And a stall reported only the word STALLED, discarding the child's stdout,
stderr and exit status. That is why the CI failure could not be diagnosed and
had to be guessed at — first as a 60s timeout, which the 16-second total run
already ruled out. It now prints the exit code, the signal, and the last twelve
lines the child produced, or says explicitly that there was none.

362 of 362 locally at the pin. Whether CI agrees is now something the output
will explain rather than something to infer.
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