The api stub from 43be32bbd silenced the fetch-rejection path but the suite
still failed on CI: the actual unhandled error is React's scheduler firing
deferred work via setImmediate after jsdom is torn down — its internal
render then dereferences `window` and throws ReferenceError. @testing-library
only auto-registers cleanup() when vitest `globals: true` is set, and this
package doesn't enable globals, so the React tree from each render() stays
mounted across teardown. Register cleanup manually in test-setup.ts so every
dashboard test unmounts its tree before the environment tears down.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ReportDetailPanel transitively calls useReportPreview, which fires fetch()
from api.ts. jsdom has no fetch, the promise rejects, and the catch handler's
setError triggers a React update after the test environment is torn down —
React then accesses window and the suite fails with ReferenceError. The
engine failures previously masked this by failing the shard before the
teardown race could surface. Mocking the api module makes the preview
resolve synchronously and keeps the suite clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Merges the Layer 2.5 scope-auto-widen feature (FN-5226) into the merger: a new evaluator module that automatically widens a task's declared file scope based on git attribution prior to the existing scope partition gate, wired into `merger.ts` with full audit taxonomy, persisted task metadata, and re
Fusion-Task-Id: FN-5226
- Add completion handoff limbo recovery state to task storage and audit events for bounded self-healing retries
- Requeue eligible in-review tasks stuck after "Task marked done by agent" with grace-period, active-task, and merge-blocker safeguards
- Isolate executor run mutation context per task to prevent cross-task runId attribution leaks in scope-leak and completion logs
- Add reliability and executor regression tests covering limbo recovery, run-context isolation, and updated persistence behavior
Fusion-Task-Id: FN-4999
The roadmap-dashboard Vitest sub-project overrode setupFiles with only
its jsdom helper. Vitest replaces (does not merge) setupFiles in child
projects, so the central isolation guard at
packages/core/src/__test-utils__/vitest-setup.ts was silently bypassed
for the 94 roadmap-dashboard tests, leaving them able to touch the real
project .fusion / $HOME / child processes without the leak-detection
and AI-CLI block.
Prepend the central guard so it loads before the dashboard jsdom setup.
All 94 roadmap-dashboard tests still pass.
Adds a title-id drift detection and reconciliation system to prevent duplicate tasks when task titles change after initial creation. Core adds the `task-title-id-drift.ts` module with `markTitleIdStable` and `resolveTitleIdDrift` logic, wired through `db.ts`, `store.ts`, and `archive-db.ts`, with co
Fusion-Task-Id: FN-4898
Adds an "advisory" `gateMode` option for workflow steps: steps in advisory mode log findings but no longer block merge completion, while steps that must block can still be configured as blocking. The change covers the workflow step types and schema, executor gating logic, dashboard UI in WorkflowSte
Fusion-Task-Id: FN-4468