Commit Graph

2600 Commits

Author SHA1 Message Date
gsxdsm
dfb9ca6630 FN-8543: enforce bounded generated-fix remediation
Keep generated fix chains within their root retry budget and preserve intervention stops.

- Track retry counts and stop reasons on the canonical root feature.
- Persist project-isolated lineage stops across generated-fix removal and archive paths.
- Serialize stop recording with generated-fix admission and expose conflict-safe mission resume behavior.

Files changed:
 .changeset/fn-8543-bounded-fix-lineage.md          |   7 +
 docs/missions.md                                   |   6 +-
 .../__tests__/postgres/mission-store.pg.test.ts    |  72 +++++++
 packages/core/src/async-mission-store-queries.ts   |  91 ++++++++-
 packages/core/src/async-mission-store.ts           | 206 ++++++++++++++++++---
 packages/core/src/index.ts                         |   2 +-
 packages/core/src/mission-store.ts                 |  10 +
 packages/core/src/mission-types.ts                 |   7 +
 .../0035_fn_8543_mission_lineage_stop.sql          |  31 ++++
 packages/core/src/postgres/schema-applier.ts       |  18 +-
 packages/core/src/postgres/schema/project.ts       |  21 +++
 .../core/src/task-store/archive-lifecycle-2.ts     |  15 +-
 .../core/src/task-store/async-archive-lineage.ts   |  10 +-
 packages/dashboard/src/mission-routes.ts           |  14 +-
 packages/engine/src/mission-execution-loop.ts      |  30 ++-
 15 files changed, 495 insertions(+), 45 deletions(-)

Fusion-Task-Id: FN-8543

Fusion-Task-Lineage: 24c03d63-5914-4072-aa17-16862432fc78

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-23 16:12:44 -07:00
Victor Canô
0c085bf444 fix(engine): pushAfterMerge no longer strands approved merges when the remote diverges (#2407)
## Problem

With `pushAfterMerge` enabled (and `mergeStrategy` other than
`pull-request`), if `origin/<integration-branch>` advances externally
between the local squash-merge and the push, the divergence path opens a
clean-room `git pull --rebase` and an AI agent resolves and stages the
conflicts — but the flow could end there: no `git rebase --continue`, no
push, and no surfaced error.

Because finalize runs *before* the push, the task is already `done`, so
a reviewed, approved merge is silently left container-only, and every
subsequent merge on the project stalls the same way. Separately, an
abort mid-push (`MergeAbortedError`) was swallowed with only a
process-log warning — no task-log entry, no run-audit event.

## Change

- **Deterministic regression coverage** for the conflicting-divergence
path (real-git fixture) proving the rebase runs to completion and the
push lands (refs converge), plus abort/termination scenarios.
- **Recovery-branch safety net:** before the clean-room rebase starts,
the pre-rebase local squash is force-pushed to a per-task remote branch
`fusion/<task-id>-stranded`, so approved content is never container-only
— even across process death or abort. Deleted after a successful target
push; retained on failure/abort as the recovery source.
- **Never-silent outcomes:** every non-pushed outcome (failure or abort)
writes a durable task-log entry and a `push:origin` run-audit event. The
audit contract now documents `push:origin` as polymorphic (dashboard
Smart Push vs. automated post-merge push) and enumerates the automated
path's outcomes, including the new `"aborted"` shutdown case.
- **Cleanup hardening:** `isRebaseInProgress` now probes Git's
worktree-specific `rebase-merge`/`rebase-apply` state directories
(async, timeout-guarded) so a completed rebase can't receive a spurious
second `--continue`; unfinished rebases are cleaned up.

Out of scope by design: withholding the "merge confirmed" state until
the push succeeds — the `FNXC:MergePush` invariant ("a push problem can
never park or roll back a landed merge") is deliberate; the recovery
branch + surfacing satisfy the data-preservation intent without breaking
it.

## Files
`packages/engine/src/merger-ai.ts`, `packages/engine/src/merger.ts`,
`packages/engine/src/run-audit.ts`, new/updated tests under
`packages/engine/src/__tests__/`, `docs/settings-reference.md`,
`docs/dashboard-guide.md`, `AGENTS.md`, and a labeled changeset.

## Validation
`tsc --noEmit` clean; engine divergence + merger suites pass (41 tests);
rebased onto current `main` with no conflicts.

---

_Developed with Claude Code, under human supervision and review._


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

* **Bug Fixes**
* Prevented approved post-merge pushes from becoming stranded when the
remote diverges by using a recovery-branch workflow and safer cleanup.
* Improved behavior and reporting when pushes are aborted or fail after
merge, including clearer non-fatal status and audit outcomes.
* **Documentation**
* Expanded push-after-merge and dashboard Smart Push documentation with
recovery-branch and `push:origin`/`push:recovery-branch` outcome
semantics.
* **Tests**
* Added end-to-end regression tests for divergent/conflicting AI
push-after-merge flows, including abort and worktree cleanup
verification.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Victor Cano <victortroz@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-07-23 15:55:03 -07:00
gsxdsm
e5caea542a FN-8544: gate mission remediation behind autopilot
Keep mission validation report-only until an operator explicitly enables autopilot.

- Gate validator-created remediation features and task dispatch behind mission autopilot.
- Audit attributed status and autopilot transitions atomically across mission stores.
- Expose mission autonomy controls and document the opt-in lifecycle.

Files changed:
 .changeset/fn-8544-mission-autonomy-audit.md       |   7 ++
 docs/missions.md                                   |  10 +-
 packages/cli/src/extension.ts                      |  26 ++++-
 .../__tests__/postgres/mission-store.pg.test.ts    |  27 +++++
 packages/core/src/async-mission-store.ts           |  70 +++++++++++--
 packages/core/src/index.gate.ts                    |   3 +
 packages/core/src/index.ts                         |   3 +
 packages/core/src/mission-store.ts                 | 113 +++++++++++++--------
 packages/core/src/mission-types.ts                 |  22 ++++
 .../dashboard/app/components/MissionManager.tsx    |   1 +
 packages/dashboard/src/mission-routes.ts           |  25 +++--
 .../src/__tests__/agent-mission-tools.test.ts      |  17 +++-
 .../src/__tests__/mission-execution-loop.test.ts   |  21 ++++
 packages/engine/src/agent-heartbeat.ts             |   4 +-
 packages/engine/src/agent-tools.ts                 |  30 +++++-
 packages/engine/src/executor.ts                    |   5 +-
 packages/engine/src/mission-autopilot.ts           |  51 +++++-----
 packages/engine/src/mission-execution-loop.ts      |  49 ++++++---
 packages/engine/src/triage.ts                      |   5 +-
 19 files changed, 377 insertions(+), 112 deletions(-)

Fusion-Task-Id: FN-8544

Fusion-Task-Lineage: 23a69923-5a19-407e-9fe2-8973c166ee9a

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-23 15:25:09 -07:00
gsxdsm
e7c9b2ac80 FN-8542: separate milestone acceptance from feature validation
Keep feature validation scoped to linked feature assertions while evaluating milestone acceptance at rollup.

- Add assertion scope and origin provenance with database migration support
- Synchronize milestone acceptance prose to a canonical milestone assertion
- Prevent milestone assertions from affecting feature verdicts and document the completion contract
- Cover scoped validation and milestone rollup behavior with core and engine tests

Files changed:
 .changeset/fn-8542-feature-validation-scope.md     |   7 +
 docs/missions-completion-contract.md               |  25 +-
 docs/missions.md                                   |   6 +-
 .../mission-store.sync-loop-transition.test.ts     |  53 +++++
 packages/core/src/async-mission-store-queries.ts   |  17 +-
 packages/core/src/async-mission-store.ts           |  58 ++++-
 packages/core/src/mission-store.ts                 | 118 +++++++++-
 packages/core/src/mission-types.ts                 |  25 ++
 .../core/src/postgres/migrations/0000_initial.sql  |   2 +
 .../0034_milestone_assertion_provenance.sql        |  30 +++
 packages/core/src/postgres/schema-applier.ts       |  24 +-
 packages/core/src/postgres/schema/project.ts       |   1 +
 .../src/__tests__/mission-execution-loop.test.ts   | 161 ++++++++++++-
 packages/engine/src/mission-execution-loop.ts      | 262 ++++++++++++++++-----
 14 files changed, 700 insertions(+), 89 deletions(-)

Fusion-Task-Id: FN-8542

Fusion-Task-Lineage: cf112d31-376a-456e-be08-225eab5de393

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-23 14:39:44 -07:00
gsxdsm
2978ec4973 FN-8551: add accessible agent heartbeat controls
Add per-agent and project-wide heartbeat enablement controls.

- Add preserved runtime configuration helpers and heartbeat controls across agent list, board, and org-chart views.
- Add bulk enable/disable actions, accessible labels, localized copy, documentation, and release metadata.
- Cover heartbeat mutations through dashboard, route, scheduler, and layout smoke tests.

Files changed:
 .changeset/fn-8551-agent-heartbeat-controls.md     |   7 +
 docs/dashboard-guide.md                            |   2 +
 packages/dashboard/app/api/agents.ts               |  12 ++
 packages/dashboard/app/api/legacy.ts               |   2 +
 .../dashboard/app/components/AgentDetailView.tsx   |  14 +-
 packages/dashboard/app/components/AgentsView.css   |  11 ++
 packages/dashboard/app/components/AgentsView.tsx   | 186 ++++++++++++++++-----
 .../AgentDetailView.advanced-settings.test.tsx     |  29 ++++
 .../__tests__/AgentDetailView.test-helpers.ts      |   2 +
 .../app/components/__tests__/AgentsView.test.tsx   |  68 ++++++++
 .../dashboard/scripts/browser-layout-smoke.mjs     |  54 ++++++
 .../src/routes/__tests__/agent-core-routes.test.ts |  69 ++++++++
 .../src/__tests__/heartbeat-scheduler.test.ts      |  21 +++
 packages/i18n/locales/en/app.json                  |  19 ++-
 packages/i18n/locales/es/app.json                  |  19 ++-
 packages/i18n/locales/fr/app.json                  |  19 ++-
 16 files changed, 484 insertions(+), 50 deletions(-)

Fusion-Task-Id: FN-8551

Fusion-Task-Lineage: 2d4c8a15-a444-47b6-b57c-f41fc4163155

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-23 14:32:58 -07:00
gsxdsm
3d0ce2ed3a FN-8545: enforce mission lineage task admission
Protect feature bootstrap task creation with mission-lineage admission rules.

- Restrict supervised agents to linked autonomous mission features
- Atomically claim defined feature tasks and preserve duplicate ownership
- Lock defined feature claims to prevent concurrent bootstrap inserts
- Document admission behavior and add PostgreSQL and delegation coverage

Files changed:
 .changeset/fn-8545-mission-admission.md            |   7 +
 docs/agents.md                                     |   6 +
 docs/missions.md                                   |  12 +-
 .../__tests__/postgres/mission-store.pg.test.ts    | 119 ++++++++++++
 packages/core/src/async-mission-store.ts           | 203 +++++++++++++++++++--
 packages/core/src/duplicate-guard.ts               |  14 +-
 packages/core/src/mission-store.ts                 |  15 ++
 packages/core/src/task-store/task-creation.ts      | 152 ++++++++++-----
 .../src/__tests__/agent-tools-delegation.test.ts   | 152 ++++++++++++++-
 packages/engine/src/agent-tools.ts                 | 151 ++++++++++++++-
 10 files changed, 753 insertions(+), 78 deletions(-)

Fusion-Task-Id: FN-8545

Fusion-Task-Lineage: c6e1b46d-f434-4b07-93bc-27e1f6b491b1

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-23 14:21:29 -07:00
gsxdsm
15b5441afc FN-8548: keep GitHub import actions on one mobile row
Keep all selected GitHub issue actions touch-safe and visible on a single mobile row.

- Group detail action controls separately from the comment composer and make their mobile tracks shrinkable.
- Add responsive browser-smoke coverage at 320px, 390px, and 412px plus modal structure tests.
- Document the mobile behavior and add a patch changeset.

Files changed:
 .changeset/fn-8548-mobile-github-import-actions.md |   7 +
 docs/dashboard-guide.md                            |   8 +-
 .../dashboard/app/components/GitHubImportModal.css |  42 +++++-
 .../dashboard/app/components/GitHubImportModal.tsx |  80 ++++++------
 .../__tests__/GitHubImportModal.test.tsx           |  50 ++++++++
 packages/dashboard/app/styles.css                  |  11 +-
 .../dashboard/scripts/browser-layout-smoke.mjs     | 142 ++++++++++++++++++++-
 7 files changed, 290 insertions(+), 50 deletions(-)

Fusion-Task-Id: FN-8548

Fusion-Task-Lineage: 8fab6a1d-0ca9-4246-9707-e1fc84ca58e5

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-23 13:28:19 -07:00
gsxdsm
e734ed8a48 FN-8541: expose actionable validator diagnostics
Surface normalized, secret-safe validator evidence and assertion verdicts across mission events and remediation work.

- Normalize, redact, bound, and render per-assertion validation diagnostics in shared core APIs.
- Attach verdict-driven diagnostics to failure events and generated fixes while suppressing duplicate triage noise.
- Display validator evidence in Mission activity and document the operator workflow.
- Add core and engine coverage for evidence, mixed blocked verdicts, and triage behavior.

Files changed:
 .changeset/fn-8541-validator-diagnostics.md        |   7 ++
 docs/missions.md                                   |  17 +++
 .../mission-store.validation-diagnostics.test.ts   |  65 ++++++++++
 packages/core/src/async-mission-store.ts           |   8 +-
 packages/core/src/index.gate.ts                    |  10 ++
 packages/core/src/index.ts                         |  10 ++
 packages/core/src/mission-store.ts                 |  10 +-
 packages/core/src/mission-types.ts                 | 136 +++++++++++++++++++++
 .../dashboard/app/components/MissionManager.css    |  21 ++++
 .../dashboard/app/components/MissionManager.tsx    |  56 +++++++++
 packages/dashboard/app/components/mission-types.ts |   3 +
 .../src/__tests__/mission-execution-loop.test.ts   |  44 +++++++
 .../mission-validator-behavioral-posture.test.ts   |  37 +++++-
 packages/engine/src/mission-execution-loop.ts      | 117 +++++++++++++-----
 14 files changed, 501 insertions(+), 40 deletions(-)

Fusion-Task-Id: FN-8541

Fusion-Task-Lineage: b226fc34-f35c-4ce5-bcb5-e418529caaa7

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-23 13:21:10 -07:00
gsxdsm
0d355f371c FN-8547: add local OpenAI-compatible provider onboarding
Add guided onboarding for OpenAI-compatible local model providers.

- Add custom/local provider prompts and atomic models registry updates.
- Preserve registry fields, validate endpoint configuration, and support Qwen thinking compatibility.
- Document setup and cover registry persistence with onboarding tests.

Files changed:
 .changeset/fn-8547-local-provider-onboarding.md    |   7 +
 docs/cli-reference.md                              |  13 ++
 docs/settings-reference.md                         |  35 ++++-
 packages/cli/src/commands/__tests__/onboard.test.ts |  55 ++++++-
 packages/cli/src/commands/onboard.ts               | 161 ++++++++++++++++++++-
 5 files changed, 261 insertions(+), 10 deletions(-)

Fusion-Task-Id: FN-8547

Fusion-Task-Lineage: 740221de-fce8-43ae-a095-13b8abf1904a

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-23 12:31:55 -07:00
gsxdsm
84d7306bd3 FN-8546: fix ideation candidate discovery
Expose persisted ideation candidate identities so agents can select a candidate for convergence.

- Render candidate IDs, provenance, source references, and content in show and diverge responses.
- Cover discover-to-converge behavior, duplicate content, empty sessions, and missing sessions.
- Document the direct candidate-ID convergence workflow and add a patch changeset.

Files changed:
 .changeset/fn-8546-ideation-candidate-ids.md       |  7 ++
 docs/agent-tool-surface-full-loop.md               |  4 +-
 docs/ideation/persisted-diverge-converge.md        |  6 +-
 .../src/__tests__/agent-ideation-tools.test.ts     | 93 +++++++++++++++++++---
 packages/engine/src/agent-tools.ts                 | 23 +++++-
 5 files changed, 116 insertions(+), 17 deletions(-)

Fusion-Task-Id: FN-8546

Fusion-Task-Lineage: 7232701f-5c6b-40fc-8d46-d65b97af9c0a

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-23 12:26:02 -07:00
gsxdsm
c4292b25ef FN-8539: make Planning Mode selection-driven
Make Planning Mode refine repository-grounded plans through successive operator choices.

- Offer concrete directions and Other for vague planning openers
- Rebuild running plans around selected options, multi-selections, and Other responses
- Add selection-loop coverage and operator documentation

Files changed:
 .changeset/fn-8539-option-driven-planning.md       |   7 ++
 docs/dashboard-guide.md                            |   2 +-
 .../__tests__/planning-infinite-interview.test.ts  | 131 ++++++++++++++++++++-
 .../planning-interview-formatters.test.ts          |  37 ++++--
 packages/dashboard/src/planning.ts                 |  34 +++---
 5 files changed, 185 insertions(+), 26 deletions(-)

Fusion-Task-Id: FN-8539

Fusion-Task-Lineage: 585bae1e-6d9e-4733-b787-77b70a7d1259

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-23 12:08:58 -07:00
gsxdsm
3f976e3dca FN-8538: give Planning Mode a dedicated collaborative prompt
Planning Mode now uses a standalone collaborative prompt rather than inherited task-triage instructions.

- Resolve the Planning Mode default independently of workflows and triage assignments.
- Preserve explicit full-system prompt overrides and update prompt-setting documentation.
- Cover dedicated prompt behavior and add the published-package changeset.

Files changed:
 .changeset/fn-8538-planning-prompt.md              |  7 +++
 docs/dashboard-guide.md                            |  3 +-
 .../core/src/__tests__/prompt-overrides.test.ts    |  7 +++
 packages/core/src/prompt-overrides.ts              |  8 ++-
 packages/dashboard/app/utils/builtinPrompts.ts     |  8 ++-
 .../__tests__/planning-infinite-interview.test.ts  | 60 +++++++++++++++++++++-
 .../__tests__/planning-prompt-resolution.test.ts   | 47 ++++++++++-------
 packages/dashboard/src/planning.ts                 | 46 +++++------------
 8 files changed, 130 insertions(+), 56 deletions(-)

Fusion-Task-Id: FN-8538

Fusion-Task-Lineage: 36e0665d-7995-4bc5-9c73-948f7f4e9131

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-23 11:41:15 -07:00
gsxdsm
b4856e3c1e fix: separate Docker app root from project mount so -v host mounts work (#2414)
The runner stage installed the application at /project, which was also the
documented bind-mount point — mounting a host project there shadowed the CLI
and the container exited with MODULE_NOT_FOUND on packages/cli/dist/bin.js.

- Install the app under /app and run the entrypoint by absolute path.
- Reserve /workspace (empty in the image, container workdir) as the project
  mount point.
- Update docs/docker.md: mount at /workspace, and document that embedded
  Postgres/global state lives in /home/node/.fusion with a named-volume
  example so persistence actually captures it.

Verified: image builds; `docker run -v host:/workspace` boots, embedded
Postgres initializes, /api/health returns ok.

Fixes #2414

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 09:50:24 -07:00
gsxdsm
42fe154abe FN-8533: add mobile planning comment actions
Make contextual plan comments reachable from the mobile action rail and restore focus after editing.

- Add responsive desktop and mobile comment triggers with contextual styling and documentation.
- Preserve the selected quote and restore the remounted trigger after canceling or adding a comment.
- Cover action placement, focus restoration, and browser interaction behavior.

Files changed:
 .changeset/fn-8533-mobile-planning-comments.md     |   7 ++
 docs/dashboard-guide.md                            |   2 +-
 .../dashboard/app/components/PlanningModeModal.css |  20 ++++
 .../dashboard/app/components/PlanningModeModal.tsx |  44 ++++++-
 .../__tests__/PlanningModeModal.css.test.ts        |  10 ++
 .../PlanningModeModal.planning-flow.test.tsx       |  40 +++++--
 .../PlanningModeModal.ui-interactions.test.tsx     |   5 +
 .../dashboard/app/planning-browser-e2e-fixture.tsx |   3 +-
 .../src/__tests__/planning-browser-e2e.test.ts     | 133 +++++++++++++++++++--
 packages/dashboard/vitest.config.ts                |  11 +-
 scripts/lib/test-quarantine.json                   |   5 -
 11 files changed, 242 insertions(+), 38 deletions(-)

Fusion-Task-Id: FN-8533
Fusion-Task-Lineage: e0d561be-ecc8-456e-807e-a1dc677b5d9c
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-23 09:33:25 -07:00
gsxdsm
d2e41e490f FN-8534: honor workflow planning-model precedence
Honor selected workflow planning models for Planning Mode sessions.

- Resolve selected workflow planning lanes against the project baseline.
- Route complete request and workflow pairs through canonical planning-model resolution.
- Cover new and draft planning sessions, test mode, and settings documentation.

Files changed:
 .changeset/fn-8534-planning-workflow-model.md      |  7 ++
 docs/settings-reference.md                         |  2 +
 .../__tests__/workflow-settings-resolver.test.ts   | 73 ++++++++++++++++
 packages/core/src/index.gate.ts                    |  1 +
 packages/core/src/index.ts                         |  1 +
 packages/core/src/workflow-settings-resolver.ts    | 80 +++++++++++-------
 .../src/__tests__/routes-planning.test.ts          | 97 ++++++++++++++++++++++
 .../src/routes/register-planning-subtask-routes.ts | 48 ++++++++---
 8 files changed, 267 insertions(+), 42 deletions(-)

Fusion-Task-Id: FN-8534

Fusion-Task-Lineage: e6b5b546-b9f1-49c5-b680-90f24e856458

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-23 08:53:06 -07:00
gsxdsm
ebbb5948ab FN-8529: add contextual plan review comments
Enable operators to submit selected-plan suggestions through the existing Planning Mode revision flow.

- Capture text selections, batch suggestions, and retain retryable comment submissions in the Planning Mode UI.
- Validate bounded comment payloads and format them for the existing planning session update path.
- Document the workflow and add coverage for ordering, retry behavior, and selection boundaries.

Files changed:
 .changeset/fn-8529-planning-comments.md            |   7 +
 docs/dashboard-guide.md                            |   4 +
 packages/dashboard/app/api/legacy.ts               |   1 +
 packages/dashboard/app/api/planning.ts             |   9 +-
 .../dashboard/app/components/PlanningModeModal.css |  86 ++++++++++++
 .../dashboard/app/components/PlanningModeModal.tsx | 144 ++++++++++++++++++++-
 .../PlanningModeModal.planning-flow.test.tsx       |  39 ++++++
 .../PlanningModeModal.ui-interactions.test.tsx     |  10 ++
 .../__tests__/planning-infinite-interview.test.ts  |  62 +++++++++
 packages/dashboard/src/planning.ts                 |  76 ++++++++++-
 .../src/routes/register-planning-subtask-routes.ts |  27 +++-
 11 files changed, 455 insertions(+), 10 deletions(-)

Fusion-Task-Id: FN-8529

Fusion-Task-Lineage: c7064d76-effd-4597-a2b4-03f344dd59b9

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-23 00:56:47 -07:00
Victor Canô
64661c3ae1 feat(dashboard): stable theme token contract and plugin overlay layering (#2415)
## Summary

Gives dashboard integrators (plugin views, embedded panels, theming
tools) a supported way to match the dashboard's look and to layer
overlay UI correctly — instead of scraping computed styles and guessing
z-index values. This implements the CSS-token bridge slice of
`docs/proposals/2026-07-01-dashboard-theme-plugin-system.md`.

Two additions, both inert unless used:

1. **Documented theme-token contract.** A "Theme tokens" section in
`docs/dashboard-guide.md` (referenced from `docs/PLUGIN_AUTHORING.md`)
declares the stable set of CSS custom properties — colors, surfaces,
status colors — that integrators may read. Tokens resolve to raw color
strings (e.g. `#161b22`) in every theme, including the newer ones. A
sync test (`theme-token-contract-docs.test.ts`) parses the doc's token
table and asserts each documented token has a real definition in the
dashboard CSS, so the contract cannot silently drift from the code.

2. **Overlay layering surface.** Overlay-style UI (palettes, pickers,
floating panels) currently has no supported way to sit above the
floating-window stack — the effective max z-index is runtime state
inside `floatingWindowStack.ts`. This PR exposes it:
- `--fusion-max-z` on `:root` — kept in sync by `floatingWindowStack`
(written at module load and after every `nextFloatingZ()` claim), so it
always reflects the true top of the dashboard-managed stack. Boot/floor
value is `11001`, chosen to clear the highest statically-declared layer
(the body-portaled model-combobox dropdown at `z-index: 11000`).
- `#plugin-overlay-root` — an empty, `pointer-events: none` sibling of
`#root` stacked at `calc(var(--fusion-max-z) + 1)`. React never renders
into it, so it is hydration-safe; integrators portal into it and
re-enable pointer events on their own elements.
- The layer bands (base UI / floating windows / toasts / dropdown /
overlay root) are documented in `styles.css` and the guide, and a guard
test (`dashboard-max-z-guard.test.ts`) scans the structural + component
CSS and fails if any static `z-index` is ever introduced above the floor
— keeping the contract honest as the codebase evolves.

## Behavior

No visual or behavioral change for existing users: `floatingWindowStack`
still returns the same values from `nextFloatingZ()`; the overlay root
is empty and click-through; tokens were already defined — this only
documents and guards them.

## Tests

- `theme-token-contract-docs.test.ts` — docs ↔ CSS sync
(non-tautological: anchored matching against real definitions).
- `floatingWindowStack.max-z.test.ts` — `--fusion-max-z` boot value and
live tracking as the stack claims z-indexes.
- `dashboard-max-z-guard.test.ts` — no static dashboard z-index above
the floor (decorative `public/theme-data.css` INT_MAX scanline overlay
deliberately excluded; it's non-interactive grain, documented in the
test).
- Changeset included (`minor`, `category: feature`). Typecheck clean.

## Open question for maintainers

The token is named `--fusion-max-z`. The existing scale uses `--z-*`
names (`--z-dropdown`, `--z-modal`) on a lower band — happy to rename to
`--z-max` / `--z-plugin-overlay` or anything that fits your convention;
the name is the only bikeshed here, the sync mechanism is independent of
it.

## AI assistance disclosure

Parts of this change were authored with AI assistance (Anthropic's
Claude); the commit carries a `Co-authored-by` trailer accordingly.
Everything was human-reviewed before submission, and the test suite and
typecheck were run locally against the current `main`.

If squash-merging with a rewritten message, please keep the attribution:

```
Co-authored-by: Claude <noreply@anthropic.com>
```


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

- **New Features**
- Added stable dashboard theme tokens for consistent plugin/integration
styling.
- Introduced a dedicated plugin overlay mount point with click-through
defaults and an overlay stacking ceiling.
- Overlay z-index now stays in sync with floating window layering
automatically.

- **Documentation**
- Added an explicit stable “theme token contract” and “overlay layering
contract,” including interaction and z-index usage rules and deprecation
expectations.

- **Bug Fixes**
- Improved reliability of plugin overlay stacking so overlay content
renders above intended dashboard layers.

- **Tests**
- Added guards validating CSS z-index ceilings and enforcing the
documented theme token contract.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-22 23:04:33 -07:00
gsxdsm
4ef94e667d FN-8523: gate retained SQLite scans by completion marker
Keep completed SQLite migration sources inert across PostgreSQL startups.

- Gate core, central identity, and plugin reads on independent completion markers.
- Preserve PostgreSQL project identity before recording a legacy-central migration as complete.
- Cover completed backup and pending-core central-marker startup paths.

Files changed:
 .changeset/fn-8523-skip-completed-sqlite-rescan.md |   7 ++
 docs/storage.md                                    |   2 +
 .../src/__tests__/postgres/sqlite-migrator.test.ts |  15 +++
 .../postgres/startup-factory-integration.test.ts   | 111 ++++++++++++++++++++-
 packages/core/src/postgres/sqlite-migrator.ts      |  28 ++++--
 packages/core/src/postgres/startup-factory.ts      |  86 +++++++++++-----
 6 files changed, 212 insertions(+), 37 deletions(-)

Fusion-Task-Id: FN-8523

Fusion-Task-Lineage: 1a05b90d-23df-4423-8346-abd6ef35f4df

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 22:57:41 -07:00
gsxdsm
e16204deef FN-8522: fix Windows embedded PostgreSQL crash recovery
Harden Windows embedded PostgreSQL startup and recover once from owned-cluster DLL initialization crashes.

- Provide child-only native PATH hardening and non-blocking runner-log monitoring.
- Detect the ordered 0xC0000142 shutdown sequence and restart only owned clusters on their resolved port.
- Add lifecycle coverage and operator diagnostics for recovery behavior.

Files changed:
 .../fn-8522-windows-embedded-postgres-recovery.md  |   7 ++
 docs/diagnostics.md                                |  10 ++
 docs/storage.md                                    |   6 +
 .../__tests__/postgres/embedded-lifecycle.test.ts  |  87 ++++++++++++++
 .../postgres/embedded-windows-elevated.test.ts     |  49 ++++++++
 packages/core/src/postgres/embedded-lifecycle.ts   | 128 ++++++++++++++++++---
 .../core/src/postgres/embedded-windows-elevated.ts | 119 +++++++++++++++++--
 7 files changed, 382 insertions(+), 24 deletions(-)

Fusion-Task-Id: FN-8522

Fusion-Task-Lineage: f256e421-d82e-4afb-9f81-b5c18f1c7100

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 22:43:51 -07:00
gsxdsm
de5d446b5c FN-8526: add custom workflow column descriptions
Enable custom workflow authors to define and display descriptions for board columns.

- Persist optional descriptions in workflow column definitions and API responses.
- Add editor controls and board tooltips for column descriptions.
- Cover validation, API, and dashboard behavior with tests and documentation.

Files changed:
 .changeset/fn-8526-workflow-column-descriptions.md |  7 +++
 docs/dashboard-guide.md                            |  4 ++
 .../src/__tests__/workflow-ir-validation.test.ts   | 30 +++++++++++
 packages/core/src/workflow-ir-types.ts             |  4 ++
 packages/core/src/workflow-ir.ts                   |  9 ++++
 packages/dashboard/app/api/board-workflows.ts      |  2 +
 packages/dashboard/app/components/Board.tsx        |  3 ++
 packages/dashboard/app/components/Column.tsx       | 14 +++--
 .../app/components/WorkflowColumnPanel.tsx         | 31 ++++++++++++
 .../app/components/WorkflowNodeEditor.css          | 41 +++++++++++++++
 .../app/components/__tests__/Column.test.tsx       | 19 +++++++
 .../__tests__/WorkflowColumnPanel.test.tsx         | 38 ++++++++++++++-
 .../app/components/__tests__/WorkflowNodeEditor.test.tsx | 19 +++++++
 .../app/components/workflow-flow-mapping.ts        |  1 +
 packages/dashboard/app/styles.css                  |  8 +++
 .../src/__tests__/board-workflows.test.ts          | 59 ++++++++++++++++++++++
 packages/dashboard/src/routes/board-workflows.ts   |  3 ++
 17 files changed, 288 insertions(+), 4 deletions(-)

Fusion-Task-Id: FN-8526

Fusion-Task-Lineage: df26b7c0-301c-4875-b100-d63d0cfecf85

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 22:37:51 -07:00
gsxdsm
28e8c0abc9 FN-8524: cover workspace manifests in Docker builds
Ensure the builder install layer includes every selected workspace manifest.

- Copy the five omitted plugin manifests before frozen installation.
- Validate pre-install Dockerfile coverage against pnpm workspace entries.
- Document the manifest coverage requirement and focused test command.

Files changed:
 Dockerfile                                         |   8 +-
 docs/docker.md                                     |   3 +-
 .../dockerfile-workspace-manifests.test.mjs        | 111 +++++++++++++--------
 3 files changed, 78 insertions(+), 44 deletions(-)

Fusion-Task-Id: FN-8524

Fusion-Task-Lineage: 16a4d9df-ff08-4051-9e53-0da414ef6a85

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 22:04:32 -07:00
gsxdsm
059b9549a9 FN-8521: separate runtime installation from toggles
Keep built-in runtime installation distinct from project-scoped enablement.

- Show enable/disable toggles only for installed runtime plugins.
- Prevent toggles from registering or reinstalling uninstalled runtimes.
- Update plugin lifecycle documentation and regression coverage.

Files changed:
 .../fn-8521-separate-plugin-install-toggle.md      |  7 ++
 docs/dashboard-guide.md                            |  2 +-
 docs/plugin-management.md                          |  2 +-
 .../dashboard/app/components/PluginManager.tsx     | 74 ++++------------------
 .../components/__tests__/PluginManager.test.tsx    | 30 ++++++---
 .../__tests__/PluginManager.toggle.test.tsx        | 51 +++++++--------
 6 files changed, 67 insertions(+), 99 deletions(-)

Fusion-Task-Id: FN-8521

Fusion-Task-Lineage: 0de225f4-1d9c-411e-b5cc-851d3579a2ec

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 20:55:27 -07:00
gsxdsm
0e2aa49f8d FN-8520: hide uninstalled runtimes from Settings
Keep Settings runtime navigation synchronized with installed runtime plugins.

- Filter runtime sections to installed plugins while preserving disabled installed runtimes
- Refresh runtime navigation after plugin lifecycle events and direct plugin mutations
- Add Settings coverage and document runtime visibility behavior

Files changed:
 .changeset/fn-8520-runtime-sidebar.md              |  7 +++
 docs/dashboard-guide.md                            |  2 +-
 .../dashboard/app/components/PluginManager.tsx     | 10 +++-
 .../dashboard/app/components/SettingsModal.tsx     | 70 +++++++++++++++++++++-
 .../__tests__/SettingsModal.general.test.tsx       | 58 ++++++++++++++++++
 .../__tests__/SettingsModal.test-harness.tsx       |  2 +
 .../components/__tests__/settings-mobile.test.tsx  |  1 +
 .../settings/sections/PluginsSection.tsx           |  6 +-
 8 files changed, 149 insertions(+), 7 deletions(-)

Fusion-Task-Id: FN-8520

Fusion-Task-Lineage: 914ae503-e1b0-4051-bc01-4da950bf55b3

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 20:38:25 -07:00
Fusion
96a9da7979 FN-8505: notify operators of terminal task wedges
Deliver durable, actionable notifications when terminal task recovery wedges.

- Persist and deduplicate terminal wedge notification episodes across task updates and service restarts.
- Classify terminal failure and self-healing escalation states, then deliver actionable ntfy and mailbox alerts.
- Align PostgreSQL baseline and upgrade migration registration for the durable wedge field.

Files changed:
 .changeset/fn-8505-task-wedge-notifications.md     |   7 +
 docs/agents.md                                     |   4 +
 docs/architecture.md                               |   4 +
 .../core/src/postgres/migrations/0000_initial.sql  |   2 +
 .../migrations/0033_fn-8505_wedge_notification.sql |   5 +
 packages/core/src/postgres/schema-applier.ts       |  29 +++-
 packages/core/src/postgres/schema/project.ts       |   1 +
 packages/core/src/store.ts                         |  22 ++-
 packages/core/src/task-store/persistence.ts        |   2 +
 packages/core/src/task-store/serialization.ts      |   1 +
 packages/core/src/task-store/task-row-mappers.ts   |   2 +-
 packages/core/src/task-store/task-update.ts        |   5 +
 packages/core/src/types.ts                         |  14 ++
 packages/core/src/types/workflow-steps.ts          |   2 +
 .../src/__tests__/notification-service.test.ts     |  20 +++
 packages/engine/src/__tests__/notifier.test.ts     |  26 +++-
 packages/engine/src/__tests__/self-healing.test.ts |   9 +-
 .../__tests__/notification-service.test.ts         |  34 ++++-
 .../__tests__/task-wedge-notification.test.ts      | 134 +++++++++++++++++
 .../src/notification/notification-service.ts       | 108 +++++++++++++-
 packages/engine/src/notification/ntfy-provider.ts  |  11 ++
 .../src/notification/task-wedge-notification.ts    | 160 +++++++++++++++++++++
 packages/engine/src/notifier.ts                    |   3 +
 packages/engine/src/self-healing.ts                |  17 +++
 24 files changed, 610 insertions(+), 12 deletions(-)

Fusion-Task-Id: FN-8505
Fusion-Task-Lineage: eee85220-18ba-475d-9d01-dc96e2b923e6
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 20:07:48 -07:00
gsxdsm
fd9e4b2a30 FN-8509: create Coding Ideas Start tasks in Todo
Coding Ideas Start now atomically creates tasks in the validated Todo column.

- Resolve Todo only from captured, visible Coding Ideas workflow metadata.
- Preserve explicit Start destinations through Board and List create hosts without a follow-up move.
- Add regression coverage, documentation, and a patch changeset.

Files changed:
 .changeset/fn-8509-coding-ideas-start-todo.md      |  7 +++++
 docs/dashboard-guide.md                            |  4 +--
 packages/dashboard/app/components/Column.tsx       |  8 +++++-
 packages/dashboard/app/components/ListView.tsx     |  5 ++++
 .../dashboard/app/components/QuickEntryBox.tsx     | 17 +++++++-----
 .../app/components/__tests__/Column.test.tsx       | 16 ++++++++++-
 .../app/components/__tests__/ListView.test.tsx     | 31 +++++++++++++++++++++-
 .../components/__tests__/QuickEntryBox.test.tsx    | 31 ++++++++++------------
 .../app/utils/__tests__/quickAddStart.test.ts      | 25 ++++++++++++++++-
 packages/dashboard/app/utils/quickAddStart.ts      | 21 ++++++++++++++-
 10 files changed, 134 insertions(+), 31 deletions(-)

Fusion-Task-Id: FN-8509

Fusion-Task-Lineage: 951599a0-f277-4499-aaea-90371ddeda72

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 19:08:47 -07:00
gsxdsm
1cd06746fe FN-8502: add photo and file attachments to Chat and Quick Add
Enable supported photo and file attachment workflows across Quick Add and Chat.

- Expand Quick Add and Chat picker, paste, and drag/drop attachment intake.
- Preserve pending attachments until direct and room sends are accepted, with accessible previews and retry support.
- Align Chat MIME and size validation with task attachments, including video, Markdown, and TOML support.
- Add regression coverage for attachment previews, delivery behavior, and accepted MIME types.

Files changed:
 .changeset/fn-8502-chat-quick-add-attachments.md   |   7 ++
 docs/dashboard-guide.md                            |   5 +-
 ... quick-entry-attachment-preview-modal.test.tsx} |  50 ++++++--
 packages/dashboard/app/components/ChatView.tsx     |  80 +++++++++++--
 .../dashboard/app/components/InlineCreateCard.tsx  |   6 +-
 .../app/components/PendingAttachmentPreviews.css   |  60 ++++++++++
 ...ePreviews.tsx => PendingAttachmentPreviews.tsx} |  68 ++++++-----
 .../app/components/PendingImagePreviews.css        |  35 ------
 .../dashboard/app/components/QuickEntryBox.tsx     | 127 +++++++++++++--------
 packages/dashboard/app/components/TaskForm.tsx     |   6 +-
 .../__tests__/ChatView.core-interactions.test.tsx  |  61 ++++++++--
 .../__tests__/ChatView.mobile-render.test.tsx      |  20 +++-
 .../components/__tests__/ChatView.rooms.test.tsx   |  27 ++++-
 .../components/__tests__/QuickEntryBox.test.tsx    |  59 ++++++++--
 packages/dashboard/app/hooks/useChat.ts            |  41 ++++++-
 .../src/__tests__/chat-attachment-content.test.ts  |  17 +++
 packages/dashboard/src/chat-attachment-content.ts  |   4 +-
 .../dashboard/src/routes/chat-attachment-config.ts |  16 +++
 .../src/routes/register-chat-room-routes.ts        |   9 +-
 .../dashboard/src/routes/register-chat-routes.ts   |  11 +-
 20 files changed, 534 insertions(+), 175 deletions(-)

Fusion-Task-Id: FN-8502

Fusion-Task-Lineage: 0205187c-7e5b-45f8-a71d-fcfd9fb01e65

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 18:46:46 -07:00
gsxdsm
227281dc32 FN-8503: preserve unbounded Code Review retries
Keep Code Review remediation retry policies accurate across graph execution and recovery.

- Preserve unlimited retry presentation when Code Review has no configured cap
- Enforce finite Code Review caps during failed-step recovery
- Validate non-negative revision settings and document the active retry policy

Files changed:
 .../fn-8503-unbounded-code-review-retries.md       |   7 ++
 docs/workflow-steps.md                             |   2 +-
 .../core/src/__tests__/builtin-workflows.test.ts   |   8 +-
 packages/core/src/builtin-workflow-settings.ts     |   4 +
 .../workflow-graph-optional-step-fix.test.ts       | 135 +++++++++++++++++++++
 packages/engine/src/executor.ts                    |  51 ++++++--
 6 files changed, 193 insertions(+), 14 deletions(-)

Fusion-Task-Id: FN-8503

Fusion-Task-Lineage: 7bd555d1-23e5-42ea-b6f5-0b9fe4da7f94

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 18:32:36 -07:00
gsxdsm
f120e6c879 FN-8506: run static checks in verify:fast
Run canonical pretest validators before test-free verification work.

- Derive read-only static check steps from the root pretest script.
- Test fail-fast static-check planning and execution.
- Document the expanded verify:fast gate and correct changeset metadata.

Files changed:
 .changeset/mobile-board-pointercancel-settle.md |   2 +-
 docs/testing.md                                 |   5 +-
 scripts/__tests__/verify-fast.test.mjs          | 105 ++++++++++++++++++++++--
 scripts/verify-fast.mjs                         |  86 ++++++++++++++++---
 4 files changed, 174 insertions(+), 24 deletions(-)

Fusion-Task-Id: FN-8506

Fusion-Task-Lineage: 87f74fda-1fd0-4e08-9bfe-51e0c4c9a31d

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 18:26:33 -07:00
gsxdsm
da616e1cf9 FN-8498: add Quick Add Start menu
Add gesture-only Quick Add Start promotion for eligible hold-based workflows.

- Open a Start menu with right-click or touch/pen long-press while preserving ordinary Save and Enter behavior.
- Validate and snapshot workflow routing before creating, then move matching tasks through host callbacks.
- Cover workflow guards, promotion outcomes, and Board/List callback wiring.

Files changed: .changeset/fn-8498-quick-add-start-menu.md         |   7 ++
 docs/dashboard-guide.md                            |   4 +
 packages/dashboard/app/components/Column.tsx       |   1 +
 packages/dashboard/app/components/ListView.tsx     |   1 +
 .../dashboard/app/components/QuickEntryBox.css     |  30 +++++
 .../dashboard/app/components/QuickEntryBox.tsx     | 115 ++++++++++++++++-
 .../app/components/__tests__/Column.test.tsx       |  10 +-
 .../app/components/__tests__/ListView.test.tsx     |  12 ++
 .../components/__tests__/QuickEntryBox.test.tsx    | 137 +++++++++++++++++++++
 .../app/utils/__tests__/quickAddStart.test.ts      |  38 ++++++
 packages/dashboard/app/utils/quickAddStart.ts      |  51 ++++++++
 11 files changed, 400 insertions(+), 6 deletions(-)

Fusion-Task-Id: FN-8498

Fusion-Task-Lineage: 30d8e7d4-59f1-4c4f-9224-1a9d8c27141b

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 16:31:24 -07:00
gsxdsm
9002fca9de FN-8497: reduce merge gate wall time
Keep merge-gate coverage focused while running its independent test lanes concurrently.

- Limit PostgreSQL gate coverage to lifecycle and transactional-handoff canaries.
- Run engine and PostgreSQL gate lanes concurrently while preserving failure propagation.
- Enforce canary coverage policy and refresh velocity documentation and history.

Files changed:
 docs/test-velocity-baseline.md                     |  16 +--
 docs/testing.md                                    |   5 +-
 package.json                                       |   2 +-
 packages/core/package.json                         |   2 +-
 .../__tests__/engine-vitest-gate-policy.test.mjs   |  79 +++++++++++++-
 scripts/test-velocity-history.json                 | 115 +++++++++++++++++++++
 6 files changed, 204 insertions(+), 15 deletions(-)

Fusion-Task-Id: FN-8497
Fusion-Task-Lineage: 8777959c-6d8c-4686-a975-d91af2c169ea
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 15:47:24 -07:00
gsxdsm
3cd023fa43 FN-8491: add declarative plugin MCP server registrations
Enable plugins to declare per-project MCP server registrations.

- Add plugin MCP server contribution types, loading, and resolution across core and engine runtimes.
- Expose resolved plugin registrations through project configuration APIs and MCP settings UI.
- Document the declarative contribution API and add release metadata and regression coverage.

Files changed:
 .changeset/plugin-mcp-servers.md                   |  7 ++
 docs/PLUGIN_AUTHORING.md                           | 17 +++++
 docs/mcp.md                                        |  4 ++
 docs/settings-reference.md                         |  4 ++
 packages/core/src/__tests__/mcp-config.test.ts     | 33 +++++++++
 .../__tests__/plugin-contribution-types.test.ts    | 16 +++++
 .../__tests__/plugin-loader-single-load.test.ts    | 23 +++++++
 packages/core/src/index.gate.ts                    |  3 +
 packages/core/src/index.ts                         |  3 +
 packages/core/src/mcp-config.ts                    | 37 ++++++++--
 packages/core/src/plugin-loader.ts                 | 24 +++++++
 packages/core/src/plugin-mcp-servers.ts            | 78 ++++++++++++++++++++++
 packages/core/src/plugin-types.ts                  | 15 ++++-
 packages/core/src/types.ts                         |  2 +-
 .../__tests__/SettingsModal.mcp.test.tsx           | 34 +++++++++-
 .../settings/sections/McpServersCard.tsx           | 52 ++++++++++-----
 .../settings/sections/ProjectMcpSection.tsx        | 31 ++++++++-
 .../register-config-mcp-pi-settings-routes.test.ts | 18 ++++-
 packages/dashboard/src/routes/context.ts           | 71 +++++++++++++++++++-
 .../register-config-mcp-pi-settings-routes.ts      | 30 ++++++++-
 .../engine/src/__tests__/mcp-resolution.test.ts    | 20 ++++++
 packages/engine/src/mcp-resolution.ts              | 15 ++++-
 packages/engine/src/plugin-runner.ts               | 38 +++++++++++
 packages/engine/src/runtimes/in-process-runtime.ts | 23 +++++++
 packages/plugin-sdk/src/index.ts                   |  1 +
 25 files changed, 563 insertions(+), 36 deletions(-)

Fusion-Task-Id: FN-8491

Fusion-Task-Lineage: be7e22fa-5776-4b3d-9fd1-a873799e6427

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 15:25:20 -07:00
gsxdsm
875d057d16 FN-8495: refresh W29 test velocity baseline
Refresh the weekly test velocity publication with the latest measurements.

- Record updated gate, boot smoke, and changed-only test timings.
- Append the W29 velocity history entry and update the published summary.
- Point testing guidance to the canonical weekly velocity workflow.

Files changed:
 docs/test-velocity-baseline.md     |  16 +++---
 docs/testing.md                    |  10 +---
 scripts/test-velocity-history.json | 115 +++++++++++++++++++++++++++++++++++++
 3 files changed, 124 insertions(+), 17 deletions(-)

Fusion-Task-Id: FN-8495

Fusion-Task-Lineage: db432471-13a2-41b1-a951-f735c96456e9

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 15:14:34 -07:00
gsxdsm
53e3063e9f FN-8490: load skills for foreach step-execute sessions
Honor skill-executor configuration for implementation sessions created by foreach templates.

- Propagate validated step-execute skill names through workflow seam context.
- Load namespaced and bare skills with configured discovery paths for pinned step sessions.
- Add regression coverage, workflow documentation, and a minor changeset.

Files changed:
 .changeset/fn-8490-step-execute-skill.md           |   7 ++
 docs/workflow-steps.md                             |   4 +-
 .../__tests__/step-execute-skill-loading.test.ts   | 128 +++++++++++++++++++++
 packages/engine/src/executor.ts                    |  62 +++++++++-
 packages/engine/src/workflow-node-handlers.ts      |  21 ++++
 5 files changed, 219 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-8490

Fusion-Task-Lineage: aa1ff02d-3139-45f2-8853-f53c0aef0f2f

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 15:07:59 -07:00
gsxdsm
4419bdbd04 Update baseline 2026-07-22 14:32:07 -07:00
gsxdsm
d5df6fc635 docs(FN-6612): refresh test velocity baseline
Record the W30 measurements, quarantine count, and stale timing-snapshot warning for the weekly velocity report.
2026-07-22 13:47:58 -07:00
flexi767
8e6985aed3 feat(core): reconcile archived mission evidence atomically (#2379)
## Summary

- add an atomic PostgreSQL operation that reconciles a mission feature
with a terminal delivery task
- support retained archived-task evidence without unarchiving or waking
mission automation
- reject missing, active, deleted-without-archive, and duplicate-linked
task evidence without partial mutation
- route the reconciliation endpoint through the transactional store
operation

## Root cause

Mission reconciliation previously relied on ordinary task-link and
lifecycle paths that cannot safely use retained archived task evidence.
That made historical delivery repair either impossible or vulnerable to
partial linkage and unintended mission-loop side effects.

## Scope

This PR contains the reusable product capability recovered from FX-001.
It intentionally does not perform the project-specific 69-row live data
mutation; that operational reconciliation was blocked by ambiguous
evidence and belongs outside the source change.

## Validation

- PostgreSQL mission-store tests: 23 passed
- dashboard reconciliation route tests: 3 passed
- `@fusion/core` typecheck
- `@fusion/dashboard` typecheck
- targeted ESLint
- strict changeset validation


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

## Summary by CodeRabbit

* **New Features**
* Added safer reconciliation for completed mission features using
validated terminal task evidence.
* Supports eligible archived tasks without restoring or relinking them.
* Reconciliation is idempotent and updates related mission progress
consistently.

* **Bug Fixes**
* Prevented conflicting or invalid task evidence from changing mission
state.
  * Added atomic rollback when reconciliation encounters an error.
* Improved API responses for missing resources and reconciliation
conflicts.

* **Documentation**
* Expanded reconciliation safety, error, idempotency, and
duplicate-cleanup guidance.

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

---------

Co-authored-by: fusion-merge-train <merge-train@topkoli.local>
Co-authored-by: Fusion <noreply@runfusion.ai>
2026-07-22 13:46:08 -07:00
gsxdsm
56efd7488e fix(engine): stop false-positive stuck loop kills on iterative work (#2404)
## Summary

- Fix a false-positive in `StuckTaskDetector` where legitimate long
single-step work (E2E debugging, iterative fix/test cycles) was
classified as a loop and kill/requeued.
- Root cause: loop meant “no step status transition for
`taskStuckTimeoutMs` + high activity volume,” conflating **step
progress** with **actual activity**. Agents can stay productively busy
on one step for 10+ minutes with zero repetition.
- Loop now requires thrash evidence on top of volume + no step progress:
- **repetitive tool fingerprints** (`toolName` + primary-arg detail in a
sliding window), or
  - **elevated ignored step-update rebuffs** (≥ 10)
- Wire tool name/detail from `AgentLogger` → executor / step-session
into `recordActivity(...)` so novelty is measurable.
- Document the thrash-evidence rule in `docs/architecture.md`.

## Test plan

- [x] `pnpm --filter @fusion/engine exec vitest run
src/__tests__/stuck-task-detector.test.ts
src/__tests__/reliability-interactions/non-progress-churn.test.ts`
- [x] Regression: high-volume **diverse** iterative activity (174
events) does **not** classify as loop
- [x] High bare text/heartbeat volume without tools does **not**
classify as loop
- [x] Repetitive identical tool fingerprint + timeout **does** classify
as loop
- [x] Ignored step-update thrash (≥10) with volume **does** classify as
loop
- [x] Existing FN-5168 no-progress-churn + FN-6598 verification
suppression paths still pass
- [ ] CI gate green

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

* **Bug Fixes**
* Improved stuck/loop classification by requiring explicit “thrash
evidence” (repetitive tool fingerprints and/or elevated ignored progress
rebuffs), reducing false positives for busy but diverse work.
* Updated loop evidence tracking to incorporate tool name plus
summarized tool-argument detail.
* Cleared loop evidence appropriately after verification, progress
updates, and task resumption.
* Extended tool-start telemetry/callbacks to include optional tool
detail.
* **Documentation**
* Refined loop-classification criteria to match the new evidence gates.
* **Tests**
* Updated/expanded stuck/loop and churn scenarios to validate the
evidence-based behavior and callback ordering.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-22 13:43:55 -07:00
gsxdsm
57af2490fe FN-8489: hard-settle mobile board column swipes
Ensure mobile board pans never stop between columns.

- Detect centered columns before resolving a zero-direction pan
- Snap off-center zero-direction pans to the nearest column center
- Add regression coverage and document the mobile settle behavior

Files changed:
 .changeset/fn-8489-mobile-column-settle.md         |  7 +++++
 docs/dashboard-guide.md                            |  2 +-
 .../app/components/__tests__/board-mobile.test.tsx |  4 +--
 .../hooks/__tests__/useColumnScrollSnap.test.ts    | 32 ++++++++++++++++++++++
 .../dashboard/app/hooks/useColumnScrollSnap.ts     | 29 ++++++++++++++++++--
 5 files changed, 69 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-8489

Fusion-Task-Lineage: 555bd906-0ac8-4c43-a00b-24d1e716488a

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 09:17:14 -07:00
gsxdsm
e514e134da fix: apply project model lanes across workflows (#2400)
## Summary

Project workflow model lanes now apply to tasks on every workflow
instead of only tasks using the active default workflow. Model selection
consistently resolves task-specific choice -> project workflow baseline
-> global lane -> selected-workflow value -> project/global default for
primary models, fallback models, and thinking levels.

The active default workflow remains the storage owner for backward
compatibility, while runtime resolution keeps its project baseline
distinct from lower-priority selected-workflow values. Non-model
workflow policies remain isolated to their selected workflow.

## Validation

- Core workflow/model resolution: 60 tests passed
- Engine effective settings and session resolution: 59 tests passed
- Reviewer: 85 tests passed
- Scheduler: 154 tests passed
- Heartbeat: 90 tests passed
- Settings UI: 67 tests passed
- Workspace lint and core/engine/dashboard typechecks passed
- `pnpm verify:fast` passed workspace builds, the published CLI build,
and real `/api/health` boot smoke

---

[![Compound
Engineering](https://img.shields.io/badge/Built_with-Compound_Engineering-6366f1)](https://github.com/EveryInc/compound-engineering-plugin)


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

* **New Features**
* Added **Project workflow model lanes** to establish a project baseline
for model selection and thinking levels across workflows.
* Updated model/fallback resolution to account for task overrides,
project baselines, global lanes, and selected-workflow values.
* **Bug Fixes**
* Improved effective settings merging so project baselines are applied
correctly (including scheduled/idle and heartbeat flows) while
preserving selected-workflow provenance.
* **Documentation**
* Refreshed settings and dashboard guidance for workflow lane
inheritance and resolution precedence.
* **Tests**
* Expanded unit test coverage for lane precedence, fallback detection,
and thinking-level behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-22 08:53:31 -07:00
gsxdsm
4efa7b51c6 fix(dashboard): harden mobile board column snap direction and settle
Lock snap direction at finger-up from the net swipe, page only in that scroll direction, hard-jump and pin until the next touch so residual fling and CSS proximity no longer drift after settle.
2026-07-22 08:32:33 -07:00
flexi767
f21d3ce132 feat(core): support additive archived task documents (#2375)
## Summary

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

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

## Why

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

## Dependency

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

## Validation

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

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

## Summary by CodeRabbit

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

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

---------

Co-authored-by: fusion-merge-train <merge-train@topkoli.local>
Co-authored-by: Fusion <noreply@runfusion.ai>
Co-authored-by: v <v@v.speedport.ip>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 08:30:12 -07:00
gsxdsm
0ade15481d FN-8477: label planning model activity logs
Planning activity consistently identifies its model provenance while preserving legacy log compatibility.

- Emit Planning using model markers from the planning lane.
- Accept Planning and legacy Triage markers in dashboard model resolution.
- Update documentation, regression coverage, and release metadata.

Files changed:
 .changeset/fn-8477-planning-model-marker.md        |  7 +++++++
 docs/agents.md                                     |  2 +-
 packages/dashboard/app/components/TaskChatTab.tsx  |  2 +-
 .../app/components/__tests__/TaskChatTab.test.tsx  |  2 +-
 ...skDetailModal.models-progress-workflow.test.tsx |  4 ++--
 .../__tests__/WorkflowResultsTab.test.tsx          |  2 +-
 .../__tests__/effective-model-resolution.test.ts   | 24 ++++++++++++++--------
 .../app/components/effective-model-resolution.ts   | 20 ++++++++++++------
 packages/engine/src/__tests__/triage.test.ts       |  8 ++++----
 packages/engine/src/triage.ts                      |  8 ++++++--
 10 files changed, 52 insertions(+), 27 deletions(-)

Fusion-Task-Id: FN-8477

Fusion-Task-Lineage: 7ddce64a-d378-4d08-ad63-ade1b20d4b87

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 00:30:34 -07:00
gsxdsm
fee920d366 FN-8478: open board deep tabs in task popups
Make board task deep-tab actions preserve their requested popup tab when task popups are enabled.

- Route Changes, Retries, and Workflow board actions through the popup preference.
- Store and refresh each popup's requested initial tab for its task and view.
- Add regression coverage, documentation, and a patch changeset.

Files changed:
 .changeset/task-card-popup-deep-tabs.md            |  7 +++++
 docs/dashboard-guide.md                            |  4 +--
 docs/settings-reference.md                         |  2 +-
 packages/dashboard/app/App.tsx                     | 25 ++++++++++-----
 .../__tests__/App.openTasksInRightSidebar.test.ts  | 36 ++++++++++++----------
 .../__tests__/navigation-history.test.tsx          | 25 ++++++++++++++-
 .../settings/sections/AppearanceSection.tsx        |  4 +--
 .../app/hooks/__tests__/usePoppedOutTasks.test.ts  | 13 ++++++++
 packages/dashboard/app/hooks/usePoppedOutTasks.ts  | 15 ++++++---
 9 files changed, 97 insertions(+), 34 deletions(-)

Fusion-Task-Id: FN-8478

Fusion-Task-Lineage: e12452c0-24d5-4f19-b50c-39526d72d7ab

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 00:22:42 -07:00
gsxdsm
cd51e1c0d8 FN-8471: add color theme filtering
Add a searchable shared color-theme picker for Settings and Command Center.

- Filter translated theme labels case- and diacritic-insensitively
- Preserve keyboard navigation, focus management, and selection behavior
- Document the picker and add a minor release changeset

Files changed:
 .changeset/fn-8471-theme-filter.md                 |   7 +
 docs/dashboard-guide.md                            |   3 +-
 .../dashboard/app/components/ThemeDropdown.css     |  32 ++++
 .../dashboard/app/components/ThemeDropdown.tsx     | 172 +++++++++++++++------
 .../components/__tests__/ThemeDropdown.test.tsx    | 106 +++++++++++++
 .../components/__tests__/ThemeSelector.test.tsx    |   1 +
 .../__tests__/CommandCenterControls.test.tsx       |   1 +
 7 files changed, 277 insertions(+), 45 deletions(-)

Fusion-Task-Id: FN-8471

Fusion-Task-Lineage: 1f73dfb8-18bb-48e6-a3ed-0ee3a200cf03

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-21 23:03:35 -07:00
gsxdsm
c94920d885 FN-8466: allow reads of advertised plugin skills
Allow isolated worktree sessions to read only host-advertised plugin skill roots.

- Normalize additional skill paths once for resource loading and boundary checks
- Permit read, glob, and grep while keeping write, edit, and Bash worktree-bound
- Document the boundary and cover root normalization and access restrictions

Files changed:
 .changeset/fn-8466-skill-path-read-boundary.md     |   7 ++
 docs/agents.md                                     |   4 +
 .../src/__tests__/pi-create-fn-agent.test.ts       | 108 +++++++++++++++++++++
 packages/engine/src/pi.ts                          |  75 +++++++++++---
 4 files changed, 183 insertions(+), 11 deletions(-)

Fusion-Task-Id: FN-8466

Fusion-Task-Lineage: ff6566be-803d-48b8-8550-aa1bfe080fed

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-21 19:46:29 -07:00
gsxdsm
859475d0bd FN-8467: align project plugin enablement state
Keep project-scoped plugin enablement consistent across dashboard and loaders.

- Resolve plugin loaders from the requested project's store and reuse scoped fallback loaders.
- Preserve authoritative enable and disable responses during dashboard refresh races.
- Add route and manager regression coverage, documentation, and a patch changeset.

Files changed:
 .../fn-8467-plugin-enable-state-consistency.md     |   7 ++
 docs/multi-project.md                              |   1 +
 docs/plugin-management.md                          |   4 +-
 .../dashboard/app/components/PluginManager.tsx     |  36 ++++--
 .../__tests__/PluginManager.toggle.test.tsx        |  38 ++++++
 .../src/__tests__/plugin-routes.routes.test.ts     | 134 ++++++++++++++++++---
 .../src/routes/register-plugins-automation.ts      | 118 +++++++++++++-----
 7 files changed, 281 insertions(+), 57 deletions(-)

Fusion-Task-Id: FN-8467
Fusion-Task-Lineage: 697a0783-9771-4140-bc82-53491a2d0b70
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-21 19:35:03 -07:00
gsxdsm
746d33e7e6 FN-8468: prevent duplicate plugin startup loads
Ensure plugins share one process-wide startup lifecycle.

- Coalesce concurrent host and engine plugin loads into a single onLoad invocation.
- Synchronize reload and stop operations across participating loaders.
- Add regression coverage and document single-load lifecycle behavior.

Files changed:
 .changeset/fn-8468-plugin-single-onload.md         |   7 +
 docs/PLUGIN_AUTHORING.md                           |   1 +
 .../__tests__/plugin-loader-single-load.test.ts    | 126 +++++++++++++
 packages/core/src/plugin-loader.ts                 | 194 +++++++++++++++++++--
 .../__tests__/plugin-startup-single-load.test.ts   |  59 +++++++
 5 files changed, 370 insertions(+), 17 deletions(-)

Fusion-Task-Id: FN-8468

Fusion-Task-Lineage: a211f445-d236-44de-837b-28b9e15c7c52

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-21 19:28:35 -07:00
gsxdsm
51fc34f585 FN-8465: align skill toggles with canonical paths
Align session skill filtering with Skills-view path identities.

- Match session inclusions, exclusions, and diagnostics by skills-relative body path.
- Ignore stale flat toggle keys for categorized skills and cover the display/session invariant.
- Document the behavior and add a patch changeset.

Files changed:
 .../fn-8465-legacy-skill-toggle-path-match.md      |   7 ++
 docs/dashboard-guide.md                            |   2 +-
 .../legacy-flat-skill-toggle-session-divergence.md |  41 ++++++++
 .../engine/src/__tests__/skill-resolver.test.ts    |  73 ++++++++++++++
 packages/engine/src/skill-resolver.ts              | 105 ++++++++++++++-------
 5 files changed, 191 insertions(+), 37 deletions(-)

Fusion-Task-Id: FN-8465

Fusion-Task-Lineage: 042fc7f4-08a3-42f4-9a6f-52f066d585e8

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-21 19:17:20 -07:00
gsxdsm
648971634a FN-8461: suppress spurious workflow skill-load warnings
Prevent optional CE configuration from producing warnings when a requested plugin skill is discoverable.

- Merge plugin skill body directories with the optional CE discovery root
- Warn only when the named workflow skill lacks every viable discovery source
- Cover plugin, CE-namespaced, and unrelated-skill discovery cases

Files changed:
 .changeset/fn-8461-skill-load-warning.md           |   7 +
 docs/workflow-steps.md                             |   8 +-
 .../__tests__/ce-workflow-step-executor.test.ts    | 149 ++++++++++++++++++++-
 .../engine/src/__tests__/executor-test-helpers.ts  |   1 +
 packages/engine/src/executor.ts                    |  53 ++++++--
 5 files changed, 200 insertions(+), 18 deletions(-)

Fusion-Task-Id: FN-8461

Fusion-Task-Lineage: ef743df4-8bd2-44e6-9498-f6448738d6dc

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-21 19:05:48 -07:00
gsxdsm
2bf3d81a76 fix(dashboard): restore accurate executing/total column headers
Show live agents over card count (e.g. 3/4) using the shared Running
predicate so unpaused WIP counts without sessionFile, and document the
badge semantics for operators.
2026-07-21 18:59:52 -07:00