Commit Graph

151 Commits

Author SHA1 Message Date
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
gsxdsm
377eee64af FN-7410: allow archived task deletion
Allow archived task snapshots to be deleted while preserving soft-delete tombstones.

- Restore cold archived snapshots into the tasks table before applying delete tombstones.
- Remove archive snapshots after deletion and preserve allowResurrection semantics.
- Cover archived deletion through store, API, UI menu, docs, and changeset updates.

Files changed:
 .changeset/fn-7410-delete-archived-tasks.md        |   7 ++
 docs/task-management.md                            |   3 +-
 .../core/src/__tests__/soft-delete-tasks.test.ts   | 129 +++++++++++++++++++++
 packages/core/src/store.ts                         |  25 +++-
 .../components/__tests__/TaskContextMenu.test.tsx  |  19 +++
 .../src/__tests__/routes-tasks-ops.test.ts         |  24 ++++
 6 files changed, 204 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-7410
Fusion-Task-Lineage: fa7d9983-e62c-4849-89d8-1ae5f6134815
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-02 11:38:30 -07:00
gsxdsm
998a7f2745 fix(FN-7226): make plan review the single pre-execution gate
Fusion-Task-Id: FN-7226
2026-06-29 01:48:27 -07:00
gsxdsm
584ed02541 FN-6897: update dashboard navigation docs
Refresh the documentation to match the reshuffled dashboard navigation model.

- Clarify that desktop/tablet content destinations live in the left sidebar while inline tools live in the right dock.
- Update Planning, Import Tasks, Git Manager Recovery, and plugin view navigation instructions across docs.
- Remove stale Header overflow, duplicate dock/sidebar, and standalone Stash Recovery wording.

Files changed:
 docs/architecture.md    |  2 +-
 docs/dashboard-guide.md | 55 +++++++++++++++++++++++++++----------------------
 docs/getting-started.md |  4 ++--
 docs/task-management.md |  4 ++--
 4 files changed, 35 insertions(+), 30 deletions(-)

Fusion-Task-Id: FN-6897

Fusion-Task-Lineage: d0009a23-c197-4c1b-8c54-5fe4a8dca03c
2026-06-22 19:24:55 -07:00
gsxdsm
1c3a4df255 FN-6509: show resumable subtask progress
Subtask breakdowns now show live progress immediately and remain resumable after closing.

- Add startup and reconnecting progress states with empty-thinking feedback.
- Preserve generating and editing subtask sessions for background resume instead of canceling on close.
- Cover mobile, desktop, running, awaiting-input, and completed resume flows in modal tests.
- Document resumable subtask generation behavior and add localized strings.

Files changed:
 docs/task-management.md                            |   2 +
 .../app/components/SubtaskBreakdownModal.tsx       |  80 ++++++++---
 .../__tests__/SubtaskBreakdownModal.test.tsx       | 156 ++++++++++++++++++---
 packages/i18n/locales/en/app.json                  |   5 +
 packages/i18n/src/resources.d.ts                   |   5 +
 5 files changed, 209 insertions(+), 39 deletions(-)

Fusion-Task-Id: FN-6509

Fusion-Task-Lineage: 3bc143fa-a00f-42b6-afd4-ba4fb65b4b63
2026-06-16 21:37:32 -07:00
gsxdsm
4f7b3ac78f FN-6439: clear stale near-duplicate flags
Clear near-duplicate decisions when their canonical task is no longer active.

- Add a shared canonical activity helper for near-duplicate detection.
- Clear stale persisted near-duplicate metadata when canonical tasks are done, archived, or deleted.
- Prevent triage and dashboard surfaces from presenting duplicate decisions for inactive canonicals.
- Cover stale-flag cleanup and hidden dashboard affordances with regression tests.

Files changed:
 docs/task-management.md                            |   4 +-
 .../near-duplicate-stale-flag-clear.test.ts        | 105 +++++++++++++++++++++
 packages/core/src/__tests__/near-duplicate.test.ts |  19 +++-
 packages/core/src/index.ts                         |   2 +
 packages/core/src/near-duplicate-canonical.ts      |  25 +++++
 packages/core/src/near-duplicate.ts                |   3 +
 packages/core/src/store.ts                         | 102 +++++++++++++++++++-
 packages/dashboard/app/App.tsx                     |   7 +-
 packages/dashboard/app/components/Column.tsx       |  10 ++
 packages/dashboard/app/components/TaskCard.tsx     |  12 ++-
 .../dashboard/app/components/TaskDetailModal.tsx   |  12 ++-
 packages/dashboard/app/components/WorktreeGroup.tsx     |  30 +++++-
 .../app/components/__tests__/TaskCard.test.tsx     |  28 ++++++
 .../__tests__/TaskDetailModal.rendering.test.tsx   |  26 +++++
 .../near-duplicate-intake.test.ts                  |  24 +++++
 packages/engine/src/triage.ts                      |  10 ++
 16 files changed, 411 insertions(+), 8 deletions(-)

Fusion-Task-Id: FN-6439

Fusion-Task-Lineage: e57b80e8-36aa-4b96-ad13-53b5a431477d
2026-06-14 15:29:35 -07:00
gsxdsm
000a73b3f0 Merge origin/main into fix/fn-352-no-commit-coordination
Reconcile the FN-352 no-commit coordination guard skip with main's
independently-landed FN-424 work. Both branches added a no_commits
guard bypass at the same fn_task_done call site:

- FN-352 (this branch): getNoCommitEligibilityReason(task) covering
  Review Level 1 coordination prompts with board-only scope and
  explicit no-source intent (e.g. "Do not change product source").
- FN-424 (main): evaluatePromptDerivedNoCommitEligibility(...) plus
  non-blocking audit logging of the skip.

Their prompt phrase-matching differs, so neither alone satisfies the
merged test file. Resolved by OR-ing both eligibility checks and
wrapping the skip in main's audit-logging block. Both helpers still
refuse the contradictory implementation+coordination prompt.

All 18 executor-task-done-invariant tests pass; engine typecheck clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 00:01:30 -07:00
gsxdsm
508551c593 FN-6299: allow archiving tasks from any column
Allow task archiving from every live board column while preserving a safe restore target.

- Record the pre-archive column and restore archived tasks to that column, downgrading active execution columns to todo.
- Expose archive actions and CLI/tooling documentation for all non-archived tasks.
- Expand store, dashboard, and route tests for archive/unarchive behavior across columns.
- Quarantine the flaky core db test observed during verification and add the published package changeset.

Files changed:
 .changeset/fn-6299-archive-any-column.md           |  5 ++
 docs/cli-reference.md                              |  4 ++
 docs/task-management.md                            |  9 +--
 .../cli/skill/fusion/references/extension-tools.md |  6 +-
 .../skill/fusion/references/fusion-capabilities.md |  4 +-
 packages/cli/src/bin.ts                            |  2 +-
 packages/cli/src/extension.ts                      | 18 ++---
 .../src/__tests__/store-archive-search.test.ts     | 76 +++++++++++++++++-----
 packages/core/src/store.ts                         | 61 ++++++++++++-----
 packages/core/src/types.ts                         |  4 ++
 packages/core/vitest.config.ts                     |  1 +
 packages/dashboard/app/components/TaskCard.tsx     |  2 +-
 .../dashboard/app/components/TaskDetailModal.tsx   |  2 +-
 .../app/components/__tests__/TaskCard.test.tsx     | 35 +++++++++-
 ...etailModal.responsive-and-dependencies.test.tsx | 26 ++++++++
 .../src/__tests__/routes-tasks-ops.test.ts         |  8 +--
 .../src/routes/register-task-workflow-routes.ts    |  9 +--
 scripts/lib/test-quarantine.json                   |  5 ++
 18 files changed, 215 insertions(+), 62 deletions(-)

Fusion-Task-Id: FN-6299

Fusion-Task-Lineage: fd5b5c12-35b8-4843-ab4e-14608d1ea395
2026-06-12 21:50:49 -07:00
gsxdsm
ac8ad834ce Merge branch 'main' into fix/fn-352-no-commit-coordination 2026-06-12 21:39:07 -07:00
gsxdsm
bd87ce7d7e FN-6304: add optional workflow steps
Allow workflows to define default-on optional steps and expose browser verification as a togglable workflow option.

- Add core optional-step helpers, IR metadata, compiler support, exports, and regression coverage.
- Mark browser verification optional in the built-in coding workflow and document optional workflow-step behavior.
- Add dashboard/API support for optional step defaults and enabled-state presentation with localized label cleanup.
- Add a patch changeset for the published Fusion package.

Files changed:
 .changeset/fn-6304-optional-workflow-steps.md      |  5 ++
 docs/task-management.md                            |  2 +-
 docs/workflow-steps.md                             |  8 ++
 packages/core/src/__tests__/workflow-ir.test.ts    | 45 +++++++++++
 .../src/__tests__/workflow-optional-steps.test.ts  | 88 ++++++++++++++++++++++
 packages/core/src/builtin-coding-workflow-ir.ts    |  1 +
 packages/core/src/index.ts                         |  3 +
 packages/core/src/store.ts                         |  3 +
 packages/core/src/workflow-compiler.ts             | 30 +++++++-
 packages/core/src/workflow-ir-types.ts             | 11 +++
 packages/core/src/workflow-ir.ts                   | 32 +++++++-
 packages/core/src/workflow-optional-steps.ts       | 46 +++++++++++
 packages/dashboard/app/api/legacy.ts               | 10 +++
 .../dashboard/app/components/InlineCreateCard.css  | 20 +++++
 .../dashboard/app/components/InlineCreateCard.tsx  | 87 ++++++++++++++++-----
 .../app/components/WorkflowResultsTab.tsx          | 44 +++++++++--
 .../components/__tests__/InlineCreateCard.test.tsx | 41 +++++++++-
 .../__tests__/WorkflowResultsTab.test.tsx          | 58 +++++++++++++-
 .../src/__tests__/workflow-routes.test.ts          | 22 ++++++
 .../src/routes/register-workflow-routes.ts         | 16 +++-
 packages/i18n/locales/en/app.json                  |  6 +-
 packages/i18n/locales/es/app.json                  |  3 -
 packages/i18n/locales/fr/app.json                  |  3 -
 packages/i18n/locales/ko/app.json                  |  3 -
 packages/i18n/locales/zh-CN/app.json               |  3 -
 packages/i18n/locales/zh-TW/app.json               |  3 -
 packages/i18n/src/resources.d.ts                   |  6 +-
 27 files changed, 543 insertions(+), 56 deletions(-)

Fusion-Task-Id: FN-6304

Fusion-Task-Lineage: 385f8ae1-494f-4e2b-a6e9-3a2d2bbe7f71
2026-06-12 17:57:19 -07:00
Phil Larson
3a729f53a9 fix(FN-352): allow no-commit coordination completion 2026-06-12 15:51:50 -07:00
gsxdsm
c285f3fb88 FN-6218: restore pi upgrade compatibility
Restore Pi-upgraded workspaces to keep Fusion resources accessible and recover title generation when configured models go stale.

- Mark read-only Fusion/Pi provider settings views as project-trusted so extension loading keeps working after Pi upgrades.
- Retry task title summarization with automatic model resolution when the configured provider model is missing from the Pi registry.
- Cover provider settings trust behavior and stale summarizer fallback paths with regression tests.
- Document the read-only settings trust contract and add a patch changeset.

Files changed:
 .changeset/fn-6218-pi-upgrade-regressions.md       |   5 +
 docs/settings-reference.md                         |   2 +
 docs/task-management.md                            |   2 +
 .../commands/__tests__/provider-settings.test.ts   |  16 ++++
 packages/cli/src/commands/provider-settings.ts     |   5 +
 packages/core/src/__tests__/ai-summarize.test.ts   | 102 +++++++++++++++++++++
 packages/core/src/ai-summarize.ts                  |  85 ++++++++++++-----
 .../src/__tests__/pi-create-fn-agent.test.ts       |  32 +++++++
 packages/engine/src/pi.ts                          |   7 +-
 9 files changed, 233 insertions(+), 23 deletions(-)

Fusion-Task-Id: FN-6218

Fusion-Task-Lineage: 3d6aca32-a56a-43a0-a57b-8e6abc839ce9
2026-06-11 09:51:49 -07:00
gsxdsm
36f5ecdaba FN-6226: skip fast-mode workflow graph validation nodes
Fast execution mode now bypasses custom pre-merge workflow graph validation consistently.

- Skip custom graph prompt, script, and gate nodes for fast-mode tasks while preserving human waits and CLI-agent work.
- Add regression coverage for fast-mode custom workflow behavior and standard-mode/null-mode validation.
- Document fast-mode workflow graph bypass behavior and record the published package changeset.
- Quarantine the unrelated self-healing real-git flake from the engine core gate.

Files changed:
 .changeset/FN-6226-fast-mode-workflows.md          |   5 +
 docs/task-management.md                            |   6 +-
 docs/workflow-steps.md                             |   2 +-
 .../__tests__/executor-fast-mode-workflows.test.ts | 280 +++++++++++++++++++++
 packages/engine/src/executor.ts                    |  16 ++
 packages/engine/vitest.config.ts                   |   1 +
 scripts/lib/test-quarantine.json                   |   5 +
 7 files changed, 313 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-6226

Fusion-Task-Lineage: 68d88a7a-e157-4d18-a2c2-9065946066de
2026-06-11 09:21:23 -07:00
gsxdsm
8aed4da764 FN-5949: add AI PR conflict resolution to Create PR flow
Add dashboard support for resolving task-branch PR conflicts with AI before PR creation.

- add a dashboard PR conflict resolver that merges the selected base into the task branch, invokes an AI merge session on conflicted files, verifies markers are removed, then commits and pushes the updated branch
- expose a POST /tasks/:id/pr/resolve-conflicts route plus client API/export wiring, docs updates, and a changeset for the published CLI package
- update the Create PR modal UI, styling, and tests to surface preflight conflicts, trigger AI resolution, and refresh preflight state after success
- add API coverage for successful and unresolved conflict-resolution paths and include the new route test in the dashboard API quality shard

Files changed:
 .changeset/fn-5949-pr-conflict-resolution.md       |   5 +
 docs/dashboard-guide.md                            |   1 +
 docs/task-management.md                            |   1 +
 packages/dashboard/README.md                       |   1 +
 packages/dashboard/app/api/legacy.ts               |  20 ++
 .../dashboard/app/components/PrCreateModal.css     |  32 ++-
 .../dashboard/app/components/PrCreateModal.tsx     |  46 ++++
 .../components/__tests__/PrCreateModal.test.tsx    |  33 +++
 ...egister-git-github.pr-resolve-conflicts.test.ts | 186 +++++++++++++++
 packages/dashboard/src/index.ts                    |   5 +
 packages/dashboard/src/pr-conflict-resolver.ts     | 258 +++++++++++++++++++++
 .../dashboard/src/routes/register-git-github.ts    | 225 ++++++++++++------
 packages/dashboard/vitest.config.ts                |   2 +-
 13 files changed, 739 insertions(+), 76 deletions(-)

Fusion-Task-Id: FN-5949

Fusion-Task-Lineage: fea35fbf-6254-415c-83cc-0bc24abc911e
2026-06-03 15:32:29 -07:00
gsxdsm
793da2c749 FN-5780: inherit source GitHub tracking when refining tasks
Preserve GitHub linking intent when creating refinement tasks from completed work.

- Set refinement `githubTracking` from the source task state during `refineTask`
- Opt out refinements when the source task is unlinked or explicitly disabled
- Carry forward `enabled` and optional `repoOverride` for linked sources without copying source issue metadata
- Add store-level tests covering unlinked, disabled, linked, and issue-only source tracking states
- Document refinement GitHub tracking inheritance behavior in task-management docs
- Add a patch changeset for `@runfusion/fusion`

Files changed:
 .changeset/fn-5780-refine-github-tracking.md  |  5 ++
 docs/task-management.md                       |  1 +
 packages/core/src/__tests__/store-ops.test.ts | 71 +++++++++++++++++++++++++++
 packages/core/src/store.ts                    | 12 +++++
 4 files changed, 89 insertions(+)

Fusion-Task-Id: FN-5780
Fusion-Task-Lineage: 88c1ce01-6efd-48c1-bbdd-704a821055d7
2026-05-31 11:55:11 -07:00
gsxdsm
24e0c44b4a FN-5731: require confirmation before archiving near-duplicate tasks
Stop silent near-duplicate auto-archive by routing duplicates through explicit user confirmation in API, engine, and dashboard flows.

- add new near-duplicate confirmation metadata/types and preserve duplicate task rows until confirmation
- update workflow routes and triage logic to return confirmation-required outcomes instead of immediate archive
- add TaskCard and TaskDetailModal UI/actions plus styling and hook updates for confirming or rejecting duplicate handling
- expand dashboard and engine tests and task-management docs to cover the new confirmation path

Files changed:
docs/task-management.md                            | 14 ++++-
packages/core/src/types.ts                         |  4 ++
packages/dashboard/app/api/legacy.ts               |  1 +
packages/dashboard/app/components/TaskCard.css     | 59 ++++++++++++++++++
packages/dashboard/app/components/TaskCard.tsx     | 46 +++++++++++++-
packages/dashboard/app/components/TaskDetailModal.css   | 34 +++++++++++
packages/dashboard/app/components/TaskDetailModal.tsx   | 71 +++++++++++++++++++++-
packages/dashboard/app/components/__tests__/TaskCard.test.tsx     | 71 ++++++++++++++++++++++
packages/dashboard/app/components/__tests__/TaskDetailModal.rendering.test.tsx   | 68 +++++++++++++++++++++
packages/dashboard/app/hooks/useTasks.ts           |  2 +-
packages/dashboard/src/__tests__/routes-tasks-near-duplicate.test.ts  | 45 ++++++++++++++
packages/dashboard/src/routes/register-task-workflow-routes.ts    |  9 ++-
packages/engine/src/__tests__/reliability-interactions/near-duplicate-intake.test.ts                  | 16 +++--
packages/engine/src/triage.ts                      | 19 +++---
14 files changed, 433 insertions(+), 26 deletions(-)

Fusion-Task-Id: FN-5731

Fusion-Task-Lineage: fa004129-7bce-4457-b8c3-ceb9fb953319
2026-05-30 15:52:46 -07:00
Phil Larson
6ba3cbf495 fix: respect dashboard task column filters 2026-05-30 08:29:04 -07:00
gsxdsm
1df1b479dd FN-5640: refresh PR status from Check PR Status footer action
Fusion-Task-Id: FN-5640

Fusion-Task-Lineage: 80074933-2486-4aa6-b23d-1d0e049808cb
2026-05-28 21:40:01 -07:00
gsxdsm
b2dce7d852 Recovery: Re-land (Close source-imported GitHub issues on ta 2026-05-28 19:49:31 -07:00
gsxdsm
e84673c632 feat(FN-5618): handle deleted source issues in TaskCard
Implements source issue delete handling in the task dashboard, including prompt-based user interaction for source-linked issues, new GitHub tracking state logic in `packages/dashboard/src/github-tracking-state.ts`, and corresponding test coverage, with documentation added to `docs/task-management.md

Fusion-Task-Id: FN-5618

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
Fusion-Task-Id: FN-5618
2026-05-28 08:57:59 -07:00
Fusion (runfusion.ai)
216c32bfe5 feat(FN-5347): reset manual retry counters across task retry surfaces
- Add a shared manual retry reset helper in core and export it for consumers
- Wire retry counter resets into CLI task retry, extension task retry, and dashboard task workflow routes
- Align retry reset behavior with task typing updates and remove superseded task-helper reset paths
- Add focused core/CLI/extension/dashboard tests plus docs and a changeset describing retry reset behavior
2026-05-21 15:45:48 -07:00
Fusion (runfusion.ai)
fd202e9356 feat(FN-5329): remove orphan rescue and branch-recovery primitives from eng
Removes the branch-recovery CLI surface, orphan-rescue engine primitives, and their associated tests (over 1,500 lines deleted), while restoring a minimal prune-only orphan branch sweep with proper git audit mutation types. Documentation across `cli-reference.md`, `task-management.md`, and `AGENTS.m

Fusion-Task-Id: FN-5329
2026-05-20 16:43:27 -07:00
Fusion (runfusion.ai)
8f2d5e7e61 feat(FN-5220): guard explicit duplicate markers in triage and self-healing
Adds an explicit duplicate-marker guard (FN-5220) spanning core helper, dashboard API endpoint, triage short-circuit, and self-healing sweep to detect and handle duplicate task creation attempts; includes comprehensive test coverage across unit, API, and integration layers plus documentation.

Fusion-Task-Id: FN-5220
2026-05-20 14:28:45 -07:00
Fusion (runfusion.ai)
b7ddfc9d20 feat(FN-5171): add near-duplicate task guard to CLI create command
Adds a near-duplicate guard to the CLI task creation command (FN-5171), preventing creation of tasks with titles that are visually or semantically identical to existing ones, with 262 new test cases covering the detection logic and the standard changeset entry.

Fusion-Task-Id: FN-5171
2026-05-20 00:41:33 -07:00
Fusion (runfusion.ai)
2be6cf2ff8 feat(FN-5152): complete Step 8 — add delivery docs and changeset
Fusion-Task-Id: FN-5152
Fusion-Task-Lineage: 954570d8-82e1-4519-a739-c52ee790d2db
2026-05-19 11:30:55 -07:00
Fusion (runfusion.ai)
012fb17db1 feat(FN-5141): complete Step 7 — add changeset and delivery docs
Fusion-Task-Id: FN-5141
Fusion-Task-Lineage: 2f90daca-c147-4807-b780-09f8f54580ae
2026-05-19 08:38:34 -07:00
Fusion (runfusion.ai)
68b5694cba feat(FN-5060): complete Step 8 — update docs and changeset 2026-05-18 19:45:58 -07:00
gsxdsm
f46629ef10 feat(FN-5084): merge fusion/fn-5084 2026-05-18 17:53:00 -07:00
gsxdsm
0046fc92e2 feat(FN-4918): merge fusion/fn-4918 2026-05-18 16:23:06 -07:00
gsxdsm
aad1219037 feat(FN-4967): merge fusion/fn-4967 2026-05-18 15:50:48 -07:00