Skip to content

pm-aggregator tests: give server-starting hooks a 60 s budget - #11463

Merged
dezren39 merged 1 commit into
mainfrom
fix/10467-server-hook-timeouts
Nov 18, 2026
Merged

dezren39 merged 1 commit into
mainfrom
fix/10467-server-hook-timeouts

Conversation

@dezren39

@dezren39 dezren39 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Closes #10467

Before: today-cache-1179.test.ts and thirteen other aggregator suites start the server in beforeAll and wait up to 8–30 s for /api/health, but bun kills a hook after 5 s by default. On a busy machine the server takes longer than 5 s to come up, so the suite failed with "a beforeEach/afterEach hook timed out" even on a clean main.

After: those hooks get a 60 s budget, the same value decisions-page.test.ts already uses, so a slow start either succeeds or fails on the hook's own readiness deadline with a clear message.

How: }, 60_000); on the 14 server-starting beforeAll hooks, each with a one-line comment pointing at #10467. No product code changes.

Testing: reproduced the failure by putting a bun shim on PATH that sleeps 7 s before bun run: on main today-cache-1179.test.ts fails with the hook timeout (0 pass, 1 fail); on this branch it passes (15 pass). Full bun test passes (2897 tests).


Generated by Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Fourteen suites start the aggregator in beforeAll and poll /api/health
against their own 8-30 s deadline, but bun's default hook timeout is
5 s, so on a loaded machine the hook was killed before the deadline and
the suite failed with an opaque "hook timed out". Pass 60_000 to each
of those hooks, as decisions-page.test.ts already does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dezren39
dezren39 marked this pull request as ready for review November 18, 2026 01:02
@dezren39
dezren39 requested a review from a team as a code owner November 18, 2026 01:02
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T01:03:19.745040Z 2cf13aa Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39
dezren39 merged commit bc1f319 into main Nov 18, 2026
@dezren39
dezren39 deleted the fix/10467-server-hook-timeouts branch November 18, 2026 01:02
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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.

aggregator today-cache-1179 test: 5s hook timeout under load (fails on pristine main)

2 participants