Skip to content

fix(frontend, v1.2): give unit tests timeout headroom for loaded macOS runners - #7736

Merged
xuang7 merged 3 commits into
release/v1.2from
backport/7717-give-unit-tests-timeout-headroom-for-loa-v1.2
Aug 20, 2026
Merged

xuang7 merged 3 commits into
release/v1.2from
backport/7717-give-unit-tests-timeout-headroom-for-loa-v1.2

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Automated backport of #7717 to release/v1.2.

Source: e80add4 · automation run

Any related issues, documentation, discussions?

Backport of #7717. Originally linked #7713.

How was this PR tested?

Release-branch CI runs on this branch once the conflicts are resolved and this PR is marked ready for review.

Was this PR authored or co-authored using generative AI tooling?

No.

…ers (#7717)

### What changes were proposed in this PR?

The `build / frontend (macos-latest)` leg failed 6 times between 08-14
and 08-17, each time on a **pure timeout in a different spec** — never a
failed assertion (details and per-failure table in #7713). The leg's own
wall time swings ~2x run to run (9m17s–16m52s), and the same test that
runs in ~400ms on ubuntu has been observed at 11s+ inside a `beforeEach`
on a loaded macOS runner — while Vitest's default limits (5s test / 10s
hook) are fixed absolute values that don't scale with runner load.
Nothing in the frontend test setup changed in that window; the margin is
simply thin enough that ordinary macOS runner variance crosses it.

- Set `testTimeout: 20000` and `hookTimeout: 30000` in
`frontend/vitest.config.ts` (which previously set neither, inheriting
the 5s/10s defaults) — roughly 4x/3x the worst observed times. Both are
needed: 4 of the 6 failures hit the test timeout, 2 hit the hook
timeout.
- The cost is that a genuinely hung test reports 15–20s later,
negligible against a 9–17 minute leg and strictly cheaper than
re-running CI and eroding the signal a red leg carries.
- `vitest.browser.config.ts` (the browser-mode leg) deliberately keeps
the defaults — no timeout failures have been observed there.
- Deliberately **not** making the individual specs cheaper: some are
expensive on purpose (`hub-search-result` / `search` stand up real child
components to work around the coverage-attribution loss in #7458;
undoing that would revert #7627 / #7535).

### Any related issues, documentation, discussions?

Closes #7713.

### How was this PR tested?

- Config-only change with no executable code; the frontend CI legs
themselves exercise it by loading `vitest.config.ts` for the full
202-spec / 4704-test suite.
- Type-checked the edited config against Vitest's `InlineConfig` typings
(`tsc --noEmit` passes — the option names and types are validated), and
`prettier --check` passes, so `format:ci` is unaffected.
- No spec sets a per-test timeout override (verified by grep), so the
global raise applies uniformly.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (claude-opus-4-8)

---------

(backported from commit e80add4)

Signed-off-by: Meng Wang <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor Author

The cherry-pick conflicted and was committed with conflict markers. Resolve the conflicts on this branch, then mark this PR ready for review.

Conflicting files:

  • frontend/vitest.config.ts

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

Backport of #7717 to release/v1.2, intended to reduce flaky frontend CI failures on macos-latest by increasing Vitest’s global test and hook timeouts.

Changes:

  • Add increased testTimeout/hookTimeout in frontend/vitest.config.ts to provide headroom on loaded macOS runners.
  • (Currently) introduces an unresolved merge conflict in frontend/vitest.config.ts that must be resolved before CI can run.
Suppressed comments (1)

frontend/vitest.config.ts:41

  • Unresolved Git merge-conflict markers (<<<<<<< / ======= / >>>>>>>) are still present in this config, which will break TypeScript parsing and prevent Vitest from loading the config. Resolve the conflict by removing the markers and keeping both the existing server.deps.inline workaround and the new timeout settings.
<<<<<<< HEAD
    // monaco-breakpoints' entry does `import './style.css'`. By default
    // Vitest leaves third-party deps externalized, so Node's ESM loader
    // tries to import the .css and crashes with
    // `TypeError: Unknown file extension ".css"`. Inlining the package

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown
Contributor Author

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @Yicong-Huang
    You can notify them by mentioning @Yicong-Huang in a comment.

@github-actions github-actions Bot added the frontend Changes related to the frontend GUI label Aug 19, 2026
@codecov-commenter

codecov-commenter commented Aug 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.99%. Comparing base (13bd51d) to head (02c2c79).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@                Coverage Diff                 @@
##             release/v1.2    #7736      +/-   ##
==================================================
- Coverage           53.01%   52.99%   -0.02%     
  Complexity           2547     2547              
==================================================
  Files                1078     1078              
  Lines               42366    42366              
  Branches             4565     4565              
==================================================
- Hits                22459    22451       -8     
- Misses              18589    18595       +6     
- Partials             1318     1320       +2     
Flag Coverage Δ *Carryforward flag
access-control-service 64.35% <ø> (ø) Carriedforward from 13bd51d
agent-service 34.36% <ø> (ø) Carriedforward from 13bd51d
amber 53.27% <ø> (ø) Carriedforward from 13bd51d
computing-unit-managing-service 1.65% <ø> (ø) Carriedforward from 13bd51d
config-service 56.06% <ø> (ø) Carriedforward from 13bd51d
file-service 61.72% <ø> (ø) Carriedforward from 13bd51d
frontend 47.32% <ø> (-0.04%) ⬇️
pyamber 93.07% <ø> (ø) Carriedforward from 13bd51d
python 90.88% <ø> (ø) Carriedforward from 13bd51d
workflow-compiling-service 58.69% <ø> (ø) Carriedforward from 13bd51d

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@xuang7
xuang7 added this pull request to the merge queue Aug 19, 2026
Merged via the queue into release/v1.2 with commit 5f58502 Aug 20, 2026
17 checks passed
@xuang7
xuang7 deleted the backport/7717-give-unit-tests-timeout-headroom-for-loa-v1.2 branch August 20, 2026 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants