Commit Graph

2762 Commits

Author SHA1 Message Date
gsxdsm
c93217dee0 fix(FN-7225): honor plan review approvals in workflows
Fusion-Task-Id: FN-7225
2026-06-29 02:08:08 -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
1d21241725 fix(FN-7225): auto-retry stale parse pause aborts 2026-06-29 01:13:31 -07:00
gsxdsm
1f365163a4 fix(FN-7225): clear stale pause state on workflow retry 2026-06-29 01:05:44 -07:00
gsxdsm
b86ddf4d10 fix(FN-7225): route failed plan review to triage 2026-06-29 00:48:49 -07:00
gsxdsm
c7cbd1dbf1 fix(FN-7221): clear stale workflow pins on spec rebuild 2026-06-29 00:37:17 -07:00
gsxdsm
138d6447fb fix(workflows): address review feedback on recovery and docs 2026-06-29 00:10:27 -07:00
gsxdsm
d1caa3bdbf test(workflows): cover coding optional gates 2026-06-28 23:45:32 -07:00
gsxdsm
e963be4088 FN-7220: harden workflow recovery lineage checks
Harden workflow recovery so pause/resume parks and already-merged detection preserve task ownership lineage.

- Reject already-merged recovery candidates with foreign task or lineage trailers before accepting patch-id, tree, or branch-tip matches.
- Recover benign pause/resume abort parks back to todo when the task has no live executor/session state.
- Add real-git and executor regression coverage plus architecture docs and a changeset for recovery behavior.

Files changed:
 .changeset/fn-7220-workflow-recovery-lineage.md    |   7 +
 docs/architecture.md                               |   8 +-
 .../already-merged-detector.real-git.test.ts       |  69 ++++++++
 .../executor-paused-abort-todo-benign.test.ts      | 194 ++++++++++++++++++---
 .../self-healing-already-merged.real-git.test.ts   |  64 ++++++-
 packages/engine/src/already-merged-detector.ts     | 113 +++++++++---
 packages/engine/src/executor.ts                    |  84 +++++++++
 packages/engine/src/self-healing.ts                | 134 ++++++++++++--
 8 files changed, 609 insertions(+), 64 deletions(-)

Fusion-Task-Id: FN-7220

Fusion-Task-Lineage: 186c65bc-fe1a-457a-b90a-abbd73044252

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-28 22:43:02 -07:00
gsxdsm
58a0c1f1d6 FN-7214: make workflow node pause resume re-entrant
Workflow graph pause aborts now re-enter interrupted nodes instead of failing the task.

- Track and abort active workflow graph runners during hard cancel and global pause flows.
- Stamp interrupted workflow nodes with typed engine-pause abort context and surface it through graph run results.
- Re-enter safe todo, in-progress, and auto-mergeable in-review graph nodes with retry bounds and run-audit evidence.
- Add regression coverage and architecture notes for paused node re-entry behavior.

Files changed:
 .changeset/fn-7214-workflow-graph-node-pause-resume.md    |   7 +
 docs/architecture.md                                      |   4 +-
 packages/engine/src/__tests__/executor-paused-abort-todo-benign.test.ts      | 231 ++++++++++++++++++++-
 packages/engine/src/__tests__/workflow-graph-paused-node-resume.test.ts      | 148 +++++++++++++
 packages/engine/src/executor.ts                           | 158 +++++++++++++-
 packages/engine/src/workflow-graph-executor.ts            |  50 ++++-
 packages/engine/src/workflow-graph-task-runner.ts         |  26 ++-
 7 files changed, 614 insertions(+), 10 deletions(-)

Fusion-Task-Id: FN-7214
Fusion-Task-Lineage: 1689e3fd-e35f-4e83-8049-aabbab49cecd
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-28 19:42:45 -07:00
gsxdsm
fac7556321 fix(FN-7210): stop merge-retry loop starving executor remediation pass
recoverCompletedTask refused workflow-graph re-entry when the live task
has incomplete plan steps or a remediation bounce is already scheduled.
A pre-merge optional/advisory REVISE reopens steps and schedules a
sendTaskBackForFix bounce; a competing graph re-entry re-passed the
advisory step (budget exhausted), advanced to merge, and looped forever
on the 'task has incomplete steps' gate. Defer to the bounce /
stale-incomplete-review recovery so the executor finishes the steps.

Fusion-Task-Id: FN-7210
2026-06-28 19:22:06 -07:00
gsxdsm
3a83868543 FN-7212: apply reviewer model overrides
Route reviewer-family sessions through the shared validator model resolver so task overrides are honored consistently.

- Resolve reviewer, workflow review-step, and spec-review models from one effective settings snapshot.
- Forward task reviewer model overrides from triage into spec review calls.
- Preserve review text capture for session implementations without subscribe support.
- Add coverage for override precedence, test-mode forcing, and optional review lanes.
- Add a patch changeset for the published Fusion package.

Files changed:
 .changeset/fn-7212-reviewer-model-overrides.md     |   7 ++
 .../core/src/__tests__/model-resolution.test.ts    | 117 +++++++++++++++++++
 .../src/__tests__/executor-review-verdicts.test.ts |  53 ++++++++-
 packages/engine/src/__tests__/reviewer.test.ts     | 130 +++++++++++++++++++--
 packages/engine/src/__tests__/triage.test.ts       |  14 ++-
 packages/engine/src/reviewer.ts                    |  91 +++++++++------
 packages/engine/src/triage.ts                      |   3 +
 7 files changed, 369 insertions(+), 46 deletions(-)

Fusion-Task-Id: FN-7212
Fusion-Task-Lineage: 34820552-e99c-4da0-97ef-fb1812cb917e
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-28 18:07:02 -07:00
gsxdsm
2051516f8b FN-7205: prefer live concurrency counts
Prefer live runtime stores for concurrency counters so dashboard totals match active agent enforcement.

- Prefer engine-manager task stores before default fallback stores when sourcing live running-agent counts.
- Count running agents from slim task lists across active lifecycle states instead of trusting stale in-progress queries.
- Add regressions for count normalization, default-project store precedence, and scoped semaphore limit changes.
- Add a patch changeset for the published Fusion CLI package.

Files changed:
 .changeset/fn-7205-concurrency-counter-enforcement.md     |  7 ++++
 packages/core/src/__tests__/live-agent-count.test.ts      | 18 ++++++++-
 packages/dashboard/src/__tests__/server.test.ts           | 44 ++++++++++++++++++++--
 packages/dashboard/src/server.ts                          |  8 ++--
 packages/engine/src/__tests__/concurrency.test.ts         | 38 +++++++++++++++++++
 5 files changed, 106 insertions(+), 9 deletions(-)

Fusion-Task-Id: FN-7205

Fusion-Task-Lineage: 957d6b2a-b7c4-4fd1-b83b-62f5cd51ebda

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-28 17:14:00 -07:00
gsxdsm
8eed09c126 FN-7211: fix image attachment MIME sniffing
Correct image attachment media types from bytes before sending image blocks to models.

- Add core image MIME sniffing for PNG, JPEG, GIF, and WEBP signatures.
- Use detected image bytes in task triage and dashboard chat attachment image blocks while preserving stored attachment metadata.
- Cover mismatched and unknown image bytes with core, triage, and chat attachment tests.
- Add a patch changeset for the published CLI package.

Files changed:
 .changeset/fn-7211-webp-image-mime-sniff.md        |  7 +++
 packages/core/src/__tests__/image-mime.test.ts     | 29 ++++++++++
 packages/core/src/image-mime.ts                    | 50 +++++++++++++++++
 packages/core/src/index.ts                         |  2 +
 .../src/__tests__/chat-attachment-content.test.ts  | 54 +++++++++++++++++--
 packages/dashboard/src/chat-attachment-content.ts  |  9 +++-
 packages/engine/src/__tests__/triage.test.ts       | 63 +++++++++++++++++-----
 packages/engine/src/triage.ts                      |  8 ++-
 8 files changed, 201 insertions(+), 21 deletions(-)

Fusion-Task-Id: FN-7211

Fusion-Task-Lineage: 22bfb812-15c4-4ff7-a281-87b25427561e

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-28 16:51:49 -07:00
gsxdsm
d9a518c0b0 FN-7200: shorten fast planning prompt
Shortens fast-mode planning while preserving workflow seam routing.

- Replace the verbose built-in fast triage prompt with a lean speed-first PROMPT.md template.
- Assert the fast prompt remains much shorter than standard planning while retaining required gates.
- Cover selected workflow planning-fast overrides and built-in fallback behavior.
- Add a minor changeset for the published CLI package.

Files changed:
 .changeset/FN-7200-fast-planning-prompt.md         |   7 +
 packages/core/src/__tests__/agent-prompts.test.ts  |  11 +-
 packages/core/src/agent-prompts.ts                 | 227 +++++----------------
 .../triage-fast-mode-workflow-variant.test.ts      |  35 +++-
 4 files changed, 98 insertions(+), 182 deletions(-)

Fusion-Task-Id: FN-7200

Fusion-Task-Lineage: cbfd7ed8-163d-4ae5-8c25-873a1b4ed669

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-28 12:24:38 -07:00
gsxdsm
ac4c3b7a01 FN-7192: Document custom workflow capacity dispatch
Clarify the custom workflow migration boundary and lock dispatch behavior with tests.

- Document that pure-v1 custom workflows keep trait-less default columns for rollback compatibility.
- Show the v2 hold(capacity) and wip traits required for custom workflow capacity dispatch.
- Add core and engine regression coverage for pure-v1 stranding and authored-v2 release behavior.

Files changed:
 docs/workflow-editor.md                            |  34 +++++
 docs/workflow-steps.md                             |  40 ++++++
 .../__tests__/custom-v1-workflow-dispatch.test.ts  | 154 +++++++++++++++++++++
 packages/engine/src/__tests__/hold-release.test.ts |  81 ++++++++++-
 4 files changed, 306 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-7192

Fusion-Task-Lineage: ff7af258-c0cb-4b81-8919-9e076c3ac1df

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-28 09:59:57 -07:00
gsxdsm
fb509b1ed3 FN-7190: fix linear built-in workflow dispatch
Ensure selectable linear built-in workflows carry the default queue traits needed for Todo release.

- Convert linear built-in workflow IR to v2 with cloned canonical coding workflow columns.
- Guard synthesized linear built-ins so todo retains hold-capacity dispatch traits.
- Cover quick-fix, review-heavy, design, and compound-engineering Todo release behavior with regression tests.
- Document that selectable built-ins dispatch through capacity-released queue columns.
- Add a patch changeset for the published CLI package.

Files changed:
 .changeset/fn-7190-linear-builtin-todo-hold.md     |   7 ++
 docs/workflow-editor.md                            |   2 +-
 docs/workflow-steps.md                             |   5 +
 .../core/src/__tests__/builtin-workflows.test.ts   | 110 +++++++++++++++++++++
 packages/core/src/builtin-workflows.ts             |  46 ++++++---
 packages/engine/src/__tests__/hold-release.test.ts |  28 ++++++
 6 files changed, 181 insertions(+), 17 deletions(-)

Fusion-Task-Id: FN-7190

Fusion-Task-Lineage: a0a40365-4bd5-49a8-8ae4-5e313cf1d4e0

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-28 08:19:01 -07:00
gsxdsm
7a2137c250 FN-7191: allow direct agent questions
Permanent agents can ask structured user questions without approval gating.

- Classify fn_ask_question as a read-only coordination tool for permanent-agent decisions.
- Exempt fn_ask_question from the action gate under locked-down policies.
- Document the user-question exemption and add release notes plus gate coverage.

Files changed:
 .changeset/FN-7191-ask-question-no-gate.md         |  7 +++
 docs/agents.md                                     |  2 +-
 .../engine/src/__tests__/agent-action-gate.test.ts | 14 ++++++
 .../src/__tests__/gating-classifications.test.ts   |  6 +++
 .../src/__tests__/permanent-agent-gating.test.ts   | 50 ++++++++++++++++++++++
 packages/engine/src/gating-classifications.ts      | 10 +++++
 6 files changed, 88 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-7191

Fusion-Task-Lineage: 349084a8-9098-49f7-ab82-c5a775c0a24c

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-28 07:53:44 -07:00
gsxdsm
524c15c2fd FN-7188: prevent agents from pausing failed tasks
Clarify agent heartbeat and tool guidance so failures surface through recovery paths instead of task pauses.

- Update heartbeat prompts to prohibit failure/blocker handling via fn_task_pause.
- Clarify fn_task_pause tool copy as explicit user-requested manual control only.
- Refresh generated Fusion skill docs and add regression coverage for the guidance.
- Add a patch changeset for the published CLI package.

Files changed:
 .changeset/FN-7188-no-pause-on-failure.md                    |  7 +++++++
 packages/cli/skill/fusion/references/best-practices.md       |  6 +++---
 packages/cli/skill/fusion/references/extension-tools.md      |  2 +-
 packages/cli/skill/fusion/references/fusion-capabilities.md  |  2 +-
 packages/cli/skill/fusion/workflows/task-management.md       |  2 +-
 packages/cli/src/__tests__/extension.test.ts                 |  8 ++++++++
 packages/cli/src/extension.ts                                | 10 ++++++++--
 .../engine/src/__tests__/heartbeat-session-prompt.test.ts    | 10 ++++++++++
 packages/engine/src/agent-heartbeat.ts                       | 12 ++++++++++--
 9 files changed, 49 insertions(+), 10 deletions(-)

Fusion-Task-Id: FN-7188
Fusion-Task-Lineage: 29df6168-7920-49d5-9c11-804727033721
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-28 01:22:43 -07:00
gsxdsm
9f45f108e5 FN-7174: reset lost steps before stuck requeue cleanup
Preserve durable stuck-requeue progress while preventing retries from skipping deleted uncommitted work.

- Reconcile completed and in-progress steps before stuck cleanup removes executor worktrees.
- Reset step progress when a branch has no unique commits or git proof fails before checkout deletion.
- Cover normal, loop-timeout, and force stuck-requeue paths with regression tests and documentation.

Files changed:
 .changeset/fn-7174-stuck-requeue-progress.md       |   7 +
 docs/architecture.md                               |   2 +-
 packages/core/src/types.ts                         |   9 +-
 ...xecutor-stuck-requeue-preserve-progress.test.ts | 282 +++++++++++++++++++++
 packages/engine/src/executor.ts                    |  99 ++++----
 5 files changed, 349 insertions(+), 50 deletions(-)

Fusion-Task-Id: FN-7174

Fusion-Task-Lineage: 3b8b09e7-fceb-4b3d-af80-993a8842a51a

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-28 00:08:53 -07:00
gsxdsm
e42679daff FN-7173: preserve stuck triage drafts on requeue
Stuck triage retries now continue from saved planning drafts instead of restarting.

- Detect non-empty PROMPT.md drafts or saved plan task documents after stuck-detector aborts.
- Requeue draft-backed stuck triage runs as replans with explicit resume feedback and bounded retry escalation.
- Cover prompt-vs-plan recovery, cold retries, approval recovery, and exhaustion behavior in engine tests.
- Document the stuck-triage preservation invariant and add a patch changeset.

Files changed:
 ...-7173-preserve-triage-draft-on-stuck-requeue.md |   7 +
 docs/architecture.md                               |   6 +-
 .../triage-stuck-requeue-preserve-draft.test.ts    | 348 +++++++++++++++++++++
 packages/engine/src/__tests__/triage.test.ts       |   2 +-
 packages/engine/src/triage.ts                      | 153 ++++++++-
 5 files changed, 499 insertions(+), 17 deletions(-)

Fusion-Task-Id: FN-7173
Fusion-Task-Lineage: 8e59b025-92cc-4902-bf88-b203b65c2c7d
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 23:18:28 -07:00
gsxdsm
987abc763b FN-7162: reopen actionable steps after review bounces
Post-verdict remediation now resumes executable work before rechecking optional gates.

- Reopen the terminal verification/delivery suffix together with the nearest actionable implementation step for revision bounces.
- Cover Code Review, Browser Verification, gate-promoted revisions, and non-revision optional outcomes with regression tests.
- Document post-verdict bounce semantics and add a patch changeset for the published CLI package.

Files changed:
 .changeset/fn-7162-post-verdict-bounce-step-completion.md |   7 ++
 docs/workflow-steps.md                             |   9 +-
 packages/engine/src/__tests__/executor-step-session.test.ts    | 117 +++++++++++++++++++--
 packages/engine/src/__tests__/workflow-graph-optional-step-fix.test.ts       |  60 +++++++++++
 packages/engine/src/executor.ts                    |  51 +++++++--
 5 files changed, 222 insertions(+), 22 deletions(-)

Fusion-Task-Id: FN-7162
Fusion-Task-Lineage: 8d422fc9-54e8-431d-97bb-e7a4a6763eaa
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 23:01:10 -07:00
gsxdsm
a95cfa7f92 FN-7160: unify live agent counts and fix use markers
Unifies running-agent slot accounting across engine, CLI, and dashboard surfaces.

- Add shared core helpers for identifying and counting active top-level agent tasks, including in-review reviewer, merger, fix, and PR merge states.
- Reuse the shared count in engine semaphore repair, project health displays, and dashboard project-store routes.
- Correct Command Center utilization markers to use a zero-based active/cap ratio.
- Cover the shared predicate and affected CLI, dashboard, and engine behaviors with regression tests.

Files changed:
 .changeset/fn-7160-running-agent-count.md          |  7 ++++
 docs/dashboard-guide.md                            |  2 +-
 .../cli/src/commands/__tests__/project.test.ts     | 40 ++++++++++++++----
 packages/cli/src/commands/project.ts               | 15 +++----
 .../core/src/__tests__/live-agent-count.test.ts    | 47 ++++++++++++++++++++++
 packages/core/src/index.ts                         |  2 +
 packages/core/src/live-agent-count.ts              | 30 ++++++++++++++
 packages/core/src/types.ts                         |  2 +-
 .../command-center/CommandCenterControls.tsx       | 14 ++++---
 .../__tests__/CommandCenterControls.test.tsx       | 22 +++++++++-
 .../dashboard/src/__tests__/project-routes.test.ts | 31 +++++++++-----
 .../src/__tests__/project-store-resolver.test.ts   | 20 ++++++---
 packages/dashboard/src/project-store-resolver.ts   |  9 ++---
 .../src/routes/register-project-routes.ts          |  7 ++--
 packages/engine/src/__tests__/concurrency.test.ts  | 18 +++++++++
 packages/engine/src/concurrency.ts                 | 12 +++---
 16 files changed, 220 insertions(+), 58 deletions(-)

Fusion-Task-Id: FN-7160

Fusion-Task-Lineage: f48332f8-ac5d-46eb-b975-d2f6c880ddd5

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 21:39:40 -07:00
gsxdsm
d7a02c4d5b FN-7151: free scoped project concurrency slots
Free stopped or paused project engines' leaked slots without disturbing other projects.

- Add scoped semaphore accounting around the shared global agent pool.
- Return residual per-project slots after runtime stop drains aborted agents.
- Keep idle leak reconciliation scoped to the owning project so active projects retain their slots.
- Cover scoped release, reconciliation, project pause, and in-process runtime behavior with tests.

Files changed:
 .../fn-7151-free-concurrency-slots-on-stop.md      |   7 ++
 docs/architecture.md                               |   2 +-
 packages/engine/src/__tests__/concurrency.test.ts  | 126 +++++++++++++++++++++
 .../src/__tests__/project-engine-manager.test.ts   |  60 ++++++++++
 packages/engine/src/concurrency.ts                 | 123 +++++++++++++++++++-
 packages/engine/src/project-engine.ts              |   2 +-
 .../runtimes/__tests__/in-process-runtime.test.ts  |  51 +++++++++
 packages/engine/src/runtimes/in-process-runtime.ts |  22 +++-
 8 files changed, 385 insertions(+), 8 deletions(-)

Fusion-Task-Id: FN-7151

Fusion-Task-Lineage: e59e5e0c-67e8-4f80-a6b9-1ea4febaeb97

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 20:55:59 -07:00
gsxdsm
605e4d7734 FN-7158: emit reflection run-audit telemetry
Record agent reflection outcomes in run audit without persisting reflection prose.\n\n- Emit generated, skipped, and failed reflection telemetry from AgentReflectionService.\n- Add run-audit metadata contracts, diagnostics docs, and operator-facing run-audit guidance.\n- Cover telemetry payloads and best-effort audit failures in agent reflection tests.\n- Add a minor changeset for the published Fusion CLI package.\n\nFiles changed:\n .changeset/fn-7158-reflection-telemetry.md         |  7 ++\n AGENTS.md                                          |  1 +\n docs/diagnostics.md                                | 12 +++\n .../engine/src/__tests__/agent-reflection.test.ts  | 99 ++++++++++++++++++++++\n packages/engine/src/agent-reflection.ts            | 60 ++++++++++++-\n packages/engine/src/run-audit.ts                   | 41 +++++++++\n 6 files changed, 219 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-7158

Fusion-Task-Lineage: e8a83fe9-2112-4ce4-9367-a6fa38b6fbb4

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 20:33:22 -07:00
gsxdsm
8b124960b8 FN-7154: prevent duplicate automation schedule runs
Add an atomic schedule claim so concurrent automation pollers execute each due window only once.

- Add AutomationStore.claimDueSchedule to CAS-advance nextRunAt before execution.
- Gate CronRunner execution on the claim across project, global, and all-scope pollers.
- Cover single-store, shared SQLite, legacy command, step, and in-process intercept deduplication paths.
- Document the claim-then-run automation invariant.

Files changed:
 docs/architecture.md                               |   1 +
 .../core/src/__tests__/automation-store.test.ts    |  77 +++++++++++++++
 packages/core/src/automation-store.ts              |  33 +++++++
 packages/engine/src/__tests__/cron-runner.test.ts  | 110 +++++++++++++++++++++
 packages/engine/src/cron-runner.ts                 |  18 +++-
 5 files changed, 237 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-7154

Fusion-Task-Lineage: 490ba154-9dd8-4e92-bacb-24b7184cb6f8

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 20:09:52 -07:00
gsxdsm
d4137f1abc FN-7144: complete compound engineering workflow audit
Adds the missing CE document-review stage and tightens workflow docs, compilation, and tests.

- Add optional advisory ce-doc-review support to the compound engineering built-in workflow.
- Register and document the compound-engineering ce-doc-review skill for markdown CE plan review.
- Preserve optional-group workflow semantics when compiling legacy steps and cover the CE workflow seams with tests.
- Update operator docs and add a published package changeset.

Files changed:
 .changeset/fn-7144-compound-engineering-audit.md   |  7 +++
 docs/workflow-editor.md                            |  2 +-
 docs/workflow-steps.md                             |  4 +-
 .../core/src/__tests__/builtin-workflows.test.ts   | 29 +++++++++-
 packages/core/src/builtin-workflows.ts             | 62 ++++++++++++++++++++--
 packages/core/src/workflow-compiler.ts             |  3 +-
 .../__tests__/ce-workflow-step-conventions.test.ts |  8 +++
 .../src/__tests__/interpreter-merge-seam.test.ts   |  3 +-
 .../src/__tests__/manifest.test.ts                 |  1 +
 .../src/skills.ts                                  | 13 +++++
 .../src/skills/ce-doc-review/SKILL.md              | 54 +++++++++++++++++++
 11 files changed, 175 insertions(+), 11 deletions(-)

Fusion-Task-Id: FN-7144
Fusion-Task-Lineage: bedbfad4-d6e8-489e-a555-803991a1ad54
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 17:40:42 -07:00
gsxdsm
13d97b7c33 FN-7145: verify CE workflow skill loading
Add coverage and documentation for skill-backed workflow step loading.

- Derive compound-engineering skill-step expectations from the built-in workflow definition.
- Assert every skill-backed step requests namespaced and bare skills and uses injected CE skill paths.
- Cover missing FUSION_CE_SKILLS_DIR warnings, skill-less steps, and toolMode-independent skill loading.
- Document the skill-backed workflow execution invariant.

Files changed:
 docs/workflow-steps.md                             |   9 ++
 .../__tests__/ce-workflow-step-executor.test.ts    | 112 +++++++++++++++++++--
 2 files changed, 115 insertions(+), 6 deletions(-)

Fusion-Task-Id: FN-7145
Fusion-Task-Lineage: 1a344fa7-fa0c-4f04-af5a-1a90d48cd34c
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 17:17:28 -07:00
gsxdsm
6f46fa17dd FN-7138: show task column context in agent assignments
Agent Current Task output now includes linked task column context to distinguish active execution from parked or stale links.

- Add shared Current Task formatting for active, terminal, and unresolved task links.
- Show linked task columns in engine and CLI agent list/show surfaces.
- Cover parked, active, terminal, and missing task-link display cases with tests.
- Document the durable agent task-link invariant and release the CLI fix.

Files changed:
 .changeset/fn-7138-agent-current-task-context.md   |  7 ++++
 docs/agents.md                                     |  1 +
 docs/architecture.md                               |  2 +-
 packages/cli/src/__tests__/extension.test.ts       | 44 ++++++++++++++++++++++
 packages/cli/src/extension.ts                      | 35 +++++++++++++++--
 packages/core/src/agent-store.ts                   | 30 +++++++++++++++
 packages/core/src/index.ts                         |  2 +-
 .../src/__tests__/agent-tools-delegation.test.ts   | 44 +++++++++++++++++++++-
 packages/engine/src/agent-tools.ts                 | 15 ++++++--
 9 files changed, 169 insertions(+), 11 deletions(-)

Fusion-Task-Id: FN-7138
Fusion-Task-Lineage: 0ea97b4c-d4f8-4289-a5b6-e5c51b47b768
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 16:16:25 -07:00
gsxdsm
6713c99011 FN-7135: Record triage token usage by model
Record triage and spec-review session token usage so Command Center model analytics includes planning models.\n\n- Add fail-soft token usage recording for triage session completion, fallback disposal, pause/delete, and engine stop paths.\n- Capture spec-review subagent token deltas before unregistering or force-disposing subagent sessions.\n- Add regression coverage for primary, fallback, and spec-review model token attribution.\n- Add a patch changeset for published CLI release notes.\n\nFiles changed:\n .changeset/fn-7135-triage-token-usage.md           |   7 +\n .../src/__tests__/triage-token-usage.test.ts       | 206 +++++++++++++++++++++\n packages/engine/src/triage.ts                      |  63 +++++++\n 3 files changed, 276 insertions(+)

Fusion-Task-Id: FN-7135

Fusion-Task-Lineage: abbff18a-44e8-41fd-9012-388115914fc7

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 15:06:12 -07:00
gsxdsm
a593cc7428 FN-7130: require agent-browser for browser verification
Browser Verification steps now explicitly request and log agent-browser usage.

- Mark the built-in browser verification workflow step as browser-required and document that it runs through agent-browser.
- Add executor helpers to inject the agent-browser skill, probe CLI availability, and log start/finish outcomes.
- Cover workflow metadata, browser verification execution logging, availability probing, and skill augmentation with tests.
- Add a patch changeset for the published Fusion package.

Files changed:
 .../fn-7130-browser-verification-agent-browser.md  |   7 +
 docs/workflow-steps.md                             |   4 +-
 .../__tests__/builtin-coding-workflow-ir.test.ts   |  23 ++
 .../core/src/__tests__/builtin-workflows.test.ts   |  12 +
 .../core/src/builtin-browser-verification-group.ts |   4 +
 packages/core/src/types.ts                         |   7 +
 ...iltin-coding-browser-verification-group.test.ts |   8 +-
 .../executor-browser-verification.test.ts          | 267 +++++++++++++++++++++
 packages/engine/src/executor.ts                    | 118 +++++++++
 9 files changed, 447 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-7130

Fusion-Task-Lineage: 3a76522e-70e1-4445-ad18-b9e1b9b355fc

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 14:27:06 -07:00
gsxdsm
c1613ad7f6 FN-7122: expose MCP servers as pi session tools
Connect configured MCP servers during pi chat and agent session startup so their discovered tools are available as namespaced custom tools.

- Add MCP session tool connection, tool-name sanitization, result mapping, and disposal handling.
- Merge discovered MCP tools into pi customTools while skipping readonly sessions and avoiding secret-bearing logs.
- Cover MCP tool wrapping and pi session integration with targeted tests.
- Document MCP forwarding behavior and promote the MCP SDK to an engine runtime dependency.

Files changed:
 .changeset/fn-7122-mcp-session-tools.md            |   7 +
 docs/mcp.md                                        |   2 +
 packages/engine/package.json                       |   2 +-
 .../engine/src/__tests__/mcp-session-tools.test.ts | 105 ++++++++
 .../src/__tests__/pi-mcp-session-tools.test.ts     |  24 ++
 packages/engine/src/mcp-session-tools.ts           | 262 ++++++++++++++++++++
 packages/engine/src/pi.ts                          |  71 +++++-
 pnpm-lock.yaml                                     | 264 ++++++++++++++++++++-
 8 files changed, 713 insertions(+), 24 deletions(-)

Fusion-Task-Id: FN-7122

Fusion-Task-Lineage: e7ff57e7-9bfb-41a4-9ebd-6c868bac2745

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 14:09:47 -07:00
gsxdsm
b1066c62cc fix: bounce in-review tasks back for pre-merge optional-step fixes
A pre-merge optional step REVISE (Code Review / Browser Verification)
reopens the last plan step to pending and schedules a rerun bounce via
sendTaskBackForFix. The hosting graph run reports disposition "completed",
so the outer completion flow can route the task to in-review before the
setTimeout(0) bounce fires. performWorkflowRerunBounce previously handled
only in-progress/todo and threw on in-review ("cannot bounce to
in-progress"), stranding the task in-review with a pending step: the merge
gate blocks forever while self-healing only re-runs the graph (re-passing
the advisory step) and never re-launches the executor — a permanent
deadlock (observed on FN-7122, stuck >1h).

The bounce's only caller (sendTaskBackForFix) unconditionally intends
remediation, so in-review now bounces back to in-progress exactly like
in-progress (todo hop preserving step progress + worktree). Adds a
regression test asserting the in-review bounce returns "bounced" and
re-dispatches.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-27 14:02:34 -07:00
gsxdsm
39d20be05f FN-7129: add per-step optional revision budgets
Add optional workflow-step revision budgets that can cap or unbound remediation loops.

- Add optional-group maxRevisions parsing, validation, exports, and docs.
- Expose numeric and unbounded revision budget controls in the workflow node editor.
- Apply per-step budgets in executor and self-healing fix loops with regression coverage.

Files changed:
 .changeset/fn-7129-per-step-revision-budget.md     |  7 ++
 docs/dashboard-guide.md                            |  1 +
 docs/settings-reference.md                         |  2 +-
 docs/workflow-steps.md                             | 10 ++-
 .../__tests__/workflow-ir-optional-group.test.ts   | 29 ++++++-
 packages/core/src/index.ts                         |  2 +
 packages/core/src/workflow-ir-types.ts             | 37 +++++++++
 packages/core/src/workflow-ir.ts                   | 15 ++++
 .../app/components/WorkflowNodeEditor.tsx          | 87 ++++++++++++++++----
 .../__tests__/WorkflowNodeEditor.test.tsx          | 95 ++++++++++++++++++++++
 packages/engine/src/__tests__/self-healing.test.ts | 63 ++++++++++++++
 .../workflow-graph-optional-group.test.ts          | 30 ++++++-
 .../workflow-graph-optional-step-fix.test.ts       | 53 ++++++++++++
 packages/engine/src/executor.ts                    | 15 ++--
 packages/engine/src/self-healing.ts                | 64 +++++++++++----
 packages/engine/src/workflow-graph-executor.ts     |  6 +-
 16 files changed, 469 insertions(+), 47 deletions(-)

Fusion-Task-Id: FN-7129

Fusion-Task-Lineage: dbde94e5-3c99-4f67-aed9-458563e845ae

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 13:05:50 -07:00
gsxdsm
c3c4216f76 FN-7132: classify task creation as a gated mutation
Classify fn_task_create as a task-agent mutation so permanent-agent policies can require approval or block task creation.

- Move fn_task_create out of the permanent-agent read-only tool set and into the shared task mutation classification.
- Add parity tests covering permanent-agent and action-gate decisions for fn_task_create.
- Preserve delegate and GitHub import tools as permanent-agent read-only coordination tools while documenting the distinction.
- Add a patch changeset for the published Fusion package.

Files changed:
 .../fn-7132-task-create-mutation-classification.md |  7 +++
 docs/agents.md                                     |  6 +--
 .../src/__tests__/gating-classifications.test.ts   | 58 +++++++++++++++++++++-
 .../src/__tests__/permanent-agent-gating.test.ts   |  3 +-
 packages/engine/src/gating-classifications.ts      | 10 ++--
 5 files changed, 75 insertions(+), 9 deletions(-)

Fusion-Task-Id: FN-7132

Fusion-Task-Lineage: 6e32ed9d-f0fa-46f2-a749-c5dbe863fb1f

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 12:44:50 -07:00
gsxdsm
3d26d4e74b FN-7127: standardize task show tool naming
Unify task-show references so planning, triage, docs, and telemetry use fn_task_show consistently.

- Replace legacy fn_task_get guidance and examples with fn_task_show across agent prompts, mission planning, triage, and docs.
- Keep fn_task_get as a deprecated read-only recognition alias for historical or in-flight calls.
- Update tests and changesets to cover the unified tool name and usage telemetry.

Files changed:
 .changeset/FN-7118-shared-task-read-tools.md       |  2 +-
 .changeset/FN-7127-unify-task-show-tool-name.md    |  7 ++++++
 docs/cli-reference.md                              |  2 +-
 docs/missions.md                                   |  2 +-
 .../cli/skill/fusion/references/engine-tools.md    |  2 +-
 packages/core/src/__tests__/usage-events.test.ts   |  1 +
 packages/core/src/agent-prompts.ts                 | 12 +++++-----
 .../__tests__/milestone-slice-interview.test.ts    |  2 +-
 .../src/__tests__/mission-interview.test.ts        |  2 +-
 .../src/__tests__/planning-board-tools.test.ts     |  6 ++---
 .../dashboard/src/milestone-slice-interview.ts     |  4 ++--
 packages/dashboard/src/mission-interview.ts        |  2 +-
 packages/dashboard/src/planning-board-tools.ts     | 10 +++++---
 packages/dashboard/src/planning.ts                 |  2 +-
 .../src/__tests__/agent-task-read-tools.test.ts    | 28 +++++++++++++++-------
 packages/engine/src/__tests__/triage.test.ts       |  6 ++---
 packages/engine/src/agent-tools.ts                 |  5 +++-
 packages/engine/src/gating-classifications.ts      |  8 +++++--
 packages/engine/src/triage.ts                      | 12 ++++++----
 19 files changed, 74 insertions(+), 41 deletions(-)

Fusion-Task-Id: FN-7127

Fusion-Task-Lineage: adf5a127-2741-4c88-97b3-aab239ab3960

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 12:25:53 -07:00
gsxdsm
59803c243d FN-7123: use workflow settings for task models
Task model displays now resolve task-scoped workflow settings consistently with execution.

- Add a shared workflow settings overlay helper for stored workflow values and declaration defaults.
- Expose task effective settings through the dashboard API and consume them in TaskDetail model surfaces.
- Cover core overlay behavior, route output, and Workflow tab model rendering with regression tests.
- Document workflow model lane precedence and add a published package changeset.

Files changed:
 .changeset/fn-7123-workflow-tab-project-model.md   |   7 ++
 docs/settings-reference.md                         |  14 ++-
 .../__tests__/effective-settings-overlay.test.ts   |  70 ++++++++++++++
 packages/core/src/effective-settings-overlay.ts    |  27 ++++++
 packages/core/src/index.ts                         |   4 +
 packages/dashboard/app/api/legacy.ts               |   5 +
 .../dashboard/app/components/TaskDetailModal.tsx   |  13 ++-
 ...skDetailModal.models-progress-workflow.test.tsx |  46 +++++++++
 .../__tests__/TaskDetailModal.test-helpers.ts      |   1 +
 .../__tests__/WorkflowResultsTab.test.tsx          |  33 +++++++
 packages/dashboard/app/test/mockApi.ts             |   9 ++
 .../task-effective-settings-route.test.ts          | 107 +++++++++++++++++++++
 .../src/routes/register-task-workflow-routes.ts    |  21 ++++
 packages/engine/src/effective-settings.ts          |  25 ++---
 14 files changed, 355 insertions(+), 27 deletions(-)

Fusion-Task-Id: FN-7123

Fusion-Task-Lineage: 5fa9d338-c886-44aa-bdba-0d361b3602d5

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 12:20:42 -07:00
gsxdsm
45e27f8875 FN-7126: govern task creation with action gate
Task creation and delegation now honor task-agent mutation policies in action-gate evaluation.

- Classify task creation, delegation, and import tools as task_agent_mutation for action-gate policy decisions.
- Preserve permanent-agent recognition for coordination paths while documenting the split semantics.
- Update permission policy examples, regression tests, and release note metadata.

Files changed:
 .changeset/fn-7126-task-create-action-gate.md      |  7 +++++++
 docs/agents.md                                     |  2 +-
 packages/core/src/types.ts                         |  2 +-
 .../engine/src/__tests__/agent-action-gate.test.ts | 24 ++++++++++++++++++----
 .../src/__tests__/gating-classifications.test.ts   | 16 +++++++++++++--
 packages/engine/src/gating-classifications.ts      | 10 ++++++---
 6 files changed, 50 insertions(+), 11 deletions(-)

Fusion-Task-Id: FN-7126

Fusion-Task-Lineage: 0e5d2aea-6670-4f9c-9ee8-5a135774c784

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 11:54:06 -07:00
gsxdsm
68282769e6 FN-7128: raise optional-step fix cycle budget
Code Review and Browser Verification now rerun through bounded fix passes until they pass.

- Raise the shared maxPostReviewFixes default and fallbacks from 1 to 3.
- Document the built-in optional-step fix cycle and release-note the operator-facing behavior.
- Update workflow graph, settings, and fallback tests for repeated optional-step remediation.

Files changed:
 .changeset/fn-7128-optional-step-cycle-default.md  |   7 ++
 docs/settings-reference.md                         |   2 +-
 docs/workflow-steps.md                             |   2 +-
 .../src/__tests__/workflow-ir-settings.test.ts     |   2 +-
 packages/core/src/builtin-workflow-settings.ts     |   8 +-
 packages/core/src/types.ts                         |   8 +-
 .../workflow-graph-optional-group.test.ts          | 112 +++++++++++++++++----
 .../workflow-graph-optional-step-fix.test.ts       |  35 +++++++
 .../workflow-settings-fallback-alignment.test.ts   |   2 +-
 packages/engine/src/executor.ts                    |   2 +-
 packages/engine/src/self-healing.ts                |   4 +-
 11 files changed, 152 insertions(+), 32 deletions(-)

Fusion-Task-Id: FN-7128
Fusion-Task-Lineage: 8165f746-3828-453a-8ca4-8134c8d33c8f
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 11:42:01 -07:00
gsxdsm
c15d1294eb FN-7115: expose governed heartbeat workflow tools
Expose the missing governed workflow and promotion tools to heartbeat agent sessions.\n\n- Add workflow authoring/settings, research cancellation, and task promotion/select tools to the shared heartbeat work surface.\n- Keep task-read discovery and executor-only worktree tools correctly scoped while documenting the heartbeat lane surface.\n- Cover tool injection, permission-gate behavior, and workflow factory exposure with regression tests.\n\nFiles changed:\n .changeset/FN-7115-heartbeat-tool-injection.md     |  7 ++\n docs/agents.md                                     |  6 +-\n .../engine/src/__tests__/agent-action-gate.test.ts | 86 +++++++++++++++++++++-\n .../agent-workflow-tools-exposure.test.ts          | 16 ++--\n .../src/__tests__/heartbeat-executor.test.ts       | 31 +++++---\n .../src/__tests__/heartbeat-session-prompt.test.ts | 69 ++++++++++++++++-\n packages/engine/src/agent-heartbeat.ts             | 22 ++++--\n 7 files changed, 207 insertions(+), 30 deletions(-)

Fusion-Task-Id: FN-7115

Fusion-Task-Lineage: 0883767b-7982-4f10-a466-1467b867dea1

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 11:17:03 -07:00
gsxdsm
8f0f020caa FN-7118: add shared task read tool factories
Add reusable heartbeat-safe task read tools for agents.\n\n- Add shared fn_task_list, fn_task_show, and fn_task_search factories with text-safe formatting.\n- Wire the task read tools into permanent/custom heartbeat work tooling and prompts.\n- Classify task read surfaces as read-only coordination exemptions and export the factories.\n- Cover cross-surface task read behavior with engine tests and document the agent surface.\n\nFiles changed:\n .changeset/FN-7118-shared-task-read-tools.md       |   7 +\n docs/agents.md                                     |   2 +-\n .../src/__tests__/agent-task-read-tools.test.ts    | 160 ++++++++++++++++++++\n .../src/__tests__/gating-classifications.test.ts   |  15 ++\n .../src/__tests__/heartbeat-executor.test.ts       |  31 ++--\n .../src/__tests__/heartbeat-session-prompt.test.ts |   8 +-\n packages/engine/src/agent-heartbeat.ts             |  16 +-\n packages/engine/src/agent-tools.ts                 | 161 ++++++++++++++++++++-\n packages/engine/src/gating-classifications.ts      |  11 ++\n packages/engine/src/index.ts                       |   7 +\n 10 files changed, 396 insertions(+), 22 deletions(-)

Fusion-Task-Id: FN-7118

Fusion-Task-Lineage: 89a5b3a2-9295-435f-8bb9-f66f8ec73cc1

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 11:08:09 -07:00
gsxdsm
5ab4a5961c FN-7119: rescue quarantined engine and CLI tests
Restore quarantined scheduler/reliability coverage while preserving override column-agent model selection.

- remove rescued engine and CLI tests from quarantine configs and the ledger
- add scheduler fake updateSettings coverage so heartbeat writes do not skew call-count assertions
- preserve override column-agent runtime models during initial execution and mid-flight task edits
- update the stale user-configured command guard registry and add a patch changeset

Files changed:
 .changeset/fn-7119-column-agent-model.md           |  7 +++
 docs/testing.md                                    |  2 +
 packages/cli/vitest.config.ts                      |  6 +-
 .../executor-column-agent-principal.test.ts        | 34 +++++++++-
 .../lease-recovery-central-claim.test.ts           |  5 ++
 .../owning-node-unavailable-interactions.test.ts   |  5 ++
 .../todo-inprogress-flapping.test.ts               |  5 ++
 .../src/__tests__/restart.integration.test.ts      |  8 +++
 .../__tests__/scheduler-ephemeral-toggle.test.ts   |  5 ++
 .../scheduler-node-unreachable-audit.test.ts       |  5 ++
 .../__tests__/scheduler-overlap-starvation.test.ts |  5 ++
 .../user-configured-command-no-execsync.test.ts    | 12 +---
 packages/engine/src/executor.ts                    | 18 ++++--
 packages/engine/vitest.config.ts                   | 26 +++-----
 scripts/lib/test-quarantine.json                   | 73 +---------------------
 15 files changed, 106 insertions(+), 110 deletions(-)

Fusion-Task-Id: FN-7119
Fusion-Task-Lineage: 7dc033c8-29d1-4c0e-bfc1-b0ff0d325f43
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 10:50:33 -07:00
gsxdsm
e1dba3fcc9 FN-7113: validate workflow graph integrity before execution
Reject malformed workflow graphs at save and run boundaries.

- Add central IR validation for duplicate top-level node ids, unregistered extension keys, and unreachable required nodes.
- Re-validate resolved workflow IR in the graph runner before side effects and fail closed on invalid graphs.
- Expand graph integrity tests and document save/run validation behavior with a release changeset.

Files changed:
 .changeset/FN-7113-workflow-graph-integrity.md     |   7 +
 docs/custom-workflow-reliability-acceptance-map.md |   7 +-
 docs/workflow-steps.md                             |  20 +++
 .../workflow-ir-extension-metadata.test.ts         |  49 ++++++-
 packages/core/src/__tests__/workflow-ir.test.ts    | 106 +++++++++++++++-
 packages/core/src/workflow-ir.ts                   |  51 +++++++-
 .../__tests__/workflow-graph-task-runner.test.ts   | 141 +++++++++++++++++----
 packages/engine/src/workflow-graph-task-runner.ts  |  46 +++++--
 8 files changed, 386 insertions(+), 41 deletions(-)

Fusion-Task-Id: FN-7113

Fusion-Task-Lineage: f41e0d81-7cdf-497a-96ab-fe42504d0be4

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 09:28:31 -07:00
gsxdsm
2b9e383e18 FN-7111: classify heartbeat tool parity gaps
Classify remaining heartbeat-agent tool gaps so permission gates enforce mutating and network behaviors consistently.

- Add shared classifications for workflow mutators, task update/promote/refine, verification/worktree acquisition, and research cancellation.
- Apply command-execution classifications in both action-gate and permanent-agent gating paths.
- Update operator docs, permission-policy examples, parity tests, and the published package changeset.

Files changed:
 .changeset/FN-7111-tool-classification-parity.md   |  7 ++
 docs/agents.md                                     |  8 +-
 packages/core/src/types.ts                         | 12 ++-
 .../engine/src/__tests__/agent-action-gate.test.ts | 11 ++-
 .../src/__tests__/gating-classifications.test.ts   | 93 +++++++++++++++++++++-
 .../src/__tests__/permanent-agent-gating.test.ts   | 44 ++++++++++
 packages/engine/src/agent-action-gate.ts           |  6 ++
 packages/engine/src/gating-classifications.ts      | 36 ++++++++-
 packages/engine/src/permanent-agent-gating.ts      |  5 ++
 9 files changed, 206 insertions(+), 16 deletions(-)

Fusion-Task-Id: FN-7111
Fusion-Task-Lineage: d2f5ee71-c742-4f10-af55-fec380f08f64
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 09:28:31 -07:00
gsxdsm
1a30ddd6e8 FN-7108: broaden heartbeat agent tool access
Heartbeat agents now receive safe coordination and discovery tools while risky calls remain permission-gated.

- Add shared heartbeat workflow, research, and clarification tools for task-scoped and no-task runs.
- Give no-task permanent agents artifact registry access alongside existing delegation, messaging, memory, goal, and identity tools.
- Cover the expanded tool surface and action-gate behavior with heartbeat and permission-policy tests.
- Document the permission-governed heartbeat tool model and add a minor changeset.

Files changed:
 .changeset/FN-7108-agent-tool-access.md            |  7 ++
 docs/agents.md                                     |  9 ++-
 .../src/__tests__/heartbeat-executor.test.ts       | 24 +++---
 .../src/__tests__/heartbeat-session-prompt.test.ts | 89 +++++++++++++++++++++-
 .../src/__tests__/pi-create-fn-agent.test.ts       | 67 ++++++++++++++++
 packages/engine/src/agent-heartbeat.ts             | 41 +++++++++-
 6 files changed, 221 insertions(+), 16 deletions(-)

Fusion-Task-Id: FN-7108

Fusion-Task-Lineage: 83302055-72be-47f8-a41d-70164d12f010

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 09:28:31 -07:00
gsxdsm
c17d745665 FN-7109: notify operators when CLI agents await input
Notify external providers when terminal-backed CLI agents pause for tool permission or user input.

- Add a dedicated cli-agent-awaiting-input notification event to settings, schema defaults, dashboard options, and provider tests.
- Dispatch CLI-agent waiting-on-input notifications from the in-process runtime with task context and prompt-scoped dedupe keys.
- Document the operator behavior and add a published package changeset for the new notification surface.

Files changed:
 .changeset/fn-7109-cli-agent-notification.md       |   7 ++
 docs/agents.md                                     |   4 +
 docs/settings-reference.md                         |   4 +-
 .../cli-agent-permission-notifications.md          |  13 +++
 .../core/src/__tests__/global-settings.test.ts     |   1 +
 packages/core/src/settings-schema.ts               |   1 +
 packages/core/src/types.ts                         |   6 ++
 .../SettingsModal.remote-notifications.test.tsx    |   1 +
 .../components/__tests__/settings-mobile.test.tsx  |   2 +-
 .../settings/sections/NotificationsSection.tsx     |   3 +
 .../src/__tests__/in-process-runtime.test.ts       |  56 ++++++++++-
 packages/engine/src/__tests__/notifier.test.ts     |   6 +-
 .../engine/src/__tests__/ntfy-provider.test.ts     |   4 +
 .../engine/src/__tests__/webhook-provider.test.ts  |   2 +
 .../engine/src/cli-agent/__tests__/runtime.test.ts |  39 +++++++-
 .../__tests__/notification-service.test.ts         |  56 ++++++++++-
 .../src/notification/notification-service.ts       |   9 +-
 packages/engine/src/notification/ntfy-provider.ts  |   7 ++
 .../engine/src/notification/webhook-provider.ts    |   2 +
 packages/engine/src/notifier.ts                    |   1 +
 packages/engine/src/runtimes/in-process-runtime.ts | 111 +++++++++++++++++++++
 21 files changed, 326 insertions(+), 9 deletions(-)

Fusion-Task-Id: FN-7109

Fusion-Task-Lineage: 636c1875-92a2-46a7-847e-1f4955c0822f

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 09:28:31 -07:00
gsxdsm
e687ff3700 FN-7110: assert normalized CE skill requests
Update CE workflow-step convention coverage for normalized skill request matching.

- Refresh the U1 test narrative around requestedSkillMatchKey normalization.
- Assert namespaced, slash, SKILL.md-suffixed, mixed-case, and dual CE skill requests resolve once.
- Keep negative coverage for requests when the CE install directory is not discoverable.

Files changed:
 .../__tests__/ce-workflow-step-conventions.test.ts | 85 ++++++++++++----------
 1 file changed, 47 insertions(+), 38 deletions(-)

Fusion-Task-Id: FN-7110

Fusion-Task-Lineage: 807649db-6c61-4c1e-9b04-28257992eb21

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 09:28:30 -07:00
gsxdsm
28cdd1c215 FN-7099: add project plan approval mode
Add a project-wide plan approval mode that can override workflow approval gates.

- Add core plan approval resolution for workflow, auto-approve-all, and require-all modes.
- Apply the resolved approval mode in triage recovery and planning finalization.
- Expose the mode in settings UI with translations, docs, tests, and a changeset.

Files changed:
 .changeset/fn-7099-plan-approval-mode.md           |  7 +++
 docs/settings-reference.md                         |  3 +-
 docs/storage.md                                    |  5 +-
 packages/core/src/__tests__/plan-approval.test.ts  | 37 ++++++++++++++
 packages/core/src/index.ts                         |  2 +
 packages/core/src/plan-approval.ts                 | 21 ++++++++
 packages/core/src/settings-schema.ts               |  3 +-
 packages/core/src/types.ts                         |  5 ++
 .../dashboard/app/components/SettingsModal.tsx     |  1 +
 .../SettingsModal.scheduling-merge.test.tsx        | 17 +++++++
 .../__tests__/SettingsModal.test-harness.tsx       |  1 +
 .../components/settings/sections/MergeSection.tsx  | 19 +++++++
 .../MergeSection.legacy-automerge-cleanup.test.tsx | 23 ++++++++-
 packages/engine/src/__tests__/triage.test.ts       | 58 ++++++++++++++++++++++
 packages/engine/src/triage.ts                      | 10 +++-
 packages/i18n/locales/en/app.json                  |  5 ++
 packages/i18n/src/resources.d.ts                   |  5 ++
 17 files changed, 215 insertions(+), 7 deletions(-)

Fusion-Task-Id: FN-7099
Fusion-Task-Lineage: 8b276000-1df3-41e4-a94d-724aac559954
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 09:28:30 -07:00
gsxdsm
ee3a06ecfd FN-7095: add actionable backup failure details
Database Backup automation failures now expose the affected database, paths, and root cause.

- Add DB-qualified error formatting for project and central backup creation, verification, schedule validation, and command failures.
- Normalize routine and cron in-process backup failures so empty or opaque errors become actionable AutomationRunResult errors.
- Cover missing database files, backup directory failures, central copy failures, corrupt backup quarantine, and runner normalization with regression tests.
- Document backup failure detail behavior and add a patch changeset.

Files changed:
 .changeset/fn-7095-backup-detail.md                |   7 ++
 docs/storage.md                                    |   2 +
 packages/core/src/__tests__/backup.test.ts         | 114 ++++++++++++++++++++-
 packages/core/src/backup.ts                        | 112 +++++++++++++++-----
 packages/engine/src/__tests__/cron-runner.test.ts  |  35 +++++++
 .../engine/src/__tests__/routine-runner.test.ts    |  45 ++++++++-
 packages/engine/src/cron-runner.ts                 |  20 +++-
 packages/engine/src/routine-runner.ts              |  20 +++-
 8 files changed, 324 insertions(+), 31 deletions(-)

Fusion-Task-Id: FN-7095

Fusion-Task-Lineage: 368e3edf-20d3-4756-97be-75734dbff703

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 09:28:29 -07:00
gsxdsm
d9b17dea01 FN-7086: default dirty checkout merge sync
Default AI merge landing to preserve legacy dirty-checkout synchronization for new and partially configured projects.

- Default resolved project merger settings to allow dirty local checkout sync while preserving explicit false values.
- Pass the resolved dirty-checkout sync policy through single-repo and workspace AI merge landing paths.
- Update settings UI defaults, type docs, regression coverage, and release notes for the new behavior.

Files changed:
 .changeset/fn-7086-allow-dirty-sync-default.md     |  7 ++++
 packages/core/src/__tests__/store-settings.test.ts | 40 ++++++++++++++++++++++
 packages/core/src/settings-schema.ts               |  6 +++-
 packages/core/src/store.ts                         | 12 +++++++
 packages/core/src/types.ts                         |  6 ++--
 .../dashboard/app/components/SettingsModal.tsx     |  2 +-
 packages/engine/src/merger-ai.ts                   | 35 +++++++++++--------
 7 files changed, 89 insertions(+), 19 deletions(-)

Fusion-Task-Id: FN-7086
Fusion-Task-Lineage: 65871e7c-af0c-45b9-af54-749d56dfadd5
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-26 18:11:41 -07:00