FN-6514: restore QuickEntryBox test isolation

Rescues the QuickEntryBox suite by restoring jsdom globals instead of keeping it quarantined.

- Snapshot and restore QuickEntryBox viewport, visibility, matchMedia, and object URL descriptors after each test.
- Add a guard test that proves mutated jsdom globals return to their original descriptors.
- Remove the QuickEntryBox quarantine entries while documenting the rescue pattern.

Files changed:
 docs/testing.md                                    |  2 +
 .../components/__tests__/QuickEntryBox.test.tsx    | 50 ++++++++++++++++++++++
 packages/dashboard/vitest.config.ts                |  7 ++-
 scripts/lib/test-quarantine.json                   |  5 ---
 4 files changed, 55 insertions(+), 9 deletions(-)

Fusion-Task-Id: FN-6514

Fusion-Task-Lineage: 12f20ad8-19ee-4168-91a9-33193b1ab5f7
This commit is contained in:
gsxdsm
2026-06-16 22:13:46 -07:00
parent 1c3a4df255
commit 669b106548
4 changed files with 55 additions and 9 deletions

View File

@@ -1,11 +1,6 @@
{
"$comment": "Flaky-test quarantine ledger (deletion ratchet — see AGENTS.md 'Flaky tests: quarantine on sight' and docs/testing.md 'Quarantine ledger and the deletion ratchet'). A test observed failing without a corresponding real bug is quarantined ON SIGHT: add an entry here AND a matching one-line `exclude` entry in that package's vitest config, in the same commit. Every entry needs a non-empty `reason` (link the failing run) and a `quarantinedAt` date — the entry expires 14 days later, at which point the test file is DELETED unless someone rescues it with evidence it catches real regressions plus a root-cause fix (never appeasement). There is deliberately no loader module and no automation around this file: it is a dated record, the vitest config exclude is the mechanism, and the sweep is policy executed by whoever touches the suite.",
"entries": [
{
"file": "packages/dashboard/app/components/__tests__/QuickEntryBox.test.tsx",
"reason": "FN-6496 verification: pnpm test failed in QuickEntryBox expanded-mode tests (expected aria-expanded=false, received true) while FN-6496 only changed chat streaming hooks; direct isolated rerun of this file passed, so classify as unrelated flaky state leakage. Failing command: pnpm test; confirming command: pnpm --filter @fusion/dashboard exec vitest run app/components/__tests__/QuickEntryBox.test.tsx --reporter=dot --silent=passed-only.",
"quarantinedAt": "2026-06-16"
},
{
"file": "packages/dashboard/src/__tests__/github-tracking-hook.test.ts",
"reason": "FN-6496 merge verification: pnpm test failed in dashboard-api-quality-backfill with ENOTEMPTY while removing a temp task directory; isolated rerun of the file passed, so classify as unrelated cleanup flake. Failing command: pnpm test; confirming command: pnpm --filter @fusion/dashboard exec vitest run src/__tests__/github-tracking-hook.test.ts --reporter=dot --silent=passed-only.",