Release gate: base-path startup test reports a slow Node start as acceptance #93

Closed
opened 2026-11-05 10:55:27 +00:00 by rockachopa · 0 comments
Member

Outcome

The release gate must fail for the right reason. tests/staging-health.test.js currently reports a rejected TIMMY_BASE_PATH as accepted whenever Node's startup takes longer than a fixed 800 ms, because the harness treats "did not exit yet" as "server is running".

Observed on main (58c6d86)

Full suite, twice in a row on the 4-core host (load ~11):

not ok 230 - malformed and escaping base paths are rejected at startup
error: '"timmy-staging" was accepted'
# pass 299
# fail 1

The same file alone passes 6/6, three runs. Direct check confirms the server itself rejects correctly:

$ TIMMY_BASE_PATH=timmy-staging PORT=0 node server.mjs
Error: TIMMY_BASE_PATH must be a canonical absolute URL path using plain unreserved characters.
exit=1

Cause

The test races child.once('exit') against an 800 ms timer. Under suite-level CPU contention the child is still importing modules at 800 ms, so it is killed and 'timeout' is asserted as acceptance. assert.match(stderr, /TIMMY_BASE_PATH/) never runs, so the diagnosis is also wrong.

Acceptance criteria

  • Acceptance is decided from the child's own Timmy is listening on http:// startup line, not from elapsed time.
  • A child that neither exits nor listens within a generous ceiling is reported as indeterminate, not as accepted.
  • The rejection assertions keep running (exit !== 0, stderr names TIMMY_BASE_PATH).
  • Full suite passes on the loaded host; a mutated server that accepts timmy-staging still fails this test.

Boundary

Test-harness only. No production behaviour, UI, inference, or medical boundary changes.

## Outcome The release gate must fail for the right reason. `tests/staging-health.test.js` currently reports a rejected `TIMMY_BASE_PATH` as **accepted** whenever Node's startup takes longer than a fixed 800 ms, because the harness treats "did not exit yet" as "server is running". ## Observed on `main` (58c6d86) Full suite, twice in a row on the 4-core host (load ~11): ``` not ok 230 - malformed and escaping base paths are rejected at startup error: '"timmy-staging" was accepted' # pass 299 # fail 1 ``` The same file alone passes 6/6, three runs. Direct check confirms the server itself rejects correctly: ``` $ TIMMY_BASE_PATH=timmy-staging PORT=0 node server.mjs Error: TIMMY_BASE_PATH must be a canonical absolute URL path using plain unreserved characters. exit=1 ``` ## Cause The test races `child.once('exit')` against an 800 ms timer. Under suite-level CPU contention the child is still importing modules at 800 ms, so it is killed and `'timeout'` is asserted as *acceptance*. `assert.match(stderr, /TIMMY_BASE_PATH/)` never runs, so the diagnosis is also wrong. ## Acceptance criteria - [ ] Acceptance is decided from the child's own `Timmy is listening on http://` startup line, not from elapsed time. - [ ] A child that neither exits nor listens within a generous ceiling is reported as indeterminate, not as accepted. - [ ] The rejection assertions keep running (`exit !== 0`, stderr names `TIMMY_BASE_PATH`). - [ ] Full suite passes on the loaded host; a mutated server that accepts `timmy-staging` still fails this test. ## Boundary Test-harness only. No production behaviour, UI, inference, or medical boundary changes.
rockachopa added the type/testpriority/P0area/release labels 2026-11-05 10:55:27 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: stackchain/timmy-talking-turd#93