Commit Graph

5 Commits

Author SHA1 Message Date
gsxdsm
764abb5a47 feat(test-infra): add shared vitest watchdog + CI job timeouts
U1/U2/KTD-6: extract the dashboard heap-runner's process-group kill lifecycle
into a shared scripts/lib/run-vitest-watchdog.mjs with per-class budget bands
(timings only tighten within a generous ceiling) and an inline hang-diagnostics
snapshot. Delegate run-vitest-with-heap.mjs to it (behavior preserved). Add
timeout-minutes backstops to all full-suite.yml test jobs so a wedged run can no
longer hang to GitHub's 6h ceiling.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 00:32:38 -07:00
gsxdsm
8f66a41c1c FN-6308: parallelize dashboard quality lanes
Reduce dashboard quality gate wall-clock by orchestrating existing Vitest lanes with bounded concurrency.

- Add a dashboard quality orchestrator that runs app/API lanes through the existing heap wrapper with safe concurrency and failure short-circuiting.
- Route dashboard quality scripts through the orchestrator while preserving compatibility lane scripts and shard boundaries.
- Export project glob metadata and strengthen guards for lane parity, heap usage, and settings route response expectations.
- Document the new dashboard quality orchestration model and measured FN-6308 timing results.

Files changed:
 docs/test-speed-audit-FN-5048.md                   |   8 +-
 docs/testing.md                                    |  35 +++-
 packages/dashboard/package.json                    |  14 +-
 .../scripts/__tests__/run-quality-tests.test.ts    | 110 ++++++++++
 packages/dashboard/scripts/run-quality-tests.mjs   | 221 +++++++++++++++++++++
 .../__tests__/dashboard-test-config-guard.test.ts  | 134 ++++++++++---
 .../src/__tests__/routes-settings.test.ts          |  14 +-
 packages/dashboard/vitest.config.ts                |  49 ++++-
 8 files changed, 540 insertions(+), 45 deletions(-)

Fusion-Task-Id: FN-6308

Fusion-Task-Lineage: 05a465fd-8eef-4c03-baa3-2b7cb024fef0
2026-06-12 18:18:24 -07:00
gsxdsm
af0be9dd32 FN-6184: log forwarded vitest wrapper signals
Improve dashboard vitest wrapper diagnostics so transient SIGTERM handling is easier to trace.

- track the last signal and reason forwarded from the heap wrapper to the vitest process group
- log when the wrapper receives SIGINT or SIGTERM and when timeout shutdown escalates
- extend wrapper tests to assert process-group leadership and emitted diagnostic stderr

Files changed:
 .../scripts/__tests__/run-vitest-with-heap.test.ts | 25 +++++++++++++++++++---
 .../dashboard/scripts/run-vitest-with-heap.mjs     | 19 ++++++++++++----
 2 files changed, 37 insertions(+), 7 deletions(-)

Fusion-Task-Id: FN-6184

Fusion-Task-Lineage: b276d88e-a22d-4fdf-a533-c4b0aa4e199d
2026-06-10 01:23:59 -07:00
gsxdsm
aa8bd3dc92 fix(FN-6043): recover stuck task processing
Fusion-Task-Id: FN-6043
2026-06-08 18:14:48 -07:00
gsxdsm
ed80f98216 FN-5918: reap dashboard vitest workers on wrapper exit
Prevent dashboard test wrappers from leaving orphaned Vitest subprocesses after interruption or timeout.

- run dashboard vitest wrappers in a detached process group and forward shutdown signals to the whole group
- add an exit-time cleanup path and spawn override seam for process-lifecycle handling without launching real vitest
- cover SIGINT/SIGTERM orphan reaping and keep the dashboard test config guard aligned with the new script test

Files changed:
 .../scripts/__tests__/run-vitest-with-heap.test.ts | 172 +++++++++++++++++++++
 .../dashboard/scripts/run-vitest-with-heap.mjs     |  89 ++++++++++-
 .../__tests__/dashboard-test-config-guard.test.ts  |   1 +
 packages/dashboard/vitest.config.ts                |   1 +
 4 files changed, 256 insertions(+), 7 deletions(-)

Fusion-Task-Id: FN-5918

Fusion-Task-Lineage: 5c695b3b-14c5-4749-ad9c-eb9f33d5ecd5
2026-06-02 19:51:12 -07:00