# Fusion changelog User-facing release notes aggregated across all packages. This file is auto-synced from each `packages/*/CHANGELOG.md` by `scripts/release.mjs` — do not edit by hand. ## 0.40.1 ### @fusion/dashboard #### Patch Changes - @fusion/core@0.40.1 - @fusion/engine@0.40.1 - @fusion/i18n@0.39.2 - @fusion-plugin-examples/cli-printing-press@0.1.19 - @fusion-plugin-examples/compound-engineering@0.1.2 - @fusion-plugin-examples/dependency-graph@0.1.33 - @fusion-plugin-examples/roadmap@0.1.21 - @fusion-plugin-examples/cursor-runtime@0.1.21 - @fusion-plugin-examples/droid-runtime@0.1.28 - @fusion-plugin-examples/hermes-runtime@0.2.52 - @fusion-plugin-examples/openclaw-runtime@0.2.52 - @fusion-plugin-examples/paperclip-runtime@0.2.52 ### @fusion/desktop #### Patch Changes - @fusion/core@0.40.1 - @fusion/dashboard@0.40.1 ### @fusion/engine #### Patch Changes - @fusion/core@0.40.1 - @fusion/pi-claude-cli@0.40.1 ### @fusion/plugin-sdk #### Patch Changes - @fusion/core@0.40.1 ### @runfusion/fusion #### Patch Changes - e62847b: fix: keep `./dist/*` subpaths resolvable in the packed manifest The prepack transform injects an `exports` field for the plugin-sdk subpath, which flips Node into strict subpath mode and hid every other `./dist/*` file. That broke the runfusion.ai alias (which imports `@runfusion/fusion/dist/bin.js`) with `ERR_PACKAGE_PATH_NOT_EXPORTED`, failing the pre-publish smoke test. Add a `./dist/*` passthrough so the alias bin and the pi `./dist/extension.js` loader keep resolving after pack. ### runfusion.ai #### Patch Changes - Updated dependencies [e62847b] - @runfusion/fusion@0.40.1 ## 0.40.0 ### @fusion/dashboard #### Patch Changes - 2d2024f: Unfreeze dashboard spinners and pulse/enter animations. Transition tokens (`--transition-slow: 0.3s ease`) bundle a duration and an easing; 15 animation declarations reused them as bare durations, which made the whole `animation` declaration invalid at computed-value time and silently resolved it to `animation: none`. Animation rules now use new duration-only tokens (`--duration-instant/fast/normal/slow`), with the transition tokens derived from them, and a repo-wide CSS regression test forbids the pattern. - 784f308: Fix first tap of GitHub tracking icon in quick task entry on mobile (FN-6148). The delegated touch handler on `.quick-entry-actions` now uses `closest("button")` to resolve taps that land on child SVG elements, so the GitHub tracking toggle responds correctly on the first touch — identical root-cause fix as FN-6145. - @fusion/core@0.40.0 - @fusion/engine@0.40.0 - @fusion/i18n@0.39.1 - @fusion-plugin-examples/cli-printing-press@0.1.18 - @fusion-plugin-examples/compound-engineering@0.1.1 - @fusion-plugin-examples/dependency-graph@0.1.32 - @fusion-plugin-examples/roadmap@0.1.20 - @fusion-plugin-examples/cursor-runtime@0.1.20 - @fusion-plugin-examples/droid-runtime@0.1.27 - @fusion-plugin-examples/hermes-runtime@0.2.51 - @fusion-plugin-examples/openclaw-runtime@0.2.51 - @fusion-plugin-examples/paperclip-runtime@0.2.51 ### @fusion/desktop #### Patch Changes - Updated dependencies [2d2024f] - Updated dependencies [784f308] - @fusion/dashboard@0.40.0 - @fusion/core@0.40.0 ### @fusion/engine #### Patch Changes - @fusion/core@0.40.0 - @fusion/pi-claude-cli@0.40.0 ### @fusion/plugin-sdk #### Patch Changes - @fusion/core@0.40.0 ### @runfusion/fusion #### Minor Changes - 61d6874: Add a guarded interpreter-authoritative workflow cutover for coding-task lifecycle execution. The new capability stays default-off behind `experimentalFeatures.workflowInterpreterAuthoritative` and only activates when rollout-readiness checks pass, preserving legacy execution as the fallback path. - 93e8bd9: Add mission↔goal linkage tooling across Fusion surfaces: REST mission goal endpoints, `fn mission goals|link-goal|unlink-goal` CLI commands, and `fn_mission_list_goals|fn_mission_link_goal|fn_mission_unlink_goal` pi-extension tools. - 26bc80a: Add mission↔goal batch linking support across REST, CLI, and pi-extension surfaces. - `POST /api/missions` and `PATCH /api/missions/:missionId` now accept optional `goalIds: string[]` for mission goal linking on create and update. - `fn mission create --goal ` supports repeatable goal flags to link goals during mission creation. - Mission goal link surfaces now reject archived goals with `GOAL_ARCHIVED` while preserving `404` for missing goals. - Unlink paths remain permissive so archived goals can still be removed from missions. - 489a287: Add an ACP (Agent Client Protocol) client runtime plugin (`runtimeId: "acp"`) that drives any external ACP-compatible agent over JSON-RPC/stdio, built on the official `@agentclientprotocol/sdk`. Installed on demand (experimental). The agent runs as an untrusted subprocess that calls back into Fusion, so the integration ships a defense-in-depth security floor: per-category permission gating against the live policy (never a preset shortcut; `allow_once` only; unmappable kinds and missing policy default-deny), an unrestricted-risk acknowledgement that escalates blanket allows to approval under the allow-all default, an opt-in filesystem capability behind a real symlink-resolving cwd jail (realpath + `O_NOFOLLOW`, secret/`.git` deny-list, writes gated through the permission policy), untrusted-output sanitization and bounds, and an env allow-list for the subprocess. - c1c99a9: Wire the CLI Agent Executor as a selectable executor kind for the task execute path (U7). A workflow node with `config.executor === "cli-agent"` (plus `cliAdapterId` and optional `cliAutonomy`/`cliNotify`) now drives an engine-owned CLI coding agent (Claude Code / Codex / Droid / Pi / generic) through the execute step inside the task worktree. The new `cli-agent/task-session.ts` orchestrates the task↔session lifecycle: spawn in the worktree, mint the per-session hook token and write the hook scripts, inject the task prompt after readiness, subscribe to the authoritative state machine, and resolve on a positive completion signal (origin R20 gating — a native `done` advances the pipeline; the generic tier never auto-advances on idle and exposes a `confirmAdvance()` affordance instead). The resolved executor config is snapshotted at launch, so a mid-run node-config edit applies to the next run only. The PTY is reaped (recorded `completed`) at the execute→in-review handoff. Lifecycle semantics honor the existing contracts: a hard cancel (`moveTask(in-progress→todo)` / column-exit abort) SIGKILLs the CLI session via the same dispose/abort path API sessions use and marks it `killed` (never resume-eligible); a re-plan/RETHINK re-entry kills any prior live session and launches fresh; a follow-up to a done task resumes the recorded native session id when the adapter supports resume, else launches fresh. A PTY-pool ceiling (`CliConcurrencyLimitError`) surfaces as a clear queued/rejected task state rather than a silent stall. - d8248b4: Add the CLI Agent Executor hook ingestion route and per-session hook scripts (U17). The dashboard now serves a localhost-only `POST /api/cli-agent/hooks` endpoint that authenticates per-session hook POSTs from a spawned CLI agent and forwards the validated payload in-process to the engine telemetry hub (the engine has no HTTP server — only the dashboard serves HTTP). The route is hardened because localhost is not a trust boundary: it validates the high-entropy per-session token against the engine-held registry (a session id alone is never sufficient, and a token for one session never validates for another), rejects browser-context requests via Origin/Host CSRF checks, caps the payload size, and treats an unknown/non-live session as a 200 no-op rather than a crash. It is exempt from the daemon bearer-token middleware (hook scripts only hold the per-session token) but authenticates with that token instead. The engine gains `hook-scripts.ts`: it generates the per-session hook script and notify shim (Orca `agent-hooks` shape — `curl` POST of the stdin JSON with the session token header, short timeouts, always exit 0), writes them into a session-scoped config dir (owner-only, executable), and deletes that dir on session end (the token is registry-invalidated at the same moment, bounding its at-rest exposure to the session lifetime). - ace7106: CLI-agent hybrid chat (U12): a chat session can select a cli-agent executor and be driven by a long-lived CLI agent process. Adapter transcript telemetry maps to durable chat_messages rows at user/assistant/tool-summary granularity (raw tool noise stays in the terminal), with the shared `redactSecrets` pass applied before persistence so transcripts never become a secret store. Composer sends route through the inject path with FIFO queueing; the flush decision re-fetches authoritative session state rather than trusting a cached busy flag. The chat surface gains a transcript ↔ raw-terminal toggle (terminal owns input, composer hidden in terminal mode); generic-tier sessions render terminal-only with no toggle. New per-session `cliExecutorAdapterId` linkage on chat_sessions. ChatView now mounts `CliChatSurface` for cli-backed sessions (the message-pane + composer region is delegated to it; regular sessions keep the standard composer), and the engine `TelemetryHub` gains a narrow optional `onEvent` tap (settable via `setEventListener`) so the chat transcript runner can observe the same sanitized events the hook route already feeds, without the hub becoming a subscriber bus. - 7a80d29: Mobile terminal interaction for cli-agent sessions (U13). `SessionTerminal` now detects mobile viewports via the canonical breakpoint (`(max-width: 768px), (max-height: 480px)`) and renders a bottom input model in place of relying on xterm's hidden-textarea (unreliable on mobile): a visible text input that forwards typed text + `\r` as input frames on submit, plus an accessory key bar emitting exact control sequences — Esc (`0x1B`), Tab (`0x09`), a dedicated Ctrl-C (`0x03`), ANSI CSI cursor arrows (`CSI A/B/C/D`), and a sticky Ctrl modifier whose next key combines into a control byte (Ctrl-C `0x03`, Ctrl-D `0x04`, Ctrl-Z `0x1A`) with a visible active state. Bar keys apply the iOS composer survival pattern (pointerdown/mousedown preventDefault, action on click) so the input keeps focus, and the bar behaves as a fixed footer that lifts above the virtual keyboard via `useMobileKeyboard` (including its pinch-zoom `vv.scale > 1` guard, which is not treated as keyboard-open). xterm `onData` input stays attached (the bar is primary, not exclusive). Bar keys and the input are deliberate user keystrokes routed straight to the session input path. All new strings are localized in the `app` i18n catalog. - 8bac390: Add CLI-agent one-shot sessions for the validator, planning, and CE plugin surfaces (U9). A one-shot session runs an adapter's non-interactive invocation (`claude -p`, `codex exec --json`, `droid exec --output-format json`, `pi --print`) to completion in a working directory, streams output to a read-only terminal (input disabled server-side via the durable `autonomyPosture.readOnly` flag the transport's `isReadOnlySession` honors), parses the adapter's structured JSON result, and reaps the PTY on exit. The new `cli-agent/one-shot-session.ts` returns a typed result: a success with the parsed payload, or a typed failure (`nonzero-exit` / `unparseable` / `spawn-failed`) carrying a bounded output tail. The validator integration (`cli-agent-validator.ts`) maps results into the existing pass/fail/blocked/error verdict contract — a malformed or unparseable result maps to `error`, NEVER a silent pass. A planning seam (`runCliAgentPlanning`) maps one-shot output into the same `PlanningResponse` shape a model run produces, and the CE plugin's orchestrator threads an `executor` option (`model` | `cli-agent`) end-to-end to its resolver. - 10acf17: Add the CLI agent resume coordinator and self-healing integration (U8). On engine start, sessions persisted as live (starting / ready / busy / waitingOnInput) are classified `engineDeath` and queued for resume respecting the session-manager concurrency ceiling. Resume verifies the recorded worktree still exists (missing → needsAttention, never a CLI spawned into a vanished directory), detects a dirty worktree (logged + flagged on the session record, resume proceeds), relaunches via the adapter's `buildResume` with the recorded native session id in the recorded worktree, re-attaches telemetry, and re-injects no prompt. Only `crashed`/`engineDeath` are resume-eligible (`killed`/`userExited`/`authFailed`/`completed` never); attempts are capped at 2 with backoff; exhaustion, an unsupported adapter, a missing vendor session store, or an immediate spawn error route to needsAttention (a permanent-failure path, not a retry loop). Self-healing idle-worktree sweeps (`enforceWorktreeCap`, `cleanupOrphans`, unregistered-orphan reap) now skip a worktree backing a resume-eligible `cli_sessions` record via a narrow `isWorktreeResumeReserved` seam, and the stuck-task detector suppresses stuck/inactivity flagging while a task's CLI session is `waitingOnInput` via a narrow `isCliSessionWaitingOnInput` seam — the U3 stall backstop remains the only escalation while genuinely waiting. - 5872331: Bootstrap the CLI Agent Executor runtime and wire it end-to-end. A new `createCliAgentRuntime` factory (engine) constructs the per-project bundle — a `CliSessionStore` over the project's existing core Database, a per-runtime adapter registry with all five bundled adapters, the `CliSessionManager` (PTY lifecycle), the `TelemetryHub` (per-session token registry rebuilt from live records), and the `CliResumeCoordinator` (relaunch re-mints a hook token + rewrites hook scripts) — returning the executor bundle, the `isWorktreeResumeReserved` / `isCliSessionWaitingOnInput` predicates, and a scoped `dispose`. The runtime is instantiated per project in `InProcessRuntime` behind the `experimentalFeatures.cliAgentExecutor` flag (opt-in, matching the `workflowGraphExecutor` precedent): the bundle threads into `TaskExecutorOptions.cliAgentRuntime`, the predicates feed the self-healing idle-worktree sweep and the stuck-task detector, and `resumeCoordinator.recoverOnStart()` runs non-blocking after engine start (errors logged, never thrown). The dashboard hook endpoint URL is derived from a server-threaded option, falling back to a localhost URL from `FUSION_DASHBOARD_PORT` (default 4040). The dashboard now resolves the project's `TelemetryHub` via `cliAgentHubResolver`, mounts the cli-sessions transport from the runtime's manager + store, and brokers cli-backed chat sends: a chat session with a `cliExecutorAdapterId` routes composer sends to a `CliChatSessionRunner` (instead of the model agent loop), and the hub's sanitized telemetry is routed per-session into the runner's transcript handler. - 17c9303: CLI agent session transport (U10): authenticated cli-sessions REST routes (list, single-use session-scoped attach tickets, inject, confirm-advance), a distinct `/api/cli-sessions/ws` WebSocket attach handler (daemon-token + Origin allowlist + single-use ticket gate, scrollback replay then live byte frames, ACK-credit flow control driving engine pause/resume, latest-active-client resize, server-side read-only enforcement, input-source attribution), a streaming-safe outbound output filter (`neutralizeTerminalOutput`) that strips OSC 52 clipboard writes, non-http(s) OSC 8 hyperlink URIs, and device-status / query sequences, and a throttled `cli:session:state` SSE event with Last-Event-ID replay. - 243113a: Add CLI-agent adapter launch settings, an autonomy approval gate, and workflow node-editor configuration for the CLI Agent Executor (U15). A new `cliAgents` slice of global settings holds per-adapter operator launch config — command override, extra args, autonomy mode, and env allowlist additions — validated and sanitized at the write boundary (unknown adapter ids and invalid fields are dropped). Shipped defaults are owned by the adapters. The autonomy gate closes the "adjacent settings" bypass: elevation requested through ANY channel (the autonomy field, extra args such as `--dangerously-skip-permissions`, an autonomy-toggling env var, or a non-default command override) is detected over the FULLY RESOLVED argv + env via per-adapter elevation markers plus a shared generic env-pattern set. `resolveEffectivePosture` derives the posture chip from the resolved invocation — never the autonomy field alone — and the effective posture is denormalized onto the session record at spawn. An elevated launch without a stored per-project approval fails with a typed `CliAutonomyNotApprovedError` instead of stalling. Approvals are per-project - per-adapter (mirroring the raw workflow-CLI-command approval precedent) and the approving principal in v1 is the daemon-token holder. The dashboard adds daemon-token-authed routes (`/api/cli-agents`, `/api/cli-agents/settings`, `/api/cli-agents/:adapterId/approve-autonomy` + revoke), a Settings section for per-adapter launch config with an explicit confirmation flow before elevated autonomy is approved, and a workflow node-editor block that surfaces an adapter picker (with native/hybrid/generic tier labels), an autonomy toggle, and the waiting-on-input notification mode (banner / banner+notify) when a node's executor is `cli-agent`. All new strings are localized in the `app` i18n catalog. - e10db81: CLI agent terminal UI (U11): a shared `SessionTerminal` component (lazy-loaded xterm + fit/webgl/unicode11) that attaches to the U10 cli-sessions WebSocket with ACK flow control, a posture chip (baseline vs elevated), a read-only badge, session-idle/ended replay states, and a generic-tier confirm-advance strip. Adds a `terminal` tab to the task detail view driven by the lifecycle visibility matrix (live / read-only live / replay-idle / replay-ended / hidden) with live `cli:session:state` SSE merging, waiting-on-input and needs-attention task-card badges (distinct from staleness/stall badges), and extends `SessionNotificationBanner` with a `cli-agent` session type plus the pinned needs-attention variants (userExited / authFailed / resume-exhausted) and their actions. All new strings flow through the i18n catalogs. - 57631c7: Add full-screen TUI attach to cli-agent sessions (U14). The Ink dashboard TUI can hand the terminal to a CLI agent session as a raw passthrough: it enters the alternate screen, streams WebSocket terminal bytes to stdout and stdin keystrokes back as input frames, propagates resizes, and ACKs consumed bytes for flow control. The detach chord (Ctrl-]) restores the TUI cleanly, and a dropped connection surfaces an error and restores the terminal. Untrusted terminal output is neutralized through the same hardening filter the dashboard WS bridge uses (OSC 52 clipboard writes, non-http(s) OSC 8 links, and device-status queries are stripped before reaching the host TTY). - 3cf13dd: Add the Compound Engineering bundled plugin: a dedicated dashboard surface for compound-engineering artifacts and interactive `ce-*` sessions, a work→board bridge, and bidirectional board↔pipeline sync. Sessions are fully multi-session: a Sessions panel lists every run with stage/status/last-activity, lets you open and switch between concurrent sessions (each keeps running server-side), resume interrupted ones, and discard settled ones (`DELETE /sessions/:id` disposes the live handle before deleting the row). Sessions show the agent's full working output live (streamed thinking/tool activity with an inactivity-based stall timeout instead of a fixed turn timeout), the user can steer mid-stage with free-text guidance (attached to an answer or sent on its own), and the transcript renders past questions/answers/working traces as a proper chat surface. This also adds two reusable host capabilities that any plugin benefits from: - **Interactive agent sessions for plugin routes** (`ctx.createInteractiveAiSession`), with skill-discovery forwarding (`requestedSkillNames` / `additionalSkillPaths`) and live mid-turn progress streaming (`onProgress`: thinking/text deltas + tool markers) so a plugin can load a bundled skill into a live session and surface its work in real time. - **Real plugin event push over SSE**: a plugin's `ctx.emitEvent` calls are forwarded to connected `/api/events` clients as project-scoped `plugin:custom` events, and dashboard views can consume them via the new `subscribePluginEvents` view-context capability. - ee5f5e8: Add "New folder" button to DirectoryPicker for project setup The directory picker in the project setup flow now includes a "New folder" button that lets users create folders directly when selecting a project path. This includes: - New `POST /api/create-directory` endpoint for creating directories - Create folder UI in DirectoryPicker with inline error handling - Keyboard support (Enter to create, Escape to cancel) - Client-side validation for folder names (no path separators or traversal) Also fixes a bug where navigating into an empty folder would revert to the previous directory. - e854d33: Add `fn onboard` command: a sequential, prompt-based onboarding wizard covering central DB creation, AI provider setup (API key), first project init, core settings defaults, and a next-steps tour. Persists a `cliOnboardingCompletedAt` completion marker in global settings (distinct from the dashboard `setupComplete` first-run flag). - 641b932: Add a safe onboarding auto-launch hook in the CLI bootstrap path. When the central DB is missing, interactive TTY commands now trigger `fn onboard` automatically before command dispatch, while non-interactive contexts (non-TTY, `serve`, `daemon`, explicit skip signals) remain unchanged and never block execution. - 2053f3f: Add `fn onboard`: an explicit, user-invoked onboarding command that runs a sequential, prompt-based wizard for central DB creation, AI provider setup (API key), first project init (`fn init`), core settings defaults (global `testMode` and project `maxConcurrent`), and a next-steps tour. It persists a `cliOnboardingCompletedAt` completion marker in global settings so later runs are skipped unless `--force` is passed. - e9de195: Add dashboard shared branch-group visibility and controls: branch-group list/show/assign/promote API routes, grouped task surfacing, and a completion-gated branch-group card that only reveals PR/merge actions once all members are landed. - eb425d1: Add a dedicated dashboard Group Task Modal for shared branch groups. Grouped badges in task cards and subtask planning now open a modal showing shared branch status, member landed progress, tracked PR state, member-task quick links, and completion-gated promote actions. - 9c29e2e: Add a new New Task branch strategy option, **Merge into a shared feature branch** (`shared-group`). When selected, task creation now joins an existing open branch group by shared branch name (or creates a `new-task` sourced group when missing), links `branchContext` with `assignmentMode: "shared"`, and derives a per-task working branch from the shared branch instead of running directly on the shared integration branch. - 3373c0b: Add shared branch-group completion-gate promotion machinery so grouped shared branches promote to the default branch exactly once after all members land. This includes idempotent promotion re-evaluation, finalized branch-group status/PR tracking persistence, and lifecycle wiring that keeps member integration and shared→default promotion as separate phases. - 130f6f1: Custom OpenAI-compatible providers now register with explicit conservative role compatibility: Fusion defaults `compat.supportsDeveloperRole` to `false` so reasoning-capable models emit the legacy `system` role instead of relying on provider URL auto-detection. Advanced users can opt in per provider with `supportsDeveloperRole: true` when their endpoint explicitly supports the `developer` role. - 0a418e6: Add the external plugin authoring loop for published Fusion installs: `@runfusion/fusion/plugin-sdk` is available as the public SDK subpath, `fn plugin new ` scaffolds standalone publishable plugin packages, and `fn plugin dev ` builds, installs, watches, and hot-reloads local plugins during development. - 30a09e3: Persist mission↔goal many-to-many links with a new `mission_goals` join table, MissionStore link/unlink/list helpers, and a project schema version bump from 100 to 101. - abbeaec: Surface mission-linked goals across mission read paths, including `fn_mission_show`, mission detail API payloads, and dashboard mission detail navigation into anchored goal cards. - 577ce12: Document mission-to-goal linkage behavior, including the explicit no-backfill decision for existing missions, and surface an Unlinked badge for active missions without linked goals in Mission Manager. - 3b9ff42: Add self-healing recovery for stale mission validator runs that are left in `running` after their owning execution disappears. Stale validator runs are now reaped to the existing terminal `error` status (rather than introducing a new `cancelled` status), the reap reason is stored in the run summary, active mission features are moved back to `needs_fix` so validation can re-trigger, and startup/maintenance sweeps emit `mission:validator-run-reaped` audit events for recovered rows. - cc18206: Mission validation now AI-validates all mission criteria by lazily ensuring a per-feature managed assertion at runtime and removing the zero-assertion auto-pass path. Milestone acceptance criteria are threaded into validator prompts, and the dashboard now presents mission criteria as AI-validated instead of informational-only. - d72cb2a: Move agent logs out of the SQLite `agentLogEntries` table into per-task `.fusion/tasks/{ID}/agent-log.jsonl` files, add one-time migration + source-ref rewrite support, preserve soft-deleted log files for forensics while hiding them from live reads, and switch goal-citation source refs to `agentLog:{taskId}:{lineNo}`. - 8aed4da: Add AI-assisted conflict resolution to the dashboard Create PR flow so users can resolve task-branch merge conflicts against the selected base branch, push the updated branch, and continue PR creation without leaving Fusion. - 8891d4b: Add an in-app Create PR remediation that pushes the task branch to `origin`, refreshes preflight status, and unblocks PR creation without leaving Fusion. - 13c6d96: Add workflow `notify` nodes so custom workflows can dispatch templated notifications through configured providers. - 6271778: Add `workflow_id` support to agent task creation, delegation, and update tools so agents can select or clear task workflows directly. - 0b7549a: Enable workflow columns, graph executor, dual-observe, and authoritative interpreter experimental flags by default. - 1b7e52e: Expose workflow discovery and selection during triage planning, including workflow routing metadata for child task creation. - b1454c1: Branch-group promotion now creates a single real GitHub PR for the group integration branch when promoting a completed PR-mode group. The PR number/url/state are persisted on the branch group and promotion is idempotent — re-running never opens a second PR (an existing persisted or open PR is reused). The GitHub client is injected into the engine via the same option-callback seam as `processPullRequestMerge`, wired at the `fn daemon`, `fn dashboard`, and `fn serve` construction sites. PR creation only happens for eligible (completion-gated, auto-merge-allowed) groups, and a GitHub failure leaves the group recoverable rather than persisting a false PR state. The single managed group PR is now kept in sync through its terminal lifecycle: as additional members land, the PR body is rewritten with the latest member checklist and x/N completion (idempotent body rewrite — sync failures are non-fatal and retry on the next landing). When the persisted PR is closed or merged out-of-band on GitHub, the stored `prState` is reconciled rather than re-opened. Abandoning a group best-effort closes its GitHub PR and marks `prState` `closed` (or preserves `merged`). New injected `syncGroupPr` callback and dashboard `updatePr`/`closePr` GitHub-client helpers back this flow. The branch-group surface is completion-gated end-to-end: the dashboard branch-group card and Group Task modal show member progress before completion, reveal the promote/Open-PR control only when the group is complete, render the persisted PR link once promoted, expose an Abandon action while the PR is open, and display a terminal merged/closed state. A new agent-native CLI command (`fn branch-group list | show | promote `) reaches the same promotion coordinator path the dashboard uses — promoting a complete group opens/links the same single managed PR, and an incomplete group is rejected with the same completion-gate message. - f9e5513: Harden the project database against the recurring "database disk image is malformed" corruption. - **Integrity-checked backups**: every backup copy is now verified with `PRAGMA quick_check` before it is kept, a verifiably-corrupt copy is quarantined as `*.corrupt` instead of masquerading as good, and `cleanupOldBackups` will never rotate out the last verified-good backup. - **Startup auto-recovery**: on open, a malformed `fusion.db` is detected and rebuilt offline via `sqlite3 .recover` (corrupt original preserved as `fusion.db.corrupt-`, stale `-wal`/`-shm` dropped) before any connection is established. Opt out with `FUSION_DISABLE_DB_AUTORECOVER=1`. This also fixes a latent bug where the recovery path invoked the non-existent `.recover main` option and always failed. - **Database shrink + retention**: scratch `lost_and_found*` tables left by prior recoveries are dropped on init, and a new `operationalLogRetentionDays` setting (default 30 days, configurable in Settings → Backups → Database Maintenance, 0 to disable) prunes unbounded append-only log tables (`activityLog`, `agentLogEntries`, `runAuditEvents`, `agentHeartbeats`) during periodic maintenance to curb the file growth that widens the corruption window. - 34c8ac9: Add the unified `fn pr` command namespace for CLI parity with the dashboard's PR-entity review surface (U8, R13): `fn pr create | list | show | approve | respond | retry | merge | close | automerge`. Each subcommand routes to the SAME store/engine/release path the dashboard PR routes use, so the two surfaces can't diverge: `create` mints the GitHub PR; `list`/`show` read PR entities; `approve`/`respond`/`retry`/`merge`/`close` fire the workflow's user-controlled release edges via `releaseHeldTaskByEvent` (`pr-approve`/`pr-respond`/`pr-retry`/`pr-merge`/`pr-close`); `automerge` toggles the entity's `autoMerge` flag. BREAKING: the per-task `fn task pr-create` command is retired. Use `fn pr create ` instead (same flags: `--title`, `--base`, `--body`, `--draft`, `--no-ai`, `--reviewer`). - 5c4c765: Add a dashboard browse-and-install flow for skills.sh catalog entries, including the new `POST /api/skills/install` API route and Skills view install actions that refresh discovered skills after a successful install. - d071aec: Add executable custom workflows with a visual graph node editor. Author a workflow as a graph (start → prompt/script/gate steps → end) in a new React Flow–based editor, then select it per task or set a project default. Selected workflows compile to the existing WorkflowStep engine and run at the pre/post-merge boundaries — no changes to the scheduler/executor/merger. Non-linear graphs are rejected with a clear message and reserved for the (deferred) graph interpreter. Prompt nodes carry an execution profile: run on a chosen model, as a named agent, as a skill invocation, or as a named project script (CLI) with the prompt passed via FUSION_NODE_PROMPT — plus per-node retries and an auto-approve toggle. "User input" nodes pause the run with a needs-input badge on the task card and a banner in the task modal; replying in comments and unpausing resumes the workflow with the answer. CLI nodes can run arbitrary commands (not just named scripts); the first run of an exact command pauses the task for explicit user approval. The task modal's input/approval banner is interactive — reply-and-resume for user-input nodes, approve-and-run for CLI commands. Agents reach workflows too: the `fn_workflow_list`, `fn_workflow_get`, `fn_workflow_select`, `fn_workflow_create`, `fn_workflow_update`, and `fn_workflow_delete` tools (plus `fn_trait_list` for the column vocabulary) give agents the same author/list/select capability as the dashboard. These are exposed not only to the task executor but also to the chat and planning agents, so you can author and edit workflows directly in a chat or planning conversation; a guard test locks all six tool names to each lane to prevent silent exposure drift. Built-in workflows are now read-only in the editor (palette/inspector disabled, with a "Duplicate to edit" action), and a node's "Auto-approve requests" toggle now actually bypasses the CLI first-run approval pause. Also fixes a latent persistence bug where `pausedReason` was written to the in-memory task and read by queries but never stored by the task upsert or mapped back on read — so it was lost on every reload. This silently broke any pause/resume that depends on the reason (workflow CLI-approval and await-input nodes, token-budget pauses, worktrunk failures). The approve-CLI endpoint now derives the approved command solely from the task's pausedReason (ignoring any caller-supplied command), await-input nodes only resume when this node actually paused the task (not on a pre-existing steering comment), and write-capable custom nodes are refused until a task worktree exists so they never mutate the shared repo root. The editor itself got a major usability upgrade: card-style nodes with kind accents and live config summaries (model/agent/skill/command, gate mode, hold release, join mode); success/failure edge authoring on regular edges with distinct styling, parallel conditioned edges, and an author-time cycle guard; one-click auto-layout that respects column swimlanes; safe node/edge deletion with cascade semantics; proper dialogs (create/delete/discard) with inline rename, descriptions, and a dirty-state guard on every dismissal path; onboarding/empty states; and the Columns and Fields panels now live in the editor's left sidebar under the workflow list. The node editor is now the primary workflow surface: the header and mobile nav open it directly and the legacy Workflow Steps screen is retired. Existing flat steps migrate automatically (and idempotently) on first editor open — every step becomes an insertable template fragment in the new palette Templates section (alongside built-in and plugin step templates), and your default-on steps become a "Migrated steps" workflow that's set as the project default. Task creation now picks a workflow (applied atomically at create) instead of individual step checkboxes. Workflows and template fragments import/export as JSON files — with server-side validation, name-collision handling, and automatic stripping of approval-bypass flags from untrusted files. And you can ask AI to design a workflow: describe what you want in the create dialog (or redesign the active workflow from the toolbar) and a planning-lane model emits a validated graph, with interpreter-only branching flagged honestly. - 9072d71: Add a localization (i18n) foundation across the UI. Introduces react-i18next-backed translation for both the dashboard and the terminal UI, with English as the source language and Simplified Chinese, Traditional Chinese, French, and Spanish as target locales. - New `@fusion/i18n` package holding the authored catalogs and shared i18next configuration (namespace split, script-aware zh-CN/zh-TW fallback, plural setup). - A `language` preference (`fusion settings`) and a Settings language switcher; the CLI resolves locale from `--lang`, settings, then environment. - An `i18next-cli` workflow (`extract`/`sync`/`types`/`status`/`lint`) so adding a future language is a translate-only, near-zero-code operation. - c1a7231: Redesign the workflow editor mobile surface with a graph outline, mobile add flow, and first-class workflow settings destinations. - fbc2c37: Convert the built-in PR lifecycle from a selectable task workflow into a reusable workflow-editor fragment template. - bd5315f: Allow projects to enable or disable built-in workflows from settings, and show built-in workflow seam prompt text in workflow nodes. - d8a015e: Allow built-in workflow review columns to surface the auto-merge toggle. - 7076dd4: Make task steps workflow-modelable, behind the `experimentalFeatures.workflowGraphExecutor` flag (off by default). Step policy — how a task breaks into steps, how each step is reviewed, and what happens on revision/rethink — was previously fixed engine law. Workflows can now model it as graph structure: a `foreach` node instantiates a per-step template subgraph once per planned step; a `step-review` node surfaces APPROVE/REVISE/RETHINK/UNAVAILABLE verdicts as outcome edges; `rework` edges (the only legal graph cycles, bounded per instance) route revisions back to a `step-execute` seam, with RETHINK triggering a substrate reset-to-baseline (git reset + session rewind). Steps additionally gain parallel execution: with `mode: parallel` + per-instance worktrees, dependency-satisfied steps (declared via `### Step N (depends: 1,2):` annotations) run concurrently off a common base, with an ordered integration stage that lands branches in step order and routes rebase conflicts to a budget-counted rework outcome. Step parsing itself becomes a graph node: `parse-steps(artifact, parser)` reads a workflow-declared task artifact and runs a registry parser (built-in `step-headings`/`json-steps`, or plugin-contributed parsers under `plugin::`) to write the step list, with routable `no-steps`/`parse-error` outcomes. A `code` node runs sandboxed TypeScript (esbuild + child process, clamped timeout, no store handle) for arbitrary computed routing/field logic. Workflows also declare typed custom task fields (string/text/number/boolean/enum/multi-enum/date/url, with enum options and render hints); values are validated through a single store authority and the task UI renders the field schema dynamically (detail form widgets, card badges, and a workflow-editor Fields panel). `fn_task_update` accepts a `custom_fields` patch; `fn_workflow_create/update` accept the new IR constructs. The default coding workflow is untouched and byte-identical (the parity oracle); a new built-in stepwise coding workflow demonstrates the full modeling. With the flag off, step execution, review, and the board are exactly as before. **ROLLBACK:** This is flag-gated by `experimentalFeatures.workflowGraphExecutor` and additive on disk. Schema migration v108 only ADDS the `workflow_run_step_instances` table and the `tasks.customFields` column (default `'{}'`) — it rewrites no existing rows. The flag is read once and pinned per run, so a mid-flight toggle never switches a task between the legacy and graph step paths; flag-off rollback mid-task converges via the existing fell-back + git-reconcile recovery, because `Task.steps[]` remains the always-git-reconcilable projection sink. Instance rows are per-run prunable and are never the authority over git history. IR using the new node kinds (`foreach`/`step-review`/`parse-steps`/`code`) is v2-only, and `downgradeIrToV1IfPure` already refuses non-v1 node kinds, so the v2 rollback contract from the columns track is preserved automatically. To downgrade to a pre-v108 binary, turn the flag off and let in-flight stepwise tasks settle (or reconcile from git) first; custom-field values on the dropped column are lost on downgrade, so export any needed field values beforehand. - 4fa5407: Add per-column agent assignment for workflow columns, behind the combined `experimentalFeatures.workflowColumns` + `experimentalFeatures.workflowGraphExecutor` flags. A workflow column can now name a permanent agent from the registry plus a mode — `defer` (the column agent is the default for work in that column that carries no agent/model settings of its own) or `override` (the column agent supersedes node- and task-level agent/model settings). The binding applies to all session-running work attributable to the column's nodes: custom prompt/gate/script nodes, the execute seam's coding session, and step-execute sessions. Precedence is resolved by one shared `@fusion/core` resolver (`resolveColumnAgentBinding` + `resolveEffectiveAgent`) consumed by every reader, with defer/override expressed as explicit named rules and defer granularity all-or-nothing (an own agent identity OR a complete `modelProvider`+`modelId` pair suppresses the column agent). The binding keys off the node's declared IR column; foreach template nodes inherit the enclosing foreach node's column. A missing/deleted agent at resolution time logs and falls back to normal resolution — a live session is never aborted. The built-in default workflow carries no column agents and stays byte-identical (parity oracle); with either flag off, column agents are inert. The effective column agent is also the principal for the subsystems that previously assumed the running agent is always `task.assignedAgentId`: action gating (`buildActionGateContext` / `buildPermanentAgentGatingContext`) is computed for the agent actually running; heartbeat serialization honors it in both directions (the execute deferral gate, a second `resumeTaskForAgent` pass that re-dispatches tasks whose effective column agent matches, and a reverse-direction heartbeat-scheduler guard so an `allowParallelExecution=false` column agent never heartbeats concurrently with its own session); and a workflow-definition edit or agent runtimeConfig change that re-keys the column-effective agent/model hot-swaps the running graph session, while an agent deleted mid-session falls back without a restart. Authoring lands in the workflow editor: the column panel gains a registry-backed per-column agent picker plus a defer/override mode toggle, bound columns are badged on their headers, and a node inside an override column shows that its own executor settings are superseded (so override never reads as a bug). Picker interaction states are explicit — flags off disables the picker with a tooltip naming both required flags, an in-flight fetch disables it, a failed fetch shows an inline error, and a stored `agentId` missing from the registry renders an "Agent not found" warning that preserves the IR until the author clears or replaces it. Agent references are validated at save time: the `POST`/`PATCH` workflow routes reject an unknown `agentId` with a typed 4xx naming the offending column, and binding an agent whose permission policy is broader than the project default requires an explicit `confirmPolicyEscalation` flag so override cannot silently re-key action gates to a more-privileged agent. - 60605fa: Add workflow-defined custom columns with composable traits, behind the `experimentalFeatures.workflowColumns` flag (off by default). Workflows can now define their own columns, each carrying composable traits (declarative flags plus lifecycle hooks) instead of the fixed `triage → todo → in-progress → in-review → done → archived` pipeline. The dashboard board renders one lane per workflow in use, and graphs gain `hold`, `split`, and `join` nodes for passive dwell and parallel fan-out/join branches. The built-in default workflow reproduces today's pipeline verbatim, and migration rewrites zero task rows — a null workflow selection resolves to the default workflow at read time. With the flag off, the legacy board, transitions, and engine behavior are unchanged. **ROLLBACK:** Workflow IR now has a `v2` on-disk shape (custom columns + `hold`/`split`/`join` nodes). Pre-v2 binaries hard-reject any IR whose `version !== 'v1'`, so a naive downgrade would brick rows that had been re-serialized as v2. To keep rollback safe, the store downgrades a workflow back to the `v1` shape on save whenever (a) the `experimentalFeatures.workflowColumns` flag is OFF, and (b) the graph is "pure v1" — only `start`/`prompt`/`script`/`gate`/`end` nodes, no `hold`/`split`/`join`, and exactly the synthesized default columns at their default seam-derived placement. v2 is persisted only when the flag is ON or a genuine v2 feature (custom column, applied trait, custom placement, or a v2-only node) is in use. Reading a downgraded `v1` row on a v2 binary re-upgrades it to the identical v2 graph, so this is lossless. Rollback is therefore only unsafe for workflows that actually use v2 features with the flag ON; turn the flag OFF and re-save such workflows (or delete them) before downgrading to a pre-v2 binary. - 71822f2: Add workflow extension plugin contracts for move policies, work engines, node handlers, task verdict providers, auto-merge facts, and shared board action services. - a504238: Add first-class workflow loop nodes with bounded template repetition, exit conditions, editor support, and plugin SDK type exports. - 61ae1bf: Expose default-workflow Plan/Triage, Executor, and Reviewer model lanes from Project Models settings while keeping workflow setting values as the source of truth. - e2707af: Add a first-class workflow settings mechanism and hard-move execution policy onto it. - **Workflow settings.** Workflows now declare typed settings in their IR (id, type, default, options) — the same authoring pattern as custom task fields. Setting _values_ persist per `(workflow, project)` behind a single validating store authority, and the engine resolves _effective settings_ per task (`stored value ?? declaration default`, dropping values that no longer validate). Built-in `builtin:coding` declares every moved key with its former default, so an untuned project behaves identically. - **Hard-move migration.** A one-time, idempotent, per-project migration relocates the step-execution, review/approval, and per-phase model-lane keys out of project/global settings into workflow setting values, removing them from the settings schema entirely. A `MOVED_SETTINGS_KEYS` tombstone list shields cross-node sync, v1 imports, and stale writers from resurrecting a moved key; a consistency test enforces one home per key. - **Settings UI redesign.** The Settings modal is rebuilt from shared schema-driven field primitives and per-section components; moved settings show a redirect stub linking to the workflow editor (one release). The new **Workflow editor → Settings** panel (Definitions/Values tabs) and the `fn_workflow_settings` agent tool edit values with typed validation. - **Export v2.** Settings export bumps to version 2 with a `workflowSettings` value section; importing a v1 export upgrades any moved key it carries into the appropriate workflow's values. Workflow settings are not synced across nodes yet (surfaced in the sync UI). #### Patch Changes - f76716e: Fix custom-provider model resolution in the bundled engine for OpenAI Responses API providers. - Align custom-provider reads with global settings directory resolution (including legacy `~/.pi/fusion` and `~/.pi/kb` migration paths), so providers persist across restart and remain visible during agent session creation. - Ensure custom provider registration diagnostics include enough detail for troubleshooting registration failures. - Improve configured-model resolution errors to clearly identify the failing `provider/model` selection while retaining the existing `"was not found in the pi model registry"` matcher substring and pointing users to Settings → Custom Providers. - Add regression tests covering legacy settings-path custom-provider loading and openai-responses provider model resolution. - fab8a62: Make `fn_goal_list` and `fn_goal_show` available in engine agent sessions, including executor, heartbeat, and triage runs. Also make `fn_goal_list` output concise by truncating descriptions to short single-line snippets while keeping full goal descriptions available through `fn_goal_show`. - 2d81a95: Fix mission→goal link write paths to return `400 { code: "GOAL_NOT_FOUND" }` instead of 404 for unknown goals, aligning the API, CLI, and pi tool contract. - 40c0048: Fix built-in workflow editor graph edge visibility so read-only built-in workflows render connected, clickable React Flow edges for success, failure, and rework paths. - 9c84ba2: Built-in coding workflow catalog (`builtin:coding`) now exposes the canonical `BUILTIN_CODING_WORKFLOW_IR` used by resolver/runtime fallback paths, removing drift between workflow surfaces. - 934071c: Agent-created tasks without explicit titles now request AI title summarization regardless of the project auto-summarize setting. - d75f861: Harden AI merge temporary worktree cleanup with same-task pre-merge pruning and task-aware stale tempdir sweeping for completed or deleted tasks. - db971a9: Initialize missing Git repositories automatically when registering Fusion projects. - 30ba1f0: Expose the dashboard file viewer to plugin views and use it for Compound Engineering artifact documents. - 07dcb16: Add the Codex, Droid, and Pi CLI agent adapters (U5). Three new launch adapters join the engine's CLI agent executor, each declaring honest, verified capability flags so surfaces can render tier differences: - **Codex** (hybrid tier): native turn-complete via the session-scoped `notify` config program (`-c notify=[…]`), capturing `thread-id` as the native session id; waiting-on-input is inferred from ANSI-stripped PTY prompt-pattern heuristics (approval menus, idle composer markers, with a spinner/working override) because Codex has no native waiting signal; resume via `codex resume `; rollout JSONL transcript tailed by probing (not hardcoding) the sessions directory for the file matching the thread-id. - **Droid** (native tier): Claude-style hooks (`SessionStart`, `Stop`, `Notification`, tool-activity) delivering `session_id`/`transcript_path`/`permission_mode`; a message classifier splits the conflated `Notification` event into permission-request vs idle sub-reasons (both treated as waiting-on-input); resume via interactive `droid --resume ` or headless `droid exec -s ` — never the bare `-r` that means `--reasoning-effort` in exec mode. - **Pi** (native tier): telemetry and transcript from session-JSONL tailing under a session-scoped `--session-dir`; lifecycle events (turn/agent start→busy, end→done, input-request→waiting) plus message rows→transcript; resume via `pi --session `. A new `session-jsonl` transcript source is added to the adapter capability union for Pi. - f3b700a: Add the generic heuristic-tier CLI agent adapter (U6). Arbitrary user-configured CLI commands can now run as engine-owned PTY sessions. The generic adapter declares every native capability disabled (no native done/waiting signal, no transcript) and infers state purely from the terminal byte stream: busy while output progresses or a spinner animates, and a synthetic idle after a configurable quiet window when a prompt-like glyph is showing and no spinner overrides it. Per the completion-gating decision (origin R20) the generic tier NEVER reports done — idle surfaces a "looks idle — confirm to advance" affordance via a new busy-equivalent idle sub-state and never advances the pipeline. - b9afce3: Fix a batch of CLI Agent Executor review defects: - **Schema-version gate**: bump `SCHEMA_VERSION` to 110 so a DB already at 109 runs migration 110 and gains the `chat_sessions.cliExecutorAdapterId` column (it was previously short-circuited). Add the column to the compat-fingerprint `MIGRATION_ONLY_TABLE_SCHEMAS.chat_sessions` entry so the fingerprint matches. - **Generic adapter double-wrap**: `formatInjection` no longer re-wraps injected text in bracketed-paste markers when `bracketedPasteActive`; the session manager's security path is the sole wrapper, so the generic adapter (like every native one) only appends a carriage return. - **Output-filter cross-boundary bypass**: thread one carry buffer across the scrollback→live seam in the CLI session WS bridge so a dangerous escape (e.g. OSC 52) split across the seam is fully neutralized instead of the held introducer being flushed verbatim into the scrollback frame. - **Output-filter overflow leak**: when an over-length carry begins with a recognized dangerous introducer (OSC `ESC ]` / DCS `ESC P`), drop the introducer instead of flushing it as literal, so it cannot recombine with a later terminator at the client. - **Follow-up never resolves**: `followUp()` now drives the authoritative state machine `done→busy` before injecting, so the re-armed result promise resolves on the next positive `done` instead of hanging on an idempotent done. - 38b84a3: Recover failed Planning Mode session loads into the existing retryable error view instead of dropping back to the empty planner. Failed or malformed persisted planning sessions now keep their session id so Retry/Dismiss recovery remains available, while deleted sessions still quietly fall back to a new session. - 68e52e3: Fix in-review tasks showing other tasks' files in the "files changed" list. `baseCommitSha` was captured as `merge-base(HEAD, origin/main)` at task start, but task branches fork from local main — when local main was ahead by merged-but-unpushed task commits, the recorded base rewound past them, and after the post-merge rebase-and-push rewrote their SHAs the diff range permanently swept the predecessors' files into the new task's diff. The capture now measures against local main first (origin/main as fallback), matching the contamination-base sites. - 314411c: Fix mission triage silently stranding features when two missions share a base branch. `branch_groups.branchName` is globally unique, but `ensureBranchGroupForSource` only checked for an existing group by `(sourceType, sourceId)`. When a second mission's shared-branch triage resolved to a base branch (e.g. `main`) that another mission already owned a branch group for, `createBranchGroup` threw `UNIQUE constraint failed: branch_groups.branchName`. That error escaped `triageFeature` and was swallowed by both of its callers (the validation-failure auto-triage and the startup/maintenance reconcile sweep), leaving the mission's `defined` features — including auto-generated fix features — permanently un-triaged and the mission unable to progress. `ensureBranchGroupForSource` now reuses an existing open group for the same branch name (matching the established `getBranchGroupByBranchName(...) ?? ensureBranchGroupForSource(...)` idiom) instead of colliding on the unique constraint. - 7d417a1: Fix the bundled Compound Engineering dashboard plugin build so its CSS is included in `dist`. - 978d07c: Fix opencode-go model sync: pass API key to CLI and strip provider prefix from model IDs Two bugs when using OpenCode Go as a provider: 1. **Model discovery only returned free models** — the saved Go API key was never passed as `OPENCODE_API_KEY` to the spawned `opencode models opencode --refresh` process. The CLI's internal plugin checks this env var and, when absent, disables all paid models (those with `cost.input > 0`). Only 20 free models appeared instead of all 67. 2. **API requests failed with 401** — `normalizeOpencodeGoModel` was registering models with prefixed IDs like `opencode-go/deepseek-v4-flash`. The Pi SDK sends `model.id` verbatim in API requests; the OpenCode API expects bare model names (e.g. `deepseek-v4-flash`). The prefix is now stripped during normalization. Also deduplicates models when the CLI emits both `opencode/foo` and `opencode-go/foo` for the same model, guards against empty model IDs, and refactors the duplicated `onApiKeySaved` handler into a shared `handleOpencodeGoApiKeySaved` helper. After this change, users must re-select their opencode-go model in Settings because model IDs have changed from prefixed to bare names. - c2604d5: Fix missions stalling when a feature is marked `done` but stranded mid-loop. A mission feature could be left `status: "done"` while its `loopState` never advanced past `"implementing"` and it had no linked board task (so it was never validated). The slice-completion gate (`MissionStore.computeSliceStatus`) correctly refuses to count an assertion-linked `done` feature until its validator passes, but nothing re-drove a task-less feature, so the slice — and the whole mission — could never auto-progress. Active-mission recovery now detects these stranded `done` features and re-runs assertion validation directly (no board task), so the gate can resolve: on pass the feature becomes legitimately complete, on fail the normal fix-feature flow takes over. The feature-validation path was extracted into a shared `runFeatureValidation` helper used by both task-completion and recovery. - a27921a: Fix project selector review regressions around optional selection handlers and bookmarked search matches, and tighten retry/backoff timeout and rate-limit handling. - 77a1099: Fix a spurious Settings → Plugins error for the bundled Dependency Graph plugin where plugin startup could fail with `Invalid state transition from "started" to "started"`. Plugin state transitions now treat same-state updates as idempotent no-ops, while still allowing same-state calls with an explicit error payload to update the persisted error field without emitting a state-changed transition. - 944c03d: Fixes the UsageIndicator popup hidden-window recovery flow by preventing hide/show controls from acting as implicit form-submit buttons. - Sets the per-window hide control and provider-level **Show hidden (N)** control to `type="button"` so they do not trigger parent form submits. - Adds a regression test that verifies clicking **Show hidden** reveals hidden windows, persists the unhidden state, and remains correct after rerender/state re-sync. - feceedb: Repair dropped spaces after sentence-ending punctuation when streamed agent text is split across separate assistant messages by tool-call round-trips (chat and agent logs), by tracking a per-session running tail at the shared engine streaming-delta chokepoints. Completes FN-5789, which only covered within-message boundaries. - 40b4919: `fn onboard` now allows each onboarding step to be skipped individually without aborting the overall wizard. Skipping steps still marks onboarding as completed, while interactive cancellation behavior remains unchanged. - e1a35a3: Harden CLI onboarding auto-launch backward compatibility by adding an explicit skip when both the central DB and local project DB already exist. This preserves established agent/headless behavior by ensuring non-TTY, `serve`, and `daemon` invocations continue without onboarding prompts or blocking. - 38e0422: Refine onboarding auto-launch bypass behavior by treating `--skip-onboarding` and `FUSION_SKIP_ONBOARDING` as first-class skip paths. - Parse `FUSION_SKIP_ONBOARDING` with strict truthiness (`1`, `true`, `yes`, `on` only). - Return distinct auto-launch skip reasons for flag (`skip-flag`) and env (`skip-env`). - Strip `--skip-onboarding` as a global CLI flag so it never leaks into downstream command parsers while still informing onboarding gate decisions. - 245129e: Add orchestrator-level regression coverage and CLI docs that guarantee onboarding auto-launch never blocks existing projects, non-TTY/headless workflows, or agent-run `fn` commands. - c676cbe: Update `fn onboard` CLI HELP text and CLI reference docs to match shipped onboarding behavior, including auto-launch conditions, skip paths, and onboarding escape hatches (`--skip-onboarding`, `FUSION_SKIP_ONBOARDING`). - 1aef3c9: Fixes a mobile dashboard crash path where toggling the in-review auto-merge switch could blank the UI until refresh on some Android/legacy WebView environments. - 327f0a9: Fix shared branch-group execution to always derive per-task working branches (`fusion/`) for checkout/worktree operations while keeping the branch-group branch as the merge target. - e16893a: Classify provider 400 errors for unsupported `messages.[n].role` values as operator-actionable agent errors, and annotate prompt-boundary failures with a clear model/provider compatibility hint. This stops invisible retry loops and makes misconfigured imported agent model/provider combinations fail fast with actionable diagnostics. - b4230c0: Reuse imported GitHub source issues as task tracking links when GitHub tracking is enabled, instead of creating a duplicate issue. Tasks imported from GitHub now link their existing `sourceIssue` (when valid) as `githubTracking.issue` with no GitHub auth or issue creation call required. - 8376781: Fix mobile Task Detail Logs scrolling for branch-group tasks by making the branch-group card collapsible and re-pinning the agent log viewer when its container height changes. - e561290: Fix shared-branch-group member finalization so routed members land on the group's shared branch instead of being auto-finalized against the project default branch. Also harden already-landed commit attribution so the recovery detector never claims a commit that merely mentions a task ID in prose (2026-05-23 lost-work regression): the `git log --grep` ancestry fallback is now ownership-anchored on a Fusion trailer or a task-scoped conventional-commit subject. - d4db0b0: CLI auto-launch now honors the persisted `cliOnboardingCompletedAt` marker so onboarding fires only once, even when the Central DB step was skipped during `fn onboard`. - 7d1708f: Fix `fn_goal_list` and `fn_goal_show` so tool calls made from Fusion worktree directories resolve the canonical project database and return goals created through the dashboard UI. - 684baa0: Stop queued chat messages from disappearing after back-navigation while the assistant is still responding (GitHub #1279). Re-entering a chat restored the queued follow-up and immediately flushed it based on the client's local `isGenerating` flag — which is stale mid-generation (it is a route-level enrichment the `chat:session:updated` SSE payload lacks). The premature send aborted the live generation server-side and could lose the queued message entirely, since its persisted copy was deleted before the send. The restore path in both Chat and Quick Chat now confirms with the server before flushing: if a generation is still in flight it re-attaches to the stream and lets completion deliver the queued message; the message is sent immediately only when the server reports no active generation. On a failed check the queued bubble is kept for a later flush trigger. - e6ce500: Fix the dashboard skills interface so enabled and disabled skill toggles persist across refreshes for both top-level and package-scoped skills. The adapter now normalizes stored skill paths consistently when writing settings and when rediscovering installed skills. - c60dae1: Fix the desktop quick chat panel so moving the FAB while the panel is closed no longer shrinks or overwrites the saved panel size before the next reopen. - f3732af: Fix chat message sends with file attachments by parsing multipart form bodies on the chat messages SSE endpoint. Uploaded message attachments are now validated, persisted to the session attachment directory, converted into chat attachment metadata, and forwarded to the chat manager while JSON-only message sends continue to work unchanged. - de23db3: Bump `@earendil-works/pi-coding-agent` and `@earendil-works/pi-ai` from `^0.77.0` to `^0.78.0`. See the upstream pi coding agent changelog for [`0.78.0` (2026-05-29)](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/CHANGELOG.md#0780---2026-05-29). - 7d20a99: Clear stale active-session registry entries when PR-mode merge cleanup removes a task worktree. - 48e08c0: Recover mission interview drafts that were sent to the background from the final summary step. Plan-ready `complete` mission interview sessions now remain resumable across the dashboard, `fn mission list`, and `fn_mission_list` until they are approved into a mission or discarded. - a66b128: Fix Planning Mode single-task session history so completed sessions remain restorable from the summary view after task creation. - d9e1cdb: Fix agent-created ntfy task notifications so they include the task description when a title has not been assigned yet. - dab1569: Fix Planning Mode session history so duplicate AI-session rows are collapsed by session id and deleting a history entry only succeeds when the server-side delete persists. - ac92174: Fix a Planning Mode reliability bug where creating a single task could fail with a browser-level `Failed to fetch` error when post-create side effects threw or rejected before the dashboard finished responding. - cf23c6f: Run the configured `worktreeInitCommand` on merge worktrees before AI merge verification across warm and cold integration modes, so merge verification uses the same project-specific bootstrap as executor worktrees. - e33dadd: Fix fresh-install `pnpm install` bin-link warnings by pointing the published `fn`/`fusion` bins at a committed `bin.mjs` launcher that forwards to the built CLI output. - 3d18872: Fix the dashboard OAuth login flow for ChatGPT Plus/Pro (Codex Subscription) so multi-option provider selection prompts no longer cancel the login before browser auth starts. - a1b7556: persist the OAuth expiry alert/notification throttle so users are alerted at most once per provider every 12 hours, even across server restarts. - 419f688: Fix the dashboard auto-merge toggle blanking on mobile by keeping board stabilization tied to viewport events instead of a one-shot resize listener. The in-review board now stays visible when auto-merge is toggled across Android mobile, iOS mobile, tablet, and desktop layouts, with regression coverage for populated and empty columns plus rollback and error-boundary paths. - de3273e: Clear the in-review stall deadlock auto-pause on user-initiated retry so dashboard, CLI, and extension retries can actually resume merge/execution work without overriding manual pauses. - 6a00dd2: Stop missions from silently looping or stalling when agents can't run their tasks (GitHub #1261). Importing a catalog ("company") agent assigns it the role `custom`, which the scheduler never auto-assigns mission/queue work to. Combined with a model/provider that rejects the `developer` system role, this surfaced to users as an invisible, repeating failure loop. - **Auto-recover from incompatible roles:** an "unsupported message role" provider rejection (e.g. a reasoning model sending the `developer` role to a provider that only accepts `system`/`user`/`assistant`/`tool`) is now treated as a model-selection error, so a configured fallback model is tried once before the task is marked failed. The single-swap guard keeps an incompatible fallback from looping. - **Stop the retry loop:** operator-actionable failures (unsupported role, auth, quota) now block the mission feature immediately with a clear event instead of burning the full retry budget re-running the same cryptic error. - **Preflight mission start:** when ephemeral agents are disabled and no eligible executor agent exists, starting a mission now fails fast with an actionable message instead of queueing tasks forever. - **Warn on import:** importing only `custom`-role agents now surfaces a warning that they won't be auto-assigned mission work unless one is given the `executor` role. - 08d25f0: Streamline the Task Changes tab header controls on mobile so diff navigation and actions use a more compact layout. - fa23782: Fix the dashboard mobile auto-merge toggle blank-screen regression by restoring shared mobile breakpoint coverage and strengthening the regression suite across mobile, tablet, desktop, rollback, and task-review detail surfaces. - e84410e: Fix duplicate GitHub tracking issues and harden GitHub issue import deduping. - 60eb2ec: Allow failed agents to be stopped and deleted consistently across the dashboard and CLI guidance. Agents in the error state can now transition to paused, the dashboard exposes delete actions for failed agents in list/detail views, and regression coverage protects the updated behavior. - f77aa07: Fix auto-merge toggle not appearing on the built-in coding workflow's in-review column. The builtin:coding IR now carries the correct column traits (merge-blocker, human-review) so the dashboard resolves and passes the auto-merge toggle to the in-review column. - 4ffd0a2: Restore terminal task notifications for workflow/PR-backed completions that move tasks to done before emitting the canonical merged lifecycle event. - 8bc3d7b: Harden dependency security floors by forcing protobufjs resolutions to patched versions and upgrading Vitest tooling to the patched 4.1 line. - a2f4bb1: Removed the `collapsible`, `collapseStorageKey`, and `collapsedLabel` props from `WorkflowSelector`. Callers should stop passing these props; workflow selectors now always render expanded. - fc33a42: Open the workflow editor on the selected board workflow when using the workflow-mode edit action. - be7645f: Right-align the task-card promote action at the end of the card action row. - 07a5365: Fix workflow/AI merge ntfy notification delivery by preserving merge-backed task metadata, treating an empty ntfy event allowlist as the documented default events, and allowing failed/no-provider notification attempts to retry after settings refresh. - 6ec0e2b: Fix task changed-file counts for stacked or cherry-equivalent task branches by filtering active review diffs to commits attributed to the current task. - 7c4e44d: Prevent QuickEntry quick-action buttons from stealing or restoring textarea focus on mouse down, preserving existing click behavior while avoiding unwanted mobile keyboard refocus. - 576ff77: Stop failing task worktree acquisition and branch authority checks when a task branch contains foreign task-attributed commits. - b7a56cc: Stop classifying benign workflow-graph exits after a task already advanced or paused as failures. These exits now use info-level benign wording while genuine in-progress graph failures keep the existing failure handling. - 99661c1: Add an expand/collapse control for the workflow prompt editor so long prompts can be edited in a fullscreen overlay. - 477c8f1: Tokenize bare hex colors in ScriptsModal and SettingsSyncLog CSS to use semantic custom properties. - 4435ca2: Detect Codex model-auth-tier incompatibility as a model-selection error, trigger configured fallback models, and surface an actionable diagnostic when no fallback is available. - d7e1454: Make the Nodes screen open as a full-screen mobile overlay so it covers the header while staying above the mobile nav. - 1c69ea7: Fix CLI task retry behavior and plugin SDK runtime shims, and harden CLI tests against stale constructor mocks. - de7b110: Fix the Nodes view tablet overlay so node cards and topology content no longer bleed through node detail modals. - bbf3de9: Fix merger AI commit finalization so deleted tasks no longer crash settings resolution while the merge is completing. - d9d67fb: Hide the compound engineering built-in workflow unless the `fusion-plugin-compound-engineering` plugin is installed. - c9d48fb: Revalidate dashboard service-worker assets before falling back to cache so rebuilt tabs cannot stay on stale bundles and render a blank page. - fa68edf: Fix the integrated dashboard terminal so Ctrl/Cmd+C copies selected terminal text without swallowing plain SIGINT behavior, and Ctrl/Cmd+V pastes clipboard text into the active session. - e883a8d: Fix retry handling for stranded in-review tasks whose status is unset by allowing retry when execution is incomplete or a merge retry has already been attempted. - 7a9d2b0: Suppress in-review stall and merge-stalled signals for tasks already owned by the merge queue. - 0b0186a: Suppress legacy stalled-review badges and re-enqueue churn for tasks already owned by the merge queue. - 5f5852d: Fix coding-agent startup and tool boundary checks from AI merge temp worktrees on macOS by comparing Git worktree paths with filesystem-canonical paths. - 85c3420: Fix Fusion task tools from AI merge temp worktrees so merger agents can fetch task details without trying to bootstrap a nested project. - 6f37806: Fix missing model rows in the Minimax provider usage panel. The primary `general` model meters quota purely via `current_interval_remaining_percent` (its count fields are `0`), so the previous count-based visibility filter dropped it entirely. Minimax usage now prefers the authoritative `*_remaining_percent` field (with a count-based fallback) and renders a window only when a model exposes any quota signal. Each model's separate weekly quota window (`current_weekly_remaining_percent`, `weekly_*` timing) is now surfaced as its own indicator alongside the interval window. - ad46881: Respect per-task auto-merge overrides when the global auto-merge setting is off. Tasks with auto-merge explicitly enabled now get enqueued for merge and covered by the in-review self-healing sweeps (stall surfacing, merged-task finalization, retry recovery) even when the project-level setting is disabled; tasks without an explicit override keep the PR-based/manual review flow untouched. - 1c49ae6: Fix mobile quick-entry action buttons so nested icons and labels do not trigger browser touch gestures instead of toggling their controls. - be0140c: Fix the bundled dependency graph plugin so the graph view fills the available dashboard width. - aa8bd3d: Fix stuck task recovery by preserving retryable requeues, supervising verification subprocesses, and narrowing executor verification guidance to impacted work. - b6243d6: Suppress transient dashboard fetch errors after tab resume so cached data remains visible and executor status shows a reconnecting state instead of raw network errors. - c27c321: Fix mobile Quick Entry action buttons so taps rely on native browser click synthesis instead of a manual touchend click. - 614bec2: Fix the vitest memory-pressure auto-kill firing on a garbage metric and killing innocent processes. The guard probed `os.availableMemory` (which does not exist) and silently fell back to `os.freemem()`, which on macOS reads ~99% used on an idle machine — so with the toggle on, every vitest process was SIGKILLed every 30 seconds regardless of real memory pressure. It now reads `process.availableMemory()` (Node 22+) and refuses to auto-kill when only the unreliable freemem fallback is available. Kill targeting is also fixed: `pgrep -f vitest` matches full command lines (wrapper shells, monitors, editors that merely mention vitest); the TUI auto-kill/manual kill and the dashboard `POST /api/kill-vitest` + system-stats count now filter matches to actual node processes via a shared `findVitestProcessIds` helper. - e138971: Fix workflow board/list workflow selection, custom workflow task creation controls, workflow editor defaults, built-in workflow node prompt display, and executor handling for built-in workflow runs. - 4b4c32d: Fix workflow scheduling so in-progress column limits are enforced from fresh task state after hold-advancing sweep dispatches. - ff0750c: Fix the workflow graph editor opening invisibly and bundle the Compound Engineering and Roadmaps plugins. - The "Graph editor" button now actually shows the editor: its overlay was rendered without the `open` class, leaving it `display: none`, so opening it looked like the workflow steps view was just dismissed. - `fusion-plugin-compound-engineering` and `fusion-plugin-roadmap` are now listed in the dashboard's built-in plugins, so they appear under Settings → Built-in Plugins (they were implemented and registered but missing from the list). - Installing Compound Engineering (and CLI Printing Press) from Settings → Built-in Plugins no longer fails with "Plugin manifest not found": both ids are now in the dashboard's bundled-plugin fallback set, and the Compound Engineering plugin is staged into `dist/plugins/` so packaged installs can resolve it. - Plugins installed from Settings now load instead of erroring with "Plugin entry must be a file, got directory": the dashboard install routes register the plugin's loadable entry file (`bundled.js`/`dist/index.js`/`src/index.ts`) rather than the package directory, and enabling a plugin heals legacy directory-path registrations in place. - 8f42098: Route task execution through workflow-native runtime primitives and make the built-in coding workflow explicitly own planning before execute/review/merge. - a533307: Restore file-overlap blocking for workflow-column task releases so cards stay queued with overlap badges until active file-scope leases clear. - 83565a5: Fix workflow-native dispatch capacity accounting and publish workflow node task metadata to the existing task fields used by scheduler and dashboard surfaces. - cd8126d: Honor the worktree execution limit when workflow-column hold releases dispatch tasks. ### runfusion.ai #### Patch Changes - Updated dependencies [61d6874] - Updated dependencies [f76716e] - Updated dependencies [93e8bd9] - Updated dependencies [26bc80a] - Updated dependencies [fab8a62] - Updated dependencies [2d81a95] - Updated dependencies [40c0048] - Updated dependencies [9c84ba2] - Updated dependencies [489a287] - Updated dependencies [934071c] - Updated dependencies [d75f861] - Updated dependencies [db971a9] - Updated dependencies [30ba1f0] - Updated dependencies [07dcb16] - Updated dependencies [c1c99a9] - Updated dependencies [f3b700a] - Updated dependencies [d8248b4] - Updated dependencies [ace7106] - Updated dependencies [7a80d29] - Updated dependencies [8bac390] - Updated dependencies [10acf17] - Updated dependencies [b9afce3] - Updated dependencies [5872331] - Updated dependencies [17c9303] - Updated dependencies [243113a] - Updated dependencies [e10db81] - Updated dependencies [57631c7] - Updated dependencies [3cf13dd] - Updated dependencies [ee5f5e8] - Updated dependencies [38b84a3] - Updated dependencies [68e52e3] - Updated dependencies [314411c] - Updated dependencies [7d417a1] - Updated dependencies [978d07c] - Updated dependencies [c2604d5] - Updated dependencies [a27921a] - Updated dependencies [77a1099] - Updated dependencies [944c03d] - Updated dependencies [feceedb] - Updated dependencies [e854d33] - Updated dependencies [40b4919] - Updated dependencies [641b932] - Updated dependencies [e1a35a3] - Updated dependencies [38e0422] - Updated dependencies [245129e] - Updated dependencies [c676cbe] - Updated dependencies [2053f3f] - Updated dependencies [1aef3c9] - Updated dependencies [327f0a9] - Updated dependencies [e9de195] - Updated dependencies [eb425d1] - Updated dependencies [9c29e2e] - Updated dependencies [3373c0b] - Updated dependencies [e16893a] - Updated dependencies [130f6f1] - Updated dependencies [b4230c0] - Updated dependencies [0a418e6] - Updated dependencies [8376781] - Updated dependencies [e561290] - Updated dependencies [d4db0b0] - Updated dependencies [7d1708f] - Updated dependencies [684baa0] - Updated dependencies [e6ce500] - Updated dependencies [c60dae1] - Updated dependencies [f3732af] - Updated dependencies [de23db3] - Updated dependencies [7d20a99] - Updated dependencies [48e08c0] - Updated dependencies [a66b128] - Updated dependencies [d9e1cdb] - Updated dependencies [dab1569] - Updated dependencies [30a09e3] - Updated dependencies [abbeaec] - Updated dependencies [577ce12] - Updated dependencies [3b9ff42] - Updated dependencies [cc18206] - Updated dependencies [ac92174] - Updated dependencies [cf23c6f] - Updated dependencies [d72cb2a] - Updated dependencies [e33dadd] - Updated dependencies [3d18872] - Updated dependencies [a1b7556] - Updated dependencies [419f688] - Updated dependencies [de3273e] - Updated dependencies [6a00dd2] - Updated dependencies [8aed4da] - Updated dependencies [8891d4b] - Updated dependencies [08d25f0] - Updated dependencies [fa23782] - Updated dependencies [e84410e] - Updated dependencies [60eb2ec] - Updated dependencies [f77aa07] - Updated dependencies [4ffd0a2] - Updated dependencies [13c6d96] - Updated dependencies [8bc3d7b] - Updated dependencies [a2f4bb1] - Updated dependencies [fc33a42] - Updated dependencies [6271778] - Updated dependencies [be7645f] - Updated dependencies [07a5365] - Updated dependencies [6ec0e2b] - Updated dependencies [7c4e44d] - Updated dependencies [0b7549a] - Updated dependencies [576ff77] - Updated dependencies [b7a56cc] - Updated dependencies [99661c1] - Updated dependencies [477c8f1] - Updated dependencies [4435ca2] - Updated dependencies [1b7e52e] - Updated dependencies [d7e1454] - Updated dependencies [1c69ea7] - Updated dependencies [de7b110] - Updated dependencies [bbf3de9] - Updated dependencies [d9d67fb] - Updated dependencies [c9d48fb] - Updated dependencies [b1454c1] - Updated dependencies [f9e5513] - Updated dependencies [34c8ac9] - Updated dependencies [5c4c765] - Updated dependencies [fa68edf] - Updated dependencies [e883a8d] - Updated dependencies [d071aec] - Updated dependencies [9072d71] - Updated dependencies [7a9d2b0] - Updated dependencies [0b0186a] - Updated dependencies [5f5852d] - Updated dependencies [85c3420] - Updated dependencies [6f37806] - Updated dependencies [c1a7231] - Updated dependencies [ad46881] - Updated dependencies [fbc2c37] - Updated dependencies [1c49ae6] - Updated dependencies [bd5315f] - Updated dependencies [d8a015e] - Updated dependencies [be0140c] - Updated dependencies [7076dd4] - Updated dependencies [aa8bd3d] - Updated dependencies [b6243d6] - Updated dependencies [c27c321] - Updated dependencies [614bec2] - Updated dependencies [e138971] - Updated dependencies [4b4c32d] - Updated dependencies [4fa5407] - Updated dependencies [60605fa] - Updated dependencies [71822f2] - Updated dependencies [ff0750c] - Updated dependencies [a504238] - Updated dependencies [61ae1bf] - Updated dependencies [8f42098] - Updated dependencies [a533307] - Updated dependencies [83565a5] - Updated dependencies [e2707af] - Updated dependencies [cd8126d] - @runfusion/fusion@0.40.0 ## 0.39.0 ### @fusion/dashboard #### Patch Changes - @fusion-plugin-examples/cli-printing-press@0.1.17 - @fusion-plugin-examples/cursor-runtime@0.1.19 - @fusion-plugin-examples/dependency-graph@0.1.31 - @fusion-plugin-examples/droid-runtime@0.1.26 - @fusion-plugin-examples/hermes-runtime@0.2.50 - @fusion-plugin-examples/openclaw-runtime@0.2.50 - @fusion-plugin-examples/paperclip-runtime@0.2.50 - @fusion-plugin-examples/roadmap@0.1.19 - @fusion/core@0.39.0 - @fusion/engine@0.39.0 ### @fusion/desktop #### Patch Changes - @fusion/dashboard@0.39.0 - @fusion/core@0.39.0 ### @fusion/engine #### Patch Changes - @fusion/core@0.39.0 - @fusion/pi-claude-cli@0.39.0 ### @fusion/plugin-sdk #### Patch Changes - 3d22a98: Fix Windows binary-release build failure: add the DOM lib to `@fusion/plugin-sdk`'s tsconfig. Because `@fusion/core` exports its types as raw `src/*.ts`, plugin-sdk recompiles core's source under its own compiler options; without the DOM lib the global fetch `Response` type (`.ok`/`.status`/`.json`) resolved inconsistently across platforms and broke the Windows CLI and desktop release jobs (TS2339). - @fusion/core@0.39.0 ### @runfusion/fusion #### Minor Changes - 3b59487: Add a new `fn_mission_update` extension tool to patch mission `title`/`description` without recreating missions, and classify it as a mission mutation tool in readonly/permanent gating policy. - 194dfa9: Add a run-audit cited-goal trail for goal anchoring flows. - Enrich `goal:injection-applied`, `goal:injection-skipped`, and `goal:retrieval-invoked` events with `metadata.goalIds` (IDs/counts only). - Add core aggregation helper `collectCitedGoalIdsFromAudit(...)` to derive injected/retrieved/combined cited goal IDs from run-audit events. - Add dashboard API endpoint `GET /api/agents/:id/runs/:runId/cited-goals` to query cited goal IDs for a run. - 3d22a98: Add the Workflow IR v1 contract surface via `@fusion/core`, including versioned graph types (`WorkflowIr`), runtime parsing/validation (`parseWorkflowIr`), serialization (`serializeWorkflowIr`), and a canonical built-in fixture (`BUILTIN_WORKFLOW_IR_FIXTURE`) for interpreter parity testing. - 0ffe7f0: Add mission delete tooling for agents: `fn_feature_delete`, `fn_slice_delete`, and `fn_milestone_delete`. Mission feature/slice/milestone deletes now enforce a linked live-task guard by default and return clear conflict errors. Callers can pass `force: true` to clear mission linkage and proceed with hard deletion. - acad46c: Expose mission assertion backfill through operator-facing surfaces. - Added dashboard API route `POST /api/missions/:missionId/backfill-assertions` with dry-run default and `MissionAssertionBackfillReport` response. - Added agent/CLI tool `fn_mission_backfill_assertions` for dry-run/apply remediation of FN-5696 legacy zero-assertion features. - Updated mission operator docs and synced fusion skill/tool reference docs. - 1edbb54: Add a flagged-off Workflow Graph Executor scaffold and built-in coding lifecycle Workflow IR exports. - Adds `BUILTIN_CODING_WORKFLOW_IR` and `buildBuiltinCodingWorkflowIr` to `@fusion/core`. - Adds `WorkflowGraphExecutor` and `WORKFLOW_GRAPH_EXECUTOR_FLAG` to `@fusion/engine`. - Adds parity-harness skeleton tests and IR documentation updates. The new executor path is gated by `experimentalFeatures.workflowGraphExecutor` and remains strict no-op while disabled (default). - ba81d1f: Add workflow graph interpreter node handlers and traversal semantics behind the default-off `workflowGraphExecutor` experimental flag. The interpreter now supports prompt/script/gate dispatch through legacy seam DI, edge-condition routing (`success`/`failure`/`outcome:`), bounded retries, and parity-oriented tests for no-op flag behavior and lifecycle routing. - 5b4eecb: Add workflow interpreter dual-observe parity instrumentation surfaces for phased rollout. - Export pure workflow parity comparison helpers from `@fusion/core` (`compareWorkflowRunObservations`, `compareWorkflowRunAudits`) with structured drift reports. - Add `observeWorkflowParity` in the engine as a default-OFF, fail-soft observer gated by `experimentalFeatures.workflowInterpreterDualObserve`. - Emit run-audit parity events (`workflow:parity-observed`, `workflow:parity-drift`) for shadow agreement/drift visibility without changing authoritative legacy execution. - 0c42578: Wire branch-group-aware merge routing into the merge path. Tasks marked with `branchContext.assignmentMode = "shared"` now merge onto their group's integration branch (`branch_groups.branchName`) in both direct merge and PR-mode base-branch resolution, while ungrouped and `per-task-derived` tasks keep existing default-branch behavior. This release also adds reliability backstop coverage for grouped vs ungrouped routing and branch-group merge audit telemetry (`merge:branch-group-routed`). - 06d8490: feat(FN-5783): enforce branch-group autoMerge precedence for grouped promotion gating and audit visibility - e2101ea: Add single group-level pull request behavior for shared `branch_groups` in PR merge mode. When tasks share a `branchContext.groupId`, Fusion now opens and tracks one PR for the group's integration branch instead of creating one PR per task. The group PR metadata is written back to `branch_groups` and refreshed from merge-status polling. - 7b70e7f: Add a branch-group promotion eligibility hook to the engine merge lifecycle via `evaluateBranchGroupPromotion`, and emit `merge:branch-group-promotion-gated` audit telemetry whenever shared-group member landings are evaluated for downstream group→default promotion readiness. - 5930c18: Add a new opt-in `task-created` notification event for ntfy/webhook providers. - `task-created` fires when a task is created by an agent (`sourceAgentId` present), including agent-issued `fn_task_create` calls. - Event is off by default and must be explicitly enabled in Settings → Notifications (`ntfyEvents` / provider `events`). - ntfy formatting includes agent attribution and task deep-linking to the created task. - b1c1a33: Add safe `fn task deps` commands for audited task dependency mutations. #### Patch Changes - 62bc1e4: Removed the `showGitHubStarButton` setting and its Project General toggle from Settings. The Settings header "Star on GitHub" button remains available (always shown) while the dedicated visibility setting is no longer configurable. - a7347ad: Skip self-owned branch reclaim for dependency-blocked todo tasks so repaired queued work is not repeatedly resumed before its blocker clears. - 6ba3cbf: Respect dashboard task-list column filters so API callers receive only tasks in the requested persisted column. - 3dee395: Block AI merge finalization when the checked-out integration worktree is dirty instead of stashing local changes into the merge landing path by default, with an explicit Merge settings UI escape hatch for the legacy dirty-checkout sync behavior. - 716f396: Fix room chat send reliability by preventing concurrent in-flight room dispatches, classifying ambiguous delivered sends as delivered (so composer text is not restored), and hardening optimistic/SSE reconciliation to avoid duplicate user message rendering. - 4148f43: Fix the Binary Release workflow so platform binaries publish to GitHub Releases again: - The release job now tolerates a single failing build leg instead of being skipped, which previously suppressed all assets. - The node_modules cache key includes CPU arch (so arm64 runners no longer restore x64 native deps, fixing the `@rollup/rollup-linux-arm64-gnu` build crash) and the job id (so same-OS/arch jobs don't race on one key and fail the post-job cache save). - The macOS and Windows CLI signing steps are skipped gracefully when their certificate secrets are absent, so unsigned binaries still publish. - Desktop packaging now invokes `electron-builder` directly via `pnpm exec` instead of the `dist:*` scripts: pnpm leaked the `--` separator into script args, which made electron-builder ignore `--publish never` (auto-publishing to the wrong repo and 404ing) and drop the Linux `--x64 --arm64` flags. - The desktop build spawns workspace `.cmd` bins with a shell on Windows, fixing the `spawn EINVAL` failure. - The desktop package declares an `author` with email so the Linux `.deb` target (fpm) can build. - The Linux AppImage verify step matches electron-builder's actual x64 output name (`-linux-x86_64.AppImage`). - `@types/node` is pinned workspace-wide via a pnpm override so the desktop/plugin-sdk build is deterministic (a stale transitive `@types/node` lacking global `fetch`/`Response` types intermittently broke the Windows desktop build). - The `build-exe-cross` tests that cross-compile platform binaries are now opt-in (`FUSION_TEST_BUILD_EXE=1`) instead of auto-running on every CI run; native per-platform binary builds remain covered by `test-release.yml`. - A workflow_dispatch run now builds and uploads binaries as artifacts for validation without creating a release (release creation is gated to tag pushes). - The dependency-graph plugin build uses a cross-platform copy step that no longer breaks the Windows desktop build. - The macOS Intel (`bun-darwin-x64`) CLI binary is no longer built/shipped — `macos-13` runners are too scarce to build reliably and were blocking releases. The macOS CLI is now Apple-Silicon-only; the desktop macOS DMG/ZIP remains universal. - f8bda56: Fix scheduler overlap starvation for coordination-only tasks by allowing no-commit/coordination scopes to bypass active file-scope leases when overlaps are limited to safe read-only paths. Implementation tasks with real write-scope overlaps remain serialized behind active leases. - 033f74c: Improve `fn_feature_link_task` error handling when linking to tasks that are not on the active board. Instead of surfacing a raw SQLite foreign key failure, the tool now returns a clear validation error explaining that only active (non-archived, non-deleted) tasks can be linked to mission features. - 3255965: Fix mission assertion-validation trigger gaps so mission-linked tasks reaching done no longer bypass validator execution. Assertion-linked features now stay completion-gated until validator pass, and startup recovery replays implementing features whose linked tasks are already done/archived but still lack a passing validator status. - 1594470: Fix mission loop no-assertions auto-pass handling so completion deterministically advances feature `loopState` to `passed`, sets `lastValidatorStatus` to `passed`, and emits the structured `validation_auto_passed_no_assertions` audit event exactly once. - 9c4e8ed: Realize the mission completion-gate contract for live Goals mission workflows. - Fix mission execution auto-pass behavior so zero-assertion features move to `loopState: "passed"` (not stuck in `implementing`) and emit `feature_auto_passed_no_assertions` telemetry while preserving `validation:passed` emission. - Add milestone guard signaling for prose acceptance criteria with zero structured assertions via `hasProseButNoAssertions` rollup and warning event `milestone_missing_structured_assertions`. - Add an idempotent `seedContractAssertionsForFeatures(...)` helper for operator-run assertion persistence and coverage tests. - Reconcile MissionManager labels/copy to clearly separate enforced contract assertions from informational feature acceptance criteria, including warning badge and indicators. - 20c1c32: Persist merge-request handoff shadow contract and accepted marker for Phase 1 reliability scaffolding. - bb0f693: Fixes a dashboard regression where toggling the in-review Auto-merge switch could leave the UI in a broken/blank state until refresh. Auto-merge toggle state updates now remain consistent during rapid toggles, and regression coverage was added for the settings hook path. - 292bf07: Fix merger agent-log visibility by flushing buffered `AgentLogger` output before disposing AI sessions used for autostash conflict resolution, autostash hard-fail recovery, and rebase conflict resolution. This ensures trailing text/thinking deltas are persisted so merger activity reliably appears in the task agent log panel. - 5396730: Harden mission validation end-to-end by locking the canonical zero-assertion auto-pass path, strengthening assertion pass/fail regression coverage, and wiring bounded periodic mission recovery into existing self-healing maintenance so stranded implementing features recover without engine restart. - b154844: Fixes an executor worktree self-heal gap where `task.worktree` could be recorded as a nested subdirectory of a valid git worktree root. When a nested path is detected under a registered worktree inside the configured worktrees directory, Fusion now re-anchors `task.worktree` to the actual git top-level and continues execution. Genuine mismatches (repo root, outside configured worktrees dir, or unregistered top-level) still fail with existing `wrong_toplevel` and liveness guard behavior. - 93e8a5f: Persist AI merge agent text, thinking, and tool output to task agent logs in AI merger mode. - 9f29935: Throttle `oauth-token-expired` notifications to at most once per provider every 12 hours, even when the credential `expires` timestamp changes across refreshes/replacements. - 793da2c: Refinement tasks now inherit the source task’s GitHub tracking state, preventing auto-created tracking issues when the source task was not GitHub-linked. - 2140ab2: Repair dropped spaces after sentence-ending punctuation in streamed agent responses (chat and agent logs) across all providers by applying the streaming-delta sentence-boundary fix at the shared engine delta chokepoints, not just the per-provider CLI bridges. - ffadb0c: Fix GitHub tracking reconciliation for soft-deleted and archived tasks by adding a periodic 15-minute sweep, paginating archive/deleted candidate scans, and correcting done-task filtering to use the task column. - fa428a4: Run the configured `worktreeInitCommand` when the merger has to create a fresh merge worktree during reuse-worktree reacquisition. This bootstraps newly created merge workspaces before merge verification/workflow steps run, while leaving pooled/reused existing worktrees unchanged. - ab38ee0: Requeue incomplete stuck-loop exhausted tasks in todo with progress preserved instead of routing them through review/merge or requiring manual unpause. - c6b3b77: Treat foreign-attributed commits reachable from origin/main as already integrated during branch contamination checks to avoid false-positive recovery loops when local main is stale. ### runfusion.ai #### Patch Changes - Updated dependencies [62bc1e4] - Updated dependencies [a7347ad] - Updated dependencies [6ba3cbf] - Updated dependencies [3dee395] - Updated dependencies [716f396] - Updated dependencies [4148f43] - Updated dependencies [f8bda56] - Updated dependencies [3b59487] - Updated dependencies [033f74c] - Updated dependencies [3255965] - Updated dependencies [1594470] - Updated dependencies [9c4e8ed] - Updated dependencies [20c1c32] - Updated dependencies [bb0f693] - Updated dependencies [292bf07] - Updated dependencies [5396730] - Updated dependencies [194dfa9] - Updated dependencies [3d22a98] - Updated dependencies [0ffe7f0] - Updated dependencies [acad46c] - Updated dependencies [1edbb54] - Updated dependencies [ba81d1f] - Updated dependencies [5b4eecb] - Updated dependencies [b154844] - Updated dependencies [93e8a5f] - Updated dependencies [9f29935] - Updated dependencies [793da2c] - Updated dependencies [0c42578] - Updated dependencies [06d8490] - Updated dependencies [e2101ea] - Updated dependencies [7b70e7f] - Updated dependencies [2140ab2] - Updated dependencies [ffadb0c] - Updated dependencies [fa428a4] - Updated dependencies [5930c18] - Updated dependencies [ab38ee0] - Updated dependencies [c6b3b77] - Updated dependencies [b1c1a33] - @runfusion/fusion@0.39.0 ## 0.38.1 ### @fusion/dashboard #### Patch Changes - bad8f52: Improve the mission manager mobile stacked layout so mission rows reflow cleanly: stacked mission list items switch to a column layout with stretched content, item actions become full-width and wrap instead of cramped inline controls, and run controls span the full width. - @fusion-plugin-examples/cli-printing-press@0.1.16 - @fusion-plugin-examples/dependency-graph@0.1.30 - @fusion-plugin-examples/roadmap@0.1.18 - @fusion/core@0.38.1 - @fusion/engine@0.38.1 - @fusion-plugin-examples/cursor-runtime@0.1.18 - @fusion-plugin-examples/droid-runtime@0.1.25 - @fusion-plugin-examples/hermes-runtime@0.2.49 - @fusion-plugin-examples/openclaw-runtime@0.2.49 - @fusion-plugin-examples/paperclip-runtime@0.2.49 ### @fusion/desktop #### Patch Changes - Updated dependencies [bad8f52] - @fusion/dashboard@0.38.1 - @fusion/core@0.38.1 ### @fusion/engine #### Patch Changes - @fusion/core@0.38.1 - @fusion/pi-claude-cli@0.38.1 ### @fusion/plugin-sdk #### Patch Changes - @fusion/core@0.38.1 ### @runfusion/fusion #### Patch Changes - bad8f52: Fix the Binary Release workflow so platform binaries publish to GitHub Releases again. The release job now tolerates a single failing build leg instead of being skipped (which previously suppressed all assets), the node_modules cache key includes CPU arch to stop arm64 runners restoring x64 native deps, the macOS CLI signing step is skipped gracefully when Apple certs are absent, and the dependency-graph plugin build uses a cross-platform copy step that no longer breaks the Windows desktop build. ### runfusion.ai #### Patch Changes - Updated dependencies [bad8f52] - @runfusion/fusion@0.38.1 ## 0.38.0 ### @fusion/dashboard #### Patch Changes - Updated dependencies [9112b7d] - @fusion/engine@0.38.0 - @fusion-plugin-examples/cli-printing-press@0.1.15 - @fusion-plugin-examples/dependency-graph@0.1.29 - @fusion-plugin-examples/roadmap@0.1.17 - @fusion/core@0.38.0 - @fusion-plugin-examples/cursor-runtime@0.1.17 - @fusion-plugin-examples/droid-runtime@0.1.24 - @fusion-plugin-examples/hermes-runtime@0.2.48 - @fusion-plugin-examples/openclaw-runtime@0.2.48 - @fusion-plugin-examples/paperclip-runtime@0.2.48 ### @fusion/desktop #### Patch Changes - @fusion/dashboard@0.38.0 - @fusion/core@0.38.0 ### @fusion/engine #### Patch Changes - 9112b7d: Fix scheduler overlap deferral starvation by considering only runnable queued todo tasks as higher-priority overlap competitors. Dependency-blocked queued tasks now keep their unmet-dependency queue state without reserving overlapping files from ready work, while active in-progress and eligible in-review tasks continue to hold explicit file-scope leases. Dispatch logs now distinguish unmet dependencies, active file-scope lease blocking, and higher-priority runnable queued-task deferral. - @fusion/core@0.38.0 - @fusion/pi-claude-cli@0.38.0 ### @fusion/plugin-sdk #### Patch Changes - @fusion/core@0.38.0 ### @runfusion/fusion #### Minor Changes - afc3b47: Adds goal-anchoring run-audit observability for Slice 2 hybrid anchoring with three `database` mutation types: `goal:injection-applied`, `goal:injection-skipped`, and `goal:retrieval-invoked`. Events carry count-only metadata contracts (`count`, plus `lane` for injection and `toolName` for retrieval, with optional `truncated`/`reason`/`notFound`) and avoid prompt bodies or goal title/description payloads. These events are available through the existing `GET /api/agents/:id/runs/:runId/audit` timeline route with standard date-range filtering via `startTime`/`endTime`. - 71e2aec: Add a goal-citation audit trail to support Slice 2 anchoring success-signal measurement. - Introduce a persisted `goal_citations` table (schema v93) with deduplication on `(goalId, surface, sourceRef)`. - Record citations from `agent_log` and `task_document` write seams. - Extract goal IDs using `GOAL_ID_PATTERN` (`/\bG-[0-9A-Z]+(?:-[0-9A-Z]+)*\b/g`) and store bounded snippets (max 200 chars). - Add `fn goals citations` with filters: `--goal`, `--agent`, `--surface`, `--since`, `--until`, `--limit`, and `--json`. - 4fee2c1: Add a branch-strategy dropdown to the New Task dialog with project-default, auto-new, existing, and custom-new modes. New tasks now submit `branchSelection`, and `auto-new` derives a persisted branch name using `fusion/{task-id}-{short-name}`. - 0605d13: Add mission-level branch strategy defaults so missions can persist whether triaged tasks should use project default branching, a shared existing/custom branch, or per-task derived branches. Mission create/edit flows now save both `baseBranch` and `branchStrategy`, and mission triage handlers apply that stored strategy by default (including autopilot triage when no explicit branch options are supplied). Also fix planning breakdown task creation to forward the selected branch options so multi-task planning respects the same branch selection used by single-task planning. - 7221413: Add per-mission/planning branch-group data-model foundations in `@fusion/core`. - Introduce durable `branch_groups` storage with source linkage (`mission`/`planning`), branch metadata, PR state, status, and auto-merge override. - Add `TaskStore` branch-group APIs: create/get/getBySource/list/update/setTaskBranchGroup. - Persist `Task.autoMerge` and `Mission.autoMerge` as optional overrides. - Reuse `Task.branchContext.groupId` for task↔group linkage (no separate `branchGroupId` column). - Bump project schema version to `94` with migration coverage and schema assertions. #### Patch Changes - 53d97e2: Clarify no-task heartbeat prompts when eligible Todo tasks exist but role policy filters them out of auto-claim candidates. - dbb0804: Fix per-task diff view incorrectly including a task's base commit when a done task lands as a no-op or its resolved merge SHA equals `baseCommitSha`. - 668e3a5: Mission creation now always returns a stopped mission. `POST /api/missions` and the mission store ignore create-time `autopilotEnabled` input, forcing new missions to `status: "planning"` with autopilot disabled and inactive. Autopilot remains a post-creation action via explicit mission start/update flows. - a014c6d: Auto-merge now treats transient provider/network failures during merge (for example "This operation was aborted", "socket hang up", and provider `server_error` payloads) as bounded retryable errors instead of immediate terminal failures. The engine re-enqueues affected in-review merges with exponential backoff for both direct and pull-request merge strategies, then parks the task as failed with explicit transient-retry exhaustion logs once the retry cap is reached. - d5b3336: Dashboard: OAuth re-login banner now clears a provider immediately after successful OAuth re-authentication, instead of waiting for the next auth-status polling interval. - 0044c23: Fix dashboard OAuth login for `github-copilot` when upstream auth storage invokes device-code callbacks. The `/api/auth/login` route now provides the expected callback wiring and preserves `deviceCode: { userCode, verificationUri }` in responses so Copilot login no longer crashes with `options.onDeviceCode is not a function`. - 4a60c2a: Backfill done-task "N files changed" chips when mergeDetails enrichment arrives after the initial done websocket snapshot. Task cards now pass a done-mode merge enrichment signature into diff-stats invalidation so `/api/tasks/:id/diff` is re-fetched and authoritative lineage stats render without requiring a manual refresh. ### runfusion.ai #### Patch Changes - Updated dependencies [53d97e2] - Updated dependencies [afc3b47] - Updated dependencies [71e2aec] - Updated dependencies [dbb0804] - Updated dependencies [4fee2c1] - Updated dependencies [0605d13] - Updated dependencies [668e3a5] - Updated dependencies [a014c6d] - Updated dependencies [d5b3336] - Updated dependencies [0044c23] - Updated dependencies [4a60c2a] - Updated dependencies [7221413] - @runfusion/fusion@0.38.0 ## 0.37.0 ### @fusion/dashboard #### Patch Changes - @fusion/core@0.37.0 - @fusion/engine@0.37.0 - @fusion-plugin-examples/cli-printing-press@0.1.14 - @fusion-plugin-examples/dependency-graph@0.1.28 - @fusion-plugin-examples/roadmap@0.1.16 - @fusion-plugin-examples/cursor-runtime@0.1.16 - @fusion-plugin-examples/droid-runtime@0.1.23 - @fusion-plugin-examples/hermes-runtime@0.2.47 - @fusion-plugin-examples/openclaw-runtime@0.2.47 - @fusion-plugin-examples/paperclip-runtime@0.2.47 ### @fusion/desktop #### Patch Changes - @fusion/core@0.37.0 - @fusion/dashboard@0.37.0 ### @fusion/engine #### Patch Changes - @fusion/core@0.37.0 - @fusion/pi-claude-cli@0.37.0 ### @fusion/plugin-sdk #### Patch Changes - @fusion/core@0.37.0 ### @runfusion/fusion #### Minor Changes - b335f3d: Add a new `fn_goal_show` tool for goal retrieval by ID, including structured JSON output via `details.goal` and a stable not-found contract (`GOAL_NOT_FOUND`). Also register `fn_goal_list` and `fn_goal_show` in the engine readonly tool allowlist so agent runtime sessions can use goal retrieval on the readonly path. #### Patch Changes - 230efa1: Update `useAiMergeCommitSummary` docs/JSDoc to match the intended default of `true`, including that merge commit summaries include a subject plus body summary (narrative + bullets + diff-stat). Also fixes AI merge-mode prompt guidance so AI-authored squash commits include a summarized body instead of subject-only commit messages. - b5f2f91: Do not mark executor sessions as failed when they are parked for pending code review. ### runfusion.ai #### Patch Changes - Updated dependencies [230efa1] - Updated dependencies [b335f3d] - Updated dependencies [b5f2f91] - @runfusion/fusion@0.37.0 ## 0.36.0 ### @fusion/dashboard #### Patch Changes - @fusion/core@0.36.0 - @fusion/engine@0.36.0 - @fusion-plugin-examples/cli-printing-press@0.1.13 - @fusion-plugin-examples/dependency-graph@0.1.27 - @fusion-plugin-examples/roadmap@0.1.15 - @fusion-plugin-examples/cursor-runtime@0.1.15 - @fusion-plugin-examples/droid-runtime@0.1.22 - @fusion-plugin-examples/hermes-runtime@0.2.46 - @fusion-plugin-examples/openclaw-runtime@0.2.46 - @fusion-plugin-examples/paperclip-runtime@0.2.46 ### @fusion/desktop #### Patch Changes - @fusion/core@0.36.0 - @fusion/dashboard@0.36.0 ### @fusion/engine #### Patch Changes - @fusion/core@0.36.0 - @fusion/pi-claude-cli@0.36.0 ### @fusion/plugin-sdk #### Patch Changes - @fusion/core@0.36.0 ### @runfusion/fusion #### Minor Changes - 2a35358: Add Goals REST API (`/api/goals`) with list/create/update/archive/unarchive endpoints. Creating a 6th active goal or unarchiving when already at 5 active now returns HTTP 409 with `ACTIVE_GOAL_LIMIT_EXCEEDED` details. - 009d569: Add `fn goals` CLI subcommand (`list` / `create` / `archive`) and pi extension tools (`fn_goal_list`, `fn_goal_create`, `fn_goal_archive`) for Slice 1 of the Goals primitive. Author-facing only — no agent anchoring yet. #### Patch Changes - f258a75: Fix ntfy JSON publish notifications to encode `priority` as the integer scale expected by ntfy so unicode mailbox/room notifications deliver successfully. - 2c4683a: Widen task detail modal on tablet viewports to use more of the 769px–1024px viewport. - e84673c: Close source-imported GitHub issues when their linked Fusion task is deleted, with parity to tracking-issue delete handling. Dashboard delete confirmation now prompts for `close`, `delete`, or `leave` on source-imported issues and forwards `githubIssueAction` through task deletion flows. For API callers that omit `githubIssueAction` (or send `auto`) on source-imported issue deletes, Fusion now defaults to `close`. - 200dda9: Suppress a misleading transient failure state when a worktree-local `.fusion/tasks//task.json` read briefly returns ENOENT during executor session startup. Fusion now treats this as recoverable, routes through existing auto-recovery, and avoids persisting `status: "failed"`/`error` so the red task-card error banner and failed notification are not shown for self-healed runs. - 6b27ab5: fix(FN-5627): default auto-prerebase to fire when branch is >=1 commit behind integration `decideAutoPrerebase()` previously defaulted `prerebaseDivergenceThreshold` to `0`, which meant the threshold path **never fired** unless the user explicitly set a positive value. Only hot-file matches could trigger prerebase. The result: tasks whose branch was started against an older main tip (because other tasks landed concurrently) would skip prerebase, build their squash commit against the stale base, and then fail at the `git update-ref` step because the squash commit didn't descend from current main. The merger correctly detected this as a non-fast-forward advance and threw `IntegrationBranchConcurrentAdvanceError` — with both "expected" and "observed" SHAs set to the current main tip (because `observedCurrentSha` was captured from the pre-update rev-parse). This produced the misleading "expected X, observed X" same-SHA error signature that stranded FN-5632 stuck at `mergeRetries=3`. New default: `prerebaseDivergenceThreshold = 1`. Any branch behind by at least 1 commit auto-rebases before squash. Users who want the legacy never-fire behavior can explicitly set `prerebaseDivergenceThreshold = 0`. Threshold comparison also changed from `>` to `>=` so an explicit threshold of N rebases at N+ commits behind instead of N+1+. The self-healing classifier comment for `spurious-concurrent-advance-same-sha` is updated to reflect that the signature can come from either the pre-FN-5627 misclassification OR the legitimate post-FN-5627 non-fast-forward path; the auto-recovery sweep is unchanged because both cases self-heal cleanly once prerebase fires on the retry. Tests: - Default threshold (undefined) fires at 1 commit behind - Explicit threshold = 0 stays as opt-out (never fire on commit-count) - Default threshold doesn't fire when branch is up-to-date (commitsBehind=0) - b2d547e: fix(FN-5627): close TOCTOU window between merger optimistic `mergeConfirmed: true` write and integration ref advance, add reachability gate on auto-merge fast-path The merger previously persisted `mergeConfirmed: true` + `commitSha` to the task row as soon as the local squash commit was built, **before** running `git update-ref refs/heads/` to actually advance the integration branch. If the ref-advance then failed for any reason (lock contention, hook rejection, packed-refs race, or a misclassified non-CAS error via the `merger-ref-update-advance.ts` string heuristic), the task row was poisoned: the auto-merge scheduler's `mergeConfirmed` fast-path would silently promote the never-landed work to `done` on the next tick, including emitting `task:merged` and closing the GitHub tracking issue. This affected at least 9 tasks across 2026-05-27/28 (FN-5596, FN-5597, FN-5599, FN-5612, FN-5613, FN-5614, FN-5616, FN-5623, FN-5625) — the merger silently dropped real work and marked the tasks complete. The fix has three layers: 1. **merger.ts** — In `reuseTaskWorktreeMerge` mode, persist `mergeConfirmed: false` initially. Promote to `true` only after `advanceIntegrationBranchRef` returns `advanced: true`. Other merge paths (legacy in-place merge, verified no-op fast-paths, owned-commit recovery) are unchanged because they advance the ref before this point. 2. **project-engine.ts** — Defense-in-depth reachability gate on the auto-merge "merge already confirmed" fast-path. Before `moveTask(taskId, "done")`, verify `git merge-base --is-ancestor ` succeeds. On failure, clear `mergeConfirmed`, mark task `status: "failed"`, leave in `in-review`, and emit `merger:fast-path-blocked-foreign-commit` run-audit event. Legitimate no-op merges (no `commitSha`) bypass the gate. 3. **merger-ref-update-advance.ts** — Replace the fragile string heuristic that classified update-ref failures as `concurrent-advance` (matching `"is at"` / `"expected"` / `"cannot lock ref"` in error text) with structured detection. After update-ref fails, re-read the ref: if observed equals expected, classify as `ref-update-refused` (no actual race occurred). Eliminates the misleading "expected X observed X" same-SHA log signature seen on FN-5625. - 694970b: fix(FN-5627): always rebase behind branches before squash regardless of user-configured prerebase threshold After the FN-5627 default-threshold fix landed (threshold=1 default), tasks were still getting stuck at `mergeRetries=3` with `Integration branch main advanced concurrently (expected X, observed X)` errors because user projects with explicit `prerebaseDivergenceThreshold` values higher than the branch's commits-behind count still skipped prerebase entirely. Example: a project with `prerebaseDivergenceThreshold: 50` for low-noise PR experience would skip prerebase on a task branched 4 commits behind main. The squash commit then doesn't descend from current main, and `git update-ref` correctly refuses the non-fast-forward advance — producing the misleading same-SHA error signature that stranded FN-5626, FN-5628, FN-5633. Root distinction missed in the earlier fix: the user-configurable `prerebaseDivergenceThreshold` controls the _user-visible severity reporting_ ("this branch is N commits behind"), while engine correctness requires a _safety invariant_ ("any branch behind main MUST be rebased before squash, or update-ref will fail"). These are independent concerns. New behavior: - After the hot-file and threshold checks, `decideAutoPrerebase()` now returns `fire: true` with `reason: "safety-fallback-any-divergence"` whenever `commitsBehind > 0`. - The threshold-based path still wins when tripped (so user-visible audit `reason` reflects the configured policy when applicable). - Full opt-out remains `prerebaseAutoEnabled: false` — that case skips the safety fallback too, and the user accepts that behind-branch merges will fail. - `prerebaseDivergenceThreshold: 0` is no longer a complete opt-out from the commit-count gate — it only suppresses the threshold-based reason label. Safety fallback still fires. Tests: - New `safety-fallback-any-divergence` reason added to `AutoPrerebaseDecision.reason` union. - 4 commits behind with threshold=50 → fires via safety fallback (was: skipped). - `prerebaseAutoEnabled=false` → no fire (full opt-out preserved). - Configured threshold tripping still wins the `reason` label. - Branch fully up-to-date (commitsBehind=0) → no-divergence (unchanged). - 5768d5e: feat(FN-5627): self-heal transient merge failures stuck at mergeRetries=3 After the FN-5627 merger fix landed, two in-review tasks (FN-5628, FN-5632) remained stuck at `mergeRetries=3` with `status='failed'` due to transient merge errors that the merger correctly identified but had no auto-recovery for: - `lease-handoff-failed: target-not-queued` — FN-5353 class race where the merge queue lease acquisition saw the task drop out of the queue between enqueue and handoff (typically due to a self-healing sweep cleaning stale `mergeQueue` rows mid-flight). - Legacy same-SHA spurious concurrent-advance errors persisted before FN-5627's `merger-ref-update-advance.ts` classifier fix landed. These tasks had no path forward except manual intervention. The `AUTO_MERGE_COOLDOWN_MS` cooldown reset takes hours and gives up too easily. This change adds `SelfHealingManager.recoverTransientMergeFailures()`, wired into both startup recovery and the periodic Batch 2 maintenance loop. For each in-review task with `mergeRetries >= MAX_AUTO_MERGE_RETRIES`, `status='failed'`, and an `error` matching `classifyTransientMergeError()`: 1. Reset `mergeRetries=0`, clear `status`/`error`. 2. Increment `mergeDetails.transientRecoveryCount` (new field on `MergeDetails`). 3. Re-enqueue via `requeueForAutoMerge`. 4. Emit `merger:transient-failure-auto-recovered` run-audit event. Bounded by `MAX_TRANSIENT_MERGE_RECOVERIES = 2` to avoid infinite loops on genuinely stuck tasks. Once exhausted, the task stays parked as failed and emits `merger:transient-failure-budget-exhausted` once with a `[transient-recovery-budget-exhausted]` marker on `error` for repeat-suppression. Non-transient failure classes (verification, build, real conflicts, etc.) are not eligible — only the pattern-matched transient classes auto-recover. No-op when `autoMerge=false`, no `requeueForAutoMerge` callback wired, or pause is active. Tests: - Lease-handoff transient recovery path - Same-SHA spurious-advance recovery (legacy pre-FN-5627) - Genuine concurrent-advance (different SHAs) NOT recovered - Non-transient failures (verification errors) NOT recovered - Budget exhaustion behavior - autoMerge=false no-op - e75c4da: fix(FN-5627): suppress ntfy notifications for transient merge failures the engine auto-recovers Even with the FN-5627 merger TOCTOU fix + transient-failure self-healing sweep + safety-fallback auto-prerebase landed, the merger can still hit transient failure classes (lease handoff races, brief same-SHA non-FF advances) for tasks whose branches are particularly out-of-sync. The self-healing sweep auto-recovers them within bounded budget — but each individual failure cycle was firing a ntfy alarm before the recovery cleared the failed state, producing user-facing alarm spam for tasks that were never actually stuck. Two layers of fix: 1. `NotificationService.handleTaskUpdated` now classifies `task.error` via the new shared `classifyTransientMergeError` helper before scheduling the deferred failure notification. Transient classes (`lease-handoff-target-not-queued`, `spurious-concurrent-advance-same-sha`) get logged as suppressed and never schedule a ntfy timer. 2. Defense-in-depth: `fireDeferredFailureNotification` re-classifies the error at dispatch time, so a failure scheduled before the suppression landed on a newer cycle still suppresses if the error matches a transient class. The classifier itself moved from `self-healing.ts` to a new logger-free `transient-merge-error-classifier.ts` module so consumers in `NotificationService` don't pull `createLogger` through the import chain and break test mocks of `../logger.js`. `self-healing.ts` re-exports the symbol for backward compatibility. Log prefix for the recovery actions also changed from `[FN-5627] Auto-recovering...` to `Auto-recovered:` so that `NotificationService.maybeSuppressTransientFailedNotification`'s existing `/^Auto-recovered:/` log-prefix check cancels any already-scheduled failure notification when the sweep runs mid-grace-window. Tests: - 3 new notification-service tests covering transient suppression for both error classes plus a control case ensuring genuine non-transient failures still notify. - Existing transient-recovery tests in self-healing.test.ts continue to pass against the relocated classifier. - b2dce7d: FN-5631 re-lands FN-5616 to add an opt-in `githubCloseSourceIssueOnDone` setting that closes source-imported GitHub issues when linked tasks are completed, including startup reconciliation for previously missed closes. - 1153b09: feat(FN-5637): update `fn init` to add `fusion.db`, `fusion.db-wal`, and `fusion.db-shm` to project `.gitignore` alongside `.fusion` and `.pi` so stray runtime SQLite files are not committed. - 5b5da2c: Fix bundled runtime plugin auto-install in globally installed CLI builds. Save/Save & Test for Paperclip, Hermes, OpenClaw, Cursor, and Droid runtime providers no longer fails with `unavailable in this build` when bundled plugins are present under `dist/plugins/`. - b96b0bc: Fix `fn update` npm EEXIST bin-link collisions by retrying once with `--force` and showing manual recovery guidance when the retry fails. - 2a35358: Add a new project-level `goals` table to the core schema and fresh database DDL. Bump `SCHEMA_VERSION` from 91 to 92 with an idempotent migration that creates `goals` and `idxGoalsStatus`. - 29ac58f: feat(FN-5633): standalone AI merge path (clean-room merge + AI reviewer) Adds a self-contained AI merge path (`merger.mode: "ai"`, the new default) that the engine dispatches to instead of the legacy `aiMergeTask` pipeline. It does not share the legacy scaffolding (prerebase / conflict-strategy ladder / post-merge audit / transient self-heal), which was buggy and error-prone. How it works: - **Clean room**: a throwaway detached worktree is created at the target branch's current tip, so the user's real checkout is never the merge surface — dirty files cannot be clobbered and the landing is a fast-forward by construction. - **AI merge**: an AI agent merges the task branch into the clean room and produces one squash commit, resolving conflicts in favor of the task's intent. - **AI reviewer with retries**: a fresh read-only reviewer audits the squash (completeness / collateral / conflict-soundness) and classifies any veto blocking vs advisory. It drives up to `merger.maxReviewPasses` corrective re-merges. After the budget, advisory concerns land with a logged warning; an unfixable BLOCKING (correctness) concern hard-fails (`AiMergeBlockedError`) rather than ship wrong code. Verdict parsing fails safe to blocking. - **Per-task target branch**: each task merges into its own target branch (or the default integration branch). The local checkout is only synced when it is on that target. - **Local checkout sync**: when the checkout is on the target branch, the ref + working tree advance together via `git merge --ff-only` (dirty state read accurately before the move); dirty edits are stashed, fast-forwarded, and restored — and if the restore conflicts the AI merger reconciles them (the original edits are also kept in a stash as a backup). A checkout on a different branch is advanced via `update-ref` and left untouched. Un-stashable dirty state advances the ref and leaves the working tree with a warning. Concurrent advances trigger a bounded rebuild on the new tip. - **Status + logs**: progress (merging / reviewing / corrective passes / landing / blocked / landed) is written to the task status pill and the task log stream. Settings: `merger.mode` (`ai` default / `deterministic` legacy), `merger.reviewerModel`, `merger.maxReviewPasses` (default 3), surfaced in Settings → Merge. When AI merge is on, the legacy merge-mechanics settings (integration worktree, conflict strategy, overlap guard, post-merge audit, direct-commit routing) are hidden since they do not apply. Commit message: the AI agent writes the squash commit subject as a concise summary of the actual changes (not just the task title), and every landed squash carries the board-association trailers — `Fusion-Task-Id: ` plus the canonical lineage trailer when the task has a `lineageId` — guaranteed via an idempotent amend even if the agent omits them, so the board associates the commit with the task. Verification: the merge agent is instructed to run the project's tests, type-check, and lint after resolving the merge and to fix any NEW failure the merge introduced (without being on the hook for pre-existing breakage) before committing. Editable prompt: the AI merge agent's base persona is the editable "merger" role prompt (Settings → Prompts); the non-negotiable clean-room / verification / commit-trailer rules are always appended so a custom prompt can't drop them. Reviewer model: the reviewer agent uses the project's reviewer/validator model lane (`resolveValidatorSettingsModel`: project validator → global validator → project default), not a merge-specific setting. No-branch guard: a missing task branch is a benign no-op only when the task was never executed or was already merged (branch cleaned up on re-process); if the task was executed (`baseCommitSha` recorded) and was never merged, the merge fails loudly rather than silently marking the task done. The legacy `aiMergeTask` pipeline is retained unchanged and used when `merger.mode: "deterministic"`. Tests: `merger-ai.test.ts` covers the verdict parser, clean merge, blocking hard-fail (no advance), advisory land, empty no-op, per-task target branch isolation, missing-target-branch error, and `landSquash` (clean ff, other-branch update-ref, dirty stash-restore, AI-resolved restore conflict). Engine merge-orchestration tests that assert the legacy path are pinned to `merger.mode: "deterministic"`. - cec191e: Migrate Fusion's pi dependencies from `@mariozechner/pi-coding-agent` / `@mariozechner/pi-ai` to the new `@earendil-works/*` scope and bump to `^0.77.0`. This follows the upstream project move to `https://github.com/earendil-works/pi` and updates transitive dependency resolution to the maintained package namespace. - aa7eccb: When `useAiMergeCommitSummary` is enabled, AI-authored merge commits now include a richer body: the short narrative headline plus an AI-generated bullet summary of changed modules/files, followed by a `Files changed` diff stat block. `mergeDetails.mergeCommitMessage` remains the short headline summary so dashboard UI consumers keep their existing concise display behavior. - d78fbcc: Fix GitHub PR modal/review fetches that call `gh api` through `runGhJsonAsync`. `runGhJson` and `runGhJsonAsync` now skip auto-appending `--json` for the `gh api` subcommand (which already returns JSON and rejects that flag), preventing runtime `unknown flag: --json` errors when loading PR comments/reviews. - 2df891f: ci: re-enable auto-trigger of binary release workflow on `v*` tags so GitHub Releases include CLI and desktop binaries ### runfusion.ai #### Patch Changes - Updated dependencies [f258a75] - Updated dependencies [2c4683a] - Updated dependencies [e84673c] - Updated dependencies [2a35358] - Updated dependencies [009d569] - Updated dependencies [200dda9] - Updated dependencies [6b27ab5] - Updated dependencies [b2d547e] - Updated dependencies [694970b] - Updated dependencies [5768d5e] - Updated dependencies [e75c4da] - Updated dependencies [b2dce7d] - Updated dependencies [1153b09] - Updated dependencies [5b5da2c] - Updated dependencies [b96b0bc] - Updated dependencies [2a35358] - Updated dependencies [29ac58f] - Updated dependencies [cec191e] - Updated dependencies [aa7eccb] - Updated dependencies [d78fbcc] - Updated dependencies [2df891f] - @runfusion/fusion@0.36.0 ## 0.35.0 ### @fusion/dashboard #### Patch Changes - Updated dependencies [1992049] - @fusion/engine@0.35.0 - @fusion-plugin-examples/cli-printing-press@0.1.12 - @fusion-plugin-examples/dependency-graph@0.1.26 - @fusion-plugin-examples/roadmap@0.1.14 - @fusion/core@0.35.0 - @fusion-plugin-examples/cursor-runtime@0.1.14 - @fusion-plugin-examples/droid-runtime@0.1.21 - @fusion-plugin-examples/hermes-runtime@0.2.45 - @fusion-plugin-examples/openclaw-runtime@0.2.45 - @fusion-plugin-examples/paperclip-runtime@0.2.45 ### @fusion/desktop #### Patch Changes - @fusion/dashboard@0.35.0 - @fusion/core@0.35.0 ### @fusion/engine #### Minor Changes - 1992049: Add opt-in RTK command rewriting for Pi bash tools via `FUSION_RTK_REWRITE`. #### Patch Changes - @fusion/core@0.35.0 - @fusion/pi-claude-cli@0.35.0 ### @fusion/plugin-sdk #### Patch Changes - @fusion/core@0.35.0 ### @runfusion/fusion #### Minor Changes - d767e2e: Add `openai-responses` as a supported custom provider `apiType` across CLI, engine, dashboard API validation, and dashboard forms. Custom providers configured with this apiType now route through pi-ai's built-in `openai-responses` transport while probe-model discovery continues to use the OpenAI-compatible `/v1/models` path. #### Patch Changes - da34bd0: Dashboard now shows a top-level "Re-login required" banner when a stored OAuth provider credential (Codex, Claude, etc.) has expired, and the engine logs the expired set on startup and once every 24 hours. - d76b6f9: TUI System panel now reliably shows the full auth token at all terminal widths so it can be selected and copied manually when the `[c]` shortcut is unavailable. - d767e2e: Fixed custom provider registration so provider keys are derived from the configured provider name (with deterministic collision suffixing) instead of internal UUID ids, ensuring model selector and logs show stable human-readable keys. Also fixed the OpenAI-compatible custom-provider registration path by validating end-to-end openai-completions round-trip behavior with a regression test. - 8a0fbf0: Fix the Bun-compiled `fn` executable so `--help` no longer crashes with a missing `react-devtools-core` module. The build now defines `process.env.DEV` as `false` during compile, allowing Ink's DEV-only devtools import path to be removed from the bundled binary. ### runfusion.ai #### Patch Changes - Updated dependencies [da34bd0] - Updated dependencies [d76b6f9] - Updated dependencies [d767e2e] - Updated dependencies [d767e2e] - Updated dependencies [8a0fbf0] - @runfusion/fusion@0.35.0 ## 0.34.0 ### @fusion/core #### Patch Changes - 6a6c6fd: Dashboard startup and request-storm fixes: - **Faster startup**: parallelized independent store inits, started CentralCore init early in background, and ran plugin loading concurrently with extension resolution. The duplicate-runtime root cause is also fixed — `shouldUseHybridExecutor` no longer auto-enables for local-only multi-project setups, where `ProjectEngineManager` already handles project lifecycle (set `FUSION_HYBRID_EXECUTOR=1` to force-enable). Eliminates ~7s of redundant self-healing pipeline work per cold start. - **Per-page request reduction**: added in-flight request dedupe (`packages/dashboard/app/api/dedupe.ts`) wrapped around the top API offenders. A single page load went from ~177 requests to ~101, with `/api/plugins/ui-slots` dropping from 17× to 1×. - **Stale-data-after-mutation hazard**: `forceFresh` option on the deduped fetchers now redirects ALL in-flight waiters to receive the fresh post-mutation response, not just the forcing caller. Generation counters in `useAgents` and `AgentListModal` provide a second layer of protection against slow polls overwriting fresh state. - **SSE refresh storm**: agent SSE event handler now debounces (250ms) with a trailing-edge guard, so multi-agent activity bursts coalesce to at most 2 refetches per burst instead of one per event. - **Live isolation-mode transition**: PATCH `/api/projects/:id` with an `isolationMode` change now returns a 503 with actionable guidance when HybridExecutor is unavailable (local-only single-node), instead of silently persisting a config that the live runtime won't honor. - **Error handling regression**: restored try/catch around `HybridExecutor.initialize` and `engineManager.ensureEngine` in the parallel engine setup so a paused or broken cwd project no longer aborts dashboard startup. - **TaskStore migration race**: sequenced the SQLite store inits (TaskStore → AutomationStore → PluginStore → AgentStore) since they all open the same `.fusion/fusion.db` and run `addColumnIfMissing` migrations with a TOCTOU `hasColumn` → `ALTER` pattern. - **`gh` CLI invocation storm**: `isGhAvailable()` and `isGhAuthenticated()` now memoize their results with a 60s TTL. `GitHubTrackingReconciler` was scanning up to 200 done tasks at startup and calling `hasGhAuth()` per task — each call shelled out to `gh --version` and `gh auth status` (which makes a network roundtrip), pinning the event loop for ~60s of synchronous `spawnSync` work. CPU-profile-confirmed: dropped from 71s (69% of cold-start CPU) to 2s. The cache benefits all 28+ call sites in `dashboard/src/github.ts`, the engine PR monitor, the research provider, and the API routes automatically. `resetGhAvailabilityCache()` is exported for login/logout flows that need to invalidate immediately. - **SQLite integrity check delay**: `PRAGMA integrity_check(100)` walks every page of the database file and was scheduled 3 seconds after init — landing right in the responsiveness-critical window for ~7s per database. Pushed the deferred-check timer to 60 seconds so the user is already interacting with the dashboard by the time it runs. The check itself is unchanged; corruption detection still works. - **Engine init event-loop yields**: `InProcessRuntime.start()` now awaits a `setImmediate`-based yield between major init phases (TaskStore → Plugins → WorktreePool → AgentStore → Scheduler → Executor → HeartbeatMonitor → SelfHealing) so HTTP requests can be processed between them instead of waiting on the entire stack. Same yield is now interleaved between each step of `SelfHealingManager.runStartupRecovery()` (34 steps per project) and its periodic maintenance batches. - **Deferred startup recovery**: `InProcessRuntime.start()` no longer awaits `resumeStartupRecoverySequence()` or `workerManager.reconcileOrphaned()` — both are correctness-preserving background operations and their git/SQLite work was blocking server-listen for several seconds. - **Deferred orphan-task AI agent resumption**: orphaned in-progress tasks resumed at engine restart now wait 30 seconds before spawning their AI agent session (worktree setup + pi-coding-agent session creation is heavy and saturates the event loop). Override via `FUSION_RESUME_ORPHAN_DELAY_MS=`; auto-zeroes under Vitest. - **Event-loop lag tracer**: opt-in debug aid for diagnosing cold-start regressions. Set `FUSION_TRACE_EL_LAG=/path/to/file.txt` to capture every block >150ms with a timestamp relative to process start. ### @fusion/dashboard #### Patch Changes - 6a6c6fd: Dashboard startup and request-storm fixes: - **Faster startup**: parallelized independent store inits, started CentralCore init early in background, and ran plugin loading concurrently with extension resolution. The duplicate-runtime root cause is also fixed — `shouldUseHybridExecutor` no longer auto-enables for local-only multi-project setups, where `ProjectEngineManager` already handles project lifecycle (set `FUSION_HYBRID_EXECUTOR=1` to force-enable). Eliminates ~7s of redundant self-healing pipeline work per cold start. - **Per-page request reduction**: added in-flight request dedupe (`packages/dashboard/app/api/dedupe.ts`) wrapped around the top API offenders. A single page load went from ~177 requests to ~101, with `/api/plugins/ui-slots` dropping from 17× to 1×. - **Stale-data-after-mutation hazard**: `forceFresh` option on the deduped fetchers now redirects ALL in-flight waiters to receive the fresh post-mutation response, not just the forcing caller. Generation counters in `useAgents` and `AgentListModal` provide a second layer of protection against slow polls overwriting fresh state. - **SSE refresh storm**: agent SSE event handler now debounces (250ms) with a trailing-edge guard, so multi-agent activity bursts coalesce to at most 2 refetches per burst instead of one per event. - **Live isolation-mode transition**: PATCH `/api/projects/:id` with an `isolationMode` change now returns a 503 with actionable guidance when HybridExecutor is unavailable (local-only single-node), instead of silently persisting a config that the live runtime won't honor. - **Error handling regression**: restored try/catch around `HybridExecutor.initialize` and `engineManager.ensureEngine` in the parallel engine setup so a paused or broken cwd project no longer aborts dashboard startup. - **TaskStore migration race**: sequenced the SQLite store inits (TaskStore → AutomationStore → PluginStore → AgentStore) since they all open the same `.fusion/fusion.db` and run `addColumnIfMissing` migrations with a TOCTOU `hasColumn` → `ALTER` pattern. - **`gh` CLI invocation storm**: `isGhAvailable()` and `isGhAuthenticated()` now memoize their results with a 60s TTL. `GitHubTrackingReconciler` was scanning up to 200 done tasks at startup and calling `hasGhAuth()` per task — each call shelled out to `gh --version` and `gh auth status` (which makes a network roundtrip), pinning the event loop for ~60s of synchronous `spawnSync` work. CPU-profile-confirmed: dropped from 71s (69% of cold-start CPU) to 2s. The cache benefits all 28+ call sites in `dashboard/src/github.ts`, the engine PR monitor, the research provider, and the API routes automatically. `resetGhAvailabilityCache()` is exported for login/logout flows that need to invalidate immediately. - **SQLite integrity check delay**: `PRAGMA integrity_check(100)` walks every page of the database file and was scheduled 3 seconds after init — landing right in the responsiveness-critical window for ~7s per database. Pushed the deferred-check timer to 60 seconds so the user is already interacting with the dashboard by the time it runs. The check itself is unchanged; corruption detection still works. - **Engine init event-loop yields**: `InProcessRuntime.start()` now awaits a `setImmediate`-based yield between major init phases (TaskStore → Plugins → WorktreePool → AgentStore → Scheduler → Executor → HeartbeatMonitor → SelfHealing) so HTTP requests can be processed between them instead of waiting on the entire stack. Same yield is now interleaved between each step of `SelfHealingManager.runStartupRecovery()` (34 steps per project) and its periodic maintenance batches. - **Deferred startup recovery**: `InProcessRuntime.start()` no longer awaits `resumeStartupRecoverySequence()` or `workerManager.reconcileOrphaned()` — both are correctness-preserving background operations and their git/SQLite work was blocking server-listen for several seconds. - **Deferred orphan-task AI agent resumption**: orphaned in-progress tasks resumed at engine restart now wait 30 seconds before spawning their AI agent session (worktree setup + pi-coding-agent session creation is heavy and saturates the event loop). Override via `FUSION_RESUME_ORPHAN_DELAY_MS=`; auto-zeroes under Vitest. - **Event-loop lag tracer**: opt-in debug aid for diagnosing cold-start regressions. Set `FUSION_TRACE_EL_LAG=/path/to/file.txt` to capture every block >150ms with a timestamp relative to process start. - Updated dependencies [6a6c6fd] - Updated dependencies [97f1143] - Updated dependencies [4e4830f] - @fusion/engine@0.34.0 - @fusion/core@0.34.0 - @fusion-plugin-examples/cli-printing-press@0.1.11 - @fusion-plugin-examples/dependency-graph@0.1.25 - @fusion-plugin-examples/roadmap@0.1.13 - @fusion-plugin-examples/cursor-runtime@0.1.13 - @fusion-plugin-examples/droid-runtime@0.1.20 - @fusion-plugin-examples/hermes-runtime@0.2.44 - @fusion-plugin-examples/openclaw-runtime@0.2.44 - @fusion-plugin-examples/paperclip-runtime@0.2.44 ### @fusion/desktop #### Patch Changes - Updated dependencies [6a6c6fd] - @fusion/dashboard@0.34.0 - @fusion/core@0.34.0 ### @fusion/engine #### Minor Changes - 97f1143: Add optional dependencies parameter to fn_task_update tool. Executors can now programmatically modify task dependency arrays during execution with `fn_task_update({ id: "FN-XXX", dependencies: ["FN-001", "FN-002"] })`. The parameter is optional and backward-compatible; omitting it preserves existing dependencies. Includes validation for self-dependency and non-existent task IDs. Eliminates the need for direct task.json editing workarounds. #### Patch Changes - 6a6c6fd: Dashboard startup and request-storm fixes: - **Faster startup**: parallelized independent store inits, started CentralCore init early in background, and ran plugin loading concurrently with extension resolution. The duplicate-runtime root cause is also fixed — `shouldUseHybridExecutor` no longer auto-enables for local-only multi-project setups, where `ProjectEngineManager` already handles project lifecycle (set `FUSION_HYBRID_EXECUTOR=1` to force-enable). Eliminates ~7s of redundant self-healing pipeline work per cold start. - **Per-page request reduction**: added in-flight request dedupe (`packages/dashboard/app/api/dedupe.ts`) wrapped around the top API offenders. A single page load went from ~177 requests to ~101, with `/api/plugins/ui-slots` dropping from 17× to 1×. - **Stale-data-after-mutation hazard**: `forceFresh` option on the deduped fetchers now redirects ALL in-flight waiters to receive the fresh post-mutation response, not just the forcing caller. Generation counters in `useAgents` and `AgentListModal` provide a second layer of protection against slow polls overwriting fresh state. - **SSE refresh storm**: agent SSE event handler now debounces (250ms) with a trailing-edge guard, so multi-agent activity bursts coalesce to at most 2 refetches per burst instead of one per event. - **Live isolation-mode transition**: PATCH `/api/projects/:id` with an `isolationMode` change now returns a 503 with actionable guidance when HybridExecutor is unavailable (local-only single-node), instead of silently persisting a config that the live runtime won't honor. - **Error handling regression**: restored try/catch around `HybridExecutor.initialize` and `engineManager.ensureEngine` in the parallel engine setup so a paused or broken cwd project no longer aborts dashboard startup. - **TaskStore migration race**: sequenced the SQLite store inits (TaskStore → AutomationStore → PluginStore → AgentStore) since they all open the same `.fusion/fusion.db` and run `addColumnIfMissing` migrations with a TOCTOU `hasColumn` → `ALTER` pattern. - **`gh` CLI invocation storm**: `isGhAvailable()` and `isGhAuthenticated()` now memoize their results with a 60s TTL. `GitHubTrackingReconciler` was scanning up to 200 done tasks at startup and calling `hasGhAuth()` per task — each call shelled out to `gh --version` and `gh auth status` (which makes a network roundtrip), pinning the event loop for ~60s of synchronous `spawnSync` work. CPU-profile-confirmed: dropped from 71s (69% of cold-start CPU) to 2s. The cache benefits all 28+ call sites in `dashboard/src/github.ts`, the engine PR monitor, the research provider, and the API routes automatically. `resetGhAvailabilityCache()` is exported for login/logout flows that need to invalidate immediately. - **SQLite integrity check delay**: `PRAGMA integrity_check(100)` walks every page of the database file and was scheduled 3 seconds after init — landing right in the responsiveness-critical window for ~7s per database. Pushed the deferred-check timer to 60 seconds so the user is already interacting with the dashboard by the time it runs. The check itself is unchanged; corruption detection still works. - **Engine init event-loop yields**: `InProcessRuntime.start()` now awaits a `setImmediate`-based yield between major init phases (TaskStore → Plugins → WorktreePool → AgentStore → Scheduler → Executor → HeartbeatMonitor → SelfHealing) so HTTP requests can be processed between them instead of waiting on the entire stack. Same yield is now interleaved between each step of `SelfHealingManager.runStartupRecovery()` (34 steps per project) and its periodic maintenance batches. - **Deferred startup recovery**: `InProcessRuntime.start()` no longer awaits `resumeStartupRecoverySequence()` or `workerManager.reconcileOrphaned()` — both are correctness-preserving background operations and their git/SQLite work was blocking server-listen for several seconds. - **Deferred orphan-task AI agent resumption**: orphaned in-progress tasks resumed at engine restart now wait 30 seconds before spawning their AI agent session (worktree setup + pi-coding-agent session creation is heavy and saturates the event loop). Override via `FUSION_RESUME_ORPHAN_DELAY_MS=`; auto-zeroes under Vitest. - **Event-loop lag tracer**: opt-in debug aid for diagnosing cold-start regressions. Set `FUSION_TRACE_EL_LAG=/path/to/file.txt` to capture every block >150ms with a timestamp relative to process start. - 4e4830f: Fix two bugs that compounded to produce bare `feat(FN-XXXX): merge fusion/fn-XXXX` merge commits in the dashboard: - **`Provided value cannot be bound to SQLite parameter 4` (TypeError) mid-merge**: the verification-fix finalize path called `upsertTaskCommitAssociation` with `commitSha` derived from a `git rev-parse HEAD` whose surrounding exec could reject under the parallel-attempt race, leaving `commitSha` undefined when bound to positional parameter 4. Extracted both duplicated callsites into a `recordCommitAssociationFromHead` helper that catches exec failures and validates each git output is non-empty before binding. The merge no longer fails over a denormalized lookup write when the commit itself landed cleanly. - **Bare-fallback subjects persisted into `mergeDetails.mergeCommitMessage`**: when `buildDeterministicMergeMessage`'s tier-3 fallback (`merge ${branch}`) made it onto a landed commit, the four `classification.commit.subject` / `landedCommit.subject` recovery sites in `self-healing.ts` and `aiMergeTask` copied that bare subject verbatim into `mergeDetails`. Added `regenerateBareMergeSubject` (in a new `merger-bare-subject.ts` module to keep self-healing's import graph narrow) which detects the bare pattern via `BARE_MERGE_SUBJECT_RE` and regenerates a descriptive subject from the landed commit's diff stat via the existing AI commit-subject summarizer. Cosmetic only — the git commit is never amended; the regenerated subject only populates the persisted `mergeDetails` and the in-process `MergeResult`. Gated by `settings.useAiMergeCommitSummary`. - Updated dependencies [6a6c6fd] - @fusion/core@0.34.0 - @fusion/pi-claude-cli@0.34.0 ### @fusion/plugin-sdk #### Patch Changes - Updated dependencies [6a6c6fd] - @fusion/core@0.34.0 ### @runfusion/fusion #### Minor Changes - 5eacd79: Add optional `baseBranch` support to mission creation and task planning flows. - `fn_mission_create` now accepts `baseBranch` to persist a mission-level default integration branch. - Mission feature/slice triage inherits mission `baseBranch` when no explicit triage base branch is supplied. - `fn_task_plan`/CLI planning paths now accept and forward `baseBranch` to created tasks. - 1fb905a: Planning Mode now lets you pick a branch strategy (project default, auto-named, existing, or custom new) and an optional base/merge-target branch when creating a task from a completed planning session. #### Patch Changes - 0a6da9f: Fix ntfy notification deep links: project-only links now switch projects, and task links to non-current projects resolve against the correct project before opening the modal. - 06a107d: Fix triage/executor not swapping to the configured planning fallback model when the primary provider's API key is missing (or returns 401/403/rate-limit). The top-level `promptWithFallback` now delegates to the rich session-attached path (which runs `isRetryableModelSelectionError` and `swapPromptSession`), with a WeakSet re-entry guard preserving the FN-4900 recursion fix. - 88c465c: Fix two engine reliability bugs surfaced by CI sharding repair: - Self-healing in-review branch rebind now dedups case-variant candidate refs by resolved SHA rather than lowercase name, so two distinct branches sharing a case-insensitive name on case-sensitive filesystems (Linux) are correctly flagged as ambiguous instead of one being silently picked. - CI test sharding: removed the `--` separator between `pnpm test` and `--shard`, which vitest's CLI parser was treating as end-of-flags and turning the shard selector into a positional file filter — silently disabling sharding so every shard ran the full suite. Test shards now run their actual slice. - CI test-shards jobs now check out with `fetch-depth: 0` so engine tests that depend on real git history (merge-base, ref resolution) behave the same on CI as locally. - PR Checks workflow now also runs on push to `main`, so post-merge regressions surface immediately instead of waiting for the next PR. - 6a6c6fd: Dashboard startup and request-storm fixes: - **Faster startup**: parallelized independent store inits, started CentralCore init early in background, and ran plugin loading concurrently with extension resolution. The duplicate-runtime root cause is also fixed — `shouldUseHybridExecutor` no longer auto-enables for local-only multi-project setups, where `ProjectEngineManager` already handles project lifecycle (set `FUSION_HYBRID_EXECUTOR=1` to force-enable). Eliminates ~7s of redundant self-healing pipeline work per cold start. - **Per-page request reduction**: added in-flight request dedupe (`packages/dashboard/app/api/dedupe.ts`) wrapped around the top API offenders. A single page load went from ~177 requests to ~101, with `/api/plugins/ui-slots` dropping from 17× to 1×. - **Stale-data-after-mutation hazard**: `forceFresh` option on the deduped fetchers now redirects ALL in-flight waiters to receive the fresh post-mutation response, not just the forcing caller. Generation counters in `useAgents` and `AgentListModal` provide a second layer of protection against slow polls overwriting fresh state. - **SSE refresh storm**: agent SSE event handler now debounces (250ms) with a trailing-edge guard, so multi-agent activity bursts coalesce to at most 2 refetches per burst instead of one per event. - **Live isolation-mode transition**: PATCH `/api/projects/:id` with an `isolationMode` change now returns a 503 with actionable guidance when HybridExecutor is unavailable (local-only single-node), instead of silently persisting a config that the live runtime won't honor. - **Error handling regression**: restored try/catch around `HybridExecutor.initialize` and `engineManager.ensureEngine` in the parallel engine setup so a paused or broken cwd project no longer aborts dashboard startup. - **TaskStore migration race**: sequenced the SQLite store inits (TaskStore → AutomationStore → PluginStore → AgentStore) since they all open the same `.fusion/fusion.db` and run `addColumnIfMissing` migrations with a TOCTOU `hasColumn` → `ALTER` pattern. - **`gh` CLI invocation storm**: `isGhAvailable()` and `isGhAuthenticated()` now memoize their results with a 60s TTL. `GitHubTrackingReconciler` was scanning up to 200 done tasks at startup and calling `hasGhAuth()` per task — each call shelled out to `gh --version` and `gh auth status` (which makes a network roundtrip), pinning the event loop for ~60s of synchronous `spawnSync` work. CPU-profile-confirmed: dropped from 71s (69% of cold-start CPU) to 2s. The cache benefits all 28+ call sites in `dashboard/src/github.ts`, the engine PR monitor, the research provider, and the API routes automatically. `resetGhAvailabilityCache()` is exported for login/logout flows that need to invalidate immediately. - **SQLite integrity check delay**: `PRAGMA integrity_check(100)` walks every page of the database file and was scheduled 3 seconds after init — landing right in the responsiveness-critical window for ~7s per database. Pushed the deferred-check timer to 60 seconds so the user is already interacting with the dashboard by the time it runs. The check itself is unchanged; corruption detection still works. - **Engine init event-loop yields**: `InProcessRuntime.start()` now awaits a `setImmediate`-based yield between major init phases (TaskStore → Plugins → WorktreePool → AgentStore → Scheduler → Executor → HeartbeatMonitor → SelfHealing) so HTTP requests can be processed between them instead of waiting on the entire stack. Same yield is now interleaved between each step of `SelfHealingManager.runStartupRecovery()` (34 steps per project) and its periodic maintenance batches. - **Deferred startup recovery**: `InProcessRuntime.start()` no longer awaits `resumeStartupRecoverySequence()` or `workerManager.reconcileOrphaned()` — both are correctness-preserving background operations and their git/SQLite work was blocking server-listen for several seconds. - **Deferred orphan-task AI agent resumption**: orphaned in-progress tasks resumed at engine restart now wait 30 seconds before spawning their AI agent session (worktree setup + pi-coding-agent session creation is heavy and saturates the event loop). Override via `FUSION_RESUME_ORPHAN_DELAY_MS=`; auto-zeroes under Vitest. - **Event-loop lag tracer**: opt-in debug aid for diagnosing cold-start regressions. Set `FUSION_TRACE_EL_LAG=/path/to/file.txt` to capture every block >150ms with a timestamp relative to process start. - bad6759: Enable editing the agent name during the review step of the New Agent dialog. - 7f01b53: Fix chat session API endpoints ignoring `projectId` in multi-project mode. `GET /chat/sessions`, `GET /chat/sessions/:id`, `GET /chat/sessions/:id/messages` and related mutation endpoints all used `options.chatStore` (the home-directory project's store) regardless of the `projectId` query parameter. In a multi-project daemon (e.g. running from `~/`) sessions belonging to secondary projects were invisible — list returned empty, fetching by ID returned 404. Root cause: `registerChatRoutes` accessed `options.chatStore` directly instead of routing through the per-project `resolveProjectChatContext` helper (already used correctly by `registerChatRoomRoutes` for the rooms API). Fix: introduce a `resolveScopedChatStore(projectId)` helper inside `registerChatRoutes` that delegates to `resolveProjectChatContext`, and replace all ten `options.chatStore` usages with calls to this helper. When `engineManager` is present and has an engine for the given `projectId`, the engine's own `ChatStore` is used; otherwise falls back to the default store (backward compatible). - 64056b3: Fix `useChat` truncating sessions longer than 50 messages on initial open. `loadMessages()` fetched `{ limit: 50 }` for the initial load. The `loadMoreMessages` callback was never called from `ChatView` (no scroll sentinel exists), so sessions beyond 50 messages were permanently cut off. Fix: introduce `fetchAllMessagesInChat()` that paginates through the API's 200-message cap and replace the initial load path. A stale-session guard (via `activeSessionRef`) prevents overwriting a switched session's messages. The forward-pagination path (`isPaginationRequest = true`) is preserved unchanged for backward compatibility. - 629aa29: Fix Windows compatibility in cloudflared install fallback by replacing `execFileAsync("mkdir", ["-p", ...])` with `fs.mkdir({ recursive: true })`. The shell-level `-p` flag is Unix-only and breaks installation on Windows cmd.exe with "A subdirectory or file -p already exists". The worktree-hooks fix from the original report was already landed independently. ### runfusion.ai #### Patch Changes - Updated dependencies [0a6da9f] - Updated dependencies [06a107d] - Updated dependencies [88c465c] - Updated dependencies [6a6c6fd] - Updated dependencies [bad6759] - Updated dependencies [7f01b53] - Updated dependencies [64056b3] - Updated dependencies [5eacd79] - Updated dependencies [1fb905a] - Updated dependencies [629aa29] - @runfusion/fusion@0.34.0 ## 0.33.0 ### @fusion/core #### Minor Changes - a201f56: feat(core): add `mergeAdvanceAutoSync` project setting (`"off" | "ff-only" | "stash-and-ff"`) Adds the schema for a new project setting that controls what happens in **other** worktrees still checked out on the integration branch when the merger advances the branch ref. Previously the merger only updated `refs/heads/` and left every other checkout's index and working tree pinned at the old tip, so `git status` in the user's project-root checkout reported the new commits as inverted "staged changes to be committed." Modes (default `"stash-and-ff"`): - `"off"` — preserve the legacy behavior; user must `git pull` or click the Merge Advance Notice banner Pull button. - `"ff-only"` — auto-fast-forward only clean worktrees; dirty worktrees stay untouched and the banner still surfaces. - `"stash-and-ff"` — run the Smart Pull pipeline (stash → fast-forward → pop). Pop conflicts emit `merge:auto-sync` audit events with `outcome: "stash-pop-conflict"` and surface through the existing dashboard stash-conflict modal. Schema-only in this changeset; the merger hook that consumes the setting lands in the follow-up engine change. - 51fc826: fix(engine,core): dedup heartbeat-spawned follow-ups by parent task Heartbeat agents create follow-up tasks via `fn_task_create`. Until now, the intake similarity guard scoped candidates by `sourceAgentId` only, so the same parent task could spawn many sibling tasks across heartbeats whenever triage rewrote their titles enough to dodge the title-fingerprint guard. The task-scoped heartbeat now stamps `sourceParentTaskId` (and `sourceRunId`) on every `fn_task_create`, and the intake duplicate matcher treats a candidate as a sibling when it shares either the caller's agent ID or the caller's parent task ID. Same-parent siblings with similar descriptions are auto-archived as before. Tool description and heartbeat prompts also now instruct agents to scan existing open tasks before creating, as a belt-and-suspenders layer above the deterministic dedup. #### Patch Changes - 408e20b: fix(merger): two root-cause fixes for tasks landing in Done with no commit on main **Bug 1: sibling fusion/fn-\* branch as merge target** — `resolveTaskMergeTarget` previously returned `task.baseBranch` unconditionally before falling back to the project default. When a task was dispatched as a sibling/dependent off another in-flight task's worktree, `baseBranch` ended up as the upstream's `fusion/fn-` branch. The merger then detached onto that sibling, squashed on top of it, and advanced `refs/heads/fusion/fn-` — never main. FN-5233's squash (`84563e549`) stranded on `fusion/fn-5339`; FN-5530's (`4140a3e0a`) stranded on `fusion/fn-5543`. The resolver now refuses any `fusion/fn-\*` candidate as a merge destination and falls through to the project default. The merger emits a new `merge:merge-target-rejected-fusion-sibling` audit event so the upstream `baseBranch`-propagation bug stays observable. **Bug 2: deadlock-recovery mis-attributed tasks to unrelated commits** — `findLandedTaskCommit` step (4) used `git log --grep=FN-XXXX` which matches the entire commit message (not just the subject) and blindly accepted the first hit. FN-5441 and FN-5446 were both marked done against `e3dbfaae` — an FN-5483 commit whose body merely _mentioned_ them by name in a paragraph about a refusal. The grep fallback now fetches each candidate's body and re-verifies ownership via a tightened `commitOwnedByTask`: trailers must be line-anchored (`(?:^|\n)Fusion-Task-Id: (?:\n|$)`), and the subject fallback must match a conventional-commit form (`():` or `:`), not a substring. Prose mentions can no longer claim a task. The historical recovery for FN-5233 has been cherry-picked to main as `2d2e5b809`. The other 11 affected tasks (FN-5441, FN-5446, FN-5472, FN-5484, FN-5487, FN-5490, FN-5515, FN-5517, FN-5526, FN-5539, FN-5540, FN-5542) remain in Done but need separate triage — 3 look like legitimate verification-only no-ops, the remaining 9 likely lost real work. - ec6643e: fix(test-utils): cancel subprocess tracking timer for every proc in afterEach The vitest subprocess guard registered a 60 s "command timed out" timer for each tracked child process and relied on `afterEach` to cancel it. Under concurrent load (`pnpm` recursive test runs) the timer could outlive the originating test and fire during a later test's `afterEach`, surfacing as spurious "Test subprocess guard detected unsafe child-process usage: Timed out after 60000ms" failures attributed to a different test name. The cleanup loop now scopes "Left running" failure reporting + SIGKILL to processes spawned by the current test, but unconditionally clears each tracked subprocess's timer so the 60 s timeout cannot fire after the afterEach completes. The grace period before declaring a process leaked is also raised from 200 ms to 1 s to absorb event-loop contention from slow git shells under recursive test load. - 4c31e88: feat(engine): merger auto-syncs project-root checkout after advancing integration-branch ref Wires `mergeAdvanceAutoSync` into the merger's post-ref-advance code path. After `advanceIntegrationBranchRef` ff-updates `refs/heads/`, the merger now enumerates other worktrees still on that branch (typically the user's project-root checkout) and reconciles each one's index + working tree to the new tip via `syncWorktreeToHead`. The reconciliation primitive is **not** a `git pull` — origin may still be at the previous tip (no `pushAfterMerge`), in which case `git pull --ff-only` is a no-op and a naive `stash → pull → pop` ends with the worktree restored to the old state. Instead `syncWorktreeToHead`: 1. Diffs the worktree against the _previous_ tip to isolate real user edits from the stale-index "phantom diff" that looks like inverted commits. 2. When the worktree is clean against the previous tip, runs `git reset --hard HEAD` to snap index + files forward. 3. In `stash-and-ff` mode with real edits, captures them as a binary patch against the previous tip, snaps to HEAD, then `git apply --3way` to restore. Untracked files are copied to a temp dir and restored after the snap. Patch conflicts surface as `synced-with-pop-conflict` with the patch left on disk for manual recovery. Each per-worktree attempt emits a `merge:auto-sync` audit event (new `GitMutationType`) with the outcome; the per-step `pull:fast-forward`, `stash:push`, `stash:pop`, and `stash:pop-conflict` events that pass through the auditor are tagged `metadata.autoSync = true` so downstream consumers can attribute them. The user-facing effect: with the default `mergeAdvanceAutoSync: "stash-and-ff"`, after a Fusion task merges the user's `git status` in the project-root checkout becomes clean and the working tree shows the new commits' content — no manual `git reset` or Pull-button click required. Set `mergeAdvanceAutoSync: "off"` to restore the legacy behavior (the Merge Advance Notice banner still surfaces and the user pulls by hand). Backstopped by `merger-auto-sync.slow.test.ts` covering: clean-sync snaps both index and files forward, ff-only with real edits is a no-op, stash-and-ff preserves untracked local files across the snap, task worktrees on `fusion/fn-*` branches are correctly skipped, and an empty branch map emits nothing. ### @fusion/dashboard #### Minor Changes - 6e7f1e5: feat(dashboard): explain "Recent integration-branch advances" and add a one-click "Sync working tree" fix Two additions to Git Manager → Status: **Info disclosure** — an `[i]` button next to the "Recent integration-branch advances (N need action)" header toggles an inline explainer. Covers what an "advance" is, what each `autoSyncOutcome` value means (`clean-sync`, `synced-with-edits-restored`, `off / not run`, `stash-failed`, `would-conflict`, …), and where to enable `mergeAdvanceAutoSync` for the permanent fix. **Sync working tree button** — when ≥1 advance shows `needsAction`, a button surfaces in the same header that calls the existing `POST /api/git/pull` (FN-5358 Smart Pull machinery: auto-stash dirty edits, fast-forward pull, restore stash, surface conflicts). On success the extended git status auto-refetches and the "need action" count drops; on conflict, the existing error toast fires. No new state machine — `handlePull`/`remoteLoading === "pull"` is the same plumbing the existing Pull button uses. - 85786e7: feat(dashboard): show extended integration-branch + working-tree state in Git Manager Repository Status panel now answers "what is the actual state of my project root vs the integration branch?" so operators can be sure of the picture even when the Merge Advance Notice banner has been dismissed. `GET /api/git/status` accepts a new `?extended=1` query and returns additional optional fields: - **integrationBranch** + **integrationBranchSource** — the canonical branch (resolved via `settings.integrationBranch` → legacy `baseBranch` → `origin/HEAD` → `main`) and where the value came from. - **integrationTipSha / originIntegrationTipSha** — SHAs at both ends, so operators can spot when local main has been advanced by the merger but origin/main hasn't caught up. - **aheadOfIntegration / behindIntegration** — HEAD vs local integration tip (useful when on a non-integration branch). - **aheadOfOriginIntegration / behindOriginIntegration** — local integration tip vs `origin/`. - **dirtyDetails** — staged/modified/untracked/conflicted counts + a 12-line porcelain sample. - **indexStaleVsHead** — true when the index reflects a previous tip and the worktree is clean against the index but not against HEAD. Surfaces the exact "phantom staged changes" scenario that `mergeAdvanceAutoSync` exists to fix. - **stashCount** — for at-a-glance recovery awareness. - **recentMergeAdvances** — up to 5 recent `merge:integration-ref-advance` audit events for the project root, joined with their `merge:auto-sync` outcomes; entries whose auto-sync didn't successfully bring this worktree forward are flagged `needsAction: true`. `GitManagerModal` now renders all of this: - The existing Branch / Commit / Working Tree / Remote Sync cards gain sub-text — Working Tree shows staged/modified/untracked/conflicted breakdown; Branch shows whether you're on the integration branch. - A second row of cards adds Integration branch (with resolution source + tip SHA), HEAD-vs-integration ahead/behind, local-integration-vs-origin ahead/behind, and stash count. - A yellow warning panel appears when `indexStaleVsHead` is true, telling the operator to enable `mergeAdvanceAutoSync` or run `git reset --hard HEAD`. - A "Recent integration-branch advances" list shows the last few merger advances with their per-advance auto-sync outcome, color-coded by whether they still need action. All `fetchGitStatus(projectId)` calls inside `GitManagerModal` now pass `{ extended: true }`. Other callers in the app are unaffected — the extra fields are optional and the un-extended response shape is unchanged. #### Patch Changes - 60a0012: fix(dashboard): stop main-chat and quick-chat composers from instantly dismissing the Android soft keyboard Two layered Android-specific fixes for the chat composers: 1. The body scroll-lock applied while the keyboard is open in main chat was an iOS-specific workaround for visualViewport drift. On Android Chrome it does the opposite of what we want — mutating `body { position: fixed; ... }` while the keyboard is opening causes Chrome to treat it as a focus-target relayout and immediately dismisses the keyboard. `useMobileScrollLock` is now gated to iOS UAs. 2. ChatView and QuickChatFAB both had an iOS-specific `onTouchStart` on the textarea that called `event.preventDefault()` and then programmatically refocused the input (to suppress iOS's visualViewport auto-scroll on re-focus). On Android, `preventDefault` on a textarea touchstart prevents the soft keyboard from opening — programmatic `focus()` alone does not raise the Android keyboard. Result: tapping the composer focused the input but the keyboard never appeared, looking like an instant dismiss. The touchstart workaround is now gated to iOS UAs via `isIOS()`. - a10fc56: fix(dashboard): keep Android keyboard open in main chat; disable kanban pinch-zoom Two Android-specific fixes: 1. **Keyboard dismissing in main chat.** `mobileKeyboardOpen` in `App.tsx` (derived from `useMobileKeyboard`) gates `project-content--with-mobile-nav` / `--with-footer` className assignment and MobileNavBar rendering. When the soft keyboard opened, those classes were removed and the nav unmounted, shrinking padding-bottom by ~80px in a single render. Android Chrome treats the resulting jump of the focused chat input as the focus target moving and instantly dismisses the keyboard. With `interactive-widget=resizes-content` set on Android, the layout viewport itself shrinks with the keyboard, so the hide-nav-on-keyboard behavior was redundant on Android (and harmful). The whole pattern is now gated to iOS via `isIOS()`. iOS path is unchanged. 2. **Pinch-zoom on kanban.** Android Chrome ignores `user-scalable=no` for accessibility, and the kanban board's `overflow-x: auto` columns combined with the inflated ICB produce a broken visual when the user zooms out. Adds `touch-action: pan-x pan-y` to `html, body` inside the mobile media query, which keeps scroll panning but disables pinch-zoom (Chat and MissionManager were unaffected because they don't expose a wide horizontal scrollable region). - de67c51: fix(dashboard): pull syncs the worktree to local integration tip, not just to origin The integration-mode `POST /api/git/pull` (used by the merge-advance-notice banner) only ran `git merge --ff-only origin/` after fetching. When the merger had advanced local `refs/heads/` via `update-ref` but the user hadn't pushed yet, the worktree's HEAD already resolved to the new sha (symbolic ref follow) but the working tree and index were still at the old state. The fast-forward step short-circuited (`already up to date with origin`) and the user saw "Pull completed" with `fromSha === toSha` while their files visibly stayed behind. Pull now explicitly resets the worktree to `refs/heads/` after the origin fast-forward step. The autostash above protects user edits, so the reset is safe regardless of whether the origin FF ran. - 5d35b64: fix(dashboard): remove duplicate integration-advances UI; Sync working tree is now pure-local (no origin fetch) **Removed duplicate UI** — Git Manager → Status had two overlapping sections rendering the same data: a `Sync local tip` button + a `Recent integration advances` list, sitting above the highlighted `Recent integration-branch advances` block (the one with the lost-work warnings). Deleted the duplicate (`gm-integration-actions` + `gm-recent-advances`) along with the dead `mergeAdvanceEvents` state, fetcher, and SSE subscription that only fed it. **Sync working tree is now pure-local** — for the "N need action" case the merger has already advanced `refs/heads/` locally and the worktree just needs to follow. Previously the button called the integration-mode pull which ran `tryFastForwardFromOrigin` first, silently pulling in unrelated remote commits. New `skipOriginFetch` option on `PullGitBranchOptions.integration` (and the matching `POST /api/git/pull` body field) skips the origin step entirely. The Sync button passes `skipOriginFetch: true`, so the sequence is: auto-stash → `git reset --hard refs/heads/` → restore stash. Origin is not touched. Help disclosure updated to match the new behavior. - 4f38ed1: fix(dashboard): clear `needs action` on recent integration-branch advances after manual sync The Git Manager's "Recent integration-branch advances" list derived `needsAction` purely from the original `merge:auto-sync` audit-event outcome. When the operator clicked "Sync working tree" — or fixed up the worktree by hand — the worktree caught up to the integration tip, but the list kept showing "(N need action)" because the historical audit events still recorded the original failure/disabled state. `collectRecentMergeAdvances` now also checks whether each advance's `toSha` is reachable from the current HEAD. If it is, the worktree already contains that advance and `needsAction` is false regardless of what the audit trail recorded. - ef12df4: fix(dashboard): close 8 review findings on extended Git Manager status + Integration branch setting **Settings persistence (data-loss)** — the project-settings patch builder now applies null-as-delete to all non-model keys, matching the global-settings branch. Previously, clearing the Integration branch field (picking `(auto-detect)` or clicking `Use dropdown`) set `integrationBranch: undefined`, which `JSON.stringify` silently dropped — the server retained the stale explicit value and the operator could not un-pin the branch from the UI. **`isIndexStale` was wrong both directions** — the heuristic (`diff --cached --name-only` non-empty AND `diff --name-only` empty) fired false-positive on benign `git add` and false-negative whenever the worktree had any unrelated edit. Replaced with a reflog-anchored check: stale iff `refs/heads/@{1}` exists, HEAD is a descendant of it, and `git diff-index --cached ` is empty (i.e. the index exactly matches the pre-advance state). **Auto-sync attribution** — two fixes to `collectRecentMergeAdvances` in `register-git-github.ts`: - Auto-sync events are now matched by `(taskId, newSha)` instead of `taskId`-only. A task that produced multiple advances over time no longer has all its older entries mislabeled with the most-recent outcome. - `worktreePath` comparison now runs both sides through `fs.realpathSync` first. On macOS the merger emits canonicalized paths (via `canonicalizePath` in `worktree-pool.ts`) while the route was called with the store's raw `rootDir`; symlinked project paths caused every advance to be marked `needsAction: true` indefinitely. **Extended path no longer 500s on git failure** — the `?extended=1` branch wraps `computeExtendedGitStatus` in its own try/catch and falls back to the basic status shape on any unhandled failure. Previously an unguarded `git branch --show-current` throw escaped to the route's outer catch and returned HTTP 500, while the basic path returned 200 with the swallowed-failure shape — surface parity matters because the dashboard always passes `extended=1` and would otherwise render an error toast where it should render the degraded panel. Also wrapped the same call inside `computeExtendedGitStatus` so detached-HEAD / non-git states return an empty `currentBranch` instead of throwing. **Integration branch falls back to `refs/remotes/origin/`** — when the configured branch exists only as a remote-tracking ref (e.g. operator set `integrationBranch: "release/v2"` without ever `git switch`-ing it locally), `integrationTipSha` now resolves to the origin tip instead of being null. A new `integrationTipSource: "local" | "remote-only" | "missing"` field tells the UI which side won; the Git Manager surfaces this with a `(remote-only — run git switch to track locally)` sub-text and a `no ref found` error state when both refs are missing. **Copy commit hash shows two buttons** — the Copy button now copies `status.commit` (the short SHA actually displayed in the `` element). A second Copy-full button surfaces `status.headSha` for git operations that need the 40-char SHA. Previously the single button silently copied the full SHA when extended was on, so what the user saw on screen was no longer what they pasted. **Detached HEAD no longer shows misleading "(not on main)"** — `git branch --show-current` returns empty on detached HEAD; the route now leaves `isOnIntegrationBranch` as `undefined` (not `false`) in that case, and the UI's "(not on )" sub-text only renders when we know we're on a different branch — not when we're on no branch at all. - d5cfa92: fix(dashboard): close 7 review findings on the extended-status hardening pass Follow-up to the prior fix commit; closes 7 more issues that an independent code review surfaced. **Settings inheritance regression (high)** — `SettingsModal.handleSave`'s non-model project branch lost the "only write if changed" gate when the prior commit added null-as-delete support. Result: every effective/inherited project key was being persisted as an explicit project override on every save, silently breaking inheritance across ~30+ keys. Restored the `value !== initialProjectValue` gate, matched against the model-lane branch's existing pattern. **Git Manager `Local vs origin` card showed misleading "Synced" in remote-only mode** — when `integrationTipSource === "remote-only"`, both `aheadOfOriginIntegration` / `behindOriginIntegration` are deliberately undefined (there's no local branch to compare), but the card's render fell through to `(ahead ?? 0) === 0 && (behind ?? 0) === 0 → "Synced"`. Now renders an explicit "no local tracking" sub-text in that case, with a separate `HEAD vs origin/` card surfacing a meaningful distance. **`isIndexStale` extended to multi-hop and gated to integration-branch worktrees** — - Walks up to 16 `refs/heads/` reflog entries so an A→B→C burst whose middle sync also missed is detected (the prior check only consulted `@{1}`). - Only fires when `isOnIntegrationBranch === true`. Previously, a feature-branch worktree whose HEAD happened to descend from `@{1}` (e.g. `git switch -c hotfix main@{N}`) would trip the stale-index warning despite being perfectly healthy. **`enumeration-failed` auto-sync events no longer dropped** — the new `(taskId, newSha)` join filter required both `worktreePath` and `newSha` on every auto-sync event, which discarded the merger's early-failure events that emit neither. Now: events with both fields use the per-advance pair-key (with macOS realpath canonicalization on both sides); events with neither use a task-id fallback so the diagnostic outcome still surfaces on the matching advance. **`aheadOfIntegration` no longer silently shifts semantics** — split into three distinct distance fields so consumers don't have to read `integrationTipSource` to know which comparison they got: - `aheadOfIntegration` / `behindIntegration` — HEAD vs **local** integration tip; undefined when only the remote tip exists. - `aheadOfIntegrationRemote` / `behindIntegrationRemote` — HEAD vs `origin/`; defined whenever the remote tracking ref exists. - `aheadOfOriginIntegration` / `behindOriginIntegration` — local integration tip vs `origin/`; defined only when both refs exist. **`currentBranch` failure no longer masks wrong-branch state** — `git branch --show-current` returns empty on detached HEAD (success) and throws on transient git errors (lock contention, timeout). The prior catch collapsed both into `currentBranch = ""` so the UI couldn't distinguish them. New `currentBranchDetectionFailed?: boolean` field on `GitStatus` lets the UI surface "branch detection unavailable" on a real failure rather than silently hiding the wrong-branch warning. - 916047c: feat(dashboard): Integration branch setting is now a dropdown of local branches with Custom… fallback Replaces the plain text input with a `