Commit Graph

331 Commits

Author SHA1 Message Date
gsxdsm
6124535759 fix(FN-4122): use unique tmp filename for task.json atomic writes
Two TaskStore instances writing to the same task concurrently raced on a
shared task.json.tmp filename: one writer's rename consumed the tmp file,
the other ENOENTed. withTaskLock only serializes within a single store
instance, so cross-process writers (engine + dashboard server) were
unprotected.

Each write now uses task.json.<pid>.<uuid>.tmp and cleans up its own tmp
on rename failure. Adds a regression test that drives 40 concurrent
same-task updates across 4 TaskStore instances.

Fixes FN-4122, FN-4123, FN-4148.
2026-05-12 09:41:43 -07:00
Fusion
429bdc213b feat(FN-4071): add overlap guard to prevent concurrent merge conflicts
Implements an overlap guard for the merger that prevents concurrent merges of tasks with conflicting file changes, wired through a new overlap-aware fallback strategy and exposed via a dashboard setting. The feature includes a 406-line test suite for the overlap guard, a 203-line lifecycle integrati

Fusion-Task-Id: FN-4071
2026-05-12 09:06:54 -07:00
Fusion
5bdf92b26e feat(FN-4094): cache schema compatibility checks with fingerprint fast path
Adds schema fingerprinting to cache schema compatibility checks, enabling a fast path that skips unnecessary re-initialization work on startup, with performance tests covering the new code paths and updated storage documentation.

Fusion-Task-Id: FN-4094
2026-05-12 07:47:11 -07:00
Fusion
7ca8d5ab50 feat(FN-4078): add ntfy access token support to notifications
Adds ntfy access token support to Fusion's notification system, wiring the token through the core settings schema, dashboard UI (SettingsModal), engine notifier, and notification pipeline, with corresponding tests across core, dashboard, and engine packages; also updates settings and storage documen

Fusion-Task-Id: FN-4078
2026-05-12 07:47:11 -07:00
Fusion
bec0b34c45 feat(FN-4044): harden task ID collision guards and allocation safety
Hardens task ID collision guards across distributed instances by adding `isAllocated` checks in `store.ts` and rewriting `distributed-task-id.ts` with deterministic collision-safe allocation logic, backed by a new `store-create-collision.test.ts` suite reproducing the race path. Updates architecture

Fusion-Task-Id: FN-4044
2026-05-12 07:47:11 -07:00
Fusion
fc863f6e96 feat(FN-4067): add squash audit gate to merger with integration tests
Adds a squash-merge audit gate that verifies duplicate-cherry-pick commits and file-overlap losses after any squash merge into main, restoring the post-squash audit step to the merge workflow with test coverage for both the audit logic and the broader merger lifecycle.

Fusion-Task-Id: FN-4067

Fusion-Task-Lineage: 593aa917-5640-495b-b1ae-80c3eaa09d01
2026-05-12 07:47:11 -07:00
Fusion
50c8ab35d7 feat(FN-4089): share in-memory DB across chat-store tests with per-test tru
Refactors the chat-store tests to share a single in-memory database across all test cases with per-test truncation, reducing redundant setup overhead.

Fusion-Task-Id: FN-4089
2026-05-12 07:47:10 -07:00
Fusion
06feb61686 feat(FN-4083): add WAL enforcement, immediate write transactions, and concu
Hardened SQLite concurrent-write safety in `@fusion/core` by auditing WAL enforcement and adding immediate write transactions to prevent stale reads under load, with executor semaphore limit tests in `@fusion/engine` validating the concurrency bounds; added a new `store-concurrent-writes.test.ts` in

Fusion-Task-Id: FN-4083

Fusion-Task-Lineage: adabe51a-a9c4-481a-850d-985c373df51a
2026-05-12 07:47:10 -07:00
Fusion
b1a0464d68 feat(FN-4087): replace sleep() with deterministic waits in tests
The merge replaces all real `setTimeout`/`sleep` polling with deterministic event-based waits across the executor pause integration tests, restart integration tests, dashboard tests, and chat-store tests, making the suite faster and more reliable.

Fusion-Task-Id: FN-4087
2026-05-12 07:47:10 -07:00
Fusion
4d47cb4bd6 feat(FN-4042): add SQLite lock contention recovery in core database layer
Adds SQLite lock contention recovery for WAL-mode databases, covering both the core database layer (db.ts, central-db.ts, store.ts) and the run-audit subsystem, with comprehensive unit and integration test coverage and updated storage documentation.

Fusion-Task-Id: FN-4042
2026-05-12 07:47:10 -07:00
Fusion
f0d4709c2e feat(FN-4077): fix mobile switcher trigger sizing in ChatView
Fixes the mobile switcher trigger sizing in ChatView by updating CSS dimensions and adjusting the component's conditional rendering logic, with corresponding test coverage added.

Fusion-Task-Id: FN-4077

Fusion-Task-Lineage: 966eafb9-35fd-4ac6-ab4a-42c0e96a2584
2026-05-12 07:47:10 -07:00
Fusion
588f2acb0e feat(FN-4048): add FusionDB vacuum helper
Added a `FusionDB.vacuum()` helper to compact the SQLite database, with accompanying regression tests covering VACUUM behavior and error handling in `packages/core/src/db.ts` and its test file.

Fusion-Task-Id: FN-4048
2026-05-12 07:47:10 -07:00
Fusion
c1035d8424 feat(FN-4029): expose database health in API and store contracts
Adds database health endpoints to the API layer (FN-4029), exposing a new store health accessor through `api-node.ts` and `api/legacy.ts`, with aligned auth middleware integration tests and updated architecture documentation.

Fusion-Task-Id: FN-4029
2026-05-12 07:47:10 -07:00
Fusion
4404c6103e feat(FN-4053): unify task ID allocation with store-owned distributed alloca
Unifies task ID allocation under a single store-owned distributed allocator, removing redundant ID-generation logic from dashboard route handlers and simplifying the overall flow; Step 1 merges the allocation authority into the store, Step 3 removes the now-unnecessary mixed-path routing, and tests

Fusion-Task-Id: FN-4053
2026-05-11 21:48:26 -07:00
Fusion
840cd1d1e0 feat(FN-4062): add global thinking log setting to persist agent reasoning a
Adds a global `thinkingLogEnabled` setting that gates AI thinking log persistence across the engine (executor, reviewer, merger, triage, step-session) and exposes the control in the dashboard Settings modal, with tests verifying settings parity and modal behavior.

Fusion-Task-Id: FN-4062
2026-05-11 21:48:26 -07:00
Fusion
9bdc5a7ead feat(FN-4063): enforce planning and triage memory write contracts
Enforces memory write contracts for triage and planning agents, adding tests in both `project-memory.test.ts` and `triage.test.ts` to guard the contract boundaries established in `project-memory.ts`.

Fusion-Task-Id: FN-4063

Fusion-Task-Lineage: 5f86295b-d583-4757-9aa5-30a64b2cc2d6
2026-05-11 21:48:26 -07:00
Fusion
e4ec922212 feat(FN-3935): align engineer role routing with explicit assignment and del
Centralized routing policy helpers in core and aligned both direct assignment and delegation to route engineer-role agents consistently, ensuring assigned tasks respect explicit engineer routing the same way delegated tasks do. Added comprehensive test coverage across core, CLI, dashboard, and engin

Fusion-Task-Id: FN-3935

Fusion-Task-Lineage: 069f4d54-f7a8-4bd3-a2c3-4de830de042f
2026-05-11 21:48:26 -07:00
Fusion
5c3a1df977 feat(FN-4027): memoize startup slim list reads to avoid redundant fresh fet
Added memoization for startup slim task list reads (`store.ts`), with dashboard server routing startup reads through the memo window and tests covering the store watcher consumers in scheduler and worktree-pool, plus performance documentation.

Fusion-Task-Id: FN-4027
2026-05-11 21:48:26 -07:00
Fusion
c501e00fdf feat(FN-4035): dedupe integrity checks per database path
- Deduplicate concurrent integrity-check requests by sharing one in-flight check per database path
- Refactor core DB integrity-check flow to prevent redundant work while preserving safety behavior
- Add core DB tests covering deduped execution and expected integrity-check outcomes
- Document integrity-check dedup behavior in architecture docs
- Add a changeset for @runfusion/fusion patch release
2026-05-11 17:59:26 -07:00
Fusion
1d6c85e900 feat(FN-4044): restore github tracking patch persistence
Restored GitHub tracking patch persistence in the core store with matching test coverage in the task detail and routes tasks ops suites, plus documentation for the repaired flow.

Fusion-Task-Id: FN-4044
2026-05-11 17:55:09 -07:00
Fusion
55bcf045eb feat(FN-4041): harden empty rawResponse handling in memory-insights
Hardened empty `rawResponse` handling in the memory insights module by adding defensive checks to prevent errors when the response is empty, accompanied by tests to cover those edge cases (FN-4041 Step 1).

Fusion-Task-Id: FN-4041
2026-05-11 17:46:42 -07:00
Fusion
59fbd7c305 feat(FN-4023): preserve triage column when SSE updates contain only priorit
Fix FN-4023: preserve the triage column filter when SSE updates only carry priority changes, preventing unintended column resets during selective priority refreshes. Added regression tests across the task store, useTasks hook, and API routes to cover column-stability scenarios.

Fusion-Task-Id: FN-4023
2026-05-11 14:56:46 -07:00
Fusion
e6e596ebb7 feat(FN-4025): defer database integrity check and expose via health endpoin
Exposes database health status via the API by deferring integrity checks asynchronously, with docs and tests covering the core DB layer, store integration, and dashboard server health endpoint.

Fusion-Task-Id: FN-4025
2026-05-11 14:15:17 -07:00
Fusion
5c005023c4 feat(FN-4030): remove wall-clock sleeps from routine store tests
Refactored routine store tests to eliminate wall-clock sleep calls, replacing them with deterministic timer-based alternatives for faster and more reliable test execution.

Fusion-Task-Id: FN-4030
2026-05-11 14:02:34 -07:00
Fusion
cbd37d4e08 refactor(FN-4021): split core store tests into domain-focused suites
- Replace monolithic store.test.ts with focused suites for create, update, upsert, movement, scheduling, comments, activity, and resilience behavior
- Add parsing and snapshot-specific test files to isolate coverage for conversion and serialization paths
- Keep shared store test harness in store-test-helpers.ts and migrate existing coverage to use the split suite structure
- Remove legacy monolith test file after preserving and redistributing coverage across new suite files

Fusion-Task-Id: FN-4021
2026-05-11 13:25:06 -07:00
Fusion
98aa09f822 feat(FN-4018): isolate split merger temp workspaces with settings persisten
Merged FN-4014 to fix dual-scope GitHub tracking settings persistence and validation (mission vs task scope), scoped repo saves to the relevant section, and documented the dual defaults. Also landed FN-4018 to isolate split merger temp workspaces and add regression checks for split-suite test isolat

Fusion-Task-Id: FN-4018
2026-05-11 11:41:19 -07:00
Fusion
ee4f7a580e feat(FN-3891): add verificationFixRetries merge control setting
Added a new `verificationFixRetries` merge control to the Settings modal, documented it in the settings reference, and added corresponding tests; a changeset was also included for the `@runfusion/fusion` package.

Fusion-Task-Id: FN-3891
2026-05-11 08:20:42 -07:00
Fusion
3a67c1b065 feat(FN-3637): establish canonical roadmap plugin ID and compatibility rout
Merged commits stabilize the Fusion roadmap plugin's identity and routing surface, establishing a canonical plugin ID and compatibility routes so the roadmap plugin integrates cleanly with the dashboard's plugin system. Added new roadmap-routes and roadmap-suggestions modules in the dashboard packag

Fusion-Task-Id: FN-3637
2026-05-11 06:47:43 -07:00
Fusion
3f85d5a5f4 feat(FN-3990): add task lineage identity and association storage
Adds task lineage storage infrastructure (FN-3990 Step 2), introducing a dedicated `task-lineage.ts` module and related types to track task identity and association relationships, with corresponding database schema and store support plus tests and documentation for the lineage reconciliation process

Fusion-Task-Id: FN-3990
2026-05-11 06:47:43 -07:00
Fusion
fea6438e36 feat(FN-3986): remove PR lint pre-build and bun setup from pr-checks workfl
Removes the PR lint pre-build step from the GitHub Actions workflow and adds a new test suite (`ci-workflow.test.ts`) covering CI workflow behavior, with a small documentation update.

Fusion-Task-Id: FN-3986
2026-05-11 06:47:43 -07:00
Fusion
00c46a056b feat(FN-3982): split monolithic store.test.ts into archive-search, run-muta
Split the monolithic `store.test.ts` suite into three focused test files (`store-workflow-steps.test.ts`, `store-archive-search.test.ts`, `store-run-mutation-context.test.ts`) and updated the test audit report with post-split timing benchmarks.

Fusion-Task-Id: FN-3982
2026-05-11 06:47:42 -07:00
Fusion
31776c76ad feat(FN-3978): split monolithic TaskStore test suite into focused domain fi
Split the monolithic `store.test.ts` suite into ten focused test modules by domain (attachments, migration, persistence, plugin routing, priority, prompt generation, settings, token usage, watcher) plus a shared helpers file, reducing the main suite by ~3000 lines while adding documentation on the s

Fusion-Task-Id: FN-3978
2026-05-11 06:47:42 -07:00
Fusion
e2fbabfd1d feat(FN-3975): optimize slow test setup in store-list-modified tests
Optimizes slow test setup in the task-store list-modification test suite, reducing test initialization overhead through refactored fixture creation.

Fusion-Task-Id: FN-3975
2026-05-10 23:36:10 -07:00
Fusion
7fd3ccc68b feat(FN-3770): add cli-printing-press bundled plugin changeset
Adds a changeset for the CLI printing-press bundled plugin (FN-3770).

Fusion-Task-Id: FN-3770
2026-05-10 23:36:10 -07:00
Fusion
a3d67e088f feat(FN-3971): add aggregate mailbox view for all agents
Adds an "All Agents" unified mailbox view to the dashboard, including a new aggregate API endpoint in `@fusion/core`, updated MailboxView UI with selection controls, CSS styling, and comprehensive tests across core and dashboard packages, with documentation updates.

Fusion-Task-Id: FN-3971
2026-05-10 23:36:10 -07:00
Fusion
4d2f02906d feat(FN-3954): blocker staleness fanout and escalation for tasks
Merges FN-3954: adds a blocker fanout system where task staleness automatically escalates to upstream blocking tasks, with a new `blocker-fanout` core module, dashboard hooks wiring that surfaces escalation status on the board and executor status bar, and a new settings toggle to disable escalation.

Fusion-Task-Id: FN-3954
2026-05-10 23:36:10 -07:00
Fusion
a04b3205b4 feat(FN-3767): add task runtime env injection into executor commands via pl
Adds executor runtime environment support to the plugin system, enabling plugins to contribute environment variables that get injected into executor commands. The implementation includes new plugin types (`ExecutorRuntimeEnvPlugin`), aggregation in the plugin runner, thread-through into executor com

Fusion-Task-Id: FN-3767
2026-05-10 23:36:09 -07:00
Fusion
a0c7c3315a feat(FN-3957): add delegate_task override flag to bypass executor role poli
Adds a `delegate_override` flag to the `delegate_task` tool that allows executor-role tasks to be assigned to non-executor agents. The override is persisted as metadata in the extension and honored by the heartbeat inbox guard, with test coverage across engine, core, and CLI packages plus updated do

Fusion-Task-Id: FN-3957
2026-05-10 23:36:09 -07:00
Fusion
a5a794d12e feat(FN-3960): add mesh replay outage contracts and runtime hooks
- Add core outage schema and mesh replay contract types, with CentralCore/CentralDB support for queue and snapshot persistence
- Expose runtime replay hooks in engine health monitoring and peer exchange paths to drive outage recovery flows
- Expand protocol and architecture docs for shared mesh replay behavior and finalized contract expectations
- Add regression tests across core and engine for queue sequencing, snapshot contracts, and replay integration

Fusion-Task-Id: FN-3960
2026-05-10 19:13:05 -07:00
Fusion
7d67dc3597 feat(FN-3956): execute provisioning on approval decisions
The merge completes Step 1 of agent provisioning approval followthrough, executing provisioning actions when approval decisions are made, with supporting documentation in AGENTS.md and docs/agents.md. Test coverage spans provisioning policy, approval routes, gating classifications, extension integra

Fusion-Task-Id: FN-3956
2026-05-10 19:13:05 -07:00
Fusion
32e76c8cc0 feat(FN-3454): add typed mesh snapshot API consumed by nodes view
Implements a typed mesh snapshot API in `@fusion/core` (`CentralCore.getMeshSnapshot`, `MeshSnapshot` type) and wires it through the dashboard nodes view via a new `useMeshState` hook, substantially simplifying `MeshTopology.tsx` by replacing internal state management with the centralized snapshot.

Fusion-Task-Id: FN-3454
2026-05-10 16:53:36 -07:00
Fusion
25da93ce0c feat(FN-3947): move github tracking section to bottom of task form
Moved the GitHub tracking section to the bottom of the task form and locked its field order, with supporting tests covering the new placement in both NewTaskModal and TaskForm components, plus documentation updates for the new form layout.

Fusion-Task-Id: FN-3947
2026-05-10 15:33:25 -07:00
Fusion
bad0e1844e feat(FN-3926): add chat room integration tests across core and dashboard
This merge adds comprehensive test coverage for chat room functionality across the core store, ChatView component, HTTP/SSE routes, and integration layer (845 lines added across four test files), guided by a test plan for FN-3812.

Fusion-Task-Id: FN-3926
2026-05-10 15:33:25 -07:00
Fusion
ab85b99bef feat(FN-3933): coordinate temp dir cleanup to harden testing suite isolatio
Documents and tests a temp directory isolation fix in the core test suite, coordinating cleanup to prevent cross-test contamination.

Fusion-Task-Id: FN-3933
2026-05-10 15:33:25 -07:00
Fusion
d0a2d90182 feat(FN-3785): add standalone HTML rendering and export routes for reports
Adds a complete HTML rendering and export pipeline to the fusion-plugin-reports plugin, including a standalone HTML renderer with template and stylesheet support, new export routes (`/api/reports/:id/export/html`) that persist rendered HTML to the store, and plugin-type support for non-JSON route re

Fusion-Task-Id: FN-3785
2026-05-10 15:33:24 -07:00
Fusion
f6f7d3f031 feat(FN-3927): persist and restore durable chat recovery state
- Persist in-flight chat generation snapshots in core chat store types and DB plumbing
- Restore durable recovery state through dashboard chat manager and chat hooks on reload
- Add coverage for chat store persistence and chat/useQuickChat recovery behavior
- Document durable chat recovery architecture and dashboard behavior

Fusion-Task-Id: FN-3927
2026-05-10 15:33:24 -07:00
Fusion
981c976efe feat(FN-3776): merge fusion/fn-3776
Commits merged:
- merge fusion/fn-3776

Files changed:
packages/core/src/__tests__/db.test.ts | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-3776
2026-05-10 15:33:24 -07:00
Berlin Luk
572e7a8f69 fix: decouple stuck detector timeout 2026-05-11 00:11:23 +08:00
Fusion
b94fd232a6 feat(FN-3812): add rooms test scaffolds and coverage across core and dashbo
This branch establishes test scaffolding for rooms functionality across core and dashboard, adding test plans, room-specific test files for ChatView, AgentMentionPopup, QuickChatFAB, and core chat routes/stores, while also updating AgentMentionPopup with enhanced room-aware behavior and QuickChatFAB

Fusion-Task-Id: FN-3812
2026-05-10 07:59:40 -07:00
Fusion
42692b50de feat(FN-3876): add GitHub tracking test coverage across settings, issues, s
Adds comprehensive test coverage for GitHub tracking across four areas: settings inheritance, issue creation, status sync transitions, and unlink sync regression — spanning 280 lines of new tests across four test files with minimal store.ts adjustment.

Fusion-Task-Id: FN-3876
2026-05-10 06:06:26 -07:00