Skip to content

fix(app-cli): give the suite explicit test and hook timeouts - #2244

Closed
willgriffin wants to merge 1 commit into
mainfrom
fix/issue-2243-app-cli-timeout
Closed

fix(app-cli): give the suite explicit test and hook timeouts#2244
willgriffin wants to merge 1 commit into
mainfrom
fix/issue-2243-app-cli-timeout

Conversation

@willgriffin

Copy link
Copy Markdown
Contributor
{"schema":"hv-agent-run:v1","runtime":"claude","session":"8a94e288-0358-403f-a3a6-8e81a80e6c5d","issue":"2243","head_sha":"82b1abd2a9b597d387262b35feb5d91b36bdedb8","policy_revision":"1.0.0","status":"complete"}

Summary

packages/app-cli/vitest.config.ts declared no testTimeout, so the suite ran on vitest's
5 s default. src/__tests__/bridge.test.ts > runMcpStdioBridge is not a 5 s test — it spawns
tsx on a fixture through StdioClientTransport and completes an MCP handshake before it
asserts anything.

Impact

Load-sensitive, so it passes on the PR lane and fails in the merge queue, where mode: full
actually runs this package. A PR sits at CLEAN and is then ejected on queue entry by a
failure in a package it never touched:

FAIL src/__tests__/bridge.test.ts > runMcpStdioBridge > negotiates MCP 2026-07-28 …  (×3 retries)
Error: Test timed out in 5000ms.
Tests  1 failed | 105 passed (106)

That ejected #2242 — a CI-only change of workflow YAML plus two docs files — after it had
already spent a full validation cycle.

Change

Both budgets set explicitly at 30000, the value used by 45 other packages in the workspace.
hookTimeout is set alongside testTimeout per the rule that landed in #2242: hooks do not
inherit it.

This is the third instance of one defect class in a day — mcp-conformance-fixture
(hookTimeout at the 10 s default, fixed three times over in #2238/#2239/#2240), app-cli
here, and users in #2220. A sweep for suites that spawn processes on default budgets is
worth doing separately.

Validation

Config-only change to test budgets; it relaxes limits and cannot mask a failure, since a
genuinely hung spawn still fails, just later. The merge-queue run exercises the fix directly,
because that is the lane where this package's tests actually execute.

Closes #2243

bridge.test.ts spawns tsx on a fixture through StdioClientTransport and
completes an MCP handshake before asserting. The package declared no
testTimeout, so that ran against vitest's 5s default.

It passed locally and on the affected lane, then timed out three times in
the merge queue -- where mode: full actually runs this package -- and
ejected an unrelated CI-only PR. Set both budgets explicitly at 30000, the
value the rest of the workspace uses; hooks do not inherit testTimeout.

Closes #2243
Copilot AI review requested due to automatic review settings August 6, 2026 02:22
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes @happyvertical/smrt-app-cli’s Vitest suite resilient in CI/merge-queue runs by explicitly setting suite-level testTimeout and hookTimeout, avoiding failures from Vitest’s low default timeouts when tests spawn child processes.

Changes:

  • Set testTimeout: 30000 for the app-cli test suite.
  • Set hookTimeout: 30000 alongside testTimeout to ensure hooks have the same budget.
  • Add inline rationale documenting why the increased budgets are needed in this package.

Comment on lines +10 to +15
// bridge.test.ts spawns `tsx` on a fixture through StdioClientTransport and
// completes an MCP handshake before it asserts anything. On vitest's 5s
// default that passed locally and on the affected lane, then timed out
// three times in the merge queue — where `mode: full` actually runs this
// package — and ejected an unrelated PR (#2243). 30000 matches the value
// used across the rest of the workspace.
@willgriffin
willgriffin enabled auto-merge August 6, 2026 02:24
@willgriffin
willgriffin added this pull request to the merge queue Aug 6, 2026
@willgriffin
willgriffin removed this pull request from the merge queue due to a manual request Aug 6, 2026
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Removed from the merge queue — reason: MANUAL

Someone removed this entry. Removal also restarts validation for every entry that was queued behind it.

Latest merge-group validation run for this PR: https://github.com/happyvertical/smrt/actions/runs/31065704626

merge-queue-watchdog: dequeue events are otherwise invisible; this comment makes queue ejections diagnosable (#2197).

@willgriffin

Copy link
Copy Markdown
Contributor Author

Superseded by #2245, which carries this commit cherry-picked verbatim alongside the other three patch-class changes.

Consolidated to spend one validation pass instead of four. For #2205 and #2233 specifically it also resolves a real collision — both rewrite pnpm-workspace.yaml and pnpm-lock.yaml, so merged separately they conflict and the second would need a rebase and lockfile regeneration regardless. #2245 regenerates the lockfile once over both edits (zero drift, supply-chain check clean).

Branch preserved.

@willgriffin willgriffin closed this Aug 6, 2026
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.

fix(app-cli): bridge.test.ts spawns tsx on the 5s default testTimeout and ejects unrelated PRs from the merge queue

2 participants