Skip to content

test(renderer): give the repeated project turn link test an explicit 15s budget - #533

Closed
PeterGuy326 wants to merge 1 commit into
mainfrom
fix/532-project-turn-link-test-timeout
Closed

PeterGuy326 wants to merge 1 commit into
mainfrom
fix/532-project-turn-link-test-timeout

Conversation

@PeterGuy326

Copy link
Copy Markdown
Contributor

Preflight

Summary

reanchors a repeated project turn link without replacing the conversation draft renders the full App, opens the project workspace and re-anchors the same turn twice inside a for loop, so its cold cost sits above the 5s vitest default on loaded runners. Fresh runs of main currently fail on Node 24 / macos-14 with Test timed out in 5000ms (#532), which keeps that required check red for every open PR.

This gives the test an explicit 15s budget with a comment recording why — the same treatment #531 gave the toolbar test, and matching the other full-App tests in this file that already carry 10_000/15_000 budgets.

Evidence

Where SHA Run / job Result
main ed94fca run 36518952016, job 109247408016 (Node 24 / macos-14) Test Files 1 failed | 70 passed (71), Tests 1 failed | 884 passed (885), App.test.tsx:2667:1 → Error: Test timed out in 5000ms.
#527 branch b6cedd3 run 36517817744 attempt 1, job 109243938638 (Node 24 / macos-14) identical signature
#527 branch, same run b6cedd3 run 36517817744 attempt 1, Node 24 / ubuntu-latest success — same commit, same code
#527 branch, plain rerun b6cedd3 run 36517817744 attempt 2 success on both platforms

Same commit passes on ubuntu in the same run, and passes on macOS on a rerun with no code change — so the test sits at the 5s edge and loses under runner load. It is not a hang and it is not caused by any PR's diff: the failing test never touches the thought-trail code path.

Assumptions

  • The test is slow, not hung. A hang would have failed the rerun and would have failed ubuntu-latest in the same run.
  • Raising the per-test budget is the right fix rather than lowering the gate: this is a test-harness budget, not a product timeout. No production code path changes.
  • 15s is the right number for consistency — the other full-App tests in this file already use explicit 10_000/15_000 budgets, and this is exactly what test(renderer): give the full-App toolbar test an explicit 15s budget #531 set for the toolbar test one function above.

Verification

  • Local, this branch: vitest run --config <temp> renderer/test/App.test.tsx -t "reanchors a repeated project turn link without replacing the conversation draft" → Tests 1 passed | 110 skipped (111), the test itself in 1441ms.
  • So it is comfortably fast on an idle machine and only blows the default under CI load, which is what the four rows above show.

Acceptance

  • Node 24 / macos-14 and Node 24 / ubuntu-latest both green on fresh runs of this branch and of main after merge.
  • No other test in App.test.tsx changes behaviour: the diff is one added comment plus }); → }, 15_000); on a single it.

Found during the 2026-09-29 duty sweep while checking why #527's macOS job failed while ubuntu passed in the same run.

Closes #532.

…15s budget

The test renders the full App, opens the project workspace and re-anchors
the same turn twice inside a loop, so its cold cost sits above the 5s vitest
default on loaded runners. Fresh runs of main currently fail on
Node 24 / macos-14 with 'Test timed out in 5000ms' (#532), which keeps the
required check red for every open PR.

The same commit passed Node 24 / ubuntu-latest in that run and passed both
platforms on a plain rerun, so this is per-test budget, not a hang.

15s matches the other full-App tests in this file, and is the same treatment
#531 gave the toolbar test.

Refs #532
@PeterGuy326

Copy link
Copy Markdown
Contributor Author

Third independent occurrence, this time on #527 after its branch update — same test, same signature, and ubuntu-latest green in the same run again:

Where SHA macOS job Result
main ed94fca 109247408016 App.test.tsx:2667:1 → Test timed out in 5000ms
feat/qoder-thought-trail (attempt 1) b6cedd3 109243938638 identical
feat/qoder-thought-trail (after update-branch onto ed94fca) fea69e7f 109251809950 identical

Three different merge bases, three different runs, the same single test in App.test.tsx, with Node 24 / ubuntu-latest green in every one of them. That is the whole argument for this PR: per-test budget on a loaded macOS runner, not something a branch changed. The test passes locally in 1441ms.

I have rerun the fea69e7f macOS job so #527 is not stuck behind it in the meantime — but the flake will keep coming back until this budget lands.

@PeterGuy326

Copy link
Copy Markdown
Contributor Author

Measured, not inferred — the test is 7.8% over budget, and the file routinely runs tests at 4–8s

I re-ran the fea69e7f macOS job and it failed again on the same test, which gave me a clean timing sample from a failing run (109254736100). Vitest prints the elapsed time even for the timed-out test, so the number is right there:

Test (same file, same run) Elapsed on macos-14 Budget
reanchors a repeated project turn link without replacing the conversation draft 5389ms 5000ms default → failed
App context navigation > consolidates the collaboration toolbar and places employee actions beside the tabs 4199ms 15000ms (added by #531) → passed
restores the original workspace's running task and cancels its exact owner after navigation 8436ms explicit budget → passed
preserves the actual composer, draft and selected session across organization graph navigation 6135ms explicit budget → passed
runs A/B/C independently and keeps late responses, streams and cancellation in their own sessions 5523ms explicit budget → passed
drops workspace A's late group 202 after switching to B and reloads A on return 4561ms explicit budget → passed

Whole file: App.test.tsx (111 tests | 1 failed) 160081ms on macOS.

What this settles

  • Not a hang. The test consumed 5389ms of real work and only overshot by 389ms. A hang would report ~5000ms while doing nothing and would fail on ubuntu-latest too — ubuntu-latest is green in this same run.
  • Not this branch's code. The test never touches the thought-trail path.
  • The 5s default is simply too tight for this file on macOS runners. Five sibling tests in the same run needed 4.2–8.4s and only pass because they carry explicit budgets. This one was the last heavily-loaded full-App test still sitting on the default.
  • 15s is ~2.8x the observed cost, matching what test(renderer): give the full-App toolbar test an explicit 15s budget #531 chose for the toolbar test directly above it and the other full-App tests in the file.

Since opening this PR the test has now failed 4 times in a row on macos-14 (109247408016 on main@ed94fca, 109243938638 and 109251809950 and 109254736100 on the #527 branch) and passed on ubuntu-latest every single time. It is currently the only thing keeping main and #527 red.

@PeterGuy326

Copy link
Copy Markdown
Contributor Author

Superseded — closing this rather than rebasing.

While this PR was open, #534 (97656cdc, test(renderer): explicit budgets for the remaining full-App edge tests) landed the same change on main, covering this exact test:

  // Full-App render with two module switches and turn-link re-anchors, so on
  // slower runners it sits above the 5s default (#529). 15s matches the
  // other full-App tests in this file.
  it("reanchors a repeated project turn link without replacing the conversation draft", async () => {
...
  }, 15_000);

#534 went further and also fixed the HireDrawer binding and the docs undo/redo test from the same family, so there is nothing left here that main does not already have — and the branch now conflicts on the same lines (mergeable_state: dirty). Rebasing would just produce two identical diffs racing for the same lines.

The timing evidence in the two comments above still stands as the measurement behind the fix, and applies equally to #534's change: 5389ms actual against a 5000ms default on macos-14, with five sibling tests in the same run needing 4.2–8.4s, and ubuntu-latest green in every run where macOS failed.

Branch fix/532-project-turn-link-test-timeout deleted.

@PeterGuy326
PeterGuy326 deleted the fix/532-project-turn-link-test-timeout branch September 29, 2026 04:42
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.

ci(renderer): the repeated project turn link test times out on fresh runs of main (macos-14)

1 participant