MissionManager.cache and MailboxModal.cache tests parsed the raw
localStorage entry as the payload, but writeCache wraps values in
{ savedAt, data }. Pull .data out before asserting on length or
nested fields. Fixes 3 failing tests.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
swrCache.writeCache wraps values in a { savedAt, data } envelope, but
useChatRooms/useEvals/useInsights/useResearch tests still parsed
localStorage entries as bare arrays. Pull the .data field out before
indexing so the cache assertions hit the actual payload. Fixes 6
failing tests across the four hook test files.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
server.ts createServer now invokes engine.getSelfHealingManager() to
wire the self-healing branch-rebind hook. The headless engine fake in
remote-access-headless.test.ts hadn't been updated. Add a vi.fn() stub
so the mock satisfies the engine surface contract.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
createDatabase(":memory:") fails the absolute-path guard added to the
Database constructor. Use a real tmp dir with inMemory: true, and call
db.init() to materialize project_insight_runs before InsightStore is
constructed. Fixes 5 failing tests.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
When fetchMissions returns a non-array (envelope shape, error path, or
mocked detail object) setMissions(data) leaks the bad shape into render,
where missions.filter() throws "is not a function" and crashes the
entire MissionManager test file. Coerce to [] before storing, matching
the existing defenses on the useState init and cache-hydration paths.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
SettingsModalNodeRouting and settings-mobile both mock ../../api but
omit fetchProjects, which the SettingsModal now calls during mount.
Add a stub returning an empty list. Drops SettingsModalNodeRouting
failures from 14 → 0 and settings-mobile from 9 → 1 (residual failure
is unrelated and tracked separately).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
proxy-routes and routes-agent-skills tests mock @fusion/core but omit
the deterministicGuardLocks Map that register-task-workflow-routes
imports at module-load time. Add the export so the mock satisfies the
shape consumers expect. Fixes 24 failing tests across the two files.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
When multiple TaskStore instances watch the same SQLite DB (dashboard +
engine runtime + per-project stores in one dashboard process), every
column move was recorded once per polling instance — inflating
task:moved rows 3x and amplifying failure noise (146k+ moves and 781
task:failed events in 24h against ~165 real done tasks).
Set suppressActivityLogForPollingEmit while checkForChanges fires
re-emit events, and skip the activity-log listeners when it's set. The
originating instance's in-process emit path remains the sole writer.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Completes FN-5153 by delivering the soft-delete verification gate with a new end-to-end test suite covering the full soft-delete lifecycle and a documentation matrix summarizing the gate behavior. Updates the dashboard test file and adds a brief entry to AGENTS.md to surface the new feature.
Fusion-Task-Id: FN-5153
- Add diagnostics.md and FN-4886/FN-5048 entries to docs/README.md index
- Fix test-project.test.ts spy target (updateSettings → init) to match fixture flow
- Remove unused DEFAULT_PROJECT_SETTINGS import and skip empty settings patch
- Add explanatory comments to empty catch blocks in secrets-env-writer
- Refine near-duplicate timestamp guard in triage for cleaner NaN handling
Stabilizes mobile keyboard viewport metrics in the `useMobileKeyboard` hook, with tests covering the hook and `ChatView` integration; a minor dashboard command adjustment is included.
Fusion-Task-Id: FN-5155
Awaiting engineManager.startAll() during dashboard startup blocked the
TUI on the slowest project's git/state init. Engine startup now runs
fire-and-forget; the reconciliation loop and the server's on-access
fast path cover any engine the user reaches before it's up.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>