Commit Graph
1 Commits
Author SHA1 Message Date
hermes-gadgetandHermes Agent a305c93a34 ci: make analysis-integration fail fast instead of hanging (#197)
The analysis integration test leaked its admin pg client whenever fixture
setup threw before the dynamic import of ../db/index.js: the finally block
referenced a block-scoped `pool` and raised ReferenceError, so `admin.end()`
never ran and node:test's failure was followed by an event loop that never
drained. CI reported the 25 ms error and then idled until GitHub's six-hour
job timeout.

- runState.integration.test.ts: provision the analytics/ops namespaces the
  code under test actually qualifies (the fixture used a private schema, so
  the test could never pass), register teardown with t.after before the first
  statement, and bound the admin connection/statement/query timeouts.
- scripts/run-analysis-integration.mjs: preflight the database URL with a
  bounded probe and a hard 120 s watchdog, exiting non-zero with an
  actionable message when the dependency is absent, unreachable or wedged.
- ci.yml: job-level timeout-minutes: 45 and a 5-minute timeout on the step.
- runAnalysisIntegration.test.ts: pin the fail-fast contract.

Co-authored-by: Hermes Agent <hermes@localhost>
2026-11-05 16:45:39 +00:00