test(runtimes): close the 1c exit-gate cells for health and compression on Deno and Bun #184

Merged
chrnx merged 1 commits from test/gate-1c-cells into develop 2026-10-30 15:55:02 +00:00
Owner

This closes the 1c exit-gate cells that the CARD-22 audit found with no test (rule G6: a missing runtime cell fails the gate).

  • CARD-17 T1–T3 on Deno and Bun: new tests in test/deno/health.test.ts and test/bun/health.test.ts for the booting, ok and degraded states.
    • T1 runs through app.fetch, because serveDeno/serveBun boot before they bind.
    • T2 and T3 run through a real listener and check the body, not only the status.
  • CARD-16 T6 on Deno and Bun: with encodings: ['gzip'], a client that only accepts br gets an identity response.
    • Checked that it can fail: run against compression: true, it fails with encoded as br.
  • CARD-16 T8 on Deno and Bun: added the case where the handler sets its own content-encoding (the bytes go out untouched) and the 204 case.

Test-only change; src/ is untouched. Runs locally: Deno 3/3 health and 8/8 compression; Bun 3/3 health and 8/8 compression; npm test 1213/1213.

This closes the 1c exit-gate cells that the CARD-22 audit found with no test (rule G6: a missing runtime cell fails the gate). - **CARD-17 T1–T3 on Deno and Bun:** new tests in `test/deno/health.test.ts` and `test/bun/health.test.ts` for the `booting`, `ok` and `degraded` states. - T1 runs through `app.fetch`, because `serveDeno`/`serveBun` boot before they bind. - T2 and T3 run through a real listener and check the body, not only the status. - **CARD-16 T6 on Deno and Bun:** with `encodings: ['gzip']`, a client that only accepts `br` gets an identity response. - Checked that it can fail: run against `compression: true`, it fails with `encoded as br`. - **CARD-16 T8 on Deno and Bun:** added the case where the handler sets its own `content-encoding` (the bytes go out untouched) and the 204 case. Test-only change; `src/` is untouched. Runs locally: Deno 3/3 health and 8/8 compression; Bun 3/3 health and 8/8 compression; `npm test` 1213/1213.
chrnx added 1 commit 2026-10-30 15:26:49 +00:00
test(runtimes): close the 1c exit-gate cells for health and compression on Deno and Bun
CI / dco (pull_request) Successful in 5s
CI / runtimes (bun) (pull_request) Successful in 20s
CI / build (pull_request) Successful in 31s
CI / runtimes (edge) (pull_request) Successful in 23s
CI / runtimes (deno) (pull_request) Successful in 34s
86d6954f72
The CARD-22 gate audit found these runtime cells without tests:

- CARD-17 T1-T3 (booting, ok, degraded) existed only on Node. Add them
  on Deno and Bun. T1 goes through app.fetch, because serveDeno and
  serveBun boot before they bind. T2 and T3 go through a real listener
  and assert the response body, not only the status.
- CARD-16 T6 (encodings ['gzip'] with a br-only client gives identity)
  was missing on Deno and Bun.
- CARD-16 T8 on Deno and Bun lacked the handler-set content-encoding
  case and the 204 case.

A negative run of T6 against compression: true fails with 'encoded as
br', so the check can tell the two cases apart.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
chrnx merged commit 2744b225a5 into develop 2026-10-30 15:55:02 +00:00
Sign in to join this conversation.