fix: add psql binary guard + delete expired quarantine tests (ratchet) (#2090)

## Summary

Follow-up to PR #2086 addressing two Greptile review findings.

## P2 — Missing `psql` binary guard (Greptile P2)

`hasPg` in `_helpers.ts` previously checked only TCP connectivity to
PostgreSQL. But `adminExecAsync()` shells out to the `psql` CLI for DDL
(`CREATE/DROP DATABASE`). On a runner where Postgres is reachable but
`psql` isn't installed, tests would fail with `spawn psql ENOENT`
instead of skipping cleanly.

**Fix**: Added `hasPsql = spawnSync("psql", ["--version"]).status === 0`
to the `hasPg` guard, so tests skip when either Postgres is unreachable
OR `psql` is missing.

## P1 — Expired quarantine entries (Greptile P1)

The 16 dashboard test files quarantined on 2026-06-25 were past the
14-day deletion ratchet (AGENTS.md: "DELETED after 14 days unless
rescued"). Per the ratchet, the test files were deleted and all
references removed:

- **Deleted 16 test files** (CSS drift, mock drift, mobile-render
regressions)
- **Removed 16 entries** from `scripts/lib/test-quarantine.json` (only
the CLI entry remains)
- **Emptied `quarantinedDashboardTests` array** in
`packages/dashboard/vitest.config.ts`

## Verification

| Check | Result |
|---|---|
| Merge gate (`pnpm test:gate`) | ✅ 294 + 99 + 63 = 456 passed |
| Dashboard curated-gate | ✅ passes (891 files, 892 executed, 1
skip-listed, 1 quarantined) |
| Typecheck (engine) | ✅ clean |
| Lint | ✅ exit 0 |

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Tests**
* Removed multiple outdated dashboard UI, CSS/token, theme contrast, and
API/route test suites.
* Updated dashboard test configuration to stop excluding quarantined
tests and to prune the quality shard to the current set.
* Updated the Vitest split/config guard to match the new test fixture
set.
* Improved PostgreSQL test detection by requiring the `psql` CLI before
running database checks.
* Adjusted quarantine tracking by adding a new CLI extension
distribution ledger entry and removing obsolete dashboard quarantine
entries.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
gsxdsm
2026-07-14 08:18:10 -07:00
committed by GitHub
parent d8f0b1a268
commit d7e072a03c
20 changed files with 19 additions and 5543 deletions

View File

@@ -5,86 +5,6 @@
"file": "packages/cli/src/__tests__/extension-dist-barrel.test.ts",
"reason": "FN-7530 RESCUE-by-split of the prior extension.test.ts entry: the dist-barrel fn_task_list test timed out at 5000ms in the full-suite shard 4/4 (run https://github.com/Runfusion/Fusion/actions/runs/28697507894) while passing locally in ~1.2s and in 3 of the 4 surrounding CI runs. Root-cause invariant: the test does in-test module recompilation (vi.resetModules + vi.importActual of the full @fusion/core dist barrel + a fresh dynamic import of extension.js) inside the default 5s test timeout; that work is CPU-bound and degrades non-linearly under 4-shard CI contention (same loaded-lane signature as FN-6483/FN-6705/FN-6795/FN-6839). Widening the timeout is forbidden by the flaky-test rule and removing the recompilation removes the test's only point, so the file is quarantined pending a split into smaller compilation units.",
"quarantinedAt": "2026-07-04"
},
{
"file": "packages/dashboard/app/components/__tests__/DevServerView.mobile.test.tsx",
"reason": "FN-6860 CI full-suite shard 4/4 fails with 'expected +0 to be 1' on the mobile CSS structure assertion. Deterministic clean-baseline failure during SQLite-to-PostgreSQL cutover. Failing run: https://github.com/Runfusion/Fusion/actions/runs/29305968000. Mirrored in packages/dashboard/vitest.config.ts quarantinedDashboardTests.",
"quarantinedAt": "2026-06-25"
},
{
"file": "packages/dashboard/app/__tests__/chat-tool-calls-mobile-layout.test.ts",
"reason": "Pre-existing CSS token/lint drift — deterministic clean-baseline failure during SQLite-to-PostgreSQL cutover. Quarantined on sight per AGENTS.md so verify:workspace goes green. Failing run: https://github.com/Runfusion/Fusion/actions/runs/29305968000. Mirrored in packages/dashboard/vitest.config.ts quarantinedDashboardTests.",
"quarantinedAt": "2026-06-25"
},
{
"file": "packages/dashboard/app/__tests__/component-css-no-raw-rgba.test.ts",
"reason": "Pre-existing CSS token/lint drift — deterministic clean-baseline failure during SQLite-to-PostgreSQL cutover. Quarantined on sight per AGENTS.md so verify:workspace goes green. Failing run: https://github.com/Runfusion/Fusion/actions/runs/29305968000. Mirrored in packages/dashboard/vitest.config.ts quarantinedDashboardTests.",
"quarantinedAt": "2026-06-25"
},
{
"file": "packages/dashboard/app/__tests__/dashboard-css-token-validity.css.test.ts",
"reason": "Pre-existing CSS token/lint drift — deterministic clean-baseline failure during SQLite-to-PostgreSQL cutover. Quarantined on sight per AGENTS.md so verify:workspace goes green. Failing run: https://github.com/Runfusion/Fusion/actions/runs/29305968000. Mirrored in packages/dashboard/vitest.config.ts quarantinedDashboardTests.",
"quarantinedAt": "2026-06-25"
},
{
"file": "packages/dashboard/app/__tests__/dev-server-layout-css.test.ts",
"reason": "Pre-existing CSS token/lint drift — deterministic clean-baseline failure during SQLite-to-PostgreSQL cutover. Quarantined on sight per AGENTS.md so verify:workspace goes green. Failing run: https://github.com/Runfusion/Fusion/actions/runs/29305968000. Mirrored in packages/dashboard/vitest.config.ts quarantinedDashboardTests.",
"quarantinedAt": "2026-06-25"
},
{
"file": "packages/dashboard/app/__tests__/spinner-animation.css.test.ts",
"reason": "Pre-existing CSS token/lint drift — deterministic clean-baseline failure during SQLite-to-PostgreSQL cutover. Quarantined on sight per AGENTS.md so verify:workspace goes green. Failing run: https://github.com/Runfusion/Fusion/actions/runs/29305968000. Mirrored in packages/dashboard/vitest.config.ts quarantinedDashboardTests.",
"quarantinedAt": "2026-06-25"
},
{
"file": "packages/dashboard/app/__tests__/status-colors-theme.test.ts",
"reason": "Pre-existing CSS token/lint drift — deterministic clean-baseline failure during SQLite-to-PostgreSQL cutover. Quarantined on sight per AGENTS.md so verify:workspace goes green. Failing run: https://github.com/Runfusion/Fusion/actions/runs/29305968000. Mirrored in packages/dashboard/vitest.config.ts quarantinedDashboardTests.",
"quarantinedAt": "2026-06-25"
},
{
"file": "packages/dashboard/app/__tests__/text-token-canonicalization.test.ts",
"reason": "Pre-existing CSS token/lint drift — deterministic clean-baseline failure during SQLite-to-PostgreSQL cutover. Quarantined on sight per AGENTS.md so verify:workspace goes green. Failing run: https://github.com/Runfusion/Fusion/actions/runs/29305968000. Mirrored in packages/dashboard/vitest.config.ts quarantinedDashboardTests.",
"quarantinedAt": "2026-06-25"
},
{
"file": "packages/dashboard/app/api/__tests__/research-api.test.ts",
"reason": "Pre-existing mock drift (getAsyncLayer not on mock store) — deterministic clean-baseline failure. Quarantined on sight per AGENTS.md. Failing run: https://github.com/Runfusion/Fusion/actions/runs/29305968000. Mirrored in packages/dashboard/vitest.config.ts quarantinedDashboardTests.",
"quarantinedAt": "2026-06-25"
},
{
"file": "packages/dashboard/app/components/__tests__/SetupWizardModal.test.tsx",
"reason": "Pre-existing mock drift (detectWorkspace / theme dropdown) — deterministic clean-baseline failure. Quarantined on sight per AGENTS.md. Failing run: https://github.com/Runfusion/Fusion/actions/runs/29305968000. Mirrored in packages/dashboard/vitest.config.ts quarantinedDashboardTests.",
"quarantinedAt": "2026-06-25"
},
{
"file": "packages/dashboard/app/components/command-center/__tests__/CommandCenterControls.test.tsx",
"reason": "Pre-existing mock drift (detectWorkspace / theme dropdown) — deterministic clean-baseline failure. Quarantined on sight per AGENTS.md. Failing run: https://github.com/Runfusion/Fusion/actions/runs/29305968000. Mirrored in packages/dashboard/vitest.config.ts quarantinedDashboardTests.",
"quarantinedAt": "2026-06-25"
},
{
"file": "packages/dashboard/app/__tests__/global-theme-css-no-raw-rgba.test.ts",
"reason": "Pre-existing CSS / mobile-render regression — deterministic clean-baseline failure during SQLite-to-PostgreSQL cutover. Quarantined on sight per AGENTS.md. Failing run: https://github.com/Runfusion/Fusion/actions/runs/29305968000. Mirrored in packages/dashboard/vitest.config.ts quarantinedDashboardTests.",
"quarantinedAt": "2026-06-25"
},
{
"file": "packages/dashboard/app/components/__tests__/WorkflowNodeEditor.css.test.ts",
"reason": "Pre-existing CSS / mobile-render regression — deterministic clean-baseline failure during SQLite-to-PostgreSQL cutover. Quarantined on sight per AGENTS.md. Failing run: https://github.com/Runfusion/Fusion/actions/runs/29305968000. Mirrored in packages/dashboard/vitest.config.ts quarantinedDashboardTests.",
"quarantinedAt": "2026-06-25"
},
{
"file": "packages/dashboard/app/components/__tests__/board-mobile-initial-render.test.tsx",
"reason": "Pre-existing CSS / mobile-render regression — deterministic clean-baseline failure during SQLite-to-PostgreSQL cutover. Quarantined on sight per AGENTS.md. Failing run: https://github.com/Runfusion/Fusion/actions/runs/29305968000. Mirrored in packages/dashboard/vitest.config.ts quarantinedDashboardTests.",
"quarantinedAt": "2026-06-25"
},
{
"file": "packages/dashboard/app/__tests__/toast-theme-contrast.test.ts",
"reason": "Pre-existing CSS / mobile-render regression — deterministic clean-baseline failure during SQLite-to-PostgreSQL cutover. Quarantined on sight per AGENTS.md. Failing run: https://github.com/Runfusion/Fusion/actions/runs/29305968000. Mirrored in packages/dashboard/vitest.config.ts quarantinedDashboardTests.",
"quarantinedAt": "2026-06-25"
},
{
"file": "packages/dashboard/app/components/__tests__/ProjectOverview.test.tsx",
"reason": "Pre-existing CSS / mobile-render regression — deterministic clean-baseline failure during SQLite-to-PostgreSQL cutover. Quarantined on sight per AGENTS.md. Failing run: https://github.com/Runfusion/Fusion/actions/runs/29305968000. Mirrored in packages/dashboard/vitest.config.ts quarantinedDashboardTests.",
"quarantinedAt": "2026-06-25"
}
]
}