Commit Graph

1133 Commits

Author SHA1 Message Date
Fusion
fdb11d552e fix(FN-4249): complete Step 2 — rollback running agents on overlap requeue
Fusion-Task-Id: FN-4249
Fusion-Task-Lineage: e0052fae-38e1-4d66-8240-43d26f5790bb
2026-05-13 06:29:33 -07:00
Fusion
f9c5ff5412 test(FN-4249): complete Step 1 — reproduce overlap requeue mismatch
Fusion-Task-Id: FN-4249
Fusion-Task-Lineage: e0052fae-38e1-4d66-8240-43d26f5790bb
2026-05-13 06:29:33 -07:00
Fusion
ad45a236fa feat(FN-4108): persist scope override fields (+4 more)
Commits merged:
- test(FN-4073): finalize invariant regression coverage
- feat(FN-4073): complete Step 4 — document merge invariant
- feat(FN-4073): complete Step 3 — enforce squash file-scope invariant
- feat(FN-4073): complete Step 2 — add file-scope invariant helper
- feat(FN-4073): complete Step 1 — persist scope override fields

Files changed:
.changeset/FN-4073-file-scope-invariant.md         |   9 +
 AGENTS.md                                          |   6 +
 packages/core/src/__tests__/store-update.test.ts   |  18 ++
 packages/core/src/db.ts                            |   2 +
 packages/core/src/store.ts                         |  34 +-
 packages/core/src/types.ts                         |   8 +
 .../__tests__/merger-file-scope-invariant.test.ts  | 357 +++++++++++++++++++++
 .../engine/src/__tests__/merger-test-helpers.ts    |   5 +
 packages/engine/src/merger.ts                      | 155 ++++++++-
 9 files changed, 582 insertions(+), 12 deletions(-)

Fusion-Task-Id: FN-4108
2026-05-12 21:52:58 -07:00
Fusion
ac59d5c71d feat(FN-4244): add no-task heartbeat procedure override
Merged FN-4244: adds an override path for the no-task heartbeat procedure in the engine, allowing agents to execute a custom procedure when they have no active task. The fix commit corrects the initial implementation, with test coverage for procedure source selection and updated documentation in `do

Fusion-Task-Id: FN-4244

Fusion-Task-Lineage: 6bf1bfe4-de2c-4467-93dc-d90231a53eb2
2026-05-12 21:45:34 -07:00
Fusion
2822781aca feat(FN-4137): add review markdown toggle to document view (FN-4137)
This large merge delivers substantial improvements across the dashboard, engine, and CI infrastructure. Key themes include GitHub tracking feature parity (mobile layout, card icons, header alignment, title derivation, restart persistence, untitled issue handling), chat/room UX enhancements (draft au

Fusion-Task-Id: FN-4137
2026-05-12 20:51:08 -07:00
Fusion
7e057a65d2 feat(FN-4238): export merger errors from engine and polish workflow results
Exports merger error types from the engine package for use in the dashboard and CLI. Adds tests for the engine barrel exports and fixes workflow results tab styling to align the edit toggle with button styles.

Fusion-Task-Id: FN-4238
2026-05-12 20:39:01 -07:00
Fusion
8b037e4c7e feat(FN-4072): add diff volume gate to merger
Added a diff volume gate to the merger that blocks or warns on large diffs before merge completes. The feature includes a new `merger-diff-volume-gate` module wired into the merger, configurable via project settings, with tests covering all gate paths. Also updated docs and the changeset for the `@r

Fusion-Task-Id: FN-4072
2026-05-12 18:26:58 -07:00
Fusion
fbd441e31c feat(FN-4177): add heartbeat messaging support for chat rooms
The merge delivers room heartbeat messaging for agents, allowing heartbeat-triggered agents to send messages into chat rooms and subscribe to room activity. Core changes include new chat-store room APIs, engine heartbeat room message tools, and corresponding tests, with a small dashboard ChatView up

Fusion-Task-Id: FN-4177
2026-05-12 18:20:17 -07:00
Fusion
d899443a44 feat(FN-4145): clear task pause state when fn_task_done is received
The fix ensures paused tasks are unpaused when `fn_task_done` is received, preventing tasks from remaining stuck in paused state after completion. Test coverage was added for the paused-to-done handoff scenario in both the executor prompt and review verdicts test files. This is a patch release (`@ru

Fusion-Task-Id: FN-4145
2026-05-12 17:59:59 -07:00
Fusion
a136dd340c feat(FN-4091): fix stale blocker in WorkflowResultsTab
The branch delivers a fix for stale blockers in the WorkflowResultsTab component, with the primary logic change in the component file and comprehensive test coverage added in the companion test suite.

Fusion-Task-Id: FN-4091
2026-05-12 17:24:44 -07:00
Fusion
75fe39d051 feat(FN-4068): add branch conflict detection and recovery for stale worktre
Implements branch conflict detection and recovery across the Fusion engine, CLI, and dashboard — surfacing git worktree conflicts when tasks conflict with unrelated branch state, and providing a recovery workflow to resolve them. The executor and worktree pool now integrate typed branch conflict che

Fusion-Task-Id: FN-4068
2026-05-12 17:14:29 -07:00
Fusion
fdd0af3b49 feat(FN-4131): refactor mission execution loop: remove dead validationTaskI
Removed dead `validationTaskId` plumbing from the mission execution loop and added tests to pin the updated behavior, with documentation for the final delivery step.

Fusion-Task-Id: FN-4131

Fusion-Task-Lineage: 1b1f010a-f520-43a0-9c10-40618b5fbc13
2026-05-12 17:04:33 -07:00
Fusion
6bc3fa03c2 feat(FN-4105): drop bun install from test-shards CI jobs
Removes unused `bun install` steps from two CI workflow files (`ci.yml` and `pr-checks.yml`), cleaning up the test-shards job configuration.

Fusion-Task-Id: FN-4105
2026-05-12 17:04:33 -07:00
Fusion
a9e2b07949 feat(FN-4119): add stale heartbeat run reaper to prevent engine blockage
Implements a stale heartbeat reaper in the engine that detects and cleans up heartbeat runs exceeding their timeout, preventing blocked heartbeat cycles from stalling agent activity. Includes comprehensive tests for the reaper gates and documentation of the feature in agents.md.

Fusion-Task-Id: FN-4119
2026-05-12 17:04:33 -07:00
Fusion
be5e1fbd97 feat(FN-4069): add direct merge commit routing to merger
Adds direct merge commit routing to the merger, allowing non-squash merges to bypass the squash-audit path when configured. The feature includes new `mergeCommitStrategy` settings, updated dashboard UI, expanded merger lifecycle tests, and documentation.

Fusion-Task-Id: FN-4069
2026-05-12 17:04:33 -07:00
Fusion
72453bb639 feat(FN-4200): prevent failed tasks from blocking overlap dispatch in sched
The scheduler now excludes failed review tasks from blocking overlap dispatch, preventing stuck tasks from stalling downstream work. A CSS fix prevents the failed badge from incorrectly overriding the in-review status in the list view, with tests covering both the scheduler logic and the badge displ

Fusion-Task-Id: FN-4200
2026-05-12 17:04:33 -07:00
Fusion
5bbfc66c83 feat(FN-4104): wrap workflow result headers and warn on overlapping in-prog
Adds warning logic when overlapping in-progress step updates occur, and wraps workflow result table headers with proper text handling and styling in the dashboard UI.

Fusion-Task-Id: FN-4104
2026-05-12 17:04:33 -07:00
Fusion
056b1a9d6a feat(FN-4179): optimistically clear room composer on send
Implements optimistic room composer clear in the ChatView, providing instant UI feedback when switching rooms without waiting for server confirmation, with accompanying tests and documentation updates.

Fusion-Task-Id: FN-4179

Fusion-Task-Lineage: 0c3588fa-81ca-464b-b001-506c1756d0ea
2026-05-12 17:04:33 -07:00
Fusion
d5d125c23e feat(FN-4167): clear paused state in fn_task_done (FN-3964 follow-up)
Fixes a FN-3964 follow-up issue where paused state wasn't being cleared on task completion, adding a test to cover the fn_task_done path.

Fusion-Task-Id: FN-4167
2026-05-12 17:04:33 -07:00
Fusion
044b1cba2f feat(FN-4178): add room message notification delivery
This merge implements room message notifications across the system, adding a core room event type, wiring the notification dispatcher to room activity, and delivering notifications via ntfy and webhook providers with updated settings UI and API routes.

Fusion-Task-Id: FN-4178
2026-05-12 17:04:33 -07:00
Fusion
8d4835998c feat(FN-4180): compact room transcript context to reduce token usage
Adds room transcript context compaction (FN-4180) to the dashboard chat layer — widens the fetch window then compacts older messages into a summary window to reduce token overhead while keeping full context recent. Includes a new 127-line test suite covering the compaction logic, a small fix to reus

Fusion-Task-Id: FN-4180

Fusion-Task-Lineage: 9e7e3a32-f2da-4c86-871b-37891f747561
2026-05-12 17:04:33 -07:00
Fusion
2d250e6067 feat(FN-4135): add always-on web search with locked provider setting
Adds always-on web search capability to the research system, locking the web search provider in settings UI and updating the ResearchView to surface web search as a persistent toggle with agent tool integration, plus corresponding docs and test coverage.

Fusion-Task-Id: FN-4135
2026-05-12 17:04:32 -07:00
Fusion
b8317a4ce5 feat(FN-4097): add merger audit gate test coverage for combined audit findi
Adds comprehensive test coverage for the merger audit gate across two test files, extending lifecycle coverage to 183 lines and adding squash-audit coverage with 31 lines.

Fusion-Task-Id: FN-4097
2026-05-12 17:04:32 -07:00
Fusion
fe1ef21daa feat(FN-4157): remove composite checkout, add workflow-level checkout steps
Fixes overlap merge checkout logic by removing the composite checkout approach and replacing it with explicit workflow-specific checkout steps, with a new CI job to guard against regressions and a test hardening the temporary directory cleanup path.

Fusion-Task-Id: FN-4157
2026-05-12 17:03:10 -07:00
Fusion
f3d275a962 feat(FN-4146): append verification subtask to planning flow
FN-4146 adds workspace verification to the planning system, including a new verification subtask in the planning module and reconciling the corresponding route tests. The bulk of the work is in `planning.ts` and its test files, with a minor adjustment to the merger overlap guard test.

Fusion-Task-Id: FN-4146
2026-05-12 10:27:36 -07:00
Fusion
7e089e195a feat(FN-4132): sync task ownership on agent reassignment
Adds a task reassignment sync helper to the core store, wires it into the system, and ships regression tests; includes a patch changeset for `@runfusion/fusion`.

Fusion-Task-Id: FN-4132

Fusion-Task-Lineage: 80ec3c62-7c09-49dd-9e49-74b203e48bf4
2026-05-12 10:27:36 -07:00
Fusion
7a982a2a5c fix(FN-4127): harden ntfy notification delivery
- Fall back to ntfy JSON publish requests for unicode titles/messages while preserving auth and click metadata
- Truncate ntfy titles and UTF-8 message bodies to documented limits without splitting surrogate pairs
- Extend notifier and provider tests to cover unicode mailbox events, truncation, and end-to-end message notification delivery
- Document the ntfy encoding/truncation behavior and add a patch changeset for @runfusion/fusion

Fusion-Task-Id: FN-4127
2026-05-12 09:41:24 -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
37063a08ef feat(FN-4106): preserve rerun summaries in executor task-done output
Preserves task rerun summaries so they persist across retries rather than being overwritten, with tests validating the persistence behavior and a patch changeset for `@runfusion/fusion`.

Fusion-Task-Id: FN-4106
2026-05-12 08:28:44 -07:00
Fusion
5804b8651c feat(FN-4084): recover tasks blocked by stalled merger self-healing
Merge starvation recovery was hardened across the engine: self-healing now detects and clears blocked-in-review tasks that starve the merger, the project engine gains defensive recovery hooks for stalled merges, and tests cover the new recovery paths.

Fusion-Task-Id: FN-4084
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
bbc9111ff6 feat(FN-4093): refactor PR checks workflow with new setup-node-pnpm composi
FN-4093 introduced a reusable `setup-node-pnpm` composite GitHub Action and refactored the PR checks workflow to use it, reducing the workflow file by over 60 lines while adding a contract test for the action. A small follow-up stabilizes workspace quality gates by adding an export in the core store

Fusion-Task-Id: FN-4093
2026-05-12 07:47:11 -07:00
Fusion
2be89d15fd feat(FN-4095): restore green verification gates and add QuickChatFAB regres
Restores green verification gates for executor review verdicts (FN-4095) with a targeted core store change, and adds a regression test ensuring the QuickChatFAB scrolls to the bottom when opened.

Fusion-Task-Id: FN-4095
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
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
1a1f60c748 feat(FN-4070): add workflow revision forking for task retries
Implements workflow revision forking with a new per-project setting, allowing follow-up tasks to inherit a fork of the calling task's workflow rather than the original revision. The feature adds classification logic, fork execution, and the settings UI, with docs and tests covering the full flow.

Fusion-Task-Id: FN-4070
2026-05-12 07:47:10 -07:00
Fusion
9f47528592 feat(FN-4056): restore bound reports lookup in heartbeat executor
Restores the bound reports lookup in the heartbeat executor (FN-4056), updating the relevant logic in `agent-heartbeat.ts` with a corresponding test and documentation clarification in `agents.md`.

Fusion-Task-Id: FN-4056
2026-05-12 07:47:10 -07:00
Fusion
f3a39753b3 feat(FN-4082): compact reviewer prompts and retry on context limits
Adds reviewer prompt compaction and automatic retry logic when the reviewer hits context-window limits, with matching test coverage and a changeset for `@runfusion/fusion`.

Fusion-Task-Id: FN-4082
2026-05-12 07:47:10 -07:00
Fusion
e3904786ac feat(FN-4074): add priority option to task creation in engine and extension
Adds task priority support to the task creation flow, spanning the engine runtime (`agent-tools.ts`, `triage.ts`), the CLI extension interface (`extension.ts`), and corresponding documentation and tests. The changeset bumps `@runfusion/fusion` as a minor version.

Fusion-Task-Id: FN-4074

Fusion-Task-Lineage: 726c0ae6-90fb-4c13-ace1-215a2becb2a9
2026-05-12 07:47:10 -07:00
Fusion
7b5ec3d063 feat(FN-4045): surface and handle delegate task collision errors
Added delegate collision detection and error surfacing across the task creation and delegation pipeline. The core store now throws a typed `DelegateCollisionError` when `createTask` encounters a duplicate task ID, the engine's `delegate_task` tool propagates these errors with context, and the CLI ex

Fusion-Task-Id: FN-4045
2026-05-12 07:47:10 -07:00
Fusion
ee46b5ad56 feat(FN-4031): recover stale review sessions and unblock dependent tasks on
Adds defensive recovery logic for stale review sessions: the executor now guards against resuming in an invalid worktree context, the self-healing manager recovers stale session paths and unblocks dependent tasks, and the restart recovery coordinator is updated to classify these cases correctly. Inc

Fusion-Task-Id: FN-4031
2026-05-12 07:47:10 -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
a8b904c993 feat(FN-4039): recover worktree db scratch bootstrap on hydration failure
Codifies the worktree database open-path hydration failure with a recovery bootstrap mechanism, documented the behavior in storage docs, and added test coverage for the executor hydration degradation path — all gated behind a patch changeset for `@runfusion/fusion`.

Fusion-Task-Id: FN-4039
2026-05-11 21:48:26 -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
3ae91c5856 feat(FN-4019): prevent merge-confirmed finalization loops via self-healing
Added self-healing logic to prevent merge-confirmed tasks from re-entering the executor, with test coverage for both merge error recovery and self-healing behavior, plus corresponding architecture and task-management docs.

Fusion-Task-Id: FN-4019
2026-05-11 15:29:34 -07:00
Fusion
b0792daa0b feat(FN-4033): handle stale timers in heartbeat scheduler
Adds stale timer repair handling to the heartbeat scheduler with test coverage, and updates the agents documentation accordingly.

Fusion-Task-Id: FN-4033
2026-05-11 14:47:21 -07:00