Commit Graph

1906 Commits

Author SHA1 Message Date
gsxdsm
3b9ff42073 FN-5901: reap stale mission validator runs
Add self-healing recovery for stale mission validator runs left behind after execution ownership disappears.

- add mission-store support to find and reap stale running validator runs, preserving terminal error status and resetting eligible features to needs_fix
- teach the mission execution loop and self-healing maintenance sweep to skip live validations, reap abandoned runs, record audit events, and avoid double-completing runs
- extend regression coverage, mission docs, architecture notes, and add a published-package changeset for the new recovery behavior

Files changed:
 .changeset/fn-5901-validator-run-reaper.md         |   7 +
 AGENTS.md                                          |   1 +
 docs/architecture.md                               |   2 +
 docs/missions.md                                   |  26 ++-
 packages/core/src/__tests__/mission-store.test.ts  |  99 +++++++++
 packages/core/src/mission-store.ts                 |  91 ++++++++
 packages/engine/src/__tests__/mission-execution-loop.test.ts   | 232 +++++++++++++++++++++
 packages/engine/src/__tests__/reliability-interactions/mission-validator-run-reaper.test.ts           | 181 ++++++++++++++++
 packages/engine/src/mission-execution-loop.ts      | 102 +++++++--
 packages/engine/src/runtimes/in-process-runtime.ts |   8 +-
 packages/engine/src/self-healing.ts                |  22 ++
 11 files changed, 746 insertions(+), 25 deletions(-)

Fusion-Task-Id: FN-5901

Fusion-Task-Lineage: 87eb2f3f-fc31-4e0a-b0fc-b771f6dc48a3
2026-06-02 15:33:31 -07:00
gsxdsm
93e8bd9940 FN-5899: add mission-goal linking commands and tools
Add mission↔goal linkage support across the API, CLI, and pi-extension surfaces.

- add mission goal list/link/unlink REST endpoints and dashboard route coverage
- add `fn mission goals`, `fn mission link-goal`, and `fn mission unlink-goal` CLI commands with tests
- add `fn_mission_list_goals`, `fn_mission_link_goal`, and `fn_mission_unlink_goal` extension tools plus skill/docs updates
- add a changeset for the published CLI package release

Files changed:
 .changeset/FN-5899-mission-goal-tooling.md         |   5 +
 docs/cli-reference.md                              |  11 +-
 docs/missions.md                                   |  27 ++++
 packages/cli/skill/fusion/SKILL.md                 |   2 +-
 packages/cli/skill/fusion/references/extension-tools.md |  26 ++++
 packages/cli/skill/fusion/references/fusion-capabilities.md |   3 +
 packages/cli/src/__tests__/bin.test.ts             |  21 +++
 packages/cli/src/__tests__/extension-mission-goal-tools.test.ts | 140 +++++++++++++++++
 packages/cli/src/bin.ts                            |  32 +++-
 packages/cli/src/commands/__tests__/mission.test.ts     |  99 +++++++++++-
 packages/cli/src/commands/mission.ts               | 102 +++++++++++++-
 packages/cli/src/extension.ts                      | 170 +++++++++++++++++++++
 packages/dashboard/src/__tests__/mission-goal-links-routes.test.ts | 151 ++++++++++++++++++
 packages/dashboard/src/mission-routes.ts           | 153 ++++++++++++++++++-
 14 files changed, 930 insertions(+), 12 deletions(-)

Fusion-Task-Id: FN-5899

Fusion-Task-Lineage: c63b0f4b-c77e-4229-ade4-537a4dda0f5f
2026-06-02 14:47:51 -07:00
gsxdsm
30a09e3422 FN-5896: persist mission-goal linkage in schema
Persist mission↔goal relationships through the core mission schema and store APIs.

- add the mission_goals join table, schema migration coverage, and schema version bump to 101
- add MissionStore goal link/unlink/list helpers plus a MissionGoalLink type and emitted linkage events
- add regression tests for persistence, idempotency, ordering, and cascade behavior, and document the new linkage model with a published changeset

Files changed:
 .changeset/fn-5896-mission-goal-linkage.md         |   5 +
 docs/missions.md                                   |  19 +++
 docs/storage.md                                    |   1 +
 packages/core/src/__tests__/db-migrate.test.ts     |  49 ++++++-
 packages/core/src/__tests__/db.test.ts             |  34 ++---
 packages/core/src/__tests__/goals-schema.test.ts   |   4 +-
 packages/core/src/__tests__/insight-store.test.ts  |  10 +-
 .../src/__tests__/merge-request-record.test.ts     |   2 +-
 .../core/src/__tests__/mission-goals-link.test.ts  | 142 +++++++++++++++++++++
 packages/core/src/__tests__/mission-store.test.ts  |   4 +-
 packages/core/src/__tests__/run-audit.test.ts      |   2 +-
 packages/core/src/__tests__/secrets-schema.test.ts |   6 +-
 .../core/src/__tests__/store-merge-queue.test.ts   |   2 +-
 packages/core/src/__tests__/task-documents.test.ts |   2 +-
 packages/core/src/db.ts                            |  31 ++++-
 packages/core/src/mission-store.ts                 | 111 ++++++++++++++++
 packages/core/src/mission-types.ts                 |   6 +
 .../src/store/__tests__/roadmap-store.test.ts      |   2 +-
 18 files changed, 391 insertions(+), 41 deletions(-)

Fusion-Task-Id: FN-5896

Fusion-Task-Lineage: a4c7c495-b20a-454b-9605-782671cdd8c8
2026-06-02 14:41:41 -07:00
gsxdsm
dab1569ac3 FN-5892: dedupe planning sessions and persist history deletion
Prevent duplicate planning-history rows and keep deletions visible only after the backend confirms persistence.

- dedupe Planning Mode history by session id across initial loads, live updates, archive toggles, and draft creation
- make deleteAiSession surface backend/content-type errors instead of silently succeeding on failed deletes
- keep failed history deletions visible, refresh the list, and show an error toast when persistence fails
- add dashboard tests covering session deduplication, delete API failures, and persistence-aware Planning Mode deletion behavior
- document the history dedupe/delete semantics and add a patch changeset for @runfusion/fusion

Files changed:
 .changeset/fn-5892-planning-history-fix.md         |   5 +
 docs/dashboard-guide.md                            |   2 +-
 packages/dashboard/app/api/__tests__/deleteAiSession.test.ts      |  54 +++++
 packages/dashboard/app/api/legacy.ts               |  41 +++-
 packages/dashboard/app/components/PlanningModeModal.tsx |  70 ++++---
 packages/dashboard/app/components/__tests__/PlanningModeModal.autosize.test.tsx  |  11 +
 packages/dashboard/app/components/__tests__/PlanningModeModal.dedupeSessionsById.test.ts   |  44 ++++
 packages/dashboard/app/components/__tests__/PlanningModeModal.initial.test.tsx   |  11 +
 packages/dashboard/app/components/__tests__/PlanningModeModal.planning-flow.test.tsx       | 226 ++++++++++++++++++++-
 packages/dashboard/app/components/__tests__/PlanningModeModal.test-helpers.ts    |   1 +
 10 files changed, 439 insertions(+), 26 deletions(-)

Fusion-Task-Id: FN-5892

Fusion-Task-Lineage: 7453bc34-6d57-4d67-ac92-8fb50084fbee
2026-06-02 12:42:04 -07:00
gsxdsm
d9e1cdbbd7 FN-5890: include task description in ntfy task-created notifications
Ensure agent-created ntfy notifications fall back to the task description when the title is still empty.

- pass task descriptions through task-created notification payloads
- cover empty-title task creation in notification service tests
- verify ntfy task-created messages render the id+description fallback
- add a patch changeset for the published CLI package

Files changed:
 .changeset/fn-5890-task-created-title.md                 |  5 +++++
 .../engine/src/__tests__/notification-service.test.ts    | 12 +++++++++++-
 packages/engine/src/__tests__/ntfy-provider.test.ts      | 16 ++++++++++++++++
 packages/engine/src/notification/notification-service.ts |  1 +
 4 files changed, 33 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-5890

Fusion-Task-Lineage: 4a67a4d0-c3a8-4923-a506-7a67a8836127
2026-06-02 10:29:34 -07:00
gsxdsm
a66b128089 FN-5883: restore planning-mode single-task history
Keep completed planning sessions restorable after single-task creation.

- preserve completed planning-session rows after create-task by releasing only in-memory runtime state
- keep completed sessions in the Planning Mode history UI and add coverage for history restoration flows
- document the restored Planning Mode history behavior and add a patch changeset for @runfusion/fusion

Files changed:
 .changeset/fn-5883-planning-restore.md             |   5 +
 docs/dashboard-guide.md                            |   2 +
 .../dashboard/app/components/PlanningModeModal.tsx |  17 +--
 .../PlanningModeModal.planning-flow.test.tsx       | 118 ++++++++++++++++++++-
 .../src/__tests__/routes-planning.test.ts          |  86 +++++++++++----
 packages/dashboard/src/planning.ts                 |   7 +-
 .../src/routes/register-planning-subtask-routes.ts |  14 +--
 7 files changed, 207 insertions(+), 42 deletions(-)

Fusion-Task-Id: FN-5883

Fusion-Task-Lineage: 47824bac-3083-45a4-a0d5-b8c7540966c1
2026-06-02 10:07:08 -07:00
gsxdsm
fa68edf9fa FN-5885: fix terminal copy/paste shortcuts
Restore expected terminal clipboard shortcuts.

- intercept Ctrl/Cmd+C in the dashboard terminal to copy the current selection while preserving plain SIGINT when nothing is selected
- intercept Ctrl/Cmd+V to read clipboard text and send it into the active PTY session
- add terminal shortcut regression coverage and document the new integrated terminal behavior
- add a patch changeset for @runfusion/fusion

Files changed:
 .changeset/friendly-ravens-hammer.md               |   5 +
 docs/dashboard-guide.md                            |   2 +
 packages/dashboard/app/components/TerminalModal.tsx     |  48 +++++++++
 packages/dashboard/app/components/__tests__/TerminalModal.test.tsx    | 113 +++++++++++++++++++++
 4 files changed, 168 insertions(+)

Fusion-Task-Id: FN-5885

Fusion-Task-Lineage: f8b3658c-2b52-4094-8cef-79c762f4d78d
2026-06-02 09:20:31 -07:00
gsxdsm
48e08c07eb FN-5880: recover plan-ready mission interview drafts
Keep completed mission interview summaries resumable until they are approved or discarded.

- include  mission interview sessions in dashboard, CLI, and extension draft listings
- relabel complete drafts as plan-ready review items and reopen them at the summary approval step
- add regression coverage and docs/changeset updates for resumable complete drafts

Files changed:
 .../fn-5880-mission-interview-complete-draft.md    |  5 ++
 docs/missions.md                                   |  8 +--
 packages/cli/src/__tests__/extension.test.ts       | 13 +++-
 .../cli/src/commands/__tests__/mission.test.ts     | 11 ++-
 packages/cli/src/commands/mission.ts               | 17 ++++-
 packages/cli/src/extension.ts                      |  7 +-
 .../dashboard/app/components/MissionManager.tsx    | 24 ++++---
 .../components/__tests__/MissionManager.test.tsx   | 70 ++++++++++++++++++
 packages/dashboard/app/components/mission-types.ts |  2 +-
 .../mission-interview-drafts-routes.test.ts        | 18 ++++ -
 .../src/__tests__/mission-interview.test.ts        | 82 ++++++++++++++++++++++
 packages/dashboard/src/mission-interview.ts        | 36 +++++-----
 12 files changed, 252 insertions(+), 41 deletions(-)

Fusion-Task-Id: FN-5880

Fusion-Task-Lineage: 18a9c25c-3f59-4179-9e9c-63f0747acb7f
2026-06-02 09:02:48 -07:00
gsxdsm
7d20a997b9 FN-5872: clear active-session registry on PR cleanup
Ensure PR-mode merge cleanup removes stale active-session registry state before deleting worktrees.

- unregister the task worktree from the active-session registry during merged-task artifact cleanup
- export the active-session registry from the engine entrypoint for lifecycle cleanup usage
- add CLI and engine regression coverage for registry cleanup and missing-entry best-effort behavior
- add a patch changeset for the published CLI package

Files changed:
 .changeset/fn-5872-registry-cleanup.md             |  5 ++++
 .../src/commands/__tests__/task-lifecycle.test.ts  | 29 +++++++++++++++++++++-
 packages/cli/src/commands/task-lifecycle.ts        |  8 +++++-
 .../pr-mode-worktree-invariants.test.ts            | 11 +++++---
 packages/engine/src/index.ts                       |  1 +
 5 files changed, 49 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-5872

Fusion-Task-Lineage: d4db24a3-7ae0-4d07-b029-7f30b2f65d2e
2026-06-02 07:46:38 -07:00
gsxdsm
f3732afcd0 FN-5858: fix multipart chat attachment sends
Handle multipart chat message requests so uploaded attachments reach the chat manager.

- parse multipart bodies on the chat message SSE endpoint with attachment count and size handling
- persist uploaded message attachments into session storage and forward generated metadata to sendMessage
- add multipart route coverage for successful sends, missing content validation, and the published package changeset

Files changed:
 .changeset/fn-5858-chat-multipart-fix.md           |  7 ++
 .../src/__tests__/chat-attachment-routes.test.ts   | 33 ++++++++
 .../dashboard/src/__tests__/chat-routes.test.ts    | 79 +++++++++++++++++++
 .../dashboard/src/routes/register-chat-routes.ts   | 92 +++++++++++++++-------
 4 files changed, 183 insertions(+), 28 deletions(-)

Fusion-Task-Id: FN-5858

Fusion-Task-Lineage: 3b1320a7-14ba-4699-8bfd-eba193a5de7e
2026-06-02 00:07:07 -07:00
gsxdsm
de23db3789 FN-5862: bump pi coding agent dependencies to 0.78
Update Fusion to the latest pi coding agent and pi AI dependency release.

- bump @earendil-works/pi-coding-agent from ^0.77.0 to ^0.78.0 in the CLI, dashboard, and engine packages
- bump @earendil-works/pi-ai from ^0.77.0 to ^0.78.0 where it is consumed
- add a patch changeset documenting the published @runfusion/fusion update and refresh the lockfile

Files changed:
 .changeset/fn-5862-pi-coding-agent-0.78.md |   5 +
 packages/cli/package.json                  |   4 +-
 packages/dashboard/package.json            |   2 +-
 packages/engine/package.json               |   4 +-
 pnpm-lock.yaml                             | 193 +++++++++++++++++++----------
 5 files changed, 138 insertions(+), 70 deletions(-)

Fusion-Task-Id: FN-5862

Fusion-Task-Lineage: abdfa987-7ba5-45f7-8bea-3db3329a760c
2026-06-01 23:55:20 -07:00
gsxdsm
7d1708f023 FN-5851: fix goal tool store resolution
Resolve goal tool lookups to the canonical project store from Fusion worktree directories.

- recognize both legacy .worktrees and .fusion/worktrees paths when resolving the project root for pi extensions
- add CLI coverage proving fn_goal_list and fn_goal_show return dashboard-created goals from a Fusion worktree cwd
- extend core worktree-resolution tests and keep the branch conflict recovery test worktree path isolated in tmpdir
- add a patch changeset for the published CLI fix

Files changed:
 .changeset/fn-5851-goal-store-resolution.md        |   5 +
 packages/cli/src/__tests__/goal-store-resolution.test.ts    | 104 +++++++++++++++++++++
 packages/core/src/__tests__/pi-extensions.test.ts  |  14 ++-
 packages/core/src/pi-extensions.ts                 |  12 ++-
 packages/engine/src/__tests__/branch-conflicts-recovery.test.ts    |   2 +-
 5 files changed, 130 insertions(+), 7 deletions(-)

Fusion-Task-Id: FN-5851

Fusion-Task-Lineage: ec4c8239-b953-4df7-9f72-02e17e4b0851
2026-06-01 23:39:20 -07:00
gsxdsm
c60dae1cb9 FN-5856: preserve closed quick chat panel size
Prevent closed quick chat FAB drags from overwriting the saved desktop panel size.

- gate desktop panel resize clamping and persistence behind the panel open state
- pass the quick chat open state into the resize hook so closed FAB moves leave saved dimensions untouched
- add a regression test covering closed-FAB dragging and reopened panel dimensions
- add a patch changeset for the published CLI package

Files changed:
 .changeset/fn-5856-quick-chat-resize.md            |  5 +++++
 packages/dashboard/app/components/QuickChatFAB.tsx | 12 +++++------
 .../app/components/__tests__/QuickChatFAB.test.tsx | 23 ++++++++++++++++++++++
 3 files changed, 34 insertions(+), 6 deletions(-)

Fusion-Task-Id: FN-5856

Fusion-Task-Lineage: 3358f2b0-ae8d-468c-8e9e-71a1b5365061
2026-06-01 23:37:03 -07:00
gsxdsm
e6ce50033b FN-5853: persist skills toggle state in dashboard
Make skills enabled and disabled toggles persist across dashboard refreshes.

- normalize stored skill paths before matching or writing skill toggle entries
- preserve enabled and disabled state for both top-level and package-scoped skills
- add round-trip adapter tests covering settings persistence and rediscovery

Files changed:
 .changeset/fn-5853-skills-persistence.md           |   5 +
 .../dashboard/src/__tests__/skills-adapter.test.ts | 116 ++++++++++++++++++++-
 packages/dashboard/src/skills-adapter.ts           |  29 ++++--
 3 files changed, 140 insertions(+), 10 deletions(-)

Fusion-Task-Id: FN-5853

Fusion-Task-Lineage: 7b9df0ae-7db7-4c3b-93c6-3ceedfad4caa
2026-06-01 23:01:26 -07:00
gsxdsm
f9e551317f Harden fusion.db against recurring corruption
Root cause: node:sqlite SIGSEGVs inside pager_write leave the B-tree
malformed in a way that still opens but fails integrity checks; large
operational-log tables widen the write window where the crash strikes.

- backup: verify every copy with PRAGMA quick_check, quarantine corrupt
  copies as *.corrupt, and never rotate out the last verified-good backup
- db: add Database.recoverIfCorrupt() startup guard (wired into
  TaskStore.init, disk-backed only, opt out via FUSION_DISABLE_DB_AUTORECOVER)
  that rebuilds a malformed db via sqlite3 .recover, preserving the corrupt
  original; also fixes the latent `.recover main` invalid-option bug that made
  recoverDatabase() always fail
- db: drop lost_and_found* scratch tables on init; add pruneOperationalLogs()
- settings: add operationalLogRetentionDays (default 30, 0 = off) and prune
  activityLog/agentLogEntries/runAuditEvents/agentHeartbeats during maintenance
- dashboard: expose retention in Settings -> Backups -> Database Maintenance

Tests: backup 59/59, db 135/135 (incl. real corrupt->recover->reopen),
self-healing cleanup/corruption 10/10, settings 77/77, SettingsModal 460/460.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 21:55:10 -07:00
gsxdsm
e561290174 FN-5846: route shared-group member finalization to shared branch
Ensure shared branch-group members keep their routed shared-branch target through merge finalization and recovery.

- ignore a shared member's default-base branch when resolving branch-group merge routing
- reroute merge-confirmed fast paths and self-healing recovery flows to the branch-group integration branch
- stamp merge target metadata, record member landings, and add regression coverage plus architecture/changeset updates

Files changed:
 .changeset/fn-5846-shared-group-merge-routing.md   |   5 +
 docs/architecture.md                               |   4 +-
 packages/engine/src/__tests__/group-merge-coordinator.test.ts  |  26 +++
 packages/engine/src/__tests__/reliability-interactions/shared-branch-group-lifecycle.test.ts  |  73 +++++--
 packages/engine/src/group-merge-coordinator.ts     |  11 +-
 packages/engine/src/project-engine.ts              |  49 ++++-
 packages/engine/src/self-healing.ts                | 212 ++++++++++++++++++++-
 7 files changed, 357 insertions(+), 23 deletions(-)

Fusion-Task-Id: FN-5846

Fusion-Task-Lineage: c8fbf8b8-3cbe-4ee5-96d9-9040bd4f0df5
2026-06-01 20:19:37 -07:00
gsxdsm
0a418e6875 FN-5844: add plugin dev loop and external authoring docs
Add a local plugin development loop plus publishable external plugin guidance.

- add `fn plugin dev` routing and implementation with supervised build, install, and hot-reload behavior
- export plugin loader/store helpers and add CLI tests for dev flow, pack shape validation, and scaffold docs coverage
- document external plugin authoring, update CLI/plugin authoring docs, and add a patch changeset for `@runfusion/fusion`

Files changed:
 .changeset/fn-5844-external-plugin-authoring.md    |   5 +
 docs/PLUGIN_AUTHORING.md                           |  10 +-
 docs/cli-reference.md                              |   3 +-
 docs/plugins/external-authoring.md                 | 114 +++++++++++
 packages/cli/src/__tests__/bin.test.ts             |  16 +-
 packages/cli/src/__tests__/plugin-dev.test.ts      | 138 ++++++++++++++
 .../cli/src/__tests__/plugin-pack-shape.test.ts    |  94 +++++++++
 packages/cli/src/__tests__/plugin-scaffold.test.ts |   3 +
 packages/cli/src/bin.ts                            |  16 +-
 packages/cli/src/commands/plugin-dev.ts            | 212 +++++++++++++++++++++
 packages/cli/src/commands/plugin-scaffold.ts       |   6 +-
 packages/cli/src/commands/plugin.ts                |   6 +-
 12 files changed, 613 insertions(+), 10 deletions(-)

Fusion-Task-Id: FN-5844
Fusion-Task-Lineage: 80afa0a0-225c-486d-901a-909d14e7b056
2026-06-01 19:40:28 -07:00
gsxdsm
d4db0b0b00 FN-5847: honor onboarding completion marker in auto-launch
CLI onboarding auto-launch now skips once the persisted completion marker is present.

- Load `cliOnboardingCompletedAt` from global settings before launching onboarding when the central DB is missing.
- Preserve existing skip precedence for non-TTY, command, flag, environment, and central DB guards.
- Add unit and backcompat coverage for completion-marker and skipped-central-DB scenarios.
- Document the updated auto-launch behavior and add a patch changeset.

Files changed:
 .changeset/fn-5847-onboard-autolaunch-marker.md    |  5 ++
 docs/cli-reference.md                              | 12 +--
 .../onboard-autolaunch-backcompat-e2e.test.ts      |  7 ++
 .../onboard-autolaunch-backcompat.test.ts          |  8 ++
 .../__tests__/onboard-autolaunch-bypass.test.ts    |  7 ++
 .../commands/__tests__/onboard-autolaunch.test.ts  | 93 ++++++++++++++++++++++
 packages/cli/src/commands/onboard-autolaunch.ts    | 46 ++++++++++-
 7 files changed, 171 insertions(+), 7 deletions(-)

Fusion-Task-Id: FN-5847

Fusion-Task-Lineage: db3e474e-e4b8-4299-8087-07b6cd1f4518
2026-06-01 18:52:28 -07:00
gsxdsm
2053f3f7b8 FN-5815: add changeset for fn onboard minor release
Add a release changeset to publish the new onboarding command in @runfusion/fusion.

- add a new changeset file for FN-5815
- mark `@runfusion/fusion` with a minor version bump
- summarize `fn onboard` wizard flow and persisted completion marker behavior

Files changed:
 .changeset/fn-5815-onboard-command.md | 5 +++++
 1 file changed, 5 insertions(+)

Fusion-Task-Id: FN-5815

Fusion-Task-Lineage: 5585bc19-b2f1-4521-a49a-e5a0b3ec8268
2026-06-01 17:52:12 -07:00
gsxdsm
c676cbe12f FN-5813: update fn onboard help and CLI docs
Align onboarding HELP text and CLI reference with current fn onboarding behavior.

- Document onboarding auto-launch conditions around missing central DB and interactive command flow.
- Add and clarify onboarding escape hatches: --skip-onboarding and FUSION_SKIP_ONBOARDING.
- Add an onboard docs parity test to keep HELP and docs aligned for key onboarding terms.
- Add a patch changeset for @runfusion/fusion describing the documentation/help update.

Files changed:
 .changeset/fn-5813-onboard-docs.md                 |  5 ++++
 docs/cli-reference.md                              | 21 +++++++++-----
 packages/cli/src/bin.ts                            |  4 ++-
 packages/cli/src/commands/__tests__/onboard-docs.test.ts    | 33 ++++++++++++++++++++++
 4 files changed, 55 insertions(+), 8 deletions(-)

Fusion-Task-Id: FN-5813

Fusion-Task-Lineage: 14a74ad9-5f09-471a-878d-aa120a28ef41
2026-06-01 17:15:11 -07:00
gsxdsm
245129e24c FN-5812: add onboard autolaunch backcompat guard coverage
Protect onboarding autolaunch behavior so legacy projects and agent-run commands are not blocked.

- add end-to-end CLI test coverage for onboarding autolaunch backcompat guard behavior
- document the onboarding autolaunch compatibility behavior in the CLI reference
- add a patch changeset for @runfusion/fusion release tracking

Files changed:
 .changeset/fn-5812-onboard-backcompat-guard.md     |   5 +
 docs/cli-reference.md                              |   6 +
 packages/cli/src/commands/__tests__/onboard-autolaunch-backcompat-e2e.test.ts      | 161 +++++++++++++++++++++
 3 files changed, 172 insertions(+)

Fusion-Task-Id: FN-5812

Fusion-Task-Lineage: d735ef0e-1abc-4c22-bd11-07c2de69ace1
2026-06-01 16:55:56 -07:00
gsxdsm
8376781864 FN-5845: fix mobile agent log scroll and add collapsible branch group card
Improve dashboard mobile log usability and make branch group cards collapsible for cleaner review workflows.

- preserve/restore AgentLogViewer scroll position when toggling mobile drawer and lock body scroll while open
- add collapse/expand state to BranchGroupCard with a summary header and hidden details when collapsed
- add regression tests for AgentLogViewer mobile scroll behavior and BranchGroupCard collapse interactions
- add a changeset and dashboard guide note for the new branch group card behavior

Files changed:
 .changeset/fn-5845-branch-group-collapse.md        |  5 ++
 docs/dashboard-guide.md                            |  1 +
 .../dashboard/app/components/AgentLogViewer.tsx    | 21 ++++++++
 .../dashboard/app/components/BranchGroupCard.css   | 23 ++++++++
 .../dashboard/app/components/BranchGroupCard.tsx   | 63 +++++++++++++++++-----
 .../components/__tests__/AgentLogViewer.test.tsx   | 48 +++++++++++++++++
 .../components/__tests__/BranchGroupCard.test.tsx  | 18 +++++++
 7 files changed, 166 insertions(+), 13 deletions(-)

Fusion-Task-Id: FN-5845

Fusion-Task-Lineage: 6a0f2967-5df8-4761-ae6c-50991f01ab78
2026-06-01 16:24:21 -07:00
gsxdsm
38e0422d35 FN-5809: add onboarding skip-flag and env bypass handling
Ensure CLI onboarding auto-launch is bypassed cleanly via explicit flag/env controls.

- Parse and strip global `--skip-onboarding` in CLI argument preprocessing while surfacing a dedicated `skipOnboarding` signal.
- Pass the surfaced skip signal into onboarding auto-launch decisions and preserve distinct reasons (`skip-flag` vs `skip-env`).
- Tighten `FUSION_SKIP_ONBOARDING` parsing to strict truthy values only (`1`, `true`, `yes`, `on`).
- Add focused tests covering bypass reasons, truthy env parsing, global flag stripping behavior, and integration with onboarding gating.
- Add a patch changeset for @runfusion/fusion documenting the onboarding bypass behavior update.

Files changed:
 .changeset/fn-5809-skip-onboarding-bypass.md       |   9 ++
 packages/cli/src/bin.ts                            |  23 +++-
 .../__tests__/onboard-autolaunch-bypass.test.ts    | 140 +++++++++++++++++++++
 packages/cli/src/commands/onboard-autolaunch.ts    |  11 +-
 4 files changed, 173 insertions(+), 10 deletions(-)

Fusion-Task-Id: FN-5809
Fusion-Task-Lineage: fc461eab-84df-42dc-924d-9d8cc59502cd
2026-06-01 14:07:46 -07:00
gsxdsm
e1a35a364b FN-5808: skip onboarding auto-launch for non-interactive and existing setups
Prevent onboarding autolaunch when invocation is non-interactive or an existing central+project setup is detected.

- Add a project initialization probe in onboard autolaunch flow and skip when both central DB and project DB already exist.
- Preserve skip behavior for serve/daemon and all non-TTY invocations so agent/headless runs never block.
- Expand CLI autolaunch coverage with backward-compat and seam tests, and add a changeset for the published package.

Files changed:
 .changeset/fn-5808-onboard-backcompat-guard.md     |   5 +
 .../onboard-autolaunch-backcompat.test.ts          | 135 +++++++++++++++++++++
 .../commands/__tests__/onboard-autolaunch.test.ts  |   9 ++
 packages/cli/src/commands/onboard-autolaunch.ts    |  16 ++-
 4 files changed, 164 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-5808

Fusion-Task-Lineage: b859aa93-44d5-4d93-bc07-8149b95b4042
2026-06-01 13:33:56 -07:00
gsxdsm
40b491958f FN-5806: make onboarding steps individually skippable
Allow each fn onboard stage to be skipped without exiting the overall onboarding flow.

- add a reusable skippable-step helper that prompts before each onboarding section
- gate central DB setup, provider setup, project init, core settings, and next-steps output behind per-step skip prompts
- preserve onboarding completion persistence while keeping cancellation semantics intact
- expand onboarding command tests for full skip, selective skip, and cancellation coverage
- document per-step skip behavior in the CLI reference
- add a patch changeset for @runfusion/fusion

Files changed:
 .changeset/fn-5806-onboard-step-skip.md            |   5 +
 docs/cli-reference.md                              |   3 +-
 packages/cli/src/commands/__tests__/onboard.test.ts     |  72 ++++++++++++-
 packages/cli/src/commands/onboard.ts               | 112 ++++++++++++---------
 4 files changed, 141 insertions(+), 51 deletions(-)

Fusion-Task-Id: FN-5806

Fusion-Task-Lineage: d122d67a-2a13-4b2f-a1aa-459dc548d370
2026-06-01 13:20:55 -07:00
gsxdsm
641b932631 FN-5807: add onboarding auto-launch hook before interactive commands
Ensure CLI onboarding auto-launch runs before interactive command execution when central DB is missing.

- Hooked auto-launch flow into bin.ts before interactive command handling.
- Added a dedicated onboard-autolaunch command module to detect missing central DB and trigger onboarding.
- Added focused CLI tests covering auto-launch behavior and guard conditions.
- Added a changeset for @runfusion/fusion patch release.

Files changed:
 .changeset/fn-5807-onboarding-autolaunch.md        |   5 +
 packages/cli/src/bin.ts                            |   3 +
 .../commands/__tests__/onboard-autolaunch.test.ts  | 164 +++++++++++++++++++++
 packages/cli/src/commands/onboard-autolaunch.ts    | 116 +++++++++++++++
 4 files changed, 288 insertions(+)

Fusion-Task-Id: FN-5807
Fusion-Task-Lineage: a12551b3-d8a4-492a-81f8-e92b4e138204
2026-06-01 13:03:20 -07:00
gsxdsm
130f6f1e9a FN-5834: enforce explicit developer-role compatibility for custom providers
Prevent unsupported developer-role API failures by making provider role compatibility explicit and covered by regression safeguards.

- Add explicit supportsDeveloperRole capability to custom provider metadata/types and wire it through provider registration.
- Update CLI custom-provider registration behavior and tests to persist and validate developer-role compatibility settings.
- Add/adjust engine regression coverage for openai-completions message role conversion, including reasoning-model fallback behavior.
- Document the new custom provider setting and add a published changeset for @runfusion/fusion.

Files changed:
 .changeset/fn-5834-developer-role-compat.md        |  5 ++
 docs/settings-reference.md                         |  2 +-
 packages/cli/src/commands/__tests__/custom-provider-registry.test.ts     | 44 +++++++++++-
 packages/cli/src/commands/custom-provider-registry.ts   |  9 ++-
 packages/core/src/types.ts                         |  5 ++
 packages/engine/src/__tests__/custom-providers-openai-completions.test.ts    | 84 +++++++++++-----------
 6 files changed, 106 insertions(+), 43 deletions(-)

Fusion-Task-Id: FN-5834
Fusion-Task-Lineage: 4edc80c9-5e60-41e4-bce1-662d18255d88
2026-06-01 09:05:18 -07:00
gsxdsm
f76716e55b FN-5833: fix custom Responses API model lookup
Ensure custom OpenAI Responses providers resolve configured models without requiring registry entries.

- update global settings model resolution to preserve custom provider model configuration
- adjust engine custom-provider and fn-agent creation paths to avoid false 'model not found' failures
- add regression tests for OpenAI Responses custom providers and pi create-fn-agent flows
- document the custom provider model behavior and add a changeset for @runfusion/fusion

Files changed:
 .../FN-5833-custom-provider-responses-fix.md       | 10 ++++
 docs/settings-reference.md                         |  2 +-
 packages/core/src/global-settings.ts               | 56 +++++++++----------
 packages/core/src/index.ts                         |  2 +-
 .../custom-providers-openai-responses.test.ts      | 64 ++++++++++++++++++++++
 .../engine/src/__tests__/custom-providers.test.ts  | 33 ++++++++++-
 .../src/__tests__/pi-create-fn-agent.test.ts       | 11 +++-
 packages/engine/src/custom-providers.ts            |  4 +-
 packages/engine/src/pi.ts                          | 21 +++++--
 9 files changed, 162 insertions(+), 41 deletions(-)

Fusion-Task-Id: FN-5833

Fusion-Task-Lineage: a59481cf-faf5-42b8-97ce-7b3eca27b4fb
2026-06-01 08:23:02 -07:00
gsxdsm
b4230c06b1 FN-5835: reuse imported GitHub source issue tracking
Reuse the existing imported source issue record when tracking GitHub work instead of creating duplicate entries.

- update GitHub tracking logic to detect and reuse previously imported source issues
- add/expand dashboard tracking tests to cover duplicate-import and reuse behavior
- add a changeset documenting the FN-5835 tracking fix for @runfusion/fusion

Files changed:
 .changeset/fn-5835-source-issue-tracking.md        |   5 ++
 .../src/__tests__/github-tracking.test.ts          | 100 ++++++++++++++++++---
 packages/dashboard/src/github-tracking.ts          |  32 +++++++
 3 files changed, 126 insertions(+), 11 deletions(-)

Fusion-Task-Id: FN-5835

Fusion-Task-Lineage: d0827711-8bfb-471c-b2c4-69324da33373
2026-06-01 08:13:36 -07:00
gsxdsm
e16893a3c7 FN-5832: surface unsupported message-role provider errors
Make unsupported provider message-role failures fail fast with actionable operator guidance.

- detect provider errors that reject `messages.[n].role` values via a dedicated transient-error detector helper
- classify unsupported message-role failures as operator-actionable/permanent to prevent retry loops
- annotate `promptSessionAndCheck` failures with model/provider compatibility guidance for imported company-role agents
- add regression tests for role-error detection, operator-actionable classification, and prompt-boundary error hinting
- add a patch changeset for `@runfusion/fusion`

Files changed:
 .changeset/fn-5832-unsupported-message-role.md     |  5 +++
 .../pi-prompt-session-and-check-recursion.test.ts  | 24 +++++++++++++++
 .../src/__tests__/transient-error-detector.test.ts | 36 ++++++++++++++++++++++
 packages/engine/src/pi.ts                          |  8 +++++
 packages/engine/src/transient-error-detector.ts    | 14 ++++++++-
 5 files changed, 86 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-5832

Fusion-Task-Lineage: b3f78f0e-d097-4cb7-a652-dc547f46fe1d
2026-06-01 07:53:56 -07:00
gsxdsm
3373c0beed FN-5830: re-land shared branch promotion gate and API
Reintroduce shared-branch-group completion gating and promotion endpoints with reliability coverage.

- add GroupMergeCoordinator promotion gate behavior and shared branch group promotion logic updates
- expose promotion flow wiring through engine index and project engine APIs
- expand coordinator tests and add reliability interaction coverage for branch-group promotion
- document the new reliability backstop and add a changeset for @runfusion/fusion

Files changed:
 .changeset/fn-5830-branch-group-promotion.md       |   5 +
 AGENTS.md                                          |   1 +
 docs/architecture.md                               |   3 +-
 .../src/__tests__/group-merge-coordinator.test.ts  | 170 ++++++++++++++++++-
 .../branch-group-promotion.test.ts                 | 166 +++++++++++++++++++
 packages/engine/src/group-merge-coordinator.ts     | 183 ++++++++++++++++++++-
 packages/engine/src/index.ts                       |   4 +
 packages/engine/src/project-engine.ts              |  37 +++++
 8 files changed, 566 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-5830

Fusion-Task-Lineage: e9823f51-df0e-4da8-8f51-58dfefdc293d
2026-06-01 05:39:01 -07:00
gsxdsm
eb425d17d9 FN-5825: add dedicated grouped-task modal popup
Introduce a dedicated modal flow for grouped shared-branch tasks in the dashboard.

- Add GroupTaskModal component and styles for grouped task details and actions.
- Wire grouped-task modal state through App, modal manager hooks, and modal container components.
- Update board/column/task-card interactions to open grouped tasks in the new modal.
- Adjust subtask breakdown behavior and add focused tests for grouped task modal/task-card flows.
- Document the grouped-task modal behavior and add a changeset for @runfusion/fusion.

Files changed:
 .changeset/fn-5825-group-task-modal.md             |   5 +
 docs/dashboard-guide.md                            |   5 +-
 packages/dashboard/app/App.tsx                     |   6 +
 packages/dashboard/app/components/AppModals.tsx    |  24 ++++
 packages/dashboard/app/components/Board.tsx        |   4 +-
 packages/dashboard/app/components/Column.tsx       |   4 +-
 .../dashboard/app/components/GroupTaskModal.css    |  79 ++++++++++
 .../dashboard/app/components/GroupTaskModal.tsx    | 159 +++++++++++++++++++++
 .../app/components/SubtaskBreakdownModal.tsx       |  16 ++-
 packages/dashboard/app/components/TaskCard.tsx     |   8 ++
 .../components/__tests__/GroupTaskModal.test.tsx   | 105 ++++++++++++++
 .../app/components/__tests__/TaskCard.test.tsx     |  18 +++
 packages/dashboard/app/hooks/useModalManager.ts    |  16 +++
 packages/dashboard/vitest.config.ts                |   2 +-
 14 files changed, 445 insertions(+), 6 deletions(-)

Fusion-Task-Id: FN-5825

Fusion-Task-Lineage: d9317a58-05ce-4437-8311-b7e2a186537b
2026-06-01 05:15:14 -07:00
gsxdsm
e9de195ef5 FN-5822: wire shared branch-group visibility and merge controls
Add dashboard and API support for viewing shared branch groups and triggering group merge actions.

- add branch-group API routes and register them in integrated routers
- extend dashboard legacy API client with branch-group fetch and merge-control actions
- add BranchGroupCard UI + styles and surface it in task/detail/subtask views
- add dashboard/API test coverage for branch-group routes and UI integration points
- document branch-group behavior and add a changeset for @runfusion/fusion

Files changed:
 .changeset/fn-5822-branch-group-dashboard.md       |   5 +
 docs/dashboard-guide.md                            |  31 ++++++
 packages/dashboard/app/api/legacy.ts               |  54 +++++++++
 .../dashboard/app/components/BranchGroupCard.css   |  83 ++++++++++++++
 .../dashboard/app/components/BranchGroupCard.tsx   | 123 +++++++++++++++++++++
 .../app/components/SubtaskBreakdownModal.tsx       |   3 +
 packages/dashboard/app/components/TaskCard.tsx     |  19 ++++
 .../dashboard/app/components/TaskDetailModal.tsx   |   4 +
 .../components/__tests__/BranchGroupCard.test.tsx  |  96 ++++++++++++++++
 .../__tests__/SubtaskBreakdownModal.test.tsx       |   1 +
 .../app/components/__tests__/TaskCard.test.tsx     |  16 ++++
 .../components/__tests__/TaskDetailModal.test.tsx  |  22 ++++
 .../src/__tests__/routes-branch-groups.test.ts     | 119 ++++++++++++++++++++
 .../src/routes/register-branch-groups-routes.ts    | 118 ++++++++++++++++++++
 .../src/routes/register-integrated-routers.ts      |  13 +++
 packages/dashboard/vitest.config.ts                |   4 +-
 16 files changed, 709 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-5822

Fusion-Task-Lineage: 199c25b8-f6ec-43b4-8fab-509f23fb5ac7
2026-06-01 04:47:19 -07:00
gsxdsm
9c29e2e776 FN-5829: add shared feature branch option for new tasks
Allow new tasks to target a shared branch-group feature branch during creation.

- Add branch-group aware branch selection handling in task workflow routes.
- Update store/types/db wiring to support and persist shared feature-branch targeting.
- Extend dashboard task creation UI/tests and route tests to cover the new option.
- Add a changeset for @runfusion/fusion documenting the new CLI/task behavior.

Files changed:
 .changeset/fn-5829-shared-feature-branch-option.md |   7 ++
 .../src/commands/__tests__/task-lifecycle.test.ts  |   2 +-
 .../core/src/__tests__/branch-group-store.test.ts  |  26 ++++++
 packages/core/src/db.ts                            |   4 +-
 packages/core/src/store.ts                         |   9 +-
 packages/core/src/types.ts                         |   2 +-
 packages/dashboard/app/components/NewTaskModal.tsx |   2 +-
 packages/dashboard/app/components/TaskForm.tsx     |   9 +-
 .../app/components/__tests__/NewTaskModal.test.tsx |  37 ++++++++
 .../src/__tests__/branch-selection.test.ts         |  12 +++
 .../dashboard/src/__tests__/mission-e2e.test.ts    |   8 +-
 .../src/__tests__/routes-planning.test.ts          |   6 +-
 .../src/__tests__/routes-tasks.test.ts             | 102 +++++++++++++++++++++
 packages/dashboard/src/routes/branch-selection.ts  |  19 +++-
 .../src/routes/register-task-workflow-routes.ts    |  23 +++--
 15 files changed, 242 insertions(+), 26 deletions(-)

Fusion-Task-Id: FN-5829

Fusion-Task-Lineage: 7d69acc8-19a3-4112-9bf2-5ac7b5e5a929
2026-06-01 03:23:10 -07:00
gsxdsm
e854d33375 FN-5805: add fn onboard command with sequential runOnboard flow
Add a new interactive onboarding CLI flow that guides first-time setup end to end.

- add new `fn onboard` command wiring in CLI entrypoint and usage help
- implement `runOnboard()` with sequential prompts for central DB, provider auth, init, test mode, and project maxConcurrent
- persist `cliOnboardingCompletedAt` marker in global settings with `--force` rerun support
- add onboarding command tests and global settings regression coverage
- document `fn onboard` usage and options in CLI reference
- add a minor changeset for published `@runfusion/fusion`

Files changed:
 .changeset/fn-5805-onboard-command.md              |   5 +
 docs/cli-reference.md                              |  20 ++
 packages/cli/src/bin.ts                            |  10 +
 packages/cli/src/commands/__tests__/onboard.test.ts| 193 ++++++++++++++++
 packages/cli/src/commands/onboard.ts               | 249 +++++++++++++++++++++
 packages/core/src/__tests__/global-settings.test.ts|  11 +
 packages/core/src/index.ts                         |   2 +-
 packages/core/src/settings-schema.ts               |   1 +
 packages/core/src/types.ts                         |   4 +
 9 files changed, 494 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-5805

Fusion-Task-Lineage: b1bcaf27-9bd7-4569-b685-225a97fa1200
2026-06-01 01:42:19 -07:00
gsxdsm
327f0a9a4f FN-5818: fix shared-branch-group execution to use per-task working branches
Ensure shared branch-group flows consistently derive and acquire per-task working branches.

- update engine merge/executor/scheduler/self-healing paths to resolve task-scoped working branch names instead of shared branch-group names
- adjust worktree acquisition and already-merged detection logic to use the corrected branch resolution
- add regression coverage for shared-branch-group working-branch behavior, worktree acquisition, and worktree name derivation
- add a patch changeset for @runfusion/fusion

Files changed:
 .changeset/fn-5818-shared-branch-working-branch.md |  5 ++
 .../shared-branch-group-working-branch.test.ts     | 53 ++++++++++++++++++++++
 .../src/__tests__/worktree-acquisition.test.ts     | 52 +++++++++++++++++++++
 .../engine/src/__tests__/worktree-names.test.ts    | 20 +++++++-
 packages/engine/src/already-merged-detector.ts     |  6 +--
 packages/engine/src/executor.ts                    | 10 ++--
 packages/engine/src/merger-ai.ts                   |  4 +-
 packages/engine/src/merger.ts                      | 16 +++----
 packages/engine/src/scheduler.ts                   |  6 +--
 packages/engine/src/self-healing.ts                | 12 ++---
 packages/engine/src/worktree-acquisition.ts        |  4 +-
 packages/engine/src/worktree-names.ts              |  9 +++-
 12 files changed, 166 insertions(+), 31 deletions(-)

Fusion-Task-Id: FN-5818

Fusion-Task-Lineage: c7eb1ec4-971a-49ad-9156-5c0349c629aa
2026-06-01 01:37:25 -07:00
gsxdsm
1aef3c9899 FN-5817: prevent blank dashboard after auto-merge toggle
Ensure viewport mode updates stay in sync so toggling auto-merge no longer blanks the dashboard.

- update useViewportMode to initialize safely and react consistently to viewport/media-query changes
- add focused hook coverage for initial mode detection and transition behavior
- add dashboard/app regression tests to confirm the board remains rendered after auto-merge toggles
- add a changeset for @runfusion/fusion patch release

Files changed:
 .changeset/fn-5817-auto-merge-toggle-mobile.md     |  5 ++
 .../app/components/__tests__/App.test.tsx          | 66 ++++++++++++++++++++++
 .../__tests__/board-mobile-initial-render.test.tsx | 30 ++++++++++
 .../app/hooks/__tests__/useViewportMode.test.ts    | 34 +++++++++++
 packages/dashboard/app/hooks/useViewportMode.ts    | 28 +++++++--
 5 files changed, 159 insertions(+), 4 deletions(-)

Fusion-Task-Id: FN-5817

Fusion-Task-Lineage: 2fc044b1-5f37-44de-b70e-c60364a3d69c
2026-06-01 01:30:34 -07:00
gsxdsm
feceedbf7e FN-5803: normalize streamed sentence spacing across message boundaries
Ensure streamed agent text preserves sentence-boundary spacing even when providers split output across message boundaries.

- add stateful streaming delta normalizer that tracks prior text/thinking tail when partial blocks reset
- update executor and PI session subscriptions to use per-session normalizer instances for text_delta and thinking_delta events
- expand streaming-delta tests to cover cross-message/tool-call boundary spacing regressions
- add task notes documenting cross-message spacing refinement

Files changed:
 .../fn-5803-streaming-cross-message-space.md       |  5 ++
 .../engine/src/__tests__/streaming-delta.test.ts   | 86 +++++++++++++++++++++-
 packages/engine/src/executor.ts                    | 13 ++--
 packages/engine/src/pi.ts                          | 24 +++---
 packages/engine/src/streaming-delta.ts             | 44 ++++++++++-
 5 files changed, 155 insertions(+), 17 deletions(-)

Fusion-Task-Id: FN-5803

Fusion-Task-Lineage: 8f88d54c-bbc0-44dd-99fc-c69738ce0ca8
2026-05-31 23:24:53 -07:00
gsxdsm
944c03d495 FN-5797: fix usage indicator show hidden button behavior
Prevent hidden-window controls in UsageIndicator from acting as implicit form submitters.

- Set both window-level Hide and provider-level Show hidden buttons to `type="button"`.
- Preserve hidden-window reveal behavior without submitting parent forms.
- Add a regression test covering hide/show persistence and rerender re-sync behavior.

Files changed:
 .changeset/fn-5797-show-hidden-fix.md              |  8 +++++
 packages/dashboard/app/components/UsageIndicator.tsx    |  2 ++
 packages/dashboard/app/components/__tests__/UsageIndicator.test.tsx   | 40 ++++++++++++++++++++++
 3 files changed, 50 insertions(+)

Fusion-Task-Id: FN-5797

Fusion-Task-Lineage: 9072bb68-b86b-4ec7-8b1f-0e6b706cbb5f
2026-05-31 21:08:41 -07:00
gsxdsm
77a109958b FN-5796: make plugin same-state transitions idempotent
Prevent duplicate-state plugin updates from throwing invalid transition errors.

- treat updatePluginState calls where next state equals current state as idempotent no-ops
- allow same-state updates with an explicit error payload to persist error changes and emit plugin:updated
- add regression tests for same-state no-op behavior, no extra stateChanged event emission, and error payload updates
- add a patch changeset documenting the Dependency Graph plugin fix

Files changed:
 .changeset/fn-5796-plugin-state-noop.md          |  7 +++++
 packages/core/src/__tests__/plugin-store.test.ts | 34 ++++++++++++++++++++++++
 packages/core/src/plugin-store.ts                | 15 +++++++++++
 3 files changed, 56 insertions(+)

Fusion-Task-Id: FN-5796

Fusion-Task-Lineage: 0da1d035-383f-456c-a212-0903dc029874
2026-05-31 20:50:09 -07:00
gsxdsm
a8c920daf9 chore(release): v0.39.0
Version bump via changesets.
2026-05-31 20:05:32 -07:00
gsxdsm
5930c18b4d FN-5795: send ntfy notification when agents create tasks
Add agent task-created ntfy notifications with configurable settings and coverage.

- add notification plumbing to emit a dedicated event when an agent creates a task
- extend ntfy provider/settings typing and dashboard settings coverage for the new event toggle
- add regression tests for notification service, notifier integration, and ntfy provider behavior
- add a changeset and documentation updates describing the new notification capability

Files changed:
 .changeset/fn-5795-task-created-notification.md    |  9 +++
 docs/architecture.md                               |  4 +-
 docs/settings-reference.md                         |  4 +-
 docs/storage.md                                    |  2 +-
 packages/core/src/types.ts                         |  4 +-
 .../dashboard/app/components/SettingsModal.tsx     |  1 +
 .../components/__tests__/SettingsModal.test.tsx    | 27 +++++++-
 .../src/__tests__/notification-service.test.ts     | 71 ++++++++++++++++++++++
 packages/engine/src/__tests__/notifier.test.ts     |  5 ++
 .../engine/src/__tests__/ntfy-provider.test.ts     | 32 ++++++++++
 .../src/notification/notification-service.ts       | 53 +++++++++++++++-
 packages/engine/src/notification/ntfy-provider.ts  | 21 +++++--
 12 files changed, 220 insertions(+), 13 deletions(-)

Fusion-Task-Id: FN-5795

Fusion-Task-Lineage: 4cfa3b46-8e9c-451e-ab2d-b7d5c9bf5968
2026-05-31 19:59:32 -07:00
gsxdsm
fa428a487b FN-5794: run worktree init for fresh merge workspaces
Run merge worktree initialization automatically when a merge workspace is newly created.

- detect when integration worktree creation is fresh and invoke the configured init command
- preserve existing behavior for already-initialized worktrees while improving setup reliability
- add integration tests covering init command execution paths for merge worktree setup

Files changed:
 .changeset/fn-5794-merge-worktree-init.md          |  5 +++
 .../__tests__/merger-integration-worktree.test.ts  | 16 +++++++++
 packages/engine/src/merger.ts                      | 39 +++++++++++++++++++++-
 3 files changed, 59 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-5794

Fusion-Task-Lineage: f368099f-a179-466e-b994-2a503167112c
2026-05-31 17:52:57 -07:00
gsxdsm
ffadb0c77f FN-5792: fix GitHub auto-close reconciliation for soft-deleted tasks
Ensure GitHub issue auto-close reconciliation still processes soft-deleted and archived tracked tasks after restart.

- Add pagination-aware reconcile scanning in core store with combined deleted+archived coverage and hasMore metadata.
- Update dashboard GitHub tracking reconciler and route handling to consume paged reconcile batches safely.
- Expand reconcile tests (core + dashboard) with restart/periodic sweep and source-issue scenarios to lock behavior.
- Add release changeset and dashboard guide note for the reconciliation sweep behavior.

Files changed:
 .changeset/fn-5792-github-tracking-sweep.md        |   5 +
 docs/dashboard-guide.md                            |   1 +
 .../store-github-tracking-reconcile.test.ts        |  45 ++++++++-
 packages/core/src/store.ts                         |  32 ++++--
 .../github-source-issue-reconciler.test.ts         |  22 ++--
 ...ithub-tracking-periodic-reconcile-sweep.test.ts |  90 +++++++++++++++++
 .../__tests__/github-tracking-reconciler.test.ts   | 111 +++++----------------
 .../dashboard/src/github-tracking-reconciler.ts    |  19 ++--
 .../dashboard/src/routes/register-git-github.ts    |  57 +++++++++--
 9 files changed, 257 insertions(+), 125 deletions(-)

Fusion-Task-Id: FN-5792

Fusion-Task-Lineage: 259f07cf-3470-47c7-b47a-86d212d44d52
2026-05-31 17:23:26 -07:00
gsxdsm
716f3964c5 FN-5790: harden room chat send handling and optimistic reconciliation
Prevent duplicate room sends and avoid restoring composer text when ambiguous failures still delivered the message.

- guard room composer sends with an in-flight ref to prevent double-dispatch
- treat ambiguous post-send refresh failures as delivered when recovery confirms the user message
- centralize optimistic/SSE user-message reconciliation to replace temp messages instead of duplicating them
- add and update chat room hook/component tests that cover double-send prevention and delivered-on-ambiguous-failure behavior
- add a patch changeset for @runfusion/fusion documenting the room chat reliability fix

Files changed:
 .changeset/few-dingos-smile.md                     |  5 ++
 packages/dashboard/app/components/ChatView.tsx     |  8 +++
 .../components/__tests__/ChatView.rooms.test.tsx   | 27 ++++++++++
 .../app/hooks/__tests__/useChatRooms.test.ts       | 48 +++++++++++++++--
 packages/dashboard/app/hooks/useChatRooms.ts       | 62 +++++++++++++++-------
 5 files changed, 126 insertions(+), 24 deletions(-)

Fusion-Task-Id: FN-5790

Fusion-Task-Lineage: a1ac5e4f-4cc2-4cf9-8bc1-42587d0d1d1b
2026-05-31 16:57:42 -07:00
gsxdsm
2140ab2dcf FN-5789: normalize missing sentence spaces in streamed deltas
Repair provider-agnostic streaming deltas so sentence boundaries keep expected spacing in chat and agent logs.

- add shared streaming-delta normalization helpers for text/thinking events
- apply normalization at executor and PI message_update chokepoints before emitting deltas
- add focused engine tests covering punctuation-boundary repairs and no-op cases
- add a patch changeset for @runfusion/fusion describing the fix

Files changed:
 .changeset/fn-5789-streaming-space-repair.md       |  5 ++
 .../engine/src/__tests__/streaming-delta.test.ts   | 84 ++++++++++++++++++++
 packages/engine/src/executor.ts                    | 11 ++-
 packages/engine/src/pi.ts                          | 13 +++-
 packages/engine/src/streaming-delta.ts             | 91 ++++++++++++++++++++++
 5 files changed, 197 insertions(+), 7 deletions(-)

Fusion-Task-Id: FN-5789

Fusion-Task-Lineage: e60ed2ae-c006-42f9-9ab0-f4e79560fb66
2026-05-31 16:48:28 -07:00
gsxdsm
7b70e7fb72 FN-5788: add group promotion gate to merge coordinator
Add lifecycle wiring so branch-group promotion respects group-level auto-merge gating.

- Extend merge coordinator/merger flow to apply group promotion precedence and pause/override reasons.
- Hook the group-promotion coordinator into engine lifecycle startup.
- Add reliability and coordinator coverage for branch group promotion gating behavior.
- Add release changeset and update architecture/AGENTS backstop notes.

Files changed:
 .changeset/fn-5788-branch-group-promotion-gate.md  |   5 +
 AGENTS.md                                          |   1 +
 docs/architecture.md                               |   3 +-
 .../src/__tests__/group-merge-coordinator.test.ts  |  95 ++++++++++++++-
 .../branch-group-promotion-gate.test.ts            | 129 +++++++++++++++++++++
 packages/engine/src/group-merge-coordinator.ts     |  46 +++++---
 packages/engine/src/index.ts                       |   2 +
 packages/engine/src/merger.ts                      |  34 +++---
 8 files changed, 283 insertions(+), 32 deletions(-)

Fusion-Task-Id: FN-5788

Fusion-Task-Lineage: 5930f662-908e-4cf0-a0d4-68b2f4360074
2026-05-31 15:59:59 -07:00
gsxdsm
06d84905ba FN-5783: enforce branch-group autoMerge precedence for shared promotions
Honor group-level autoMerge precedence when promoting shared branch groups.

- add core/store helpers to preserve branch-group autoMerge overrides and resolve effective precedence against task/project settings
- gate branch-group promotion eligibility in engine merge coordination and emit promotion-gated audit metadata
- update dashboard planning/subtask flows for shared mission triage routing and add reliability/unit coverage
- include docs and changeset updates for branch-group autoMerge precedence behavior

Files changed:
 .../fn-5783-branch-group-automerge-precedence.md   |   5 +
 AGENTS.md                                          |   1 +
 docs/settings-reference.md                         |   2 +-
 docs/workflow-steps.md                             |   2 +
 .../core/src/__tests__/branch-group-store.test.ts  |  18 ++++
 packages/core/src/__tests__/task-merge.test.ts     |  18 ++++
 packages/core/src/index.ts                         |   1 +
 packages/core/src/mission-store.ts                 |  13 +++
 packages/core/src/store.ts                         |  17 ++++
 packages/core/src/task-merge.ts                    |   8 ++
 .../dashboard/src/__tests__/mission-e2e.test.ts    |  98 ++++++++++++++++--
 .../src/__tests__/routes-planning.test.ts          | 109 ++++++++++++++++++++-
 packages/dashboard/src/planning.ts                 |   1 +
 .../src/routes/register-planning-subtask-routes.ts |  28 ++++++
 packages/dashboard/src/subtask-breakdown.ts        |   1 +
 .../branch-group-automerge-precedence.test.ts      | 102 +++++++++++++++++++
 packages/engine/src/group-merge-coordinator.ts     |  31 +++++-
 packages/engine/src/merger.ts                      |  30 ++++--
 18 files changed, 466 insertions(+), 19 deletions(-)

Fusion-Task-Id: FN-5783

Fusion-Task-Lineage: 74327984-b14f-445c-81cd-5295ee562382
2026-05-31 15:17:11 -07:00
gsxdsm
e2101ea721 FN-5785: add group-level pull request support for branch_groups
Add a single group-level pull request path for branch_groups in task lifecycle workflows.

- add CLI task lifecycle logic to create one pull request per branch group
- update task lifecycle tests to cover grouped pull request behavior and edge cases
- document the pull/merge dashboard behavior update
- add a changeset for @runfusion/fusion patch release

Files changed:
 .changeset/fn-5785-group-pr.md                     |   7 +
 docs/dashboard-guide.md                            |   1 +
 .../src/commands/__tests__/task-lifecycle.test.ts  | 294 ++++++++++++++++++++-
 packages/cli/src/commands/task-lifecycle.ts        | 156 ++++++++++-
 4 files changed, 443 insertions(+), 15 deletions(-)

Fusion-Task-Id: FN-5785

Fusion-Task-Lineage: 3100dedd-5b41-4cde-a56c-291410563568
2026-05-31 13:50:23 -07:00
gsxdsm
0c425788cb FN-5782: wire branch groups into merge routing
Connect branch_group metadata through planning and merge execution for grouped integration branches.

- propagate `branchGroup` and `branchGroupName` through core store types, merge metadata, and CLI task lifecycle APIs
- add merge coordination that computes branch-group plans and routes grouped tasks via `group-merge-coordinator`
- extend finalize-plan, merger, and reliability tests to cover grouped merge routing and integration behavior
- document the architecture update and add a patch changeset for `@runfusion/fusion`

Files changed:
 .changeset/fn-5782-branch-group-merge.md           |   7 +
 docs/architecture.md                               |   2 +
 packages/cli/src/commands/__tests__/task-lifecycle.test.ts  |  64 ++++++++-
 packages/cli/src/commands/task-lifecycle.ts        |   4 +
 packages/core/src/__tests__/branch-group-store.test.ts  |  20 +++
 packages/core/src/__tests__/task-merge.test.ts     |  64 +++++++++
 packages/core/src/store.ts                         |  22 ++-
 packages/core/src/task-merge.ts                    |  26 +++-
 packages/core/src/types.ts                         |   2 +-
 packages/engine/src/__tests__/experiment-finalize-plan.test.ts |  33 ++++-
 packages/engine/src/__tests__/group-merge-coordinator.test.ts  |  62 +++++++++
 packages/engine/src/__tests__/reliability-interactions/branch-group-merge-routing.test.ts | 153 +++++++++++++++++++++
 packages/engine/src/experiment/finalize-plan.ts    |  62 +++++++--
 packages/engine/src/group-merge-coordinator.ts     |  51 +++++++
 packages/engine/src/index.ts                       |   4 +
 packages/engine/src/merger.ts                      |  47 ++++++-
 16 files changed, 601 insertions(+), 22 deletions(-)

Fusion-Task-Id: FN-5782
Fusion-Task-Lineage: 0a70cfaa-2379-4955-b295-64de1f3093c8
2026-05-31 13:50:23 -07:00