Files
stack/apps/gateway
shaggy bdcdff5e31 test(gateway): KBN-101-02a RED — positive anchors, owned exit, classified readability
Second AMEND from the verifier. Five blockers, all inside the 16-path fence; no
new path taken and no GREEN implemented.

1. The run carried an out-of-band `process.exit unexpectedly called with "1"`,
   raised by main.ts:71 self-invoking on import and rejecting after the importing
   case had returned. Vitest attributes that to no case and warns it can produce
   false positives; it also falsified the document's "zero non-assertion
   failures". The import is now wrapped so `process.exit` is stubbed
   non-throwing and the case awaits a settle turn — the behavioral red is
   unchanged, the error is owned, and the run reports `Errors 0`.

2. Two inventory cases demanded the raw values 'standalone' and 'postgres',
   which the value-free classification unions cannot represent, so no compliant
   implementation could have turned them green. They assert 'non-local' and
   'non-pglite'.

3. SourceReadability gained `absent`. Without it an absent source has to be
   reported `readable` — the one value meaning "read, and clean" — collapsing
   the distinction the refusal path is built on. The invariant
   `present === false` iff `readability === 'absent'` is now asserted per state
   and across all seven rows at once.

4. Acceptance #6 had no positive anchor: an empty `bootstrap()` and an
   always-refusing `onModuleInit()` satisfied every case, so "safe" could have
   meant "does not work". Two cases now fail against that — bootstrap must reach
   NestFactory.create and listen under the frozen policy with zero independent
   read, and the sterile local lifecycle must actually run both migrations with
   no Postgres handle. Both in-process and substituted at their seams; no port
   is bound and nothing connects.

5. Every mkdtemp site in the six files now registers teardown at the point of
   creation, including the child route's root created inside the spawn
   arguments. The matrix leaves zero /tmp/kbn-02a-* residue, measured.

Focused matrix: 82 failing / 16 passing (98 cases, 6 files), Errors 0.
Typecheck, lint, Prettier, diff --check clean.
2026-08-12 21:39:20 -05:00
..