Add a focused engine regression guard for user-configured command paths.
- Add a static Vitest registry that slices protected configured-command helpers and fails on execSync usage.
- Assert each protected command path keeps bounded async safeguards such as timeout, maxBuffer, or maxLifetimeMs.
- Document the guard and its deliberate git-plumbing exclusions in the testing guide.
Files changed:
docs/testing.md | 5 +
.../user-configured-command-no-execsync.test.ts | 288 +++++++++++++++++++++
2 files changed, 293 insertions(+)
Fusion-Task-Id: FN-7056
Fusion-Task-Lineage: b92f19cf-526e-4345-b18e-869a278e0e10
`pnpm test`'s changed-affected lane ran `vitest run --changed <base>` for the
heavy packages (@fusion/engine, @fusion/dashboard). `vitest --changed` does
unbounded transitive module-graph expansion: one changed hub source file
selects ~8,393 test entries (79s just to list), which at the OOM-pinned
workers=1 exceeds the engine's 15-min VERIFICATION_TIMEOUT_WORKSPACE_MS. The
engine SIGKILLs and restarts the task, producing the observed loop of nine
15-min verification timeouts (~2.8h) on a single task.
Guard the lane with a git-only predictor: when a heavy package has changed
non-test source in its graph, run only the directly-changed test files;
when no test files changed, delegate cross-cutting coverage to the merge gate
(already run in changed mode). Test-only diffs keep normal --changed.
Mirrors the existing reverse-dependent blast cap one level down. No widened
timeouts, retries, or worker bumps. test:full remains the explicit full sweep.
Bounded engine run: 2.79s vs 79s. Regression suite 111/111.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
## What this adds
A **test-free verification command** — `pnpm verify:fast`
(`scripts/verify-fast.mjs`) — that gives deterministic, flake-free
signal without running the test suite. It is fully **additive**: `pnpm
test`, the merge gate (`test:gate`), and CI are untouched.
`docs/testing.md` observes the broad test gate "caught no recalled real
bugs while consuming ~70% of shipping time in flake triage."
`verify:fast` is the opt-in path for non-test verification, suitable as
a project `testCommand`/verification command.
## What verify:fast runs
1. **typecheck — scoped to the changed packages** (each package's
`typecheck` script, or `pnpm --filter <pkg> exec tsc --noEmit -p .` when
none exists).
2. **build — scoped to the changed packages** (`pnpm --filter <pkg>
build`, only for packages that declare a build script).
3. **boot smoke once** (`scripts/boot-smoke.mjs`: CLI `--help` + a real
`fn serve` answering `GET /api/health`), after builds so it runs against
fresh artifacts.
Change-detection **reuses `scripts/test-changed.mjs`** (`getBaseBranch`
/ `detectComparisonBase` / `changedFilesSince` /
`resolveAffectedPackages` / workspace resolution — newly `export`ed)
instead of reinventing git-diff, so it scopes to exactly the packages a
changed-only test run would. With no affected package (root/docs-only
diff) it runs the boot smoke only. Each step is bounded by the existing
`runWithWatchdog` (class `changed`) so a hung tsc/build/serve fails
fast; it streams progress and exits nonzero on the first failing step.
`@fusion/desktop` and `@fusion/mobile` are skipped, mirroring the root
`build`/`typecheck` exclusions.
## Measured wall-time
On this branch's diff (which resolves to the heaviest package,
`@fusion/dashboard`), end-to-end:
```
[verify:fast] plan: typecheck:@fusion/dashboard -> build:@fusion/dashboard -> boot-smoke
[verify:fast] OK typecheck @fusion/dashboard (~44s)
[verify:fast] OK build @fusion/dashboard (26.2s)
[verify:fast] OK boot smoke (CLI --help + real serve /api/health) (19.6s)
[verify:fast] PASS — 3 step(s) green in 90.3s (no tests run).
```
**~90s total**, deterministic and flake-free. By contrast a typical
**scoped test run for the same package** is far heavier and flake-prone:
`docs/testing.md` notes a dashboard task "otherwise re-ran all 822
dashboard test files (~5-8 min)", and `pnpm test` additionally runs the
merge-gate suite first. verify:fast trades that test-suite cost (and its
flake-triage tax) for a typecheck+build+boot signal in ~1.5 min.
## Doc additions
- `AGENTS.md` + `docs/testing.md` testing-commands lists now include
`pnpm verify:fast`, described as the recommended **test-free
verification** (typecheck + build + boot-smoke), suitable as a project
`testCommand`/verification command; the full suite stays available and
runs non-blocking.
## Tests / verification
- New `scripts/__tests__/verify-fast.test.mjs` (11 tests) pins the pure
planning / arg-construction logic — scoped typecheck/build selection,
build-script gating, desktop/mobile exclusion, boot-smoke-only fallback,
and reuse of `resolveAffectedPackages`. It never spawns real
tsc/build/vitest.
- `pnpm verify:fast` runs end-to-end and exits 0 (output above).
- Lint clean on all new/changed files; `agents-md-invariants`,
`check-test-inventory`, `verify-fast`, and `test-changed` script tests
all green (132 tests).
No changeset (scripts + docs + CI-tooling, behavior-additive;
`@runfusion/fusion` runtime unaffected).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- stage-review-badge-begin -->
---
<a href="https://stagereview.app/Runfusion/Fusion/pull/1777">
<picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://stagereview.app/assets/gh-open-in-stage-dark.svg">
<img src="https://stagereview.app/assets/gh-open-in-stage-light.svg"
alt="Open in Stage">
</picture>
</a>
<!-- stage-review-badge-end -->
Adds scripts/verify-fast.mjs + root `pnpm verify:fast`, an opt-in, flake-free
verification path that runs typecheck + build scoped to the changed packages
(reusing test-changed.mjs git-diff / changed-package resolution) plus the
existing boot smoke once, with no test suite. Each step is bounded by the
shared runWithWatchdog (class "changed"); exits nonzero on the first failure.
No default changed: pnpm test, the merge gate, and CI are untouched.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Strengthen the fn_run_verification allowFullSuite parameter description, add an
AGENTS.md standing rule, and update docs/testing.md so agents default to a
file-scoped verification command and reserve allowFullSuite for genuinely full
runs with no targetable test set. allowFullSuite is the main way verification
balloons past its budget; the thin merge gate is the cross-cutting safety net.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Remove the orphaned session-cross-tab quarantine ledger entry after confirming the test remains active and rescued.
- Document FN-6937's rescue proof and ledger/config lockstep expectation in testing guidance.
- Keep the dashboard Vitest quarantine list empty with a note explaining the stale ledger-only cleanup.
- Remove the session-cross-tab row from the flaky-test quarantine ledger.
Files changed:
docs/testing.md | 8 ++++++--
packages/dashboard/vitest.config.ts | 3 +++
scripts/lib/test-quarantine.json | 8 +-------
3 files changed, 10 insertions(+), 9 deletions(-)
Fusion-Task-Id: FN-6937
Fusion-Task-Lineage: 34a67bf3-2a7f-49ea-93ab-68fadc81f893
Add a non-measured build setup step so velocity baselines do not misclassify missing dist artifacts as lane time.
- Run a default `pnpm build` preflight before measured test velocity lanes, with an explicit skip flag for pre-built CI.
- Add injectable command-runner coverage for preflight ordering, failure reporting, and skip behavior.
- Document the preflight behavior in the generated baseline report and testing docs.
Files changed:
docs/test-velocity-baseline.md | 2 +
docs/testing.md | 4 +-
scripts/__tests__/test-velocity-baseline.test.mjs | 159 ++++++++++++++++++++++
scripts/test-velocity-baseline.mjs | 38 +++++-
4 files changed, 195 insertions(+), 8 deletions(-)
Fusion-Task-Id: FN-6905
Fusion-Task-Lineage: 3016a542-4395-4d06-9f2e-1a91f4939e07
Stabilize changed-test runs by giving the engine affected Vitest lane its own memory envelope.
- Split @fusion/engine out from other scoped affected-package Vitest runs.
- Apply a capped heap and single-worker settings to the isolated engine lane while preserving watchdog timing.
- Cover the partitioning and environment behavior with script tests and document the envelope.
Files changed:
docs/testing.md | 3 +++
scripts/__tests__/test-changed.test.mjs | 45 +++++++++++++++++++++++++++++++++
scripts/test-changed.mjs | 40 ++++++++++++++++++++++++++---
3 files changed, 84 insertions(+), 4 deletions(-)
Fusion-Task-Id: FN-6854
Fusion-Task-Lineage: 144acf15-4ccb-4974-b06c-99cdcc2814dd
Preserve auth route coverage by moving the suite out of the contended API backfill shard.\n\n- Add routes-auth to the curated dashboard API quality shard.\n- Document the FN-6753 suite-load coupling classification and shard-isolation remedy.\n\nFiles changed:\n docs/testing.md | 4 ++++\n packages/dashboard/vitest.config.ts | 7 ++++++-\n 2 files changed, 10 insertions(+), 1 deletion(-)
Fusion-Task-Id: FN-6753
Fusion-Task-Lineage: 4da2f45f-87ba-4b80-baed-68dbde93a09e
Rescue the WorkflowNodeEditor quarantine by making duplicate merge seam detection reliable during initial canvas load.
- Derive fragment seam conflicts from the loaded workflow IR until React Flow nodes materialize.
- Treat IR merge nodes as merge seams so duplicate merge fragments are rejected consistently.
- Cover desktop and mobile duplicate merge fragment insertion paths and remove the test from quarantine.
- Document the FN-6744 rescue evidence and deletion-ratchet update.
Files changed:
docs/testing.md | 6 +++-
.../app/components/WorkflowNodeEditor.tsx | 11 +++++--
.../__tests__/WorkflowNodeEditor.test.tsx | 34 ++++++++++++++++------
.../app/components/workflow-flow-mapping.ts | 10 +++++++
packages/dashboard/vitest.config.ts | 8 +++--
scripts/lib/test-quarantine.json | 5 ----
6 files changed, 54 insertions(+), 20 deletions(-)
Fusion-Task-Id: FN-6744
Fusion-Task-Lineage: 0f5b167a-8efc-4458-ac9d-e719320b751f
Document the same-day flaky-test quarantine audit and ownership plan.\n\n- Record the 2026-06-19 quarantine batch expiration date and ledger/config lockstep status.\n- Split follow-up ownership across CLI, core, and dashboard quarantine rescue/delete work.\n- Add an FNXC comment explaining why the coordinated audit should stay scoped by subsystem.\n\nFiles changed:\n docs/testing.md | 4 ++++\n 1 file changed, 4 insertions(+)
Fusion-Task-Id: FN-6740
Fusion-Task-Lineage: eba08900-18d6-4768-ac8a-c673f89537ca
Add real-browser coverage for Command Center chart sizing and overflow across mobile and desktop.
- Include emitted lazy CSS chunks in dashboard browser-layout smoke fixtures.
- Add a Command Center charts smoke fixture with populated pie/line charts and an empty state.
- Assert chart heights, SVG visibility, overflow containment, and scroll-owner behavior at mobile and desktop breakpoints.
- Document the browser smoke requirement alongside the Command Center responsive chart testing guidance.
Files changed:
docs/dashboard-guide.md | 1 +
docs/testing.md | 3 +-
.../CommandCenter.mobile-chart-layout.test.ts | 6 +
.../dashboard/scripts/browser-layout-smoke.mjs | 220 ++++++++++++++++++++-
4 files changed, 226 insertions(+), 4 deletions(-)
Fusion-Task-Id: FN-6685
Fusion-Task-Lineage: 456d51e2-ffaa-442d-bfa2-5ba17ff6724f
Add a weekly baseline workflow for tracking test feedback-loop speed and flake pressure.
- Add a stdlib-only script to record gate and pnpm test timings alongside slowest test files and quarantine counts.
- Publish generated markdown and JSON baseline artifacts for #leads reporting.
- Document the weekly refresh process and add package scripts plus coverage for the baseline helper.
Files changed:
docs/test-feedback-loop-baseline.md | 48 ++++++
docs/test-feedback-loop-baselines.json | 122 ++++++++++++++
docs/testing.md | 12 ++
package.json | 1 +
scripts/__tests__/test-feedback-baseline.test.mjs | 90 ++++++++++
scripts/test-feedback-baseline.mjs | 192 ++++++++++++++++++++++
6 files changed, 465 insertions(+)
Fusion-Task-Id: FN-6612
Fusion-Task-Lineage: 72bdc070-50e3-4e6b-a07d-3b8aeb9c2e92
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
Rescue the same-day core and CLI flaky quarantines by fixing their fixture seams instead of appeasing timeouts.
- Make the core concurrent-write lock helper release synchronously inside its child process so package load cannot delay the transient lock release.
- Close real CLI TaskStore fixtures before removing temp roots and switch mock cleanup to non-hoisted unmocking.
- Remove both test files from package quarantine excludes and clear the quarantine ledger while documenting the rescue pattern.
Files changed:
docs/testing.md | 2 ++
packages/cli/src/__tests__/extension-task-tools.test.ts | 17 +++++++++++++----
packages/cli/vitest.config.ts | 4 +++-
.../core/src/__tests__/store-concurrent-writes.test.ts | 8 +++++++-
packages/core/vitest.config.ts | 4 +++-
scripts/lib/test-quarantine.json | 13 +------------
6 files changed, 29 insertions(+), 19 deletions(-)
Fusion-Task-Id: FN-6486
Fusion-Task-Lineage: c90358c4-0549-4c68-8d17-2e2a336433b5
Add a fast guard that rejects Vitest timeout bumps in tracked test files.
- Add a test-timeout appeasement scanner with a temporary allowlist for legacy exemptions.
- Run the scanner in pretest, pretest:full, and test:gate so merge gates catch timeout bumps.
- Cover the scanner behavior with node:test cases and document the policy/remediation path.
Files changed:
docs/testing.md | 6 ++
package.json | 6 +-
.../check-no-test-timeout-appeasement.test.mjs | 49 +++++++++
scripts/check-no-test-timeout-appeasement.mjs | 119 +++++++++++++++++++++
.../lib/test-timeout-appeasement-allowlist.json | 10 ++
5 files changed, 187 insertions(+), 3 deletions(-)
Fusion-Task-Id: FN-6434
Fusion-Task-Lineage: deb46a27-b0c9-4644-b8bb-34ce98e7acde
- 427 orphaned dashboard test files ran in NO gate; 395 now gated via self-maintaining backfill lanes (glob minus curated minus skip-list), 31 pre-existing failures + build-output skip-listed with reasons
- settings -t name-filter lanes replaced by one unfiltered lane (describe blocks can no longer fall through filters)
- scripts/check-test-inventory.mjs: --capture/--diff superset harness + --dashboard-curated completeness guard
- pr-checks.yml: engine-slow CI gate (non-empty assertion) + inventory guard job
- docs/testing.md: guard, skip-list policy, harness usage