Commit Graph

180 Commits

Author SHA1 Message Date
Fusion Agent
eab7635f83 FN-109: enable task-card board panning
Allow users to pan the desktop and tablet board from noninteractive task-card surfaces without disrupting controls or mobile scrolling.

- Start horizontal panning from eligible task-card bodies and text while preserving native controls and editing behavior.
- Wire board pan state and cursor styling across live board roots while keeping mobile snap and touch scrolling unchanged.
- Add regression coverage, documentation updates, and a patch changeset.

Files changed:
 .changeset/fn-109-board-card-pan.md                |  7 ++
 docs/dashboard-guide.md                            |  5 +-
 docs/task-management.md                            |  4 +-
 packages/dashboard/app/components/Board.css        |  7 +-
 packages/dashboard/app/components/Board.tsx        |  8 +-
 .../app/components/__tests__/Board.test.tsx        | 98 ++++++++++++++++------
 .../app/hooks/__tests__/useBoardMousePan.test.tsx  | 47 ++++++++++-
 packages/dashboard/app/hooks/useBoardMousePan.ts   | 12 +--
 8 files changed, 146 insertions(+), 42 deletions(-)

Fusion-Task-Id: FN-109

Fusion-Task-Lineage: 456bd9d3-9767-4b82-9f99-f191abc44b18

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-08-23 01:35:06 +00:00
Fusion Agent
eb3eeb887a FN-074: remove task splitting and parent deletion
Remove complex-task splitting and parent-deletion behavior across core, dashboard, and engine.

- Remove subtask splitting, breakdown UI, and related API routes and lifecycle handling.
- Add the migration and prompt/documentation updates that enforce the simplified task model.
- Update affected tests and integrations for the removed behavior.

Files changed:
 .changeset/fn-074-removal.md                       |    7 +
 docs/dashboard-guide.md                            |   17 +-
 docs/gitlab-parity-inventory.md                    |    7 +-
 docs/mcp.md                                        |    6 +-
 docs/settings-reference.md                         |   16 +-
 docs/task-management.md                            |   31 +-
 docs/workflow-steps.md                             |   10 +-
 .../cli/skill/fusion/references/task-structure.md  |    2 +-
 .../cli/skill/fusion/workflows/specifications.md   |    4 +-
 packages/core/src/__tests__/agent-prompts.test.ts  |   19 +-
 .../builtin-workflow-settings-triage.test.ts       |   32 +-
 .../src/__tests__/postgres/schema-applier.test.ts  |    2 +-
 .../core/src/__tests__/prompt-overrides.test.ts    |    3 +-
 ...-deleted-observed-dispatch-side-effects.test.ts |    3 -
 .../task-deleted-outbox-consumer-backoff.test.ts   |    1 -
 packages/core/src/agents/agent-prompts.ts          |   56 +-
 packages/core/src/index.ts                         |    2 +-
 .../0062_remove_task_subtask_splitting.sql         |    2 +
 packages/core/src/postgres/schema-applier.ts       |   14 +-
 packages/core/src/postgres/schema/project.ts       |    1 -
 packages/core/src/store.ts                         |   12 +-
 packages/core/src/task-delete-attribution.ts       |   20 +-
 packages/core/src/task-delete-notice.ts            |    7 +-
 .../__tests__/lifecycle-outbox-writer.test.ts      |    4 +-
 .../core/src/task-store/archive-lifecycle-2.ts     |   13 +-
 packages/core/src/task-store/archive-lifecycle.ts  |    6 +-
 packages/core/src/task-store/lifecycle-outbox.ts   |    2 -
 packages/core/src/task-store/persistence.ts        |    2 -
 packages/core/src/task-store/serialization.ts      |    2 -
 packages/core/src/task-store/task-creation.ts      |    2 -
 .../src/task-store/task-deleted-outbox-consumer.ts |    4 -
 packages/core/src/task-store/task-mutation-ops.ts  |    2 +-
 packages/core/src/task-store/task-row-mappers.ts   |    2 +-
 packages/core/src/tasks/prompt-overrides.ts        |   35 -
 packages/core/src/types.ts                         |   12 -
 packages/core/src/types/mesh/archive-planning.ts   |    1 -
 packages/core/src/types/task/task-core.ts          |    3 -
 .../src/workflows/builtin-workflow-settings.ts     |   86 --
 packages/dashboard/app/App.tsx                     |   15 -
 .../mission-planning-modals-mobile.test.ts         |   15 -
 packages/dashboard/app/api/legacy.ts               |   18 +-
 packages/dashboard/app/api/planning/ai-text.ts     |  171 +---
 packages/dashboard/app/api/planning/planning.ts    |   46 -
 packages/dashboard/app/api/tasks/tasks.ts          |    4 +-
 packages/dashboard/app/components/AppModals.tsx    |   39 +-
 packages/dashboard/app/components/Board.tsx        |   10 +-
 packages/dashboard/app/components/Column.tsx       |    9 +-
 .../dashboard/app/components/InlineCreateCard.tsx  |   63 +-
 packages/dashboard/app/components/Lane.tsx         |    3 +-
 packages/dashboard/app/components/ListView.tsx     |   10 +-
 packages/dashboard/app/components/NewTaskModal.tsx |    8 +-
 .../dashboard/app/components/PlanningModeModal.css |  128 ---
 .../dashboard/app/components/PlanningModeModal.tsx |  566 +----------
 .../dashboard/app/components/QuickEntryBox.tsx     |   43 +-
 .../dashboard/app/components/SettingsModal.tsx     |    2 -
 .../app/components/SubtaskBreakdownModal.tsx       |  932 -----------------
 packages/dashboard/app/components/TaskCard.tsx     |    1 -
 packages/dashboard/app/components/TaskForm.tsx     |   23 +-
 .../__tests__/AgentPromptsManager.test.tsx         |    1 -
 .../app/components/__tests__/AppModals.test.tsx    |   92 +-
 .../app/components/__tests__/Board.test.tsx        |   69 +-
 .../components/__tests__/InlineCreateCard.test.tsx |  170 ----
 .../app/components/__tests__/ListView.test.tsx     |   38 -
 .../app/components/__tests__/NewTaskModal.test.tsx |   48 -
 .../components/__tests__/QuickEntryBox.test.tsx    |  293 +-----
 .../__tests__/SubtaskBreakdownModal.test.tsx       |  933 -----------------
 ...skDetail.mobile-transition.board-panel.test.tsx |    1 -
 .../__tests__/TaskDetail.swipe-back.test.tsx       |    1 -
 .../app/components/__tests__/TaskForm.test.tsx     |   67 --
 .../__tests__/WorkflowSettingsPanel.test.tsx       |   51 -
 .../app/components/__tests__/board-mobile.test.tsx |   20 -
 .../composer-settings-read-isolation.test.tsx      |   30 -
 .../components/__tests__/migratedModalFixtures.tsx |    2 -
 .../app/components/dashboard/MainContent.tsx       |    5 -
 .../dashboard/__tests__/DashboardBanners.test.tsx  |    1 -
 .../__tests__/MainContent.graph-popout.test.tsx    |    1 -
 .../dashboard/app/components/dashboard/types.ts    |    2 -
 .../app/components/workflow-setting-display.ts     |   10 -
 ...ckgroundSessions.resume-instrumentation.test.ts |    1 -
 .../hooks/__tests__/useBackgroundSessions.test.ts  |   25 +-
 .../app/hooks/__tests__/useModalManager.test.ts    |    3 -
 packages/dashboard/app/hooks/modalPersistence.ts   |   14 -
 .../dashboard/app/hooks/useBackgroundSessions.ts   |    9 +-
 packages/dashboard/app/hooks/useModalManager.ts    |   58 +-
 packages/dashboard/app/hooks/useProjectActions.ts  |    2 +-
 packages/dashboard/app/hooks/useTaskHandlers.ts    |    9 -
 packages/dashboard/app/utils/builtinPrompts.ts     |    7 -
 packages/dashboard/app/utils/projectStorage.ts     |    1 -
 .../src/__tests__/ai-session-diagnostics.test.ts   |    5 +-
 .../src/__tests__/github-tracking-state.test.ts    |   97 --
 .../src/__tests__/gitlab-delete-close.test.ts      |    6 +-
 .../gitlab-parity-inventory-documentation.test.ts  |    1 -
 .../src/__tests__/gitlab-split-close.test.ts       |  125 ---
 .../planning-flow-diagnostics-guardrail.test.ts    |    1 -
 .../src/__tests__/process-lifecycle.test.ts        |    1 -
 .../dashboard/src/__tests__/routes-auth.test.ts    |    2 -
 .../src/__tests__/routes-automation.test.ts        |    2 -
 .../dashboard/src/__tests__/routes-git.test.ts     |    2 -
 .../dashboard/src/__tests__/routes-github.test.ts  |   92 --
 .../src/__tests__/routes-planning-tracking.test.ts |  130 ---
 .../src/__tests__/routes-planning.test.ts          | 1062 +-------------------
 .../dashboard/src/__tests__/routes-system.test.ts  |    2 -
 .../dashboard/src/__tests__/routes-tasks.test.ts   |  902 -----------------
 .../shared-branch-group-entry-points.test.ts       |   93 --
 packages/dashboard/src/ai-session-diagnostics.ts   |    3 +-
 packages/dashboard/src/ai-session-store.ts         |    6 +-
 packages/dashboard/src/ai-session-timeout.ts       |    3 +-
 packages/dashboard/src/github-tracking-state.ts    |   43 +-
 packages/dashboard/src/gitlab-delete-close.ts      |    7 +-
 packages/dashboard/src/gitlab-lifecycle.ts         |    4 +-
 packages/dashboard/src/gitlab-split-close.ts       |  103 --
 packages/dashboard/src/gitlab-tracking-state.ts    |    2 +-
 packages/dashboard/src/index.ts                    |    1 -
 packages/dashboard/src/planning.ts                 |  171 ----
 packages/dashboard/src/routes.ts                   |    6 -
 ...er-planning-subtask-routes.parent-close.test.ts |  120 ---
 .../dashboard/src/routes/register-git-github.ts    |    6 -
 .../src/routes/register-planning-subtask-routes.ts |  773 +-------------
 .../src/routes/register-task-workflow-routes.ts    |    6 +-
 packages/dashboard/src/server.ts                   |    8 -
 packages/dashboard/src/subtask-breakdown.ts        |  833 ---------------
 packages/dashboard/src/triage-trait.ts             |   93 +-
 .../src/__tests__/agent-task-read-tools.test.ts    |    1 -
 .../triage-duplicate-search-regression.test.ts     |    3 -
 .../triage-split-into-subtasks-delete.test.ts      |  222 ----
 packages/engine/src/__tests__/triage.test.ts       |  519 +---------
 packages/engine/src/triage.ts                      |  239 +----
 127 files changed, 214 insertions(+), 10001 deletions(-)

Fusion-Task-Id: FN-074

Fusion-Task-Lineage: 23207799-4ec4-4ec7-bcd7-83cba4d98f53

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-08-21 04:32:53 +00:00
Fusion Agent
be34be7430 FN-073: prevent durable blocks from missing dependencies
Reconcile missing dependency references so task completion and self-healing do not leave durable lifecycle blocks.

- Validate and repair dependency references during task creation and lifecycle operations.
- Reconcile missing dependencies during self-healing and preserve honest blocked completion behavior.
- Add PostgreSQL and executor regression coverage and document the recovery behavior.

Files changed:
docs/task-management.md                            |   5 +-
packages/core/src/__tests__/postgres/task-dependency-mutation.pg.test.ts   | 124 ++++++++++++++++++++
packages/core/src/task-store/archive-lifecycle-2.ts     |  71 +++++++++++-
packages/core/src/task-store/async/async-lifecycle.ts   |  19 ++++
packages/core/src/task-store/project-store-ops.ts  |  46 +++++++-
packages/core/src/task-store/task-creation.ts      |  43 ++++++-
packages/engine/src/__tests__/executor-task-done-blocked.test.ts   |  65 ++++++++++-
packages/engine/src/__tests__/missing-dependency-reconcile.test.ts |  63 +++++++++++
packages/engine/src/executor/create-task-done-tool.ts   |  25 ++++-
packages/engine/src/self-healing.ts                |  58 ++++++++++
10 files changed, 502 insertions(+), 17 deletions(-)

Fusion-Task-Id: FN-073

Fusion-Task-Lineage: 863a07f9-a9d4-4195-b09a-a318689c6382

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-08-21 04:32:52 +00:00
Fusion Agent
3fd4bdbc69 FN-051: disable native task dragging
Remove native task drag-and-drop while preserving board panning and task actions.

- Remove draggable task movement and drop handling from board, columns, lanes, lists, and cards.
- Add task context-menu movement actions and update related documentation and release metadata.
- Update component tests to cover non-draggable cards and board-pan exclusions.

Files changed:
 .changeset/fn-051-task-card-moves.md               |   7 +
 docs/dashboard-guide.md                            |   5 +-
 docs/task-management.md                            |   6 +
 packages/dashboard/app/components/Board.tsx        |  63 +-----
 packages/dashboard/app/components/Column.tsx       | 140 +-------------
 packages/dashboard/app/components/DockTaskList.tsx |   3 +-
 packages/dashboard/app/components/Lane.tsx         |   9 -
 packages/dashboard/app/components/ListView.css     |  12 +-
 packages/dashboard/app/components/ListView.tsx     | 132 ++-----------
 packages/dashboard/app/components/TaskCard.css     |   8 -
 packages/dashboard/app/components/TaskCard.tsx     |  58 ++----
 .../dashboard/app/components/TaskContextMenu.css   |  37 ++++
 .../dashboard/app/components/TaskContextMenu.tsx   | 145 ++++++++++++--
 .../__tests__/Board.canDropTask.test.tsx           | 212 ---------------------
 .../app/components/__tests__/Board.test.tsx        |   8 +-
 .../app/components/__tests__/Column.test.tsx       | 101 +---------
 .../app/components/__tests__/DockTaskList.test.tsx |   5 +-
 .../app/components/__tests__/Lane.test.tsx         |  26 ---
 .../app/components/__tests__/ListView.test.tsx     | 178 +----------------
 .../app/components/__tests__/TaskCard.test.tsx     |  60 ++----
 .../components/__tests__/TaskContextMenu.test.tsx  |  55 +++++-
 .../dashboard/app/components/boardCanDropTask.ts   |  56 -----
 .../app/components/dashboard/MainContent.tsx       |   1 -
 .../app/components/useRightDockController.tsx      |   1 -
 packages/dashboard/app/styles.css                  |  14 --
 25 files changed, 297 insertions(+), 1045 deletions(-)

Fusion-Task-Id: FN-051

Fusion-Task-Lineage: b5614cb1-75f3-4307-a595-123f903adc99

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-08-20 03:57:23 +00:00
Fusion Agent
7563fcfe1b FN-037: configure AI-authored task output language
Configure a persisted output-language setting and apply it across AI-authored task text and workflow summaries.

- Add project/global output-language settings with defaults, validation, UI controls, translations, and documentation.
- Propagate the selected language through planning, execution, review, summaries, and task creation.
- Add focused coverage for language resolution and update affected dashboard, engine, and localization tests.

Files changed:
 .changeset/fn-037-task-output-language.md          |   7 ++
 docs/settings-reference.md                         |   4 +
 docs/task-management.md                            |   4 +
 .../core/src/__tests__/ai-output-language.test.ts  |  21 +++++
 packages/core/src/ai/ai-output-language.ts         |  42 +++++++++
 packages/core/src/ai/ai-summarize.ts               |  16 +++-
 packages/core/src/config/settings-schema.ts        |   2 +
 packages/core/src/index.gate.ts                    |   2 +
 packages/core/src/index.ts                         |   2 +
 packages/core/src/task-store/settings-ops.ts       |   7 ++
 packages/core/src/task-store/task-creation.ts      |   4 +
 packages/core/src/types/settings/settings-scope.ts |   2 +
 .../app/__tests__/settings-sections.test.tsx       |  21 +++--
 .../__tests__/SettingsModal.models-auth.test.tsx   |  10 +-
 .../app/components/settings/section-keys.ts        |   2 +-
 .../sections/ProjectModelsSection.search.ts        |  13 ++-
 .../settings/sections/ProjectModelsSection.tsx     |  28 ++++--
 .../settings-default-descriptions.test.tsx         |   4 +-
 .../src/__tests__/github-tracking.test.ts          |   4 +-
 .../__tests__/planning-prompt-resolution.test.ts   |  29 ++++--
 .../src/__tests__/routes-planning.test.ts          |  32 ++++++-
 packages/dashboard/src/ai-session-store.ts         |  15 ++-
 packages/dashboard/src/github-tracking.ts          |   3 +
 packages/dashboard/src/planning.ts                 |  75 +++++++++++++--
 .../routes/register-ai-text-assistant-routes.ts    |  11 ++-
 .../src/routes/register-planning-subtask-routes.ts |   6 +-
 .../src/routes/register-task-workflow-routes.ts    |   9 +-
 packages/dashboard/src/shared/settings-sections.ts |   2 +-
 .../__tests__/ce-workflow-step-executor.test.ts    |  45 ++++++++-
 .../__tests__/executor-review-artifacts.test.ts    |  65 +++++++++++++
 packages/engine/src/__tests__/triage.test.ts       |   7 +-
 .../src/__tests__/workflow-task-runtime.test.ts    |  23 +++++
 .../create-authoritative-workflow-primitives.ts    |  14 ++-
 .../create-authoritative-workflow-seams.ts         |  17 +++-
 .../engine/src/executor/execute-workflow-graph.ts  |  19 +++-
 .../engine/src/executor/execute-workflow-step.ts   |  13 ++-
 packages/engine/src/executor/execution-prompt.ts   |  10 +-
 .../engine/src/executor/handoff-task-to-review.ts  |  10 +-
 .../engine/src/executor/run-graph-custom-node.ts   |   6 +-
 .../src/executor/task-executor-graph-facades.ts    |   8 +-
 packages/engine/src/triage.ts                      |  35 ++-----
 .../src/workflows/workflow-completion-summary.ts   | 101 ++++++++++++++++++---
 .../engine/src/workflows/workflow-task-runtime.ts  |  12 +++
 packages/i18n/locales/en/app.json                  |   7 +-
 packages/i18n/locales/es/app.json                  |   7 +-
 packages/i18n/locales/fr/app.json                  |   7 +-
 packages/i18n/locales/ko/app.json                  |   7 +-
 packages/i18n/locales/pt-BR/app.json               |  14 ++-
 packages/i18n/locales/zh-CN/app.json               |   7 +-
 packages/i18n/locales/zh-TW/app.json               |   7 +-
 packages/i18n/src/resources.d.ts                   |  13 ++-
 51 files changed, 680 insertions(+), 151 deletions(-)

Fusion-Task-Id: FN-037

Fusion-Task-Lineage: 968a707e-7ffe-43ba-b983-d679b031f7a5

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-08-20 03:57:23 +00:00
Fusion Agent
a81c9b80d9 FN-036: make task title summarization project-controlled
Make generated task titles project-controlled while preserving useful summaries at any length.

- Add project-level title summarization settings and UI controls.
- Make summarization length-independent across task creation, planning, GitHub, and agent flows.
- Update localization, documentation, and regression coverage.

Files changed:
 .../fn-036-systematic-title-summarization.md       |   7 +
 docs/settings-reference.md                         |   2 +-
 docs/storage.md                                    |   2 +-
 docs/task-management.md                            |   4 +-
 packages/core/src/__tests__/ai-summarize.test.ts   |  34 ++--
 .../__tests__/store-create-intake-column.test.ts   | 186 +++++++++++++++++++++
 packages/core/src/ai/ai-summarize.ts               |  32 ++--
 packages/core/src/task-store/task-creation.ts      |  83 +++++++--
 packages/core/src/types/settings/settings-scope.ts |   9 +-
 packages/core/src/types/task/task-core.ts          |   2 +-
 .../dashboard/app/__tests__/api-projects.test.ts   |   4 +-
 .../app/__tests__/settings-sections.test.tsx       |   2 +-
 .../dashboard/app/api/planning/ai-summarize.ts     |   2 +-
 .../__tests__/SettingsModal.search.test.ts         |   5 +-
 .../search/__tests__/settings-search-index.test.ts |   2 +-
 .../sections/ProjectModelsSection.search.ts        |   4 +-
 .../settings/sections/ProjectModelsSection.tsx     |  11 +-
 .../src/__tests__/github-tracking.test.ts          |  12 +-
 .../src/__tests__/routes-planning.test.ts          |  28 +++-
 .../dashboard/src/__tests__/routes-tasks.test.ts   |  19 +++
 packages/dashboard/src/github-tracking.ts          |   9 +-
 .../routes/register-ai-text-assistant-routes.ts    |   7 +-
 .../src/__tests__/agent-tools-delegation.test.ts   |   1 +
 .../src/__tests__/heartbeat-executor.test.ts       |   1 -
 packages/engine/src/__tests__/triage.test.ts       |   7 +-
 packages/engine/src/agent-tools.ts                 |   7 +-
 packages/engine/src/triage.ts                      |  12 +-
 packages/i18n/locales/en/app.json                  |   6 +-
 packages/i18n/locales/pt-BR/app.json               |   8 +-
 packages/i18n/src/resources.d.ts                   |   6 +-
 30 files changed, 418 insertions(+), 96 deletions(-)

Fusion-Task-Id: FN-036

Fusion-Task-Lineage: df603386-e63e-4be8-a8e5-bae9aa1d4a80

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-08-20 03:57:23 +00:00
Fusion Agent
a7afb020e9 FN-032: use deterministic titles for short descriptions
Short untitled task descriptions now receive stable planning titles instead of an empty placeholder.

- Derive short-task titles from the first meaningful description line with shared normalization and length safety.
- Preserve explicit titles and leave long or empty descriptions on existing AI/none behavior.
- Persist the planning heading title through normal task metadata finalization and document the threshold.

Files changed:
 .changeset/fn-032-short-description-title.md |   7 ++
 docs/settings-reference.md                   |   2 +-
 docs/task-management.md                      |   4 +-
 packages/engine/src/__tests__/triage.test.ts | 115 ++++++++++++++++++++++++---
 packages/engine/src/triage.ts                |  23 +++++-
 5 files changed, 137 insertions(+), 14 deletions(-)

Fusion-Task-Id: FN-032

Fusion-Task-Lineage: 886f5a32-7eb5-460d-bf1a-93ebf5dc0b93

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-08-20 03:55:39 +00:00
Fusion Agent
c3ff663c1c FN-030: route refinement tasks directly to planning
Route refinement and duplicate-task handling through the planning path while preserving task metadata and API behavior.\n\n- Route CLI refinement commands directly into planning.\n- Harden dependency updates and duplicate-task refinement persistence.\n- Expand PostgreSQL, CLI, and dashboard authorization coverage.\n- Document the refined task lifecycle and add the published-package changeset.\n\nFiles changed:\n .changeset/fn-030-refinement-planning-route.md     |   7 ++\n docs/architecture.md                               |  20 ++--\n docs/task-management.md                            |  11 +-\n packages/cli/src/commands/__tests__/task.test.ts   |   9 +-\n packages/cli/src/commands/task.ts                  |   2 +-\n .../postgres/refine-duplicate-task.pg.test.ts      | 130 +++++++++++++++++++++\n .../__tests__/postgres/store-comments.pg.test.ts   |  32 +++++\n packages/core/src/task-store/update-task-deps.ts   |  17 +--\n packages/dashboard/app/__tests__/api-auth.test.ts  |   5 +-\n 9 files changed, 207 insertions(+), 26 deletions(-)

Fusion-Task-Id: FN-030

Fusion-Task-Lineage: 885c0a9f-d8bf-4abf-9ec9-dca5a01648e8

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-08-20 03:55:39 +00:00
gsxdsm
7ded57e550 FN-9167: clear interrupted manual merge status
Prevent interrupted manual merges from leaving tasks stranded in a transient merging state.

- track locally owned merge stamps and clear them through fenced abort cleanup
- handle SIGINT, SIGTERM, and SIGHUP for foreground task merges with documented exit behavior
- reconcile only age-proven orphan stamps before manual CLI and UI-only dashboard merges
- cover merge stamp authorization, signal cleanup, and mock completeness with regression tests
- add a patch changeset and operator documentation

Files changed:
 .../fn-9167-interrupted-manual-merge-stamp.md      |   7 +
 docs/cli-reference.md                              |   1 +
 docs/task-management.md                            |   2 +-
 .../task-command-github-import-tracking.test.ts    |   3 +
 packages/cli/src/commands/__tests__/task.test.ts   | 179 +++++-
 packages/cli/src/commands/dashboard.ts             |   3 +
 packages/cli/src/commands/task.ts                  | 138 +++--
 .../merge-orphan-durable-write-inventory.json      | 608 +++++++++++----------
 .../src/__tests__/merge-active-status.test.ts      |  49 ++
 packages/engine/src/index.ts                       |   2 +
 .../engine/src/merge/clear-orphaned-merge-stamp.ts |  80 +++
 packages/engine/src/merge/merger-ai.ts             |  12 +
 packages/engine/src/project-engine.ts              |  20 +-
 13 files changed, 735 insertions(+), 369 deletions(-)

Fusion-Task-Id: FN-9167

Fusion-Task-Lineage: 554380e2-ce55-4e7a-89fd-f5c24341937b

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-19 20:17:42 -07:00
gsxdsm
ef35fb8e5a FN-9164: select per-repository workspace base branches
Workspace worktrees now honor and persist the appropriate base branch for each sub-repository throughout their lifecycle.

- Resolve requested bases per repository, normalize remote-only refs, and fall back safely to repository integration branches.
- Reuse recorded bases for landing, recovery, and revert flows with privacy-safe audit breadcrumbs.
- Surface base and fallback details in task UI, documentation, tests, and release notes.

Files changed:
 .changeset/fn-9164-workspace-base-branch.md        |   7 +
 AGENTS.md                                          |   1 +
 docs/task-management.md                            |   2 +-
 docs/workspaces.md                                 |   8 +-
 packages/core/src/types/task/task-core.ts          |  12 ++
 .../dashboard/app/components/TaskDetailModal.css   |  14 ++
 .../app/components/WorkspaceWorktreesSummary.tsx   |   2 +
 .../__tests__/WorkspaceWorktreesSummary.test.tsx   |  13 ++
 .../src/routes/register-task-workflow-routes.ts    |   2 +
 .../task-revert.workspace.real-git.test.ts         |  25 +++
 .../src/__tests__/workspace-base-branch.test.ts    |  93 +++++++++++
 .../worktree-acquisition-workspace.test.ts         |  27 ++++
 packages/engine/src/execution/task-revert.ts       |  58 +++++--
 packages/engine/src/merge/merger-ai.ts             |  30 +++-
 packages/engine/src/self-healing.ts                |  50 +++++-
 packages/engine/src/util/run-audit.ts              |   6 +
 .../engine/src/worktree/workspace-base-branch.ts   | 180 +++++++++++++++++++++
 .../engine/src/worktree/worktree-acquisition.ts    |  62 ++++---
 18 files changed, 548 insertions(+), 44 deletions(-)

Fusion-Task-Id: FN-9164

Fusion-Task-Lineage: 487a1c77-32cb-47dd-bf43-297a146951ba

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-19 18:57:33 -07:00
gsxdsm
c7779e44ac FN-9055: guard archive disposal of live workspace worktrees
Prevent archive cleanup from removing worktrees that still belong to live tasks.

- Add shared archive liveness evaluation and transactional refusal guards.
- Require CLI and extension archive operations to refuse live tasks unless a human uses --force.
- Protect baseline archive worktree disposal and cover CLI, core, and engine paths with tests.

Files changed:
 .changeset/fn-9055-archive-live-worktree-guard.md  |  7 ++
 docs/cli-reference.md                              |  4 +-
 docs/task-management.md                            |  4 +-
 .../extension-task-archive-live-guard.test.ts      | 82 +++++++++++++++++++
 packages/cli/src/bin.ts                            |  6 +-
 packages/cli/src/commands/__tests__/task.test.ts   | 66 ++++++++++++++-
 packages/cli/src/commands/task.ts                  | 49 +++++++++---
 packages/cli/src/extension.ts                      | 25 ++++--
 .../src/__tests__/archive-live-task-guard.test.ts  | 70 ++++++++++++++++
 .../postgres/archive-live-task-fence.pg.test.ts    | 69 ++++++++++++++++
 .../src/__tests__/task-archive-liveness.test.ts    | 19 +++++
 packages/core/src/index.ts                         | 10 +++
 packages/core/src/store.ts                         |  4 +-
 .../core/src/task-store/archive-lifecycle-2.ts     | 27 +++++--
 packages/core/src/task-store/archive-lifecycle.ts  | 20 ++---
 .../src/task-store/async/async-archive-lineage.ts  | 17 +++-
 packages/core/src/tasks/task-archive-liveness.ts   | 56 +++++++++++++
 ...chive-baseline-disposer-live-task-guard.test.ts | 93 ++++++++++++++++++++++
 .../healing/archive-worktree-disposer-install.ts   | 15 +++-
 19 files changed, 592 insertions(+), 51 deletions(-)

Fusion-Task-Id: FN-9055

Fusion-Task-Lineage: 08644626-cc61-4854-abb9-5b415ddc9491

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-15 00:35:12 -07:00
gsxdsm
892afaaf03 FN-9048: clear disposed workspace state on unarchive
Prevent disposed workspace metadata from being revived when archived tasks return.

- Reconcile missing workspace and singular worktree paths during archive restore.
- Preserve surviving workspace entries and cover archive-to-restore recovery behavior.
- Document the restore lifecycle and add a patch changeset.

Files changed:
 .changeset/fn-9048-workspace-unarchive.md          |   7 ++
 docs/task-management.md                            |   2 +-
 .../archive-restore-workspace-worktrees.pg.test.ts |  70 +++++++++++++
 .../core/src/task-store/archive-lifecycle-2.ts     |   8 +-
 .../src/task-store/async/async-archive-lineage.ts  |  43 ++++++++
 .../src/__tests__/self-healing-workspace.test.ts   | 111 ++++++++++++++++++++-
 6 files changed, 236 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-9048

Fusion-Task-Lineage: fa9b9359-5fab-497f-87ce-0174d8069d99

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-14 23:22:05 -07:00
gsxdsm
d77b427b8c FN-9063: document multi-repository workspace mode
Document workspace setup, operation, recovery, and lifecycle guidance for operators.

- Add a dedicated multi-repository workspace guide.
- Link workspace mode from onboarding, settings, task management, and project documentation.
- Cover the documentation contract with focused dashboard tests.

Files changed:
 docs/README.md                                     |   1 +
 docs/getting-started.md                            |   2 +-
 docs/multi-project.md                              |   2 +-
 docs/settings-reference.md                         |   1 +
 docs/task-management.md                            |   4 +-
 docs/workspaces.md                                 | 129 +++++++++++++++++++++
 packages/dashboard/src/__tests__/workspace-documentation.test.ts |  74 ++++++++++++
 7 files changed, 209 insertions(+), 4 deletions(-)

Fusion-Task-Id: FN-9063

Fusion-Task-Lineage: b79baa34-fcd7-47ed-89de-b4637160c305

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-14 22:25:15 -07:00
gsxdsm
d9a2d9dba3 FN-8925: clear orphaned paused merge stamps safely
Allow only engine-owned deadlock pauses to clear stale merge stamps without resuming work.

- Fail closed when merge ownership probing is unavailable.
- Clear stale stamps only for merge-deadlock-detected pauses and suppress their enqueue.
- Add race coverage, audit documentation, and a patch changeset.

Files changed:
 .changeset/fn-8925-paused-stale-merge.md           |   7 +
 docs/self-healing-backward-move-audit.md           |   2 +-
 docs/task-management.md                            |   4 +-
 .../self-healing-query-filter-blindness.test.ts    |   5 +-
 .../self-healing-stale-merge-fanout.test.ts        |   1 +
 packages/engine/src/__tests__/self-healing.test.ts | 203 +++++++++++++++++++--
 packages/engine/src/self-healing.ts                |  45 ++++-
 7 files changed, 241 insertions(+), 26 deletions(-)

Fusion-Task-Id: FN-8925

Fusion-Task-Lineage: e5491e1a-ca0a-4a82-b4e0-4002f30e869e

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>,
2026-08-09 23:13:34 -07:00
Phil Larson
a5c3476cb2 fix: harden pinned worktree recovery cleanup (#3402)
## Summary
- serialize pinned-path classification, orphan preservation, quarantine
reconciliation, and recreation under one reservation
- preserve cross-filesystem orphans atomically beside the configured
worktree root and retain the newest 10 generated entries per recovery
root
- exclude recovery containers from pool and self-healing scans, with
fail-closed symlink and active-session guards
- document recovery location and retention behavior

## Test plan
- `pnpm --filter @fusion/engine exec vitest run
src/__tests__/worktree-acquisition.test.ts
src/__tests__/worktree-paths.test.ts src/__tests__/worktree-pool.test.ts
src/__tests__/self-healing-tempdir-sweep.test.ts --silent=passed-only
--reporter=dot`
- `pnpm --filter @fusion/engine typecheck`
- `pnpm --filter @fusion/engine build`
- `pnpm test:gate:static`
- `pnpm check:changesets --strict`
- `pnpm check:fnxc-future-dates`


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Preserves orphaned pinned worktrees during recovery, including across
filesystems.
* Retains the 10 most recent recovery entries and safely skips active or
invalid entries.
* Keeps recovery data separate from normal worktree discovery, cleanup,
and capacity checks.
* Adds safeguards for path containment, active-session ownership, and
concurrent recovery.

* **Bug Fixes**
* Prevents pinned worktree data from being lost during recreation or
quarantine cleanup.
* Ensures recovery cleanup failures do not interrupt worktree
acquisition.

* **Documentation**
* Documented orphan recovery, retention, fallback behavior, and cleanup
safeguards.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-08-09 19:39:39 -10:00
gsxdsm
f5a9cf01b1 FN-8912: recover stale merge status after aborts
Clear orphaned transient merge statuses so bounded retries can proceed.

- Fence aborted merge generations from writing transient task statuses.
- Reconcile and clear unconfirmed merge stamps in the queue and stale-state recovery paths.
- Cover timeout, abort, retry, and self-healing behavior with regression tests.

Files changed:
 .changeset/fn-8912-merge-abort-transient-status.md |   7 +
 docs/architecture.md                               |   1 +
 docs/task-management.md                            |   2 +-
 .../merge-abort-clears-transient-status.test.ts    | 410 +++++++++++++++++++++
 .../src/__tests__/merge-active-status.test.ts      |  21 ++
 packages/engine/src/__tests__/self-healing.test.ts | 231 ++++++++++--
 packages/engine/src/merge/merge-active-status.ts   |  18 +
 packages/engine/src/merge/merger-ai.ts             |  34 +-
 packages/engine/src/project-engine.ts              |  49 ++-
 packages/engine/src/self-healing.ts                |  72 +++-
 10 files changed, 810 insertions(+), 35 deletions(-)

Fusion-Task-Id: FN-8912

Fusion-Task-Lineage: 8b2b7506-ed3e-41d4-9e54-59f45abc0020

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 20:14:10 -07:00
gsxdsm
1cf86baa1c refactor: package code organization wave 18 (executor pure peels) (#3317)
## Summary

Wave 18 continues the package code-organization program after wave 17
domain folders (U4 Slice A from
`docs/plans/2026-07-14-001-refactor-package-code-organization-plan.md`).

### What changed
Peel **pure, behavior-preserving** helpers out of
`packages/engine/src/executor.ts` into domain modules under
`packages/engine/src/executor/`, with **stable re-exports** from
`executor.ts` so deep imports and `vi.mock("../executor.js")` keep
working.

| New module | Symbols |
|------------|---------|
| `executor/task-done-refusal.ts` | `evaluateTaskDoneRefusal`,
`determineRevisionResetStart`, skip-bypass refusal helper |
| `executor/workflow-feedback-paths.ts` |
`extractReferencedPathsFromWorkflowFeedback`,
`isAlwaysAllowedScopeLeakPath`, `workflowPathMatchesDeclaredScope` |
| `executor/workflow-step-verdict.ts` |
`FUSION_WORKFLOW_STEP_CONVENTIONS_PREAMBLE`, `parseWorkflowStepVerdict`
/ `parseWorkflowStepOutput`, step outcome types |
| `executor/await-input-parse.ts` | `parseAwaitInputSentinel`,
`parseAwaitInputQuestionToolCall` |
| `executor/no-commit-eligibility.ts` | `getNoCommitEligibilityReason`
(+ prompt heuristics) |

`executor.ts` live LOC ~**22817 → ~22427** (first pure-peel batch; more
peels needed to approach the 2k cap).

### Shims
- `old path` `executor.ts` public exports → `new path` `executor/*.ts` →
delete-when consumer deep-imports are re-pointed (not this PR)

### Test plan
- [x] `@fusion/engine` typecheck
- [x] Oracle: task-done refusal, skip-bypass, workflow malformed
verdict, scope-leak allowlist, executor-step-session, executor-prompt
- [x] `vitest --project=engine-core` (merge-gate curated suite)
- [ ] CI merge gate

**Stack:** wave17 (merged) → **this PR**

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Improved recognition of workflow outcomes from structured and
conversational responses.
* Added support for extracting questions from await-input responses and
tool calls.
* Improved workflow feedback handling for referenced files and declared
scope patterns.
* Added clearer guidance for task execution, approvals, verification,
and available tools.

* **Bug Fixes**
* Prevented completion when required review approvals are missing or
revisions remain pending.
* Improved handling of workflows that legitimately require no code
changes.
  * Added clearer refusal messages and more reliable revision restarts.
  * Sanitized repository paths in Git remediation instructions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-08-09 15:46:09 -10:00
gsxdsm
65bf3097ff FN-8857: invalidate stale task dispatch routes
Clear persisted effective routes whenever an eligible task node override changes.

- Add route invalidation logic that preserves checkout-bound and explicit replacement routes.
- Cover in-memory and PostgreSQL task-update scenarios, including partial snapshot replacements.
- Document the dispatch snapshot invalidation behavior and add a patch changeset.

Files changed:
 .changeset/fn-8857-stale-effective-route.md        |   7 +
 docs/architecture.md                               |   6 +-
 docs/task-management.md                            |   4 +-
 .../__tests__/effective-route-invalidation.test.ts | 101 ++++++++++++++
 .../postgres/task-node-override.pg.test.ts         |  63 +++++++++
 ...ask-update-effective-route-invalidation.test.ts | 148 +++++++++++++++++++++
 packages/core/src/index.ts                         |   5 +
 .../core/src/mesh/effective-route-invalidation.ts  |  58 ++++++++
 packages/core/src/task-store/task-update.ts        |  40 ++++++
 9 files changed, 428 insertions(+), 4 deletions(-)

Fusion-Task-Id: FN-8857

Fusion-Task-Lineage: ab6c1a40-70b4-4501-ab34-771de288da10

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-08 23:05:29 -07:00
gsxdsm
f36e23848f FN-8840: recognize duplicate redirects in task titles
Recognize exact duplicate redirects in either task title or PROMPT.md while preserving conflicting decisions for operator resolution.

- Resolve duplicate markers consistently across intake, scheduling, execution, dashboard, and replication paths.
- Accept task-ID prefixes beyond FN- and expose duplicate-marker state to the UI.
- Fail closed during stale-decision recovery when prompt, title, or persisted canonical redirects disagree.
- Add regression coverage and operator documentation for title-based redirects.

Files changed:
 .changeset/fn-8840-duplicate-title-redirect.md     |   7 ++
 docs/settings-reference.md                         |   2 +-
 docs/task-management.md                            |  11 +-
 .../__tests__/explicit-duplicate-marker.test.ts    |  30 ++++-
 .../src/__tests__/mesh-task-replication.test.ts    |   6 +
 .../src/duplicates/explicit-duplicate-marker.ts    |  66 ++++++++---
 packages/core/src/index.gate.ts                    |   3 +
 packages/core/src/index.ts                         |   3 +
 packages/core/src/mesh/mesh-task-replication.ts    |   2 +-
 ...-task-workflow-routes.awaiting-planning.test.ts |  78 +++++++++++--
 .../src/routes/register-task-workflow-routes.ts    |  26 ++++-
 .../executor-explicit-duplicate-recovery.test.ts   |  75 ++++++++++++
 .../__tests__/merged-intake-hold-column.test.ts    |  19 +++
 .../scheduler-explicit-duplicate-marker.test.ts    | 130 +++++++++++++++++++++
 .../self-healing-stale-duplicate-decision.test.ts  |  67 +++++++++++
 .../triage-explicit-duplicate-marker.test.ts       |  51 ++++++++
 packages/engine/src/execution/hold-release.ts      |  10 +-
 packages/engine/src/executor.ts                    |  11 +-
 packages/engine/src/scheduler.ts                   |  15 ++-
 packages/engine/src/self-healing.ts                |  55 ++++++---
 packages/engine/src/triage.ts                      |  98 +++++++++++++---
 21 files changed, 687 insertions(+), 78 deletions(-)

Fusion-Task-Id: FN-8840

Fusion-Task-Lineage: d08a3e84-1851-4fba-bfa9-507116ad6219

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-08 19:58:43 -07:00
gsxdsm
c978cdbacf FN-8687: close imported GitLab issues on task deletion
Add GitLab close-on-delete behavior for imported source issues.

- Close linked GitLab issues by default while honoring leave and delete action semantics.
- Preserve split-close ownership, skip merge requests, and limit malformed tracking fallback to deletion.
- Document the lifecycle contract and add dashboard coverage.

Files changed:
 .changeset/fn-8687-gitlab-close-on-delete.md       |   7 ++
 docs/gitlab-parity-inventory.md                    |  20 +++-
 docs/settings-reference.md                         |   1 +
 docs/task-management.md                            |   5 +-
 .../src/__tests__/gitlab-delete-close.test.ts      | 101 +++++++++++++++++++++
 .../src/__tests__/gitlab-lifecycle.test.ts         |  35 +++++++
 .../gitlab-parity-inventory-documentation.test.ts  |   7 +-
 .../__tests__/gitlab-source-issue-close.test.ts    |   8 ++
 .../src/__tests__/gitlab-split-close.test.ts       |  12 +++
 packages/dashboard/src/gitlab-delete-close.ts      |  90 ++++++++++++++++++
 packages/dashboard/src/gitlab-lifecycle.ts         |  33 +++++--
 packages/dashboard/src/gitlab-split-close.ts       |   2 +-
 packages/dashboard/src/index.ts                    |   1 +
 .../dashboard/src/routes/register-git-github.ts    |   7 ++
 14 files changed, 313 insertions(+), 16 deletions(-)

Fusion-Task-Id: FN-8687

Fusion-Task-Lineage: 48bc9159-fc35-43cb-b72e-1b6260d9e3cb

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-01 04:08:57 -07:00
gsxdsm
23c9992e7b FN-8682: add GitLab split-close issue comments
GitLab source issues now receive an explanatory split handoff before closure.

- Add a GitLab split-close service that posts normalized child-task notes before closing source issues.
- Wire split-close handling across project stores while preserving merge-request and failure safeguards.
- Document GitLab lifecycle parity and cover split-close behavior with tests.

Files changed:
 .changeset/fn-8682-gitlab-split-close-comment.md   |   7 ++
 docs/gitlab-parity-inventory.md                    |   2 +-
 docs/task-management.md                            |   1 +
 .../gitlab-parity-inventory-documentation.test.ts  |   2 +
 .../src/__tests__/gitlab-split-close.test.ts       | 113 +++++++++++++++++++++
 packages/dashboard/src/gitlab-lifecycle.ts         |   6 +-
 packages/dashboard/src/gitlab-split-close.ts       |  98 ++++++++++++++++++
 packages/dashboard/src/gitlab-tracking-state.ts    |   6 +-
 packages/dashboard/src/index.ts                    |   1 +
 .../dashboard/src/routes/register-git-github.ts    |   6 ++
 10 files changed, 237 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-8682

Fusion-Task-Lineage: 8eca9888-b10a-4ea9-b9d3-fc09a39022ab

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-01 03:19:00 -07:00
gsxdsm
3793b576d8 FN-8673: comment on split source issue closures
Explain GitHub source-issue closures when imported work is split into subtasks.

- carry split closure context through task deletion and triage
- post one explanatory comment before closing source and tracking GitHub issues
- preserve exactly-one-comment behavior when close retries after transient failures
- document split closure behavior and cover source/tracking scenarios

Files changed:
 .changeset/fn-8673-split-close-issue-comment.md    |  7 ++
 docs/settings-reference.md                         |  2 +-
 docs/task-management.md                            |  1 +
 .../task-delete-caller-attribution.test.ts         | 32 +++++++
 packages/core/src/index.ts                         |  2 +-
 packages/core/src/store.ts                         | 10 +--
 packages/core/src/task-delete-attribution.ts       | 16 ++++
 .../core/src/task-store/archive-lifecycle-2.ts     | 14 ++--
 packages/core/src/task-store/archive-lifecycle.ts  |  6 +-
 packages/core/src/types.ts                         | 13 +++
 .../src/__tests__/github-tracking-state.test.ts    | 98 +++++++++++++++++++++-
 packages/dashboard/src/github-tracking-state.ts    | 82 +++++++++++++++---
 packages/engine/src/__tests__/triage.test.ts       |  4 +
 packages/engine/src/triage.ts                      | 10 +++
 14 files changed, 268 insertions(+), 29 deletions(-)

Fusion-Task-Id: FN-8673

Fusion-Task-Lineage: 904c2445-64d9-47b9-b706-f64b23c4e3a6

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-01 02:47:25 -07:00
flexi767
f21d3ce132 feat(core): support additive archived task documents (#2375)
## Summary

Re-lands the completed Fusion board task FX-005 on current upstream
`main`, stacked on #2374 (FX-004).

- adds a narrowly authorized additive publication path for archived task
documents
- preserves archived task and mission state and keeps ordinary
replacement/deletion writes rejected
- exposes retained archived current/revision reads
- requires project-scoped revision/hash CAS for publication
- maps malformed, unauthorized, missing, inconsistent, and stale states
safely
- rebases preserved dashboard drafts explicitly after CAS conflicts

## Why

Operators need to append a correction or evidence revision to an
archived task without unarchiving it or weakening ordinary archived-task
immutability.

## Dependency

This branch contains #2374 plus the eight FX-005 commits because
cross-fork PRs cannot target a fork-only base branch. After #2374 lands,
this PR should be rebased or refreshed so its diff collapses to FX-005
only.

## Validation

- PostgreSQL task-store and archived-default suites: 33/33
- dashboard route and editor suites: 321/321
- agent document tools: 22/22
- core, dashboard, and engine typechecks pass

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Added optimistic concurrency controls for task document creation and
editing using revisions and content hashes.
* Added safe, authenticated append-only corrections for documents
retained on archived tasks.
* Archived documents and revision history remain available for direct
reading.
* Agent and dashboard tools now report conflicts clearly and support
explicit draft rebasing.
* **Bug Fixes**
  * Prevented stale updates from overwriting newer document content.
* Preserved archived-task immutability while allowing controlled
corrections.
* **Documentation**
* Updated CLI, dashboard, storage, task-management, and agent guidance
for these workflows.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: fusion-merge-train <merge-train@topkoli.local>
Co-authored-by: Fusion <noreply@runfusion.ai>
Co-authored-by: v <v@v.speedport.ip>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 08:30:12 -07:00
gsxdsm
1d4e8afa7b FN-8444: include planning time in task metrics
Track active planning time alongside execution time for costs, analytics, and task displays.

- Persist planning timing state across task lifecycle transitions and recovery
- Include planning activity in token cost, analytics, and dashboard timing displays
- Add PostgreSQL migration support using the configured migration directory

Files changed:
 .changeset/fn-8444-planning-time-cost.md           |  7 +++
 docs/dashboard-guide.md                            |  3 ++
 docs/task-management.md                            |  5 ++
 packages/core/src/index.ts                         |  1 +
 .../migrations/0029_planning_active_timing.sql     |  3 ++
 packages/core/src/postgres/schema-applier.ts       | 14 ++++-
 packages/core/src/postgres/schema/project.ts       |  2 +
 packages/core/src/productivity-analytics.ts        | 29 +++++-----
 packages/core/src/store.ts                         |  2 +-
 .../core/src/task-store/archive-lifecycle-2.ts     |  2 +
 packages/core/src/task-store/moves.ts              |  7 +++
 packages/core/src/task-store/persistence.ts        |  4 ++
 packages/core/src/task-store/remaining-ops-2.ts    |  2 +-
 packages/core/src/task-store/serialization.ts      |  7 +++
 packages/core/src/task-store/task-row-mappers.ts   |  2 +-
 packages/core/src/task-store/task-update.ts        | 10 ++++
 packages/core/src/task-timing.ts                   | 35 ++++++++++++
 packages/core/src/types.ts                         | 12 +++++
 packages/dashboard/app/components/TaskCard.tsx     | 13 ++---
 .../app/components/TaskTokenStatsPanel.tsx         |  6 ++-
 .../app/components/__tests__/TaskCard.test.tsx     | 17 ++++++
 .../app/utils/__tests__/taskTiming.test.ts         |  9 +++-
 packages/dashboard/app/utils/taskTiming.ts         | 14 +++++
 packages/dashboard/app/utils/taskTokenCost.ts      |  2 +
 .../dashboard/src/task-planner-chat-metrics.ts     | 14 ++++-
 packages/engine/src/__tests__/self-healing.test.ts | 61 +++++++++++++++++++++
 packages/engine/src/executor.ts                    | 50 +++++++++++++++++
 packages/engine/src/runtimes/in-process-runtime.ts |  3 ++
 packages/engine/src/self-healing.ts                | 62 ++++++++++++++++++++++
 packages/engine/src/triage.ts                      | 10 ++++
 packages/i18n/locales/en/app.json                  |  2 +-
 packages/i18n/locales/es/app.json                  |  2 +-
 packages/i18n/locales/fr/app.json                  |  2 +-
 packages/i18n/locales/ko/app.json                  |  2 +-
 packages/i18n/locales/zh-CN/app.json               |  2 +-
 packages/i18n/locales/zh-TW/app.json               |  2 +-
 36 files changed, 384 insertions(+), 36 deletions(-)

Fusion-Task-Id: FN-8444

Fusion-Task-Lineage: 0178e0a7-3018-4ef4-be9b-6de5f964fb58

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-20 13:40:50 -07:00
gsxdsm
00891c225f FN-8440: preserve acknowledged duplicate decisions
Keep an operator's same-canonical duplicate decision durable across triage and maintenance reprocessing.

- Preserve acknowledged Keep decisions for the same canonical while prompting for a new canonical.
- Clear acknowledged duplicate markers without overriding manual pauses.
- Export the acknowledgement helper through both core barrels for engine gate loading.
- Add regression coverage, operator documentation, and a patch changeset.

Files changed:
 .changeset/fn-8440-persist-duplicate-decision.md   |  7 ++
 docs/task-management.md                            |  2 +
 .../core/src/__tests__/duplicate-intake.test.ts    | 16 +++++
 packages/core/src/duplicate-intake.ts              | 27 ++++++--
 packages/core/src/index.gate.ts                    |  1 +
 packages/core/src/index.ts                         |  1 +
 .../explicit-duplicate-marker-sweep.test.ts        | 59 +++++++++++++++++
 .../triage-explicit-duplicate-marker.test.ts       | 77 ++++++++++++++++++++--
 packages/engine/src/self-healing.ts                | 21 +++++-
 packages/engine/src/triage.ts                      | 21 ++++++
 10 files changed, 221 insertions(+), 11 deletions(-)

Fusion-Task-Id: FN-8440

Fusion-Task-Lineage: 966d7c09-8651-463c-840d-707f2bafd2a7

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-20 11:12:54 -07:00
gsxdsm
104bf69b3b FN-8401: preserve same-agent duplicates across create paths
Unify same-agent duplicate intake so live duplicates remain visible and sticky tombstones block recreation on every backend.

- Route SQLite and backend creation through one duplicate-intake resolver
- Flag new live duplicates by default; archive only the new task when explicitly enabled
- Include archived soft-deletes in sticky tombstone matching and cover the backend-safe read
- Document the cross-backend duplicate and resurrection policy

Files changed:
 .changeset/fn-8401-same-agent-intake.md            |   7 +
 docs/architecture.md                               |   2 +-
 docs/settings-reference.md                         |   2 +-
 docs/task-management.md                            |   8 +-
 .../__tests__/same-agent-duplicate-intake.test.ts  | 129 ++++++++++++
 packages/core/src/task-store/remaining-ops-2.ts    |  50 +----
 packages/core/src/task-store/task-creation.ts      | 220 ++++++++-------------
 7 files changed, 233 insertions(+), 185 deletions(-)

Fusion-Task-Id: FN-8401

Fusion-Task-Lineage: 2efa998e-a27d-4013-b42e-e44b7e2316fb

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-20 09:01:39 -07:00
gsxdsm
ca7a5a7106 FN-8144: remove workspace worktrees on archive
Archive workspace task worktrees synchronously and safely across archive entry points.

- Add store-scoped workspace disposal planning, reservations, and quarantine handling.
- Install baseline and executor disposers that remove per-repository worktrees and branches without shell interpolation.
- Cover disposal-plan deduplication and document the archive cleanup behavior.

Files changed:
 .../fn-8144-archive-removes-workspace-worktrees.md |   7 ++
 AGENTS.md                                          |   1 +
 docs/task-management.md                            |   4 +
 .../archive-removes-workspace-worktrees.test.ts    |  59 +++++++++++
 packages/core/src/archive-worktree-disposer.ts     |  52 ++++++++++
 packages/core/src/index.gate.ts                    |   8 ++
 packages/core/src/index.ts                         |   8 ++
 .../core/src/task-store/archive-lifecycle-2.ts     |  29 ++++--
 packages/core/src/task-store/archive-lifecycle.ts  | 114 ++++++++++++++++++++-
 .../src/archive-worktree-disposer-install.ts       |  27 ++++-
 packages/engine/src/executor.ts                    |  25 ++++-
 11 files changed, 319 insertions(+), 15 deletions(-)

Fusion-Task-Id: FN-8144

Fusion-Task-Lineage: 1c4b65f3-a1d2-4a5c-a4b6-c263f9e6f61d

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 17:05:29 -07:00
gsxdsm
f57dfc03b6 FN-8105: remove archived task worktrees safely
Archive task worktrees through a store-scoped, race-safe disposal lifecycle.

- Reserve pinned worktree paths during archive cleanup and successor creation.
- Reconcile quarantined removals before reusing a pinned path.
- Gate PostgreSQL archival before destructive worktree disposal and wire CLI cleanup.

Files changed:
 .changeset/fn-8105-archive-removes-worktree.md     |   7 +
 docs/task-management.md                            |   4 +
 .../extension-experiment-finalize.test.ts          |   1 +
 .../src/__tests__/extension-fn-secret-get.test.ts  |   1 +
 .../extension-gitlab-tracking.test.ts              |   1 +
 .../cli/src/__tests__/extension-web-fetch.test.ts  |   1 +
 .../task-command-github-import-tracking.test.ts    |   1 +
 packages/cli/src/commands/__tests__/task.test.ts   |   1 +
 packages/cli/src/commands/task.ts                  |   8 +-
 packages/cli/src/extension.ts                      |   4 +
 .../__tests__/worktree-path-reservation.test.ts    |  58 ++++++++
 packages/core/src/archive-worktree-disposer.ts     |  21 +++
 packages/core/src/index.gate.ts                    |  13 ++
 packages/core/src/index.ts                         |  13 ++
 .../core/src/task-store/archive-lifecycle-2.ts     |   8 ++
 packages/core/src/task-store/archive-lifecycle.ts  |  37 +++++
 packages/core/src/worktree-path-reservation.ts     | 149 +++++++++++++++++++++
 .../src/archive-worktree-disposer-install.ts       |  18 +++
 packages/engine/src/executor.ts                    |  16 +++
 packages/engine/src/index.ts                       |   2 +
 packages/engine/src/runtimes/in-process-runtime.ts |   1 +
 packages/engine/src/worktree-acquisition.ts        |  27 +++-
 22 files changed, 388 insertions(+), 4 deletions(-)

Fusion-Task-Id: FN-8105
Fusion-Task-Lineage: cabb8f52-093f-4986-bfda-2c7601a72579
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 15:27:03 -07:00
gsxdsm
a242f1b449 fix(FN-7952): migrate bundled plugins to PostgreSQL (#2111)
## Summary

Bundled plugins now persist shared runtime state in project-scoped
PostgreSQL tables instead of maintaining independent SQLite authority.
Reports, CLI Printing Press, Compound Engineering, Roadmap, Even
Realities, and WhatsApp all follow the same ownership and startup
contract as Fusion core.

## Design decisions

- Plugin schema hooks run through the host’s PostgreSQL owner and
enforce project isolation.
- The SDK exposes the host contract needed by bundled plugins without
importing engine internals.
- Legacy Roadmap ownership fixtures use the supported empty-owner
sentinel, preserving current composite primary/foreign keys while
exercising backfill behavior.
- The lockfile travels with the Even Realities PostgreSQL dependency so
packaged installs remain reproducible.

## Validation

- All six affected plugin builds pass.
- Affected plugin suites pass: 773 tests across Printing Press, Compound
Engineering, Even Realities, Reports, Roadmap, and WhatsApp.
- `pnpm test:gate` passes all 478 gate tests.
- This PR changes 40 files.

## Stack

- Depends on #2110 → #2109 → #2108.
- The documentation/release PR completes the stack.

Related: #2105


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Breaking Changes**
* PostgreSQL is now required for runtime storage; SQLite files are used
only as one-time migration inputs.
  * The legacy `FUSION_NO_EMBEDDED_PG` fallback has been removed.

* **New Features**
* Added project-isolated PostgreSQL storage for plugins, reports, tasks,
notifications, and other plugin data.
  * Added agent tools for reports and CLI service drafts.
  * Added PostgreSQL schema initialization support for plugin authors.

* **Bug Fixes**
  * Improved migration and recovery of legacy plugin state.
* Prevented cross-project data access and strengthened transactional
schema updates.

* **Documentation**
* Updated storage, migration, deployment, plugin authoring, CLI, and
dashboard guidance for PostgreSQL.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-15 00:27:59 -07:00
gsxdsm
21fb8f6786 FN-7802: recover phantom-worktree tasks stuck merge-active with scopeOverride
Fixes phantom-worktree context bleed where the engine refused to start a
coding agent in a missing worktree for in-review/merge-active tasks even
when scopeOverride=1, stranding them past the normal recovery paths and
retry budget.

- Add isMergeActiveMissingWorktreeSessionStartFailure/isInReviewMissingWorktreeSessionStartFailure classifiers and MERGE_ACTIVE_MISSING_WORKTREE_STATUSES (merging/merging-pr/merging-fix) in restart-recovery-coordinator.ts, exported from @fusion/engine.
- Self-healing: reorder missing-worktree-review-failures sweep earlier, extend the in-review sweep to also match merge-active missing-worktree failures with a triple-proof-guarded, bounded (recoveryRetryCount) stale-metadata clear and fresh session-start retry budget reset.
- Self-healing: extend scopeOverride worktree-metadata reconciliation to safely clear phantom worktree/branch/session metadata for in-review tasks stuck in a merge-active sub-status, narrowly scoped to avoid clobbering genuinely live in-progress/mid-step tasks (FN-5256 guard preserved).
- CLI (task.ts), pi extension (extension.ts), and dashboard route (register-task-workflow-routes.ts) retry paths now bypass the merge-active status gate via a signature-only check, clearing worktree/branch/sessionFile and requeuing to todo while preserving progress.
- Add regression coverage across self-healing.test.ts, restart-recovery-coordinator.test.ts, extension.test.ts, task-retry.test.ts, and routes-tasks-ops.test.ts; update mockCoreEngine.ts test scaffolding.
- Update docs/architecture.md, docs/self-healing-backward-move-audit.md, docs/task-management.md, and AGENTS.md to describe the new merge-active missing-worktree recovery behavior.
- Add changeset (patch) for @runfusion/fusion.

Files changed:
 .changeset/fn-7802-phantom-worktree-merge-active-recovery.md      |   7 +
 AGENTS.md                                                          |   1 +
 docs/architecture.md                                               |   4 +-
 docs/self-healing-backward-move-audit.md                           |   5 +-
 docs/task-management.md                                            |   2 +-
 packages/cli/src/__tests__/extension.test.ts                       |  64 +++++
 packages/cli/src/__tests__/task-retry.test.ts                      |  49 ++++
 packages/cli/src/commands/task.ts                                  |  28 +-
 packages/cli/src/extension.ts                                      |  26 +-
 packages/dashboard/src/__tests__/routes-tasks-ops.test.ts          |  52 ++++
 packages/dashboard/src/routes/register-task-workflow-routes.ts     |  25 +-
 packages/dashboard/src/test/mockCoreEngine.ts                      |  11 +
 packages/engine/src/__tests__/restart-recovery-coordinator.test.ts |  20 ++
 packages/engine/src/__tests__/self-healing.test.ts                 | 297 +++++++++++++++++++++
 packages/engine/src/index.ts                                       |  13 +
 packages/engine/src/restart-recovery-coordinator.ts                |  19 +-
 packages/engine/src/self-healing.ts                                | 157 +++++++++--
 17 files changed, 744 insertions(+), 36 deletions(-)

Fusion-Task-Id: FN-7802

Fusion-Task-Lineage: 5897105b-6b5c-49d5-a8e8-519902182861

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-10 22:25:21 -07:00
gsxdsm
f7d9509294 FN-7658: gate same-agent duplicate auto-archiving behind opt-in setting
Duplicate tasks created by the same agent are no longer auto-archived by default; they are flagged for review instead, controlled by a new opt-in project setting.

- Add project setting `autoArchiveDuplicateTasksEnabled` (default false) gating the FN-4892 same-agent duplicate intake path
- Add `flagSameAgentDuplicate` path and `nearDuplicateOf` metadata used when auto-archive is disabled; tombstone-resurrection blocking is unchanged
- Wire the setting through core settings schema/types/store, dashboard SchedulingSection UI, and i18n strings
- Update docs (settings-reference.md, task-management.md) to describe the new default-off behavior
- Add a changeset for the @runfusion/fusion minor release
- Extend duplicate-intake, tombstone-window, store-parent-task-dedup, and reliability-interaction tests to cover both flag states

Files changed:
$(cat /tmp/fn7658_stat.txt)

Fusion-Task-Id: FN-7658

Fusion-Task-Lineage: 7d0d1074-1020-48a8-b96f-186154c2c408

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-08 00:23:32 -07:00
gsxdsm
4e8c621e9c FN-7641: fix cards stranded after out-of-band/workspace merges by allowing proven-merge rehome
Fixes a state-machine bug family where cards got stranded after out-of-band or workspace merges landed: store.moveTask now allows a proven-merge recoveryRehome to cross legacy columns (e.g. todo→done), and nodeId='end' finalize no longer silently no-ops — it finalizes on durable merge proof or returns an explicit error, consistently across the dashboard route, the CLI task-update tool, and store.updateTask.

- packages/core/src/store.ts: allow proven-merge recoveryRehome moves across legacy columns (e.g. todo→done) instead of rejecting them
- packages/core/src/node-override-guard.ts: nodeId='end' finalize now checks for durable merge proof and returns an explicit error instead of silently no-op'ing
- packages/dashboard/src/routes/register-task-workflow-routes.ts: dashboard workflow route surfaces the new explicit finalize error/behavior
- packages/cli/src/extension.ts: CLI task-update tool surfaces the same explicit finalize error/behavior
- docs/task-management.md: documented the updated finalize/rehome behavior
- Added regression tests across core (node-override-guard, store-movement, task-node-override), dashboard (register-task-workflow-routes.nodeid-finalize), engine (merger-merge-lifecycle), and CLI (extension) covering the stranded-card invariant
- Added changeset for @runfusion/fusion (patch)

Files changed:
 .changeset/fn-7641-stranded-cards-after-merge.md   |  7 ++
 docs/task-management.md                            |  2 +
 packages/cli/src/__tests__/extension.test.ts       | 59 ++++++++++++++
 packages/cli/src/extension.ts                      | 10 +++
 .../core/src/__tests__/node-override-guard.test.ts | 93 +++++++++++++++++++++
 packages/core/src/__tests__/store-movement.test.ts | 94 ++++++++++++++++++++++
 .../core/src/__tests__/task-node-override.test.ts  | 73 +++++++++++++++++
 packages/core/src/node-override-guard.ts           | 69 +++++++++++++++-
 packages/core/src/store.ts                         | 69 +++++++++++++++-
 ...er-task-workflow-routes.nodeid-finalize.test.ts | 90 +++++++++++++++++++++
 .../src/routes/register-task-workflow-routes.ts    | 10 +++
 .../src/__tests__/merger-merge-lifecycle.test.ts   | 58 +++++++++++++
 12 files changed, 631 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-7641

Fusion-Task-Lineage: 48ea7851-ee68-48f1-92f9-302d0da5acff

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-07 22:06:20 -07:00
gsxdsm
f30d55fae7 FN-7593: move Before/After Transformation section to top of task definitions
Reorders task-definition prompt templates so the Before -> After Transformation section appears before other sections, making the expected change visible first.

- Move the Before -> After Transformation section ahead of other sections in agent-prompts.ts task-definition templates
- Update docs/task-management.md to reflect the new section order
- Add/extend tests in agent-prompts.test.ts and triage.test.ts covering the new ordering
- Add changeset fn-7593-before-after-top.md documenting the change

Files changed:
 .changeset/fn-7593-before-after-top.md            |  7 +++++++
 docs/task-management.md                           |  2 +-
 packages/core/src/__tests__/agent-prompts.test.ts | 20 ++++++++++++++++++++
 packages/core/src/agent-prompts.ts                | 20 +++++++++++++-------
 packages/engine/src/__tests__/triage.test.ts      | 17 +++++++++++++++++
 5 files changed, 58 insertions(+), 8 deletions(-)

Fusion-Task-Id: FN-7593

Fusion-Task-Lineage: d0d5eb4d-2fe0-456c-b061-5c078b78911b

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-05 13:44:50 -07:00
gsxdsm
74358494a7 FN-7577: extend PR-based revert to workspace tasks under autoMerge:false
Extends FN-7554's single-repo PR revert path to workspace (multi-repo) tasks: when autoMerge is disabled, the revert route now opens one dedicated fusion/revert-<id> PR per sub-repo instead of refusing workspace tasks outright.

- Add prepareWorkspaceRevertPrBranches (packages/engine/src/task-revert.ts): classifies every sub-repo first and only prepares a per-sub-repo fusion/revert-<id> branch when all sub-repos are clean/already-reverted (all-or-nothing at branch-prep phase); never force-writes any sub-repo integration branch.
- Export the new helper from packages/engine/src/index.ts.
- Extend POST /api/tasks/:id/revert (register-task-workflow-routes.ts) to resolve owner/repo and check the GitHub rate limiter for every sub-repo before pushing/creating any PR, opening one PR per sub-repo and returning an additive { mode: "pr", clean: true, workspace: { repos: [...] } } result; degrades the whole task to needsHuman if GitHub is unconfigured or any sub-repo is rate-limited, rather than opening a partial subset of PRs.
- Leave existing { mode: "git" | "ai" | "pr" } shapes, the autoMerge:true workspace path, and FN-7554's single-repo PR path unchanged.
- Add engine real-git coverage (task-revert-workspace-pr.real-git.test.ts) and extend dashboard route tests (task-revert-route.test.ts) for the new workspace PR path.
- Add changeset (.changeset/fn-7577-workspace-pr-revert.md, minor) and update docs/task-management.md.

Files changed:
 .changeset/fn-7577-workspace-pr-revert.md          |   7 +
 docs/task-management.md                            |   3 +-
 .../src/__tests__/task-revert-route.test.ts        | 313 ++++++++++++++++-
 .../src/routes/register-task-workflow-routes.ts    | 181 +++++++++-
 .../task-revert-workspace-pr.real-git.test.ts      | 371 +++++++++++++++++++++
 packages/engine/src/index.ts                       |   4 +
 packages/engine/src/task-revert.ts                 | 295 ++++++++++++++++
 7 files changed, 1166 insertions(+), 8 deletions(-)

Fusion-Task-Id: FN-7577

Fusion-Task-Lineage: bedbfab7-5804-485f-9b40-64531edfc64a

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-05 11:31:48 -07:00
gsxdsm
73b38babf0 FN-7578: surface aiUndoTaskWorkflowId picker in Settings General
Adds a Settings → General picker so operators can choose which workflow governs AI-undo (revert) board tasks, instead of it being fixed.

- Add aiUndoTaskWorkflowId select to GeneralSection, defaulting to builtin:review-heavy, with an "Inherit project default workflow" empty-string option matching the revert route's blank-is-inherit behavior (FN-7556)
- Load full workflow list (including custom workflows, excluding fragments) separately from the builtin-only workflow list used for enable/disable checkboxes
- Add FNXC:TaskRevert comment documenting the default/inherit semantics
- Add tests for the new picker and update settings-default-descriptions test
- Add changeset (minor) and update settings-reference/task-management docs
- Add i18n strings across en/es/fr/ko/zh-CN/zh-TW locales

Files changed:
 .changeset/fn-7578-ai-undo-workflow-setting-ui.md  |   7 ++
 docs/settings-reference.md                         |   2 +-
 docs/task-management.md                            |   2 +-
 .../settings/sections/GeneralSection.tsx           |  42 +++++++
 .../GeneralSection.aiUndoWorkflow.test.tsx         | 129 +++++++++++++++++++++
 .../settings-default-descriptions.test.tsx         |   3 +-
 packages/i18n/locales/en/app.json                  |   5 +-
 packages/i18n/locales/es/app.json                  |   5 +-
 packages/i18n/locales/fr/app.json                  |   5 +-
 packages/i18n/locales/ko/app.json                  |   5 +-
 packages/i18n/locales/zh-CN/app.json               |   5 +-
 packages/i18n/locales/zh-TW/app.json               |   5 +-
 12 files changed, 205 insertions(+), 10 deletions(-)

Fusion-Task-Id: FN-7578
Fusion-Task-Lineage: 1d1701ab-ecc7-4bbe-a003-2ce45ac15a25
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-05 11:31:47 -07:00
gsxdsm
e7cb2f1fed FN-7525: add Revert/Undo affordance to Done and Archived task cards
Adds a Revert action so operators can undo landed changes for Done/Archived tasks directly from the board.

- Adds onRevertTask wiring through Board, Column, Lane, ListView, TaskDetailModal, and WorktreeGroup surfaces
- Adds a Revert affordance to TaskCard (Done/Archived states) with confirm UX and CSS
- Adds POST /tasks/:id/revert legacy API route supporting "auto" mode with an AI-undo fallback (mode: "ai") on conflict
- Wires useTasks hook and dashboard MainContent/types to support the new revert action
- Adds new i18n strings for the revert affordance
- Adds a minor changeset for @runfusion/fusion documenting the feature
- Adds/updates tests: TaskCard.test.tsx, board-mobile.test.tsx, api-git.test.ts
- Updates docs/dashboard-guide.md and docs/task-management.md

Files changed:
 .changeset/fn-7525-revert-card-affordance.md       |   7 +
 docs/dashboard-guide.md                            |   2 +-
 docs/task-management.md                            |  10 ++
 packages/dashboard/app/App.tsx                     |   7 +-
 packages/dashboard/app/__tests__/api-git.test.ts   |  51 +++++++
 packages/dashboard/app/api/legacy.ts               |  51 +++++++
 packages/dashboard/app/components/AppModals.tsx    |   5 +-
 packages/dashboard/app/components/Board.tsx        |  10 +-
 packages/dashboard/app/components/Column.tsx       |   8 +-
 packages/dashboard/app/components/Lane.tsx         |   5 +-
 packages/dashboard/app/components/ListView.tsx     |  80 ++++++++++-
 packages/dashboard/app/components/TaskCard.css     |  24 +++-
 packages/dashboard/app/components/TaskCard.tsx     | 127 ++++++++++++++++-
 packages/dashboard/app/components/TaskDetailModal.tsx   |  85 ++++++++++++
 packages/dashboard/app/components/WorktreeGroup.tsx     |   6 +
 packages/dashboard/app/components/__tests__/TaskCard.test.tsx     | 151 +++++++++++++++++++++
 packages/dashboard/app/components/__tests__/board-mobile.test.tsx |  63 +++++++++
 packages/dashboard/app/components/dashboard/MainContent.tsx       |   4 +
 packages/dashboard/app/components/dashboard/types.ts    |   8 ++
 packages/dashboard/app/components/useRightDockController.tsx      |   4 +
 packages/dashboard/app/hooks/useTasks.ts           |  21 ++-
 packages/i18n/locales/en/app.json                  |  11 ++
 22 files changed, 718 insertions(+), 22 deletions(-)

Fusion-Task-Id: FN-7525

Fusion-Task-Lineage: b9e2ca94-4ec6-4443-8e41-cf4828018856

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-05 11:31:47 -07:00
gsxdsm
94e9d15e38 FN-7556: auto-select review-heavy workflow for AI-undo tasks
AI-undo tasks now default to a configurable, stricter review workflow instead of always inheriting the project default.

- Add project setting `aiUndoTaskWorkflowId` (default `builtin:review-heavy`) to ProjectSettings type and DEFAULT_PROJECT_SETTINGS
- `POST /api/tasks/:id/revert` resolves and validates the configured workflow id (via `isBuiltinWorkflowId`/`getWorkflowDefinition`), falling back to inherit-with-warning on a blank/unknown value
- `createAiUndoTask` engine helper gains an optional `workflowId` param, forwarded verbatim to `createTask` only when non-blank, staying pure (no settings/store access itself)
- Add regression tests for the route resolution logic and the engine helper's workflow forwarding
- Update docs (`settings-reference.md`, `task-management.md`) and add changeset

Files changed:
 .changeset/fn-7556-ai-undo-workflow.md             |  7 +++
 docs/settings-reference.md                         |  1 +
 docs/task-management.md                            |  1 +
 packages/core/src/settings-schema.ts               |  4 ++
 packages/core/src/types.ts                         | 14 +++++
 .../settings-default-descriptions.test.tsx         |  2 +
 .../src/__tests__/task-revert-route.test.ts        | 52 ++++++++++++++++-
 .../src/routes/register-task-workflow-routes.ts    | 31 +++++++++-
 .../src/__tests__/task-revert-ai-undo.test.ts      | 67 ++++++++++++++++++++++
 packages/engine/src/task-revert.ts                 | 16 ++++++
 10 files changed, 192 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-7556
Fusion-Task-Lineage: dec5603c-10a8-4780-a1b8-8a836a0de4c1
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-05 11:31:47 -07:00
gsxdsm
2df6c356fc FN-7554: add PR-based revert path for autoMerge:false projects
Adds a PR-based revert path for done/archived tasks in autoMerge:false projects instead of refusing outright.

- New engine export `prepareRevertPrBranch` (packages/engine/src/task-revert.ts) prepares a dedicated `fusion/revert-<id>` branch off the base branch's HEAD and applies the revert commit(s) there, never mutating the base branch itself.
- `POST /api/tasks/:id/revert` route gains an additive `{ mode: "pr", clean: true, prUrl, prNumber, revertBranch, existingPr? }` result for clean single-repo reverts under autoMerge:false, reusing GitHubClient.createPr, findPrForBranch idempotency, and the manual:true PR handoff.
- Existing `{ mode: "git" | "ai", ... }` result shapes and the autoMerge:true path are unchanged.
- Workspace (multi-repo) tasks are explicitly refused for PR-based revert (out of scope; single PR cannot represent a multi-repo revert).
- Adds real-git integration tests for the new branch-prep/apply/commit flow and expands the dashboard route test coverage.
- Adds a changeset for @runfusion/fusion (minor) and a small task-management doc update.

Files changed:
 .changeset/fn-7554-pr-based-revert.md              |   7 +
 docs/task-management.md                            |   2 +-
 .../src/__tests__/task-revert-route.test.ts        | 196 +++++++++++++++++++-
 .../src/routes/register-task-workflow-routes.ts    | 182 ++++++++++++++++++
 .../src/__tests__/task-revert-pr.real-git.test.ts  | 206 +++++++++++++++++++++
 packages/engine/src/index.ts                       |   3 +
 packages/engine/src/task-revert.ts                 | 154 +++++++++++++++
 7 files changed, 747 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-7554

Fusion-Task-Lineage: 9b1bfd82-2428-4cf7-9b36-77afe3517a14

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-05 11:31:47 -07:00
gsxdsm
986e249bc1 FN-7555: surface bidirectional undo/source task links in dashboard UI
Adds a client-side helper and UI affordances so AI-undo tasks and their source tasks link to each other in the dashboard, without any new API or backend changes.

- Add packages/dashboard/app/utils/taskRevert.ts with getRevertOfId() (resolves the revertOf marker written by createAiUndoTask, with a defensive sourceType==="recovery" fallback to sourceParentTaskId) and findOpenUndoTaskForSource() (reverse lookup for the most recent open undo task pointing at a source task)
- TaskCard and TaskDetailModal now render "Undo of <id>" / "Undo task: <id>" provenance links using the shared helper, keeping forward and reverse affordances consistent
- Add TaskCard.css styling for the new undo-link affordance
- Add/extend tests: TaskCard.test.tsx and TaskDetailModal.rendering.test.tsx cover the new undo/source link rendering
- Update docs/task-management.md and packages/i18n/locales/en/app.json for the new UI copy

Files changed:
 docs/task-management.md                            |   2 +-
 packages/dashboard/app/components/TaskCard.css     |  37 +++++
 packages/dashboard/app/components/TaskCard.tsx     |  29 +++-
 .../dashboard/app/components/TaskDetailModal.tsx   |  46 ++++++
 .../app/components/__tests__/TaskCard.test.tsx     |  46 ++++++
 .../__tests__/TaskDetailModal.rendering.test.tsx   | 160 +++++++++++++++++++++
 packages/dashboard/app/utils/taskRevert.ts         |  80 +++++++++++
 packages/i18n/locales/en/app.json                  |   7 +-
 8 files changed, 403 insertions(+), 4 deletions(-)

Fusion-Task-Id: FN-7555

Fusion-Task-Lineage: c3d2dbd2-4d86-40b5-afce-0ca7a6dfc73d

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-05 11:31:46 -07:00
gsxdsm
2ed06f9f14 FN-7547: support reverting multi-repo workspace tasks via git
Adds all-or-nothing git-revert support for multi-repo workspace tasks and wires it into the existing revert route/AI-undo/per-sha machinery.

- Add `resolveWorkspaceTaskRevertCommits` and `revertWorkspaceTask` to `packages/engine/src/task-revert.ts`, dry-run classifying every sub-repo first and only committing per-repo revert commits when every sub-repo is clean/already-reverted; any conflicting sub-repo rolls back every already-committed sub-repo.
- Extract shared `applyAndCommitRevert" apply/commit machinery (built on the existing `applyRevertNoCommit` primitive) so the workspace path reuses the same commit-message/trailer contract as the single-repo path.
- Add a defensive `isWorkspaceTask` guard to `performTaskRevert` so workspace tasks can never be silently reverted through the single-repo path.
- Wire `POST /api/tasks/:id/revert` (register-task-workflow-routes.ts) to dispatch workspace tasks to `revertWorkspaceTask`, preserving the existing `mode` (git/ai/auto) and AI-undo-fallback contract for workspace conflicts.
- Export the new workspace revert types/functions from `packages/engine/src/index.ts`.
- Add route-dispatch and real-git workspace revert test coverage; update docs and add a changeset.

Files changed:
 .changeset/fn-7547-workspace-task-revert.md        |   7 +
 docs/task-management.md                            |   8 +-
 packages/dashboard/src/__tests__/task-revert-route.test.ts        | 102 +++++
 packages/dashboard/src/routes/register-task-workflow-routes.ts    |  76 +++-
 packages/engine/src/__tests__/task-revert.workspace.real-git.test.ts | 272 +++++++++++++
 packages/engine/src/index.ts                       |   6 +
 packages/engine/src/task-revert.ts                 | 448 ++++++++++++++++++++-
 7 files changed, 897 insertions(+), 22 deletions(-)

Fusion-Task-Id: FN-7547

Fusion-Task-Lineage: b1b5eeda-06fd-43c1-8163-74b62c77b000

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-05 11:31:44 -07:00
gsxdsm
8c6f76c37e FN-7548: add per-sha revert commit granularity to the git-revert service/route
Adds an opt-in per-sha commit granularity mode to the task-revert git path, alongside its default squash behavior, and merges it cleanly with the existing FN-7524 AI-undo mode support.

- Add `TaskRevertGranularity` ("squash" | "per-sha") and thread an optional `granularity` option through `performTaskRevert`/`PerformTaskRevertOptions`.
- Factor a shared `applyRevertNoCommit` primitive (stage + no-op/conflict detection) used by both the squash and new per-sha apply paths.
- `"per-sha"` creates one attributed `revert(FN-xxxx): ...` commit per original sha (each with its own `Fusion-Task-Id` trailer and audit line), skipping no-op shas without empty commits; a mid-batch conflict rolls the whole batch back to the pre-call HEAD.
- Extend `TaskRevertResult`'s clean shape with `revertCommitShas: string[]` (all created commits) alongside the existing `revertCommitSha`.
- `POST /api/tasks/:id/revert` accepts an optional `granularity` request-body field (default `"squash"`, validated, 400 on unknown values) and forwards it to the engine service; documented alongside the existing `mode` (git/ai/auto) contract.
- Add real-git and route-level test coverage for per-sha creation, no-op skipping, default-squash behavior, and mid-batch conflict rollback.
- Update docs/task-management.md's revert section and add a changeset.

Files changed:
 .changeset/fn-7548-per-sha-revert-granularity.md   |   7 +
 docs/task-management.md                            |   3 +-
 packages/dashboard/src/__tests__/task-revert-route.test.ts        |  46 +++++-
 packages/dashboard/src/routes/register-task-workflow-routes.ts    |  51 ++++--
 packages/engine/src/__tests__/task-revert.real-git.test.ts     | 124 +++++++++++++++
 packages/engine/src/index.ts                       |   2 +
 packages/engine/src/task-revert.ts                 | 176 +++++++++++++++++----
 7 files changed, 359 insertions(+), 50 deletions(-)

Fusion-Task-Id: FN-7548

Fusion-Task-Lineage: b9548f5e-fcc2-45d4-98e0-dd7340928208

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-05 11:31:44 -07:00
gsxdsm
c4d81fe5cc FN-7524: add AI-undo fallback task for reverting done/archived tasks
Adds an AI-undo fallback to the revert route: when a git-based revert conflicts or is unsupported, an ordinary board task is created to perform the undo via AI instead of a forced/failed git write.

- POST /tasks/:id/revert now accepts an optional `{ mode?: "git" | "ai" | "auto" }` body (default "auto"); unknown values reject with 400.
- "git" preserves the FN-7523 git-only contract unchanged; "ai" always creates the AI-undo task; "auto" tries git first and falls back to AI only on a conflicting or unsupported (e.g. workspace) result — needsHuman (autoMerge:false) never triggers the fallback.
- New engine helpers in task-revert.ts: `createAiUndoTask`, `buildAiUndoTaskDescription`, `REVERT_OF_METADATA_KEY`, plus `AiUndoTaskResult`/`CreateAiUndoTaskDeps` types, exported from packages/engine/src/index.ts.
- The AI-undo task is created via the normal triage-column `store.createTask` path with no dependency on the source task, referencing the source task's mission, id, and landed files, and instructing an undo commit using the `revert(FN-xxxx): ...` convention.
- New core `TaskStore.findOpenRevertTaskForSource` backs an idempotency guard: a repeated call while an AI-undo task is still open returns the same `createdTaskId` with `alreadyOpen: true` instead of creating a duplicate.
- Updated docs/task-management.md's revert section to document the git path + AI-undo fallback contract.
- Added a minor changeset for the @runfusion/fusion release notes.
- Added/extended tests: packages/engine/src/__tests__/task-revert-ai-undo.test.ts (new) and packages/dashboard/src/__tests__/task-revert-route.test.ts (extended) covering mode validation, auto-fallback-on-conflict, forced "ai" mode, and the duplicate-open-task guard.

Files changed:
 .changeset/fn-7524-ai-undo-revert.md               |   7 +
 docs/task-management.md                            |  13 +-
 packages/core/src/store.ts                         |  31 +++++
 packages/dashboard/src/__tests__/task-revert-route.test.ts | 143 ++++++++++++++++++++-
 packages/dashboard/src/routes/register-task-workflow-routes.ts |  75 +++++++++--
 packages/engine/src/__tests__/task-revert-ai-undo.test.ts |  114 ++++++++++++++++
 packages/engine/src/index.ts                       |   5 +
 packages/engine/src/task-revert.ts                 | 117 ++++++++++++++++-
 8 files changed, 487 insertions(+), 18 deletions(-)

Fusion-Task-Id: FN-7524

Fusion-Task-Lineage: 64dfedcf-c286-4c46-8cf8-51ec5e668bf7

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-05 11:31:43 -07:00
gsxdsm
53d7b7edcd FN-7523: add git-revert engine service and task revert API route
Adds an intelligent git-revert service for done/archived tasks plus a single POST /api/tasks/:id/revert route, with tests and a changeset.

- Add packages/engine/src/task-revert.ts exporting resolveTaskRevertCommits, classifyTaskRevert, and performTaskRevert (squash/rebase/lineage attribution precedence, dry-run classification, guaranteed-clean rollback)
- Wire new revert exports into packages/engine/src/index.ts
- Add POST /api/tasks/:id/revert route in register-task-workflow-routes.ts, enforcing done/archived-only and autoMerge-off guard rails; unresolved conflicting results are left for sibling FN-7524 (AI-undo) to act on; workspace tasks return unsupported
- Add engine real-git revert tests (task-revert.real-git.test.ts) and dashboard route tests (task-revert-route.test.ts)
- Document the revert capability in docs/task-management.md
- Add .changeset/fn-7523-task-revert.md (@runfusion/fusion: patch)

Files changed:
 .changeset/fn-7523-task-revert.md                  |   7 +
 docs/task-management.md                            |   8 +
 .../src/__tests__/task-revert-route.test.ts        | 180 +++++++
 .../src/routes/register-task-workflow-routes.ts    |  75 ++-
 .../src/__tests__/task-revert.real-git.test.ts     | 248 ++++++++++
 packages/engine/src/index.ts                       |  14 +
 packages/engine/src/task-revert.ts                 | 524 +++++++++++++++++++++
 7 files changed, 1055 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-7523

Fusion-Task-Lineage: ec349d4f-cc05-48d1-9e82-8c14d1470881

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-04 21:28:18 -07:00
gsxdsm
d2e3134746 FN-7499: require before-after task summaries
Require generated task specs to summarize the requested before-to-after transformation near the top.

- Add a Before → After Transformation section to standard and fast planning prompt templates.\n- Document the new task definition section and cover it with prompt regression tests.\n- Add a patch changeset for the published Fusion package.\n\nFiles changed:\n .changeset/fn-7499-before-after-transformation.md |  7 +++++++\n docs/task-management.md                           |  1 +\n packages/core/src/__tests__/agent-prompts.test.ts | 17 +++++++++++++++\n packages/core/src/agent-prompts.ts                | 25 +++++++++++++++++++----\n packages/engine/src/__tests__/triage.test.ts      | 20 ++++++++++++++++++\n 5 files changed, 66 insertions(+), 4 deletions(-)

Fusion-Task-Id: FN-7499

Fusion-Task-Lineage: d049b5d6-a4bc-40dd-831d-04a11f9dc2cf

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-04 10:42:20 -07:00
gsxdsm
f9733341b5 FN-7453: add GitLab enablement controls
Add a settings-controlled GitLab enablement path while preserving saved GitLab configuration.

- Add project and global GitLab enable settings with collapsible Settings UI for URL and token controls.
- Gate GitLab auth, import loading, and import actions when GitLab integration is disabled.
- Preserve global GitLab values separately during global settings saves and document the new behavior.
- Cover enablement resolution, settings save behavior, disabled import UI, and GitLab route/auth gating with tests.

Files changed:
 .changeset/fn-7453-gitlab-enable-disclosure.md     |  7 ++
 docs/dashboard-guide.md                            |  7 ++
 docs/gitlab-parity-inventory.md                    |  1 +
 docs/settings-reference.md                         |  4 ++
 docs/task-management.md                            |  6 +-
 packages/core/src/__tests__/gitlab-config.test.ts  | 17 ++++-
 .../core/src/__tests__/settings-parity.test.ts     | 18 +++--
 packages/core/src/gitlab-config.ts                 | 15 ++++-
 packages/core/src/index.ts                         |  2 +-
 packages/core/src/settings-schema.ts               |  2 +
 packages/core/src/types.ts                         |  5 ++
 .../app/__tests__/settings-save-split.test.ts      | 20 +++---
 .../dashboard/app/components/GitHubImportModal.tsx | 43 +++++++++---
 .../dashboard/app/components/SettingsModal.css     | 77 +++++++++++++++++++++
 .../dashboard/app/components/SettingsModal.tsx     | 34 ++++++++-
 .../__tests__/GitHubImportModal.test.tsx           | 19 ++++++
 .../__tests__/SettingsModal.general.test.tsx       | 78 ++++++++++++++++++++++
 .../SettingsModal.scheduling-merge.test.tsx        |  7 +-
 .../app/components/settings/save-split.ts          |  5 +-
 .../settings/sections/GeneralSection.tsx           | 36 ++++++----
 .../settings/sections/GlobalGeneralSection.tsx     | 71 ++++++++++++--------
 .../components/settings/sections/MergeSection.tsx  | 44 +++++++-----
 .../dashboard/src/__tests__/gitlab-auth.test.ts    | 20 ++++++
 .../dashboard/src/__tests__/routes-gitlab.test.ts  | 11 +++
 packages/dashboard/src/gitlab-auth.ts              | 11 ++-
 25 files changed, 458 insertions(+), 102 deletions(-)

Fusion-Task-Id: FN-7453

Fusion-Task-Lineage: 81fbd39d-675f-49d6-8d13-b7fcb4d25658

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-02 19:01:09 -07:00
gsxdsm
dfb6e5270d FN-7443: add bundled Linear import plugin
Add a plugin-owned Linear importer that creates Fusion tasks from Linear issues.

- Add the fusion-plugin-linear-import package with settings, Linear GraphQL client, import routes, tools, and dashboard UI.
- Bundle and register the Linear import plugin in the CLI and dashboard plugin view registry.
- Document bundled plugin authoring details and cover duplicate detection, routes, tools, UI, and packaging with tests.

Files changed:
 .changeset/fn-7443-linear-import-plugin.md         |   7 +
 docs/PLUGIN_AUTHORING.md                           |   7 +
 docs/task-management.md                            |   2 +
 packages/cli/src/__tests__/bundle-output.test.ts   |  22 ++
 .../__tests__/bundled-plugin-install.test.ts       |  29 +++
 packages/cli/src/plugins/bundled-plugin-install.ts |   1 +
 .../cli/src/plugins/staged-bundled-plugin-ids.ts   |   1 +
 packages/cli/tsup.config.ts                        |   8 +
 .../__tests__/registerBundledPluginViews.test.tsx  |   9 +-
 .../app/plugins/registerBundledPluginViews.ts      |  18 ++
 .../app/types/plugin-dashboard-views.d.ts          |   9 +
 .../src/__tests__/routes-plugin-registry.test.ts   |   5 +
 .../runtime-plugin-alias-regression.test.ts        |  12 +
 packages/dashboard/src/registry-manifest.json      |  10 +
 packages/dashboard/vite.config.ts                  |   8 +
 packages/dashboard/vitest.config.ts                |   8 +
 plugins/fusion-plugin-linear-import/README.md      |  75 ++++++
 plugins/fusion-plugin-linear-import/manifest.json  |  48 ++++
 plugins/fusion-plugin-linear-import/package.json   |  38 +++
 .../scripts/copy-css.mjs                           |  11 +
 .../src/LinearImportView.css                       | 167 +++++++++++++
 .../src/LinearImportView.tsx                       | 263 +++++++++++++++++++++
 .../src/__tests__/LinearImportView.test.tsx        | 124 ++++++++++
 .../src/__tests__/import-linear.test.ts            |  78 ++++++
 .../src/__tests__/linear-client.test.ts            |  81 +++++++
 .../src/__tests__/routes.test.ts                   |  90 +++++++
 .../src/__tests__/tools.test.ts                    |  79 +++++++
 .../src/dashboard-interop.d.ts                     |  13 +
 .../src/dashboard-view.tsx                         |  10 +
 .../src/import-linear.ts                           | 154 ++++++++++++
 plugins/fusion-plugin-linear-import/src/index.ts   |  45 ++++
 .../src/linear-client.ts                           | 247 +++++++++++++++++++
 plugins/fusion-plugin-linear-import/src/routes.ts  | 149 ++++++++++++
 .../fusion-plugin-linear-import/src/settings.ts    |  68 ++++++
 plugins/fusion-plugin-linear-import/src/tools.ts   | 138 +++++++++++
 plugins/fusion-plugin-linear-import/tsconfig.json  |  14 ++
 .../fusion-plugin-linear-import/vitest.config.ts   |  40 ++++
 pnpm-lock.yaml                                     |  40 ++++
 pnpm-workspace.yaml                                |   1 +
 39 files changed, 2128 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-7443
Fusion-Task-Lineage: a016a9d4-84a4-4a0b-b9b6-b9a2886da49a
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-02 14:31:16 -07:00
gsxdsm
865dec235b FN-7424: add GitLab task imports
Adds GitLab-backed task import flows across the CLI, extension, API, and dashboard.

- Add GitLab client normalization, provenance, duplicate detection, and import routes for project issues, group issues, and merge requests.
- Extend the dashboard import modal with a GitLab provider, resource tabs, previews, imported-state detection, and import actions.
- Add CLI and extension task import commands plus usage event/gating classifications and operator documentation.
- Cover GitLab fetch/import behavior with dashboard, CLI, and gating tests.

Files changed:
 .changeset/fn-7424-gitlab-imports.md               |   7 +
 docs/cli-reference.md                              |  11 +-
 docs/gitlab-parity-inventory.md                    |  10 +-
 docs/task-management.md                            |   6 +-
 packages/cli/skill/fusion/SKILL.md                 |   2 +-
 .../cli/skill/fusion/references/extension-tools.md |  60 ++++
 .../skill/fusion/references/fusion-capabilities.md |   6 +
 packages/cli/src/__tests__/extension.test.ts       |   6 +
 .../__tests__/task-command-gitlab-import.test.ts   |  97 ++++++
 packages/cli/src/bin.ts                            |  25 +-
 packages/cli/src/commands/task.ts                  |  58 ++++
 packages/cli/src/extension.ts                      | 106 +++++++
 packages/core/src/__tests__/usage-events.test.ts   |   2 +
 packages/core/src/types.ts                         |   7 +
 packages/core/src/usage-events.ts                  |   3 +
 packages/dashboard/app/api/legacy.ts               |  52 ++++
 .../dashboard/app/components/GitHubImportModal.css |  41 +++
 .../dashboard/app/components/GitHubImportModal.tsx | 143 ++++++++-
 .../__tests__/GitHubImportModal.test.tsx           |  33 ++
 packages/dashboard/src/__tests__/gitlab.test.ts    |  56 ++++
 .../dashboard/src/__tests__/routes-gitlab.test.ts  |  99 ++++++
 packages/dashboard/src/gitlab.ts                   | 334 +++++++++++++++++++++
 packages/dashboard/src/index.ts                    |  15 +
 packages/dashboard/src/routes.ts                   |   2 +
 packages/dashboard/src/routes/register-gitlab.ts   | 192 ++++++++++++
 .../engine/src/__tests__/agent-action-gate.test.ts |   4 +
 .../gating-classifications-provisioning.test.ts    |  13 +-
 .../src/__tests__/gating-classifications.test.ts   |   6 +
 packages/engine/src/gating-classifications.ts      |   9 +
 29 files changed, 1388 insertions(+), 17 deletions(-)

Fusion-Task-Id: FN-7424
Fusion-Task-Lineage: 8012425c-21d5-4b20-adb7-07d2e5aa1cef
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-02 11:38:34 -07:00
gsxdsm
fafe4c9d9f FN-7423: add GitLab access token settings
Add GitLab access-token configuration and auth resolution for future HTTP API integrations.

- Add personal, project, and group GitLab token settings at project and global scope.
- Resolve configured tokens with GITLAB_TOKEN fallback and PRIVATE-TOKEN metadata without requiring glab.
- Document required GitLab scopes and update parity handoff notes.
- Cover settings save splitting, parity, modal rendering, and auth resolution with tests.

Files changed:
 .changeset/fn-7423-gitlab-access-tokens.md         |   7 ++
 docs/gitlab-parity-inventory.md                    |  10 +-
 docs/settings-reference.md                         |   6 +-
 docs/task-management.md                            |   2 +-
 .../core/src/__tests__/settings-parity.test.ts     |  28 +++--
 packages/core/src/index.ts                         |   2 +-
 packages/core/src/settings-schema.ts               |   4 +
 packages/core/src/types.ts                         |  17 ++-
 .../app/__tests__/settings-save-split.test.ts      |  69 ++++++++++++
 .../dashboard/app/components/SettingsModal.tsx     |   2 +
 .../SettingsModal.scheduling-merge.test.tsx        |  57 ++++++++++
 .../app/components/settings/save-split.ts          |   6 +-
 .../settings/sections/GlobalGeneralSection.tsx     |  18 ++-
 .../components/settings/sections/MergeSection.tsx  |  22 ++++
 .../dashboard/src/__tests__/gitlab-auth.test.ts    |  99 +++++++++++++++++
 packages/dashboard/src/gitlab-auth.ts              | 123 +++++++++++++++++++++
 16 files changed, 449 insertions(+), 23 deletions(-)

Fusion-Task-Id: FN-7423

Fusion-Task-Lineage: f14ae52b-b730-44b0-8bad-54945c61d009

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-02 11:38:33 -07:00
gsxdsm
573876603f FN-7422: add GitLab URL configuration
Add typed GitLab instance and API URL settings for GitLab.com and self-managed instances.

- Add core GitLab URL defaults, validation, normalization, and project/global inheritance.
- Expose project and global GitLab instance/API URL fields in settings with save-split handling.
- Cover configuration resolution, settings parity, and settings UI save behavior with tests.
- Document the new settings and add a changeset for the published CLI package.

Files changed:
 .changeset/fn-7422-gitlab-configuration.md         |  7 ++
 docs/settings-reference.md                         |  6 +-
 docs/task-management.md                            |  2 +-
 packages/core/src/__tests__/gitlab-config.test.ts  | 74 +++++++++++++++++++
 .../core/src/__tests__/settings-parity.test.ts     | 22 +++++-
 packages/core/src/gitlab-config.ts                 | 79 +++++++++++++++++++++
 packages/core/src/index.ts                         |  4 +-
 packages/core/src/settings-schema.ts               |  4 ++
 packages/core/src/types.ts                         | 20 ++++++
 .../app/__tests__/settings-save-split.test.ts      | 53 ++++++++++++++
 .../dashboard/app/components/SettingsModal.tsx     | 20 ++++++
 .../__tests__/SettingsModal.general.test.tsx       | 82 ++++++++++++++++++++++
 .../app/components/settings/save-split.ts          |  6 ++
 .../settings/sections/GeneralSection.tsx           | 15 ++++
 .../settings/sections/GlobalGeneralSection.tsx     | 14 ++++
 15 files changed, 402 insertions(+), 6 deletions(-)

Fusion-Task-Id: FN-7422

Fusion-Task-Lineage: 0110b4b6-71b0-4a62-afaf-61af65ebef03

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-02 11:38:33 -07:00
gsxdsm
7302d22b9d FN-7421: document GitLab parity inventory
Document the GitLab parity implementation inventory and guardrails for downstream work.

- Add a GitLab parity inventory covering import, tracking, comments, auto-close, auth, CLI/tools, Command Center, and signals surfaces.
- Link the inventory from existing settings, signals, and task-management documentation.
- Add a documentation contract test for required GitLab assumptions and explicit exclusions.

Files changed:
 docs/gitlab-parity-inventory.md                    | 106 +++++++++++++++++++++
 docs/settings-reference.md                         |   3 +
 docs/signals-connectors.md                         |   2 +
 docs/task-management.md                            |   2 +
 .../gitlab-parity-inventory-documentation.test.ts  |  70 ++++++++++++++
 5 files changed, 183 insertions(+)

Fusion-Task-Id: FN-7421

Fusion-Task-Lineage: 3b16cb60-11d6-4dc5-a374-23e515dc8b31

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-02 11:38:32 -07:00