Commit Graph

6987 Commits

Author SHA1 Message Date
gsxdsm
bb87ac0693 FN-5905: remove orphaned .skip stubs from soft-delete test
Remove obsolete placeholder skips from the soft-delete end-to-end suite.

- delete six orphaned `it.skip(...)` stub cases from `soft-delete-end-to-end.test.ts`
- keep the reliability interaction test focused on active end-to-end assertions instead of cross-file placeholder notes

Files changed:
 packages/engine/src/__tests__/reliability-interactions/soft-delete-end-to-end.test.ts | 49 ----------------------
 1 file changed, 49 deletions(-)

Fusion-Task-Id: FN-5905
Fusion-Task-Lineage: 2edd9ef8-e5f4-492e-9bd0-a58963ac2e58
2026-06-02 16:21:07 -07:00
gsxdsm
32f8cac284 FN-5903: fix SkillsView mobile row wrapping
Keep mobile discovered-skill rows aligned after toggles and skill enablement.

- keep .skills-view-item rows from wrapping at the mobile breakpoint
- let .skills-view-item-info flex instead of forcing full-width stacking
- add CSS regression coverage for the mobile row layout and toggle geometry
- add component coverage that preserves row structure across enabled and disabled toggle states

Files changed:
 packages/dashboard/app/components/SkillsView.css   |  5 ++-
 .../components/__tests__/SkillsView.css.test.ts    | 49 ++++++++++++++++++++++
 .../app/components/__tests__/SkillsView.test.tsx   | 47 +++++++++++++++++++++
 .../__tests__/skills-view-mobile.test.tsx          |  9 ++--
 4 files changed, 104 insertions(+), 6 deletions(-)

Fusion-Task-Id: FN-5903

Fusion-Task-Lineage: 1004a702-28e7-4e7e-af22-591cc122be01
2026-06-02 16:11:42 -07:00
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
8d9bbc1906 FN-5895: fix MissionManager interview resume behavior
Keep MissionManager mission interview state and detail rendering in sync while stabilizing the failing test coverage.

- reload assertion-linked feature data when mission details or milestone panels load
- keep selected mission detail state synchronized after mission update events instead of forcing a full mission reload
- hide the sidebar edit form while the selected mission is already being edited in the detail pane
- add a non-destructive Send to background action for resume-launched mission interview modals
- tighten MissionManager tests to target the detail pane and slice-scoped controls that now render alongside sidebar content

Files changed:
docs/missions.md                                   |  2 +-
 .../app/components/MissionInterviewModal.tsx       | 30 ++++++++
 .../dashboard/app/components/MissionManager.tsx    | 77 +++++++++++--------
 .../components/__tests__/MissionManager.test.tsx   | 88 +++++++++++++++-------
 4 files changed, 137 insertions(+), 60 deletions(-)

Fusion-Task-Id: FN-5895

Fusion-Task-Lineage: d018a945-33a7-4471-9636-35bc36dc88a9
2026-06-02 14:30:35 -07:00
gsxdsm
b95e7f7575 FN-5894: share project data-boundary and status helpers
Centralize project loading and status-state handling across dashboard surfaces.

- add a reusable DataBoundary component for loading, empty, error, and loaded states
- extract shared project status config helpers for labels, colors, icons, and initializing detection
- update project overview, cards, badges, and selector UI to use the shared helpers
- add regression coverage for data-boundary behavior, project overview empty/loading transitions, and status config fallbacks

Files changed:
 packages/dashboard/app/components/DataBoundary.tsx | 64 ++++++++++++++++++++++
 packages/dashboard/app/components/ProjectCard.tsx  | 48 ++--------------
 .../app/components/ProjectHealthBadge.tsx          | 45 +--------------
 .../dashboard/app/components/ProjectOverview.tsx   |  4 +-
 .../dashboard/app/components/ProjectSelector.tsx   | 27 +--------
 .../app/components/__tests__/DataBoundary.test.tsx | 62 +++++++++++++++++++++
 .../components/__tests__/ProjectOverview.test.tsx  | 25 +++++++++
 .../__tests__/ProjectThemeTokens.test.tsx          | 37 ++++---------
 .../utils/__tests__/projectStatusConfig.test.ts    | 53 ++++++++++++++++++
 .../dashboard/app/utils/projectStatusConfig.ts     | 50 +++++++++++++++++
 packages/dashboard/vitest.config.ts                |  2 +
 11 files changed, 282 insertions(+), 135 deletions(-)

Fusion-Task-Id: FN-5894

Fusion-Task-Lineage: 3626a4af-b62b-456d-82d7-cf47bbf55c21
2026-06-02 14:14:24 -07:00
gsxdsm
65ddb4d4f5 FN-5893: require invariant-level bug regression coverage
Add invariant-first regression guidance to triage prompts and testing docs.

- add an AGENTS standing rule to cover bug-fix invariants across all known surfaces
- update standard, fast, and core triage prompt templates to require invariant-level regression tests
- add triage regression tests that lock the new wording into standard, fast, and core prompts
- link docs/testing guidance back to the new invariant-over-repro rule

Files changed:
 AGENTS.md                                    |  7 ++++++
 docs/testing.md                              |  1 +
 packages/core/src/agent-prompts.ts           |  3 ++-
 packages/engine/src/__tests__/triage.test.ts | 32 ++++++++++++++++++++++++++++
 packages/engine/src/triage.ts                |  6 ++++--
 5 files changed, 46 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-5893

Fusion-Task-Lineage: 31c082c6-2a0a-4619-a13b-94dad97eef62
2026-06-02 14:02:36 -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
a6989ed7f4 FN-5891: respect validator model settings in mission validation
Use the configured validator lane when creating mission validation sessions.

- resolve mission validation session models from test mode, assigned agent runtime, and validator/default task settings in precedence order
- surface validation session creation failures as mission validation errors instead of triggering fix-feature retries
- add regression coverage and documentation for mission validation model resolution and error handling

Files changed:
 AGENTS.md                                          |   1 +
 docs/missions.md                                   |   4 +-
 docs/settings-reference.md                         |   6 +-
 .../src/__tests__/mission-execution-loop.test.ts   | 252 ++++++++++++++++++++-
 packages/engine/src/mission-execution-loop.ts      |  63 +++++-
 5 files changed, 316 insertions(+), 10 deletions(-)

Fusion-Task-Id: FN-5891

Fusion-Task-Lineage: 6254daee-fb6b-4ebb-9fb4-3636237404b1
2026-06-02 12:38:09 -07:00
gsxdsm
8156382d76 FN-5889: suppress post-done continuation wedges
Keep completed post-done continuation errors from wedging review tasks in a failed state.

- route step-session non-continuable continuation errors through the executor recovery path before marking tasks failed
- add self-healing recovery and run-audit events for in-review tasks already wedged by post-done non-continuable errors
- extend reliability coverage and architecture/backstop docs for the new post-done wedge handling

Files changed:
 AGENTS.md                                          |   1 +
 docs/architecture.md                               |   3 +-
 packages/engine/src/__tests__/reliability-interactions/post-done-continuation-no-wedge.test.ts        | 131 ++++++++++++++++++++-
 packages/engine/src/executor.ts                    |  11 +-
 packages/engine/src/run-audit.ts                   |   2 +
 packages/engine/src/self-healing.ts                |  97 ++++++++++++++-
 6 files changed, 236 insertions(+), 9 deletions(-)

Fusion-Task-Id: FN-5889

Fusion-Task-Lineage: c22716f2-cddb-4c98-ac87-0282017e7c82
2026-06-02 11:03:18 -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
742a564491 FN-5888: retry non-continuable sessions with a fresh session
Retry incomplete executor work with a fresh session after non-continuable session errors.

- add executor recovery handling that clears session state and requeues incomplete tasks to todo while retry budget remains
- preserve terminal failure behavior once the fresh-session retry budget is exhausted
- extend reliability coverage and AGENTS.md backstop notes for the new retry path

Files changed:
 AGENTS.md                                          |  1 +
 .../post-done-continuation-no-wedge.test.ts        | 48 +++++++++++++++++++++-
 packages/engine/src/executor.ts                    | 40 ++++++++++++++++++
 3 files changed, 87 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-5888

Fusion-Task-Lineage: 4ebce260-8923-4599-aced-541533b94543
2026-06-02 10:14:20 -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
cc5e61dbc4 FN-5882: fix mission interview draft resume handling
Keep mission interview drafts recoverable when closing and refreshing Missions.

- make MissionInterviewModal use a single non-destructive close path for header, Escape, and backdrop actions
- refresh mission interview draft/session rows on mission and ai-session SSE updates and reconnects
- open Plan New Mission as a fresh interview instead of always resuming the last session, with regression coverage and docs updates

Files changed:
 docs/missions.md                                   |   2 +-
 .../app/components/MissionInterviewModal.tsx       |  89 +++-----
 .../dashboard/app/components/MissionManager.tsx    | 156 ++++++++++----
 .../__tests__/MissionInterviewModal.test.tsx       | 100 ++++++++-
 .../components/__tests__/MissionManager.test.tsx   | 224 +++++++++++++++++++++
 5 files changed, 455 insertions(+), 116 deletions(-)

Fusion-Task-Id: FN-5882

Fusion-Task-Lineage: 75de9e94-edef-4564-a266-91782e60c2ac
2026-06-02 10:04:38 -07:00
gsxdsm
9e00a72d7d FN-5884: preserve quick chat session across reopens
Keep quick chat warm and restore the last opened conversation per project.

- persist the active quick chat session id in per-project local storage and restore it before falling back to latest activity
- retain in-memory quick chat state across close/reopen while resetting chat state correctly when the project changes
- add storage, hook, and FAB coverage for restored sessions, warm reopen behavior, and project switching; document the updated quick chat behavior

Files changed:
 docs/dashboard-guide.md                            |   3 +-
 packages/dashboard/app/components/QuickChatFAB.tsx |  29 ++++--
 .../app/components/__tests__/QuickChatFAB.test.tsx | 112 +++++++++++++++++++--
 .../__tests__/quickChatLastSessionStorage.test.ts  |  55 ++++++++++
 .../app/hooks/__tests__/useQuickChat.test.ts       |  70 +++++++++++++
 .../app/hooks/quickChatLastSessionStorage.ts       |  41 ++++++++
 packages/dashboard/app/hooks/useQuickChat.ts       |  25 +++++
 7 files changed, 319 insertions(+), 16 deletions(-)

Fusion-Task-Id: FN-5884

Fusion-Task-Lineage: 4d689611-1824-41db-8fc2-d543407316ff
2026-06-02 09:34:19 -07:00
gsxdsm
cf3b9a575e FN-5886: show empty usage state after empty fetch
Handle empty usage responses without leaving the panel in its loading skeleton.

- add a hasFetched flag to useUsageData so the UI can distinguish initial loading from an empty completed response
- update UsageIndicator to render the skeleton only before the first fetch completes and show the empty state afterward
- refresh dashboard hook and component tests to cover empty fetches, refresh behavior, and the new loading semantics

Files changed:
 .../dashboard/app/components/UsageIndicator.tsx    |  19 +-
 .../components/__tests__/UsageIndicator.test.tsx   | 395 +++++++++++----------
 .../app/hooks/__tests__/useUsageData.test.ts       |  42 ++-
 packages/dashboard/app/hooks/useUsageData.ts       |   5 +
 4 files changed, 245 insertions(+), 216 deletions(-)

Fusion-Task-Id: FN-5886

Fusion-Task-Lineage: 8fa901a9-3167-4e33-a082-e5de95f692da
2026-06-02 09:24:42 -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
1a065f2637 FN-5873: trim async waits in SettingsModal tests
Reduce SettingsModal test setup overhead around Remote and Notifications flows.

- switch key authentication assertions to await section controls directly instead of waiting for full modal readiness
- share a zero-delay user-event instance across Remote and Notifications suites and consolidate default-render setup in nested describe blocks
- replace several clear/type interaction sequences with direct change events to cut async churn while preserving coverage

Files changed:
 .../components/__tests__/SettingsModal.test.tsx    | 473 ++++++++++-----------
 1 file changed, 224 insertions(+), 249 deletions(-)

Fusion-Task-Id: FN-5873

Fusion-Task-Lineage: d1f33301-a43f-467f-97e8-b7bfad28e009
2026-06-02 09:05:22 -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
f20c37471d FN-5881: guard project status badges against unknown states
Prevent Projects view status rendering from crashing on unknown or missing project states.

- add fallback status config helpers to ProjectCard, ProjectHealthBadge, and ProjectSelector
- format unknown status strings into readable labels and default missing values to Unknown
- add regression tests for unknown and missing statuses across project dashboard components
- document graceful degradation for transient registry or health status mismatches

Files changed:
 docs/multi-project.md                              |  1 +
 packages/dashboard/app/components/ProjectCard.tsx  | 36 ++++++++++++++++-
 .../app/components/ProjectHealthBadge.tsx          | 36 ++++++++++++++++-
 .../dashboard/app/components/ProjectSelector.tsx   | 15 ++++++-
 .../app/components/__tests__/ProjectCard.test.tsx  | 31 +++++++++++++-
 .../__tests__/ProjectHealthBadge.test.tsx          | 47 ++++++++++++++++++++++
 .../components/__tests__/ProjectSelector.test.tsx  | 24 ++++++++++-
 7 files changed, 182 insertions(+), 8 deletions(-)

Fusion-Task-Id: FN-5881

Fusion-Task-Lineage: 55a9df6f-3fcb-46e8-9e83-3494312b4c24
2026-06-02 08:49:25 -07:00
gsxdsm
5bad807189 FN-5879: restore desktop tab scrolling in task detail modal
Keep the task detail tab strip scrollable on desktop without shrinking tab labels.

- move horizontal tab-strip scrolling and momentum styles into the base .detail-tabs rule
- keep .detail-tab items from shrinking at all viewport sizes so overflow remains scrollable
- add a CSS contract test for the base tab strip behavior and extend task detail API mocks with refreshPrStatus

Files changed:
 packages/dashboard/app/components/TaskDetailModal.css              | 7 ++++---
 .../dashboard/app/components/__tests__/TaskDetailModal.css.test.ts | 7 +++++++
 .../app/components/__tests__/TaskDetailModal.test-helpers.ts       | 1 +
 3 files changed, 12 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-5879

Fusion-Task-Lineage: b990a88e-7b1d-44d9-b222-986a28ae143d
2026-06-02 08:46:04 -07:00
gsxdsm
0006408181 FN-5874: persist fast-forward merge details
Persist merge metadata for AI fast-forward landings and done-task recovery.

- capture landed files and shortstat metadata from the single landed commit in the AI merge finalizer
- persist mergeDetails and modifiedFiles for landed squash commits, and record commit associations without setting no-op attribution flags
- extend done-task self-healing to backfill merge metadata when baseCommitSha exists but mergeDetails is empty
- add reliability and self-healing coverage for landed-file persistence, empty AI merges, and recovery behavior

Files changed:
 AGENTS.md                                          |   1 +
 .../ai-merge-ff-landed-files.test.ts               | 150 +++++++++++++++++++++
 packages/engine/src/__tests__/self-healing.test.ts |  76 +++++++++++
 packages/engine/src/merger-ai.ts                   |  40 +++++-
 packages/engine/src/merger.ts                      |  30 ++++-
 packages/engine/src/self-healing.ts                |  11 +-
 6 files changed, 303 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-5874

Fusion-Task-Lineage: a407910c-9ce8-4049-86ef-e80f045c981a
2026-06-02 08:35:47 -07:00
gsxdsm
419d6cda86 FN-5877: add sync-with-origin remotes action
Add a one-click Remotes sync flow that rebases on pull before pushing.

- add a Sync button in Git Manager Remotes that runs pull --rebase and then push
- stop before pushing when the rebase pull reports a conflict or fails, and surface toasts/status updates
- cover successful, conflicting, failing, and loading sync behavior in GitManagerModal tests
- document the new Sync action in the dashboard guide

Files changed:
 docs/dashboard-guide.md                            |   1 +
 .../dashboard/app/components/GitManagerModal.tsx   |  39 ++++++++
 .../components/__tests__/GitManagerModal.test.tsx  | 100 +++++++++++++++++++++
 3 files changed, 140 insertions(+)

Fusion-Task-Id: FN-5877

Fusion-Task-Lineage: 2e28c00d-b965-4f44-a6fa-26536d91d16d
2026-06-02 08:25:46 -07:00
gsxdsm
8b839d79e8 FN-5878: re-hide revealed secrets from the eye toggle
Let users hide a revealed secret again from the row visibility toggle.

- add a hideSecret helper that clears reveal timers and resets the revealed value
- make the row eye toggle switch between reveal and hide states instead of reveal-only
- add a SecretsView regression test covering reveal, hide, and copy button state changes

Files changed:
 packages/dashboard/app/components/SecretsView.tsx         | 18 +++++++++-
 packages/dashboard/app/components/__tests__/SecretsView.test.tsx | 40 ++++++++++++++++++++++
 2 files changed, 57 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-5878

Fusion-Task-Lineage: 936195db-88c9-48f5-8273-9b930bf6b858
2026-06-02 08:14:10 -07:00
gsxdsm
dd1024fe0b FN-5871: streamline SettingsModal tests
Reduce SettingsModal test overhead by reusing setup and waiting on stable UI signals.

- replace generic waitFor polling with findBy* queries and direct mock call assertions
- consolidate project-general persistence coverage and split default-value checks from save-path assertions
- share Memory and Merge section setup across related tests to avoid repeated navigation and duplicate work

Files changed:
 packages/dashboard/app/components/__tests__/SettingsModal.test.tsx | 333 ++++++++-------------
 1 file changed, 127 insertions(+), 206 deletions(-)

Fusion-Task-Id: FN-5871

Fusion-Task-Lineage: 1b625571-f16e-4aec-8640-22d8f3bb8139
2026-06-02 08:10:35 -07:00
gsxdsm
3989193cf2 FN-5876: prevent mobile quick-entry autofocus
Avoid restoring focus to the new-task quick entry on mobile while preserving desktop behavior.

- gate quick-entry autofocus and post-submit focus restoration behind a desktop-width check
- add desktop and mobile coverage for initial focus behavior
- add mobile coverage for avoiding focus restoration after successful task creation

Files changed:
 .../dashboard/app/components/QuickEntryBox.tsx     |  5 ++-
 .../components/__tests__/QuickEntryBox.test.tsx    | 42 ++++++++++++++++++++++
 2 files changed, 46 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-5876

Fusion-Task-Lineage: ede08207-6506-4f5e-8a6f-f7f1cbfb37c9
2026-06-02 08:08:01 -07:00
gsxdsm
91784d9acf FN-5875: fix hidden usage row count
Keep the usage indicator's hidden-row toggle in sync with rendered duplicate windows.

- count hidden usage rows from the currently rendered provider windows instead of persisted label entries
- preserve the Show hidden button when duplicate live windows share a stored hidden label
- add a regression test covering duplicate Daily windows with persisted hidden state

Files changed:
 .../dashboard/app/components/UsageIndicator.tsx    | 12 ++++++-
 .../components/__tests__/UsageIndicator.test.tsx   | 42 ++++++++++++++++++++++
 2 files changed, 53 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-5875

Fusion-Task-Lineage: 648f9cb9-ea0a-4573-b08f-b1a412a46ae4
2026-06-02 07:52:04 -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
336010007c FN-5870: speed up routes-agents workflow tests
Reduce routes-agents workflow route test overhead while preserving coverage.

- collapse repetitive workflow-step create and update route permutations into helper-driven it.each tables
- reuse shared Express app fixtures across workflow-step, refine, diagnostics, and template describe blocks to avoid repeated setup cost
- update the FN-5048 speed audit with the new routes-agents timing improvement and landed optimization notes

Files changed:
 docs/test-speed-audit-FN-5048.md                   |    4 +-
 .../dashboard/src/__tests__/routes-agents.test.ts  | 1076 +++++++++++---------
 2 files changed, 591 insertions(+), 489 deletions(-)

Fusion-Task-Id: FN-5870

Fusion-Task-Lineage: 64d25216-72d1-4fd7-a949-f5f1bc4bd90c
2026-06-02 07:44:21 -07:00
gsxdsm
7c7fb065dc fix(dashboard): remove Lineage commit associations from Task Changes UI
The lineage commit associations panel surfaced low-value provenance
metadata. Remove the UI section, its dead state/fetch wiring in
TaskChangesTab, the orphaned .task-lineage-* CSS, and the obsolete
tests. The fetchTaskCommitAssociations API helper is retained.
2026-06-02 07:40:37 -07:00
gsxdsm
be95b3f2c3 FN-5854: preselect default model for new chats
Preselect the resolved default model when creating a new model-based chat.

- pass the resolved default model into the new chat dialog
- preserve and restore the default model selection when switching into model mode
- add ChatView coverage for default-model preselection, create enablement, and unresolved-default fallback

Files changed:
 packages/dashboard/app/components/ChatView.tsx     | 18 +++++-
 packages/dashboard/app/components/__tests__/ChatView.test.tsx     | 65 ++++++++++++++++++++--
 2 files changed, 75 insertions(+), 8 deletions(-)

Fusion-Task-Id: FN-5854

Fusion-Task-Lineage: d1ace008-0354-44b4-90c8-e0370f38b6bf
2026-06-02 04:01:31 -07:00
gsxdsm
f4cbaed494 FN-5866: suppress post-done non-continuable session errors
Keep completed executor work in review when session continuation is no longer possible.

- detect non-continuable session errors separately from unsupported message role failures
- suppress post-done continuation errors once task work is already complete and clear any failed state before review handoff
- add regression coverage for completed vs incomplete continuation failures and document the FN-5866 backstop

Files changed:
 AGENTS.md                                          |   1 +
 .../post-done-continuation-no-wedge.test.ts        | 169 +++++++++++++++++++++
 .../src/__tests__/transient-error-detector.test.ts |  27 ++++
 packages/engine/src/executor.ts                    |  41 ++++-
 packages/engine/src/transient-error-detector.ts    |   8 +
 5 files changed, 245 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-5866

Fusion-Task-Lineage: b5cffce4-7c14-40f6-b12e-84b9acdf7f50
2026-06-02 01:48:26 -07:00
gsxdsm
e549d7af30 FN-5849: shard dashboard quality Vitest runs
Split the dashboard quality Vitest lane into bounded heap-managed shards to avoid signal exits.

- replace the single dashboard quality test command with sequential app and API shard scripts
- add a heap wrapper plus Vitest config shard definitions for foundation, component, App, ChatView, and SettingsModal coverage
- add guard tests for the sharded dashboard test configuration and restore spinner-animation.css.test.ts to foundation-ui coverage
- update the CLI package-config test expectations for the new dashboard test script layout

Files changed:
 packages/cli/src/__tests__/package-config.test.ts  |   8 +-
 packages/dashboard/package.json                    |  18 +-
 packages/dashboard/scripts/run-vitest-with-heap.mjs     |  41 ++++
 packages/dashboard/src/__tests__/dashboard-test-config-guard.test.ts  |  77 ++++++
 packages/dashboard/vitest.config.ts                | 273 ++++++++++++++++++++-
 5 files changed, 407 insertions(+), 10 deletions(-)

Fusion-Task-Id: FN-5849

Fusion-Task-Lineage: 522f3963-4647-4a59-bb6b-a3dacfbf620e
2026-06-02 00:53:39 -07:00
gsxdsm
04e1701d90 FN-5864: stabilize ChatView skill-menu keyboard assertions
Make the ChatView skill-menu keyboard navigation test wait for async UI updates.

- wrap the highlighted-option assertion after ArrowUp in waitFor to avoid synchronous timing races
- wait for the textarea value update after Enter selection before asserting the chosen skill command

Files changed:
 packages/dashboard/app/components/__tests__/ChatView.test.tsx | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-5864

Fusion-Task-Lineage: 9f1b3988-7022-415f-8d4b-83b0b3b25dfb
2026-06-02 00:34:43 -07:00
gsxdsm
e36fb451a8 FN-5863: harden secondary worktree recovery test path
Tighten the branch-conflicts recovery test to use an isolated secondary worktree root.

- create a unique temporary parent directory for the detached secondary worktree
- track the temporary root for cleanup instead of only the nested worktree path
- keep the reanchor regression focused on detached worktree recovery behavior

Files changed:
 packages/engine/src/__tests__/branch-conflicts-recovery.test.ts | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-5863

Fusion-Task-Lineage: 6cfb02c0-e9fd-456d-a78b-451e3e0707b2
2026-06-02 00:26:38 -07:00
gsxdsm
76a5337833 FN-5861: preserve FileEditor instance across content updates
Keep the memory/file editor stable while controlled content updates flow through CodeMirror.

- stop recreating the editor view when content and editor options change
- reconfigure line numbers, word wrap, read-only state, and language in place via compartments
- add regression tests for editor instance preservation and caret stability during controlled edits

Files changed:
 packages/dashboard/app/components/FileEditor.tsx         | 34 +++++++++++++++-
 packages/dashboard/app/components/__tests__/FileEditor.test.tsx | 47 +++++++++++++++++++++-
 2 files changed, 79 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-5861

Fusion-Task-Lineage: a8c5c4b0-ff5f-4f25-9e65-ed3f31c2b893
2026-06-02 00:23:05 -07:00
gsxdsm
a381863b5c FN-5860: allow Shift+Enter newlines in collapsed quick entry
Ensure quick entry keeps Shift+Enter newline behavior even before expansion.

- allow Shift+Enter to bypass submit handling in any quick-entry state
- expand the quick entry when Shift+Enter inserts a newline from the collapsed state
- update QuickEntryBox coverage to verify newline behavior without submission while collapsed

Files changed:
 packages/dashboard/app/components/QuickEntryBox.tsx         |  5 +++--
 packages/dashboard/app/components/__tests__/QuickEntryBox.test.tsx | 13 ++++++++-----
 2 files changed, 11 insertions(+), 7 deletions(-)

Fusion-Task-Id: FN-5860

Fusion-Task-Lineage: 58a65cb7-2d5b-45bb-bce9-8ffdbebbe586
2026-06-02 00:14:28 -07:00
gsxdsm
b9bcae6ea4 FN-5859: resolve task card agent names from cache
Resolve task card agent badges to show assigned and source agent names without fetch delay.

- use the agents map cache to resolve assigned agent names before falling back to fetches or raw ids
- prefer cached source agent names for agent-created provenance badges while preserving the generic fallback when no name is available
- add TaskCard coverage for cached agent badge rendering, provenance label resolution, and fallback behavior

Files changed:
 packages/dashboard/app/components/TaskCard.tsx     | 51 ++++++++++++---
 .../app/components/__tests__/TaskCard.test.tsx     | 76 ++++++++++++++++++++--
 2 files changed, 114 insertions(+), 13 deletions(-)

Fusion-Task-Id: FN-5859

Fusion-Task-Lineage: ac15f69a-50ca-48c5-a7a8-fb6c5e48af70
2026-06-02 00:10:21 -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
b6c15fe470 FN-5855: fix frozen dashboard spinners
Restore shared spinner animation behavior for dashboard AI activity indicators.

- switch BackgroundTasksIndicator loaders to the shared animate-spin utility class
- anchor shared spin utilities on SVG centers with transform-origin and transform-box rules
- add CSS regression tests covering global spin keyframes and spinner utility styles

Files changed:
 .../app/__tests__/spinner-animation.css.test.ts    | 50 ++++++++++++++++++++++
 .../app/components/BackgroundTasksIndicator.tsx    |  9 ++--
 packages/dashboard/app/styles.css                  |  7 +++
 3 files changed, 60 insertions(+), 6 deletions(-)

Fusion-Task-Id: FN-5855

Fusion-Task-Lineage: b94d4333-2e78-4c4b-a304-5a13b797bbc6
2026-06-01 23:29:21 -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
41c891d7d8 FN-5850: add AI goal description drafting
Add AI-assisted goal description drafting from the Goals view add form.

- add a readonly AI drafting flow for goal descriptions with title validation and shared rate limiting
- expose a new /api/ai/draft-goal-description endpoint and dashboard API helper for requesting drafts
- add Goals view UI, styling, tests, and dashboard docs covering the draft workflow

Files changed:
 docs/dashboard-guide.md                            |   6 +
 packages/dashboard/app/api/legacy.ts               |  24 +++-
 packages/dashboard/app/components/GoalsView.css    |  14 ++
 packages/dashboard/app/components/GoalsView.tsx    |  46 +++++-
 packages/dashboard/app/components/__tests__/GoalsView.test.tsx    |  50 +++++++
 packages/dashboard/src/__tests__/ai-refine.test.ts |  75 ++++++++++
 packages/dashboard/src/__tests__/routes-agents.test.ts  |  92 ++++++++++++
 packages/dashboard/src/ai-refine.ts                | 155 ++++++++++++++++++---
 packages/dashboard/src/routes.ts                   |  58 ++++++++
 9 files changed, 489 insertions(+), 31 deletions(-)

Fusion-Task-Id: FN-5850

Fusion-Task-Lineage: $#%
!

2026-06-01 22:50:41 -07:00
gsxdsm
70e7a6b30a FN-5852: persist queued chat messages across navigation
Keep queued follow-up chat drafts across session switches, reloads, and view re-entry.

- persist queued pending-message text per chat session in shared localStorage helpers
- restore and flush queued follow-up messages in full Chat when returning to an active session
- restore and flush queued follow-up messages in Quick Chat and cover the recovery path with tests
- document queued-message persistence behavior in the dashboard guide

Files changed:
 docs/dashboard-guide.md                            |   2 +
 .../dashboard/app/hooks/__tests__/useChat.test.ts  | 119 +++++++++++++++++-
 .../app/hooks/__tests__/useQuickChat.test.ts       | 135 +++++++++++++++++++++
 .../app/hooks/chatPendingMessageStorage.ts         |  48 ++++++++
 packages/dashboard/app/hooks/useChat.ts            |  38 ++++++
 packages/dashboard/app/hooks/useQuickChat.ts       |  35 ++++++
 6 files changed, 376 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-5852

Fusion-Task-Lineage: 1cddfb19-7e02-40e5-b373-5d593dfcfe2a
2026-06-01 22:11:30 -07:00
gsxdsm
a21038de6d Fix flaky recoverIfCorrupt test across sqlite3 builds
Whether `sqlite3 .recover` can rebuild a given byte-level corruption is
build-dependent — CI's sqlite3 returned "failed" (the safe outcome: leave
the corrupt original untouched rather than swap in an unverified rebuild)
where the local build returned "recovered". Assert the contract for whichever
branch is taken instead of hard-requiring "recovered".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 22:09:19 -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