Commit Graph

4621 Commits

Author SHA1 Message Date
gsxdsm
aedee4b823 feat(docker): ship ripgrep in the image
The coding agents Fusion drives reach for `rg` as their primary search tool. It
was absent from the image, so inside a container they silently fall back to
slower or partial search while working fine on a developer machine that has it
installed. Operator asked for it by default.

Installed alongside git and ca-certificates in the runner stage, and covered by
the same runner-stage guard so it cannot quietly drop out again.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 22:43:59 -07:00
gsxdsm
3105b06102 fix(docker): install ca-certificates so git can clone over HTTPS
Operator hit "Git clone failed: ... server certificate verification failed.
CAfile: none CRLfile: none" the moment they tried to add a project in the
container.

The runner stage installed git but not ca-certificates, and the slim base ships
zero CA certificates (/etc/ssl/certs was empty). git verifies TLS against the
SYSTEM trust store, so every HTTPS remote failed and project setup — the first
thing anyone does after logging in — was impossible in Docker.

It hid because Node carries its OWN bundled CA store: the dashboard, model API
calls, and the OAuth token exchanges against platform.claude.com and OpenAI all
worked fine, so the image looked healthy right up until the first clone. Nothing
else in the image exercises the system trust store, so a guard is added rather
than trusting someone to notice next time.

Verified in the running container: installing ca-certificates took it from 0 to
301 certs and `git clone https://github.com/Runfusion/Fusion.git` then succeeded
as the node user.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 22:21:13 -07:00
gsxdsm
9eae6b9bc5 fix(auth): a provider's first-ever login silently saved nothing
Operator could not log in to Anthropic or Codex on a fresh container: every
attempt ended "Login did not complete. Please try again.", while the same
providers worked flawlessly on their long-lived native install.

FusionAuthStorage.modify() is the seam pi persists a COMPLETED LOGIN through
(Models.login -> credentials.modify(provider.id, ...) in pi-ai models.js:198).
It resolved its write target with `creating: false` and returned before invoking
the callback whenever the provider had no credential row yet:

    const target = this.resolveWriteTarget(provider, current, false);
    if (!target || !this.credential(target, current)) return { changed: false };

So a first login completed its browser flow, exchanged the code, took and
released the lock file, wrote NOTHING, and resolved as success — leaving the
dashboard poll to see authenticated:false and report the generic failure.

It reproduces only on a store with no existing row, which is why it looked
environment-specific: an install that has logged in before takes the same path
as a refresh over an existing row and is fine, while every new container, new
machine, or wiped ~/.fusion can never complete a first login for ANY provider.

Evidence from the operator's container: flow ended with err=None (pi resolved,
no error), nothing logged, auth.json still {}, the agent directory's mtime
bumped when the lock was taken and released while auth.json itself never
changed, and an API-key write — which goes through set(), not modify() — landed
immediately.

modify() now creates when absent and updates when present; a callback returning
undefined still writes nothing, so pi's refresh-bails-out behaviour is unchanged.

auth-storage-instances.test.ts asserted the old behaviour, grouping modify() with
remove/logout/removeInstance as "non-creating". The removal guarantees are kept;
the modify() assertion is inverted, because it encoded the defect.

Also surfaces the server's own loginError through a new describeLoginFailure()
helper instead of the generic sentence, so an OAuth state mismatch reads as the
stale-tab instruction it is. Writing its test caught a bad regex of mine:
`code.*expired` matched "OpenAI Codex ... token_expired", a different failure.

Verified: the new first-login test fails against the old `creating: false` and
passes with the fix; 86 engine auth tests, 238 dashboard auth/dialog tests, and
pnpm test:gate all pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 21:39:06 -07:00
gsxdsm
7c1d06237c feat(dashboard): use the persistent sign-in dialog in Settings authentication too
Settings had its own copy of the flow onboarding just replaced: instructions and
the paste field rendered inline in the provider row of a scrolling list, with no
single place showing what the login was waiting on. Same dialog now serves both,
so an operator who learns the flow at first run sees it again when adding a
provider later.

Settings differs in one way that matters: every flow is keyed by `stateKey`
(`providerId`, or `providerId[instance]` for a named credential instance),
because one provider can hold several accounts. `loginDialog` therefore carries
{ stateKey, providerId, instanceId, providerName } and threads instanceId back
to handleSubmitManualCode / handleCancelLogin, and the row suppresses its own
instructions + paste field ONLY for the key the dialog owns — a sibling account
keeps its inline field. (An early draft keyed on `provider:default`, which is
not the real format and broke exactly that case; caught by the new tests.)

The dialog renders outside renderModalShell: the modal presentation is a
FloatingWindow, and a portaled dialog inside a window's React subtree lifts that
window above itself on first click. The embedded presentation is unaffected.

Verified in a container build against the real Settings UI: dialog opens on
Continue to login, the row's inline paste field disappears (0 present), exactly
one paste field exists, and the dialog is not a descendant of the window.
756 dashboard tests pass, including 3 new handoff tests; typecheck and eslint clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 20:58:15 -07:00
gsxdsm
0a50e2142d FN-9143: inherit selected workflow in New Task dialog
Make every New Task entry point seed the dialog from the active Board or List workflow.

- Resolve implicit workflow selection through the modal manager while preserving explicit choices and All workflows behavior.
- Forward selected workflow IDs from List view and navigation-backed dialog entry points.
- Add cross-surface regression coverage, operator documentation, and a patch changeset.

Files changed:
 .changeset/fn-9143-new-task-selected-workflow.md   |  7 +++
 docs/dashboard-guide.md                            |  2 +-
 packages/dashboard/app/App.tsx                     |  4 +-
 packages/dashboard/app/components/AppModals.tsx    |  4 +-
 packages/dashboard/app/components/Column.tsx       |  4 +-
 .../dashboard/app/components/LeftSidebarNav.tsx    |  4 +-
 packages/dashboard/app/components/ListView.tsx     |  7 ++-
 .../components/__tests__/LeftSidebarNav.test.tsx   |  1 +
 .../app/components/__tests__/ListView.test.tsx     | 13 +++--
 .../new-task-dialog-selected-workflow.test.tsx     | 46 ++++++++++++++++++
 .../dashboard/app/components/dashboard/types.ts    |  2 +-
 .../app/hooks/__tests__/useModalManager.test.ts    | 55 ++++++++++++++++++++++
 packages/dashboard/app/hooks/useModalManager.ts    | 19 ++++++--
 13 files changed, 148 insertions(+), 20 deletions(-)

Fusion-Task-Id: FN-9143

Fusion-Task-Lineage: 43951c5d-24d2-4243-826a-c6f416607882

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-17 20:54:43 -07:00
gsxdsm
83a33be353 feat(dashboard): persistent sign-in dialog for paste-back provider logins
Operator report: during a container login there was nowhere obvious to paste the
redirect URL and no sign of what the app was waiting on. The flow was split
across a pre-flight confirm that warned about paste-back and vanished, a card
that shrank to a disabled "Waiting for login…" chip, and the paste field
rendered inline in that card below the fold of a scrolling modal.

ProviderLoginDialog now opens with the flow and stays until it ends: a two-step
progress list, a button to re-open a lost sign-in tab, the paste field, and the
terminal outcome inline instead of a toast that disappears while the operator is
in another browser tab.

Three defects found and fixed while verifying it in a real container:

- It sank behind the onboarding modal and clicks landed on the modal instead.
  createPortal relocates the DOM node but NOT the React tree, so pointer events
  bubbled to the host FloatingWindow, which raises itself to a fresh
  nextFloatingZ() on every pointerdown — each click in the dialog lifted the
  window above it. Fixed by rendering the dialog as a sibling of the window,
  claiming z once on open (it was calling nextFloatingZ() inline on every render
  of a modal that re-renders on a 2s poll), and stopping propagation on the
  overlay. Ratcheted for every portaled .modal-overlay.
- Spacing did not match any other dialog: it hand-rolled header/action padding
  instead of using .modal-header/.modal-actions, and padded each child
  separately. Every row now shares var(--modal-padding) — verified at a uniform
  17px inset across header, steps, paste prompt, field, Submit, and actions.
- The paste field was invisible (.form-input fills with var(--surface), and so
  does .modal — measured #0c0c0e on #0c0c0e), Submit was a 25px row-density
  btn-sm, and both could scroll out of reach. The field now sinks to var(--bg)
  with var(--border-strong), Submit takes standard control padding, and the
  paste region is pinned outside the scroll area.

Dialog anatomy rules (spacing primitives, portal/stacking) documented in
docs/dashboard-guide.md.

Verified: 441 dashboard tests including 4 new dialog tests, eslint, dashboard
typecheck, and the rendered dialog measured in a container build.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 20:47:28 -07:00
gsxdsm
bb11e493f7 fix(auth): restore Codex login and promote outboard resize targets
Operator report from a containerized dashboard: OpenAI Codex login never opened
a browser window at all, and floating windows still needed the FN-8015 follow-up.

- pi's `AuthPrompt` is a discriminated union — text, secret, select, manual_code —
  and FusionAuthStorage.login's interaction shim flattened every variant into
  `onPrompt({message, placeholder})`, discarding `type` and a select's `options`.
  pi's Codex `login()` OPENS with `prompt({type:"select"})` (Browser vs Device
  code) before emitting any auth URL, so the dashboard answered the method picker
  with the promise that waits for a pasted code — input the UI never solicits,
  because nothing had been surfaced yet. The flow hung until the route's 30s
  kickoff timeout: "Login initiation timed out", no window. The route's
  onSelect/selectOauthOption has had the right answer since FN-5917, but the
  callback was dead code from the moment login moved to pi's ModelRuntime.
  Verified against a real container: the login endpoint now returns Codex's
  auth.openai.com URL in 0.03s instead of timing out after 30s.
- Promote FN-8766's outboard east/NE/SE resize targets from Task Detail to every
  desktop window. With FN-8015's body gutter deleted, a hosted scrollbar sits
  flush against the painted edge where those hit zones used to cover it (issue
  #2140); moving the targets outside the shell keeps it grabbable without
  insetting anything. That needs the host to stop clipping, so the body and its
  direct child inherit the corner radius — only 8 of ~30 callers set that
  themselves — and phones re-assert clipping since they hide every handle.
- Document the fixed OAuth callback ports (Anthropic 53692, Codex 1455) and
  PI_OAUTH_CALLBACK_HOST for Docker: without them the browser callback cannot
  reach the container's loopback listener, which is why subscription logins
  appeared to fail there.

Verified: 14989 dashboard tests, 58 engine auth-storage tests (4 new, covering
each prompt type), pnpm test:gate, eslint, and both typechecks all pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 17:38:26 -07:00
gsxdsm
9db2565e99 fix(dashboard): remove the shared floating-window gutter and fix browser onboarding
Operator report: the first-run "Set Up AI" modal had extra space along its right
edge, and it asked a browser visitor to connect a remote server and mentioned a
native shell they do not have.

Three defects, verified in a real container build at desktop and mobile widths:

- FN-8015 reserved `margin-inline-end: var(--space-lg)` on the shared
  `.floating-window__body` so a hosted scrollbar cleared the east resize hot
  zones. One shared reservation every caller had to know about produced a
  recurring class of asymmetric-right-inset bugs instead: it was zeroed
  piecemeal five times (FN-8766, mobile task detail, FN-8722, FN-8702, every
  tablet window) while two callers leaned on it for their right inset and had to
  restore it whenever one of those predicates fired. Delete the gutter, its five
  overrides, and GitHub Import's borrowed-inset compensation. Where a scrollbar
  and a resize target actually collide, use FN-8766's outboard east targets.
  Trade-off accepted by the operator; the ratchet test now forbids the gutter in
  any stylesheet at any breakpoint.
- The hosted Set Up AI modal did not fill its window: its standalone
  `height: min(85vh, ...)` rule ties on specificity with FloatingWindow's
  `height: 100%` and won on source order, leaving ~60px of dead window surface
  under the footer alongside the 16px gutter strip. Right gap 17px -> 1px,
  bottom gap 62px -> 1px.
- The "Connect remote Fusion server" card keyed only on
  `desktopMode !== "local"`, and `desktopMode` is undefined on web, so every
  browser first-run led with a native-shell hand-off form. Now also requires
  `host !== "web"`.

Verified: 165 dashboard test files / 5829 tests pass, eslint and
`tsc -p tsconfig.app.json` clean, and a container built from this tree shows the
panel flush at 1280x800 and as a symmetric full-screen sheet at 390x844 with no
remote-server card.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 16:56:48 -07:00
gsxdsm
37bd6ee859 chore: add changeset for docker build and volume ownership fixes
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 16:26:30 -07:00
gsxdsm
2eae0b2507 feat: remove stuck-task tagging from the dashboard; fix liveness-ratchet scan path
Removes the dashboard's stuck-task tagging per operator request: the Stuck
card/status badges, stuck row styling, the footer Stuck segment and
stuckTaskCount stat, utils/taskStuck.ts, the isStuck agent-activity gate,
and the taskStuckTimeoutMs prop plumbing (App -> Board/Lane/Column/
WorktreeGroup/MainContent -> TaskCard/ListView/ExecutorStatusBar). Stuck-task
tests are deleted or reconciled. The taskStuckTimeoutMs setting and the
engine's recovery sweeps (including the stuck-killed status) are unchanged —
the setting is engine-side only now.

Also repoints the FN-6756 liveness-gate ratchet's facade scans at
executor/task-executor-session-facades.ts, where the wave20 extraction moved
hasLiveSessionSurface/clearPhantomExecutorBinding (the two pre-existing red
tests on main).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-17 15:47:43 -07:00
gsxdsm
5f29935056 fix: hold task checkouts through progress-preserving recovery rebounds
Ten self-healing rebounds passed preserveProgress without preserveWorktree, so
the reopen-into-planning move hook cleared task.worktree and the idle sweep
reaped the checkout (uncommitted work included) — the same loss mechanism as
the in-review branch-rebind incident. Those rebounds (stuck-loop park,
undeclared-column rehome, finalize-integrity blocks, stale-incomplete-review,
ghost-review, terminal-failure retry, legacy rehome, partial-progress) now pass
preserveWorktree: true; deliberate discards (branch proven merged, zero unique
commits, worktree already missing) carry an explicit worktree-discard-intended
marker.

A new static ratchet test requires every preserveProgress rebound in
self-healing.ts to either preserve the worktree or carry the marker.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-17 15:10:56 -07:00
ischindl
c84924b99a fix(RUFU-076): stop self-healing git storm on paused projects and bound repair sweeps (#3473)
**Problem:** Self-healing repeatedly spawned git children
(status/rev-parse/for-each-ref) for paused/idle projects on every sweep,
and certain repair sweeps ran unbounded — a spawn/git storm that spiked
CPU and I/O on the production host.

**Fix:** Bound self-healing git work for paused projects (skip/cooldown)
and cap the repair sweeps so the engine stops churning git processes
when there is nothing actionable. Includes in-process-runtime pause-gate
+ self-healing pause-storm regression tests.

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

## Summary by CodeRabbit

- **Bug Fixes**
- Paused projects no longer trigger Git-intensive self-healing
maintenance.
- Pause and unpause transitions now correctly stop and resume
maintenance scheduling.
  - Global and engine-level pauses are handled consistently.
- **Improvements**
- Active-project Git maintenance is limited to an hourly cadence,
reducing unnecessary activity.
- Merge-metadata recovery is capped at 25 items per cycle for more
predictable processing.
  - Database and filesystem housekeeping continues during pauses.
- **Documentation**
- Updated architecture and runtime documentation to describe pause-aware
maintenance behavior.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-08-17 15:05:10 -07:00
gsxdsm
3e6eea5421 fix: preserve live worktree through in-review branch rebind and certify lifecycle hold
The in-review branch-rebind sweep unconditionally nulled task.worktree while
repairing a broken branch binding, making the checkout invisible to
scanIdleWorktrees' active set so the idle sweep reaped it — the reported
"worktree lost between review and in-progress" incident. The rebind now keeps
the pointer when the directory exists and is checked out on the rebound branch,
and the applied audit event records preservedWorktree.

Adds a reliability-lane certification suite pinning that worktree metadata and
the on-disk directory survive in-progress ↔ in-review transitions and
idle-in-review maintenance ticks, and that severed metadata is exactly what
makes a directory reap-eligible.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-17 14:37:49 -07:00
ischindl
5e95a930f3 fix(RUFU-075): safest scheduler queue/mission-store writes for minimal stores (#3472)
**Problem:** Scheduler writes assumed a full missionStore contract
(getSlice/getMilestone), aborting/pre-resolving mission reconciliation
when a minimal store or a genuine missing mission was present.

**Fix:** Resolve a missing `missionId` best-effort through
`missionStore.getSlice`/getMilestone when available, and make
reconciliation non-blocking — a partial missionStore must not gate the
completion advance. Includes scheduler + pre.json rebase resolution over
the latest origin.

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

## Summary by CodeRabbit

- **New Features**
  - Added Grok 4.6 to the model catalog.
- Added archive and restore views for mailbox messages and chat
conversations.
- Added manager evaluation tools for reviewing agents and follow-up
actions.
  - Updated the bundled Pi runtime.

- **Bug Fixes**
  - Improved Quick Add model searching and dropdown toggling.
  - Refined Quick Add merger labels and spacing.
- Recommendations now appear only for completed tasks with valid
recommendations.
- Improved scheduler resilience during mission updates and
reconciliation.

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

Co-authored-by: gsxdsm <gsxdsm@users.noreply.github.com>
2026-08-17 13:54:48 -07:00
Phil Larson
0159ef8784 fix: preserve gridlock notification cooldown (#3469)
## Summary
- preserve the gridlock notification wall-clock cooldown across
transient detector clears
- add a regression test for clear-then-rediscover behavior during the
cooldown
- document the cooldown contract and add a patch changeset

## Test plan
- `corepack pnpm --filter @fusion/engine exec vitest run
src/__tests__/notifier.test.ts --project=engine-default
--reporter=verbose -t 'suppresses the same gridlock after a transient
resolution during cooldown'`
- `corepack pnpm --filter @fusion/engine typecheck`
- `corepack pnpm build`
- `corepack pnpm changeset status --output
/tmp/fusion-gridlock-changeset-status.json`


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

- **Bug Fixes**
- Gridlock notifications now remain suppressed during the 15-minute
cooldown, even if the condition temporarily clears and reappears.
- Prevents repeated notifications caused by transient detector-state
changes.

- **Documentation**
- Updated gridlock notification behavior documentation to reflect the
persistent cooldown.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-08-16 17:46:23 -07:00
gsxdsm
2160f7500c FN-9132: order approval audits by lifecycle on timestamp ties
Ensure approval audit histories preserve lifecycle chronology when events share a timestamp.

- rank tied audit events by the declared approval lifecycle before audit ID
- cover tied and distinct timestamps through module and public store surfaces
- document the diagnosed satellite assertion and add a patch changeset

Files changed:
 .changeset/fn-9132-approval-audit-order.md         |  7 +++
 .../suite-only-flakes-observed-register.md         | 27 +++++++++++
 ...oval-request-audit-project-isolation.pg.test.ts |  2 +-
 .../postgres/approval-request-lifecycle.pg.test.ts | 53 +++++++++++++++++++++-
 .../async-stores/async-approval-request-store.ts   | 17 +++++--
 5 files changed, 100 insertions(+), 6 deletions(-)

Fusion-Task-Id: FN-9132

Fusion-Task-Lineage: 2f49e896-69bf-48c8-b813-4b1b2b72fc65

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 16:04:18 -07:00
gsxdsm
7380be699c chore(release): v0.77.0-beta.1
Version bump via changesets.
2026-08-16 08:39:57 -07:00
gsxdsm
821e036c9d fix: route all AI lanes through runtime resolution so CLI-runtime models work everywhere
createFnAgent now delegates to createResolvedAgentSession — deriving the CLI
runtime hint (cursor/claude/grok/omp/hermes), mock/test-mode forcing, and
session:runtime-resolved visibility — using a host-registered default
PluginRunner keyed by project root (published by InProcessRuntime at plugin
init). DefaultPiRuntime re-enters via a __rawPiSession marker so the seam's
own pi bridge cannot recurse, and the raw constructor survives as
createPiAgentSessionRaw for that bridge and pi-internal tests.

Mission and milestone/slice interviews additionally pass their request-scoped
pluginRunner through the seam and prompt via the engine promptWithFallback
dispatcher (plugin CLI runtime sessions have no session.prompt()). This fixes
"Configured model cursor-cli/auto ... was not found in the pi model registry"
in mission planning while chat on the same model worked, and closes the same
gap for every remaining bare createFnAgent lane.

Also updates the pi skill-filtering test that still asserted pre-FN-9114
allow-list narrowing; requested skill names are ensure-present since FN-9114.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-16 08:32:46 -07:00
gsxdsm
385059f5ca FN-9124: Move mission planning CTA to top of list
Place the primary mission-planning action consistently above mission content across desktop and mobile layouts.

- move the Plan New Mission and Create actions above the mission list
- increase the mission CTA height with shared design tokens and remove duplicate empty-state controls
- document and test placement, sizing, create-mode, empty-state, and responsive behavior

Files changed:
 .changeset/fn-9124-mission-cta-top.md              |   7 ++
 docs/missions.md                                   |   2 +-
 .../dashboard/app/components/MissionManager.css    |  42 +++----
 .../dashboard/app/components/MissionManager.tsx    |  89 +++++++-------
 .../dashboard/app/components/PlanningModeModal.css |  14 +--
 .../dashboard/app/components/PlanningModeModal.tsx |  12 +-
 .../__tests__/MissionManager.mobile-css.test.ts    |  33 +++--
 .../MissionManager.plan-cta-placement.test.tsx     | 134 +++++++++++++++++++++
 8 files changed, 238 insertions(+), 95 deletions(-)

Fusion-Task-Id: FN-9124

Fusion-Task-Lineage: 09ad7695-80ed-46af-a1c1-f334952c37ec

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 08:05:11 -07:00
gsxdsm
111c6c96cc FN-9117: Preserve Planning Mode answers across session hydration
Keep visible Planning Mode controls bound to the current turn during asynchronous refreshes.

- preserve active question and plan-review workspaces during same-session hydration
- submit from live session state and retain dirty answers across response identity changes
- add desktop and mobile regression coverage for deferred hydration and stale Stop polling
- document the ownership race and add a patch changeset

Files changed:
 .changeset/fn-9117-planning-turn-ownership.md      |   7 +
 .../suite-only-flakes-observed-register.md         |  24 ++++
 .../dashboard/app/components/PlanningModeModal.tsx | 141 ++++++++++++---------
 .../PlanningModeModal.planning-flow.test.tsx       | 132 +++++++++++++++++++
 .../PlanningModeModal.ui-interactions.test.tsx     |  20 +++
 5 files changed, 265 insertions(+), 59 deletions(-)

Fusion-Task-Id: FN-9117

Fusion-Task-Lineage: 18d63f63-b532-49eb-a6d1-241e31c5b2c7

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 02:26:42 -07:00
gsxdsm
3272affbb3 FN-9120: Fence Create Room agent roster loads
Keep Create Room picker state accurate across overlapping agent roster requests.

- Track explicit idle, loading, loaded, and failed picker phases.
- Ignore stale close, reopen, project-change, and unmount request completions.
- Reconcile selected members and cover ordering, failure, empty, duplicate, desktop, and mobile states.
- Document the loaded-lane flake investigation and add a patch changeset.

Files changed:
 .changeset/fn-9120-create-room-picker.md           |   7 ++
 .../suite-only-flakes-observed-register.md         |  17 +++
 .../dashboard/app/components/CreateRoomModal.tsx   |  50 ++++++--
 .../components/__tests__/CreateRoomModal.test.tsx  | 126 ++++++++++++++++-----
 4 files changed, 165 insertions(+), 35 deletions(-)

Fusion-Task-Id: FN-9120

Fusion-Task-Lineage: 5c9ff011-7653-40ab-a7c1-e3464ca3eaf5

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 01:50:38 -07:00
gsxdsm
7527d2651f FN-9116: fence planning reconciliation by turn ownership
Prevent stale Planning Mode snapshots and recovery callbacks from replacing a newer interview turn.

- track session-load and turn epochs across response reconciliation, polling, streaming, and automatic retry
- fence loading-poll fetches at launch so accepted SSE questions and newer responses retain ownership
- add desktop and mobile race-ordering coverage and document the resolved suite-only flake
- publish a patch changeset for the operator-visible recovery fix

Files changed:
 .changeset/fn-9116-planning-reconciliation.md      |   7 +
 .../suite-only-flakes-observed-register.md         |  19 +
 .../dashboard/app/components/PlanningModeModal.tsx | 109 ++++-
 .../PlanningModeModal.planning-flow.test.tsx       | 502 ++++++++++++++++++++-
 4 files changed, 614 insertions(+), 23 deletions(-)

Fusion-Task-Id: FN-9116

Fusion-Task-Lineage: b861176e-9104-4caf-8b6c-e645972aa5f6

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 00:59:48 -07:00
gsxdsm
dd1e0f22e1 chore(release): v0.77.0-beta.0
Version bump via changesets.
2026-08-16 00:32:50 -07:00
gsxdsm
9a9e591b72 FN-9115: clarify and expand agent skill selection
Clarify automatic skill availability while making forced-reading selections easier to manage.

- Replace the skill picker with a searchable multi-select checkbox list and explicit loading, error, empty, and unavailable states.
- Label forced, disabled, and undiscovered skills consistently across agent detail and list views, including a clear None state.
- Update localized guidance, documentation, regression coverage, and the published package changeset.

Files changed:
 .changeset/fn-9115-skills-ui.md                    |   7 +
 docs/dashboard-guide.md                            |   4 +
 .../agent-detail-settings-theme-styling.test.ts    |   3 +-
 .../dashboard/app/components/AgentDetailView.css   |   7 +-
 .../dashboard/app/components/AgentDetailView.tsx   |  35 ++-
 packages/dashboard/app/components/AgentsView.css   |   4 +
 packages/dashboard/app/components/AgentsView.tsx   |  13 +-
 .../dashboard/app/components/NewAgentDialog.tsx    |   5 +-
 .../dashboard/app/components/SkillMultiselect.css  | 258 +++------------------
 .../dashboard/app/components/SkillMultiselect.tsx  | 178 +++++---------
 .../AgentDetailView.mobile-scroll.test.tsx         |   4 +-
 .../AgentDetailView.skills-procedure.test.tsx      |  59 +++--
 .../app/components/__tests__/AgentsView.test.tsx   |  19 +-
 .../components/__tests__/SkillMultiselect.test.tsx |  81 ++++---
 .../__tests__/useDiscoveredSkillsCache.test.ts     |  16 ++
 .../app/hooks/useDiscoveredSkillsCache.ts          |  13 +-
 .../app/utils/__tests__/agentSkills.test.ts        |  28 +++
 packages/dashboard/app/utils/agentSkills.ts        |  69 +++++-
 packages/i18n/locales/en/app.json                  |  21 +-
 packages/i18n/locales/es/app.json                  |  21 +-
 packages/i18n/locales/fr/app.json                  |  21 +-
 packages/i18n/locales/ko/app.json                  |  21 +-
 packages/i18n/locales/pt-BR/app.json               |  21 +-
 packages/i18n/locales/zh-CN/app.json               |  21 +-
 packages/i18n/locales/zh-TW/app.json               |  21 +-
 25 files changed, 493 insertions(+), 457 deletions(-)

Fusion-Task-Id: FN-9115

Fusion-Task-Lineage: 18229b87-d0dc-41e7-9333-2d12df852486

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-15 23:14:24 -07:00
gsxdsm
a90d4e1b3b chore(changesets): trim over-length summary in fix-cc-spacing-and-settings-search
check:changesets enforces a 120-char summary; this legacy entry was 133 and
failed the PR-check gate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 22:42:51 -07:00
gsxdsm
fad45c2d1f fix(dashboard): return 404 for event streams of unknown projects
An SSE subscription with a nonexistent projectId (stale client tab, e2e fixture
page using projectId "fixture") surfaced the PG startup-factory construction
chain as a 500 on every poll, filling operator logs with alarming
"failed to construct TaskStore" errors. Map project-not-found to a clean 404,
matching the project routes' existing handling.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 22:42:51 -07:00
gsxdsm
87e673baf7 feat(merge): remove the pre-commit diff-volume gate
The gate blocked approved clean-room squashes on per-file shrinkage with no
override path ("AI merge diff-volume gate blocked the approved squash").
Removed by operator decision: delete checkDiffVolume/DiffVolumeRegressionError,
the merge:diff-volume-blocked audit event, the runDiffVolumeGate call sites in
every legacy squash finalizer, the AI-merge pre-land check, and the
mergeDiffVolume* settings. File scope remains the pre-land guard; the
post-squash audit policy remains the shrinkage backstop.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 22:42:39 -07:00
gsxdsm
cd433bd68d fix(dashboard): map unresolvable-workflow triage errors to 404; complete stale route fixtures
Dashboard bare-run repair, route/store cluster. Real product regression
fixed: the FNXC:IntakeOwnership boundary replaced the 'Workflow ... not
found' message with a typed TaskIntakeOwnerResolutionError, so the
mission triage routes' message-pattern mapping stopped firing and an
unknown workflowId leaked as a 500 — both feature and slice triage
handlers now match the typed error structurally and return 404 (patch
changeset included). Everything else was stale fixtures behind the PG
cutover and recent seams: sse's mock stores learn getAsyncLayer, the
retry fixtures learn FN-8908's resetTerminalFailureAutoRecoveryBudget,
approve-plan tests materialize a real on-disk PROMPT.md per the
SpecLockApproval 409 contract (fingerprint assertion strengthened to
the always-hash contract), and the MCP settings route body pins the new
host-dependent fusionMemoryMcpAvailable field. Verified 7 files / 213
tests green under their assigned lane projects, src typecheck clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 22:16:34 -07:00
gsxdsm
9673f15c11 fix(dashboard): repair undefined spacing tokens, settings-search gaps, and census/browser-lane test drift
Dashboard bare-run repair, census/token cluster. Real product bugs: the
Command Center activity panel (FN-8866) and structural-mail badge
(FN-8872) referenced undefined --space-* tokens, zeroing their
gaps/padding — mapped to the defined named scale; the settings search
index lagged FN-8829/FN-9021 additions and FN-8855's requiredChecks
entry had no scroll anchor (now a SettingsTextRow). Test-side: the
theme census learns FN-8730's intentional midnight theme, and the
Chromium touch-resize suite self-gates with describe.runIf per the
sibling browser-lane convention (CI/FUSION_BROWSER_SMOKE_REQUIRE still
fail loudly; all 62 tests still run where Chromium exists).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 22:13:17 -07:00
gsxdsm
9f5f981e33 FN-9114: expose enabled skills and enforce agent skill reads
Make project-enabled skills available across agent sessions while preserving explicit per-agent skills as observable read-first requirements.

- resolve all enabled discovered skills without using agent metadata as an availability filter
- carry forced skill intent through PI, plugin, chat, workflow, merger, and heartbeat session paths
- report resolved and unavailable forced skills in session summaries and diagnostics
- document the updated skill model and add release notes and regression coverage

Files changed:
 .changeset/fn-9114-forced-skills.md                |   7 +
 docs/PLUGIN_AUTHORING.md                           |   2 +-
 docs/agents.md                                     |  10 +-
 docs/diagnostics.md                                |   2 +-
 docs/settings-reference.md                         |   2 +-
 packages/core/src/__tests__/skill-settings.test.ts |   9 +
 .../dashboard/src/__tests__/chat-manager.test.ts   |  26 ++-
 packages/dashboard/src/chat.ts                     |  10 +
 .../engine/src/__tests__/agent-skills-flow.test.ts |  14 +-
 .../compound-engineering-skill-resolution.test.ts  |   2 +-
 .../engine/src/__tests__/heartbeat-skills.test.ts  |  41 ++++
 .../__tests__/hermes-runtime-integration.test.ts   |  63 +++++-
 .../engine/src/__tests__/merger-skills.test.ts     |  33 ++-
 packages/engine/src/__tests__/pi.test.ts           |  35 ++-
 .../__tests__/plugin-skill-body-delivery.test.ts   |   8 +-
 .../src/__tests__/plugin-skill-integration.test.ts |   3 +-
 .../src/__tests__/session-skill-context.test.ts    |  40 ++--
 .../engine/src/__tests__/skill-resolver.test.ts    |  38 +++-
 .../__tests__/step-execute-skill-loading.test.ts   |   6 +
 packages/engine/src/agents/agent-runtime.ts        |   2 +
 .../engine/src/agents/agent-session-helpers.ts     |  88 ++++++-
 .../src/cli-runtime/session-skill-context.ts       | 117 ++++------
 packages/engine/src/cli-runtime/skill-resolver.ts  | 252 +++++++++------------
 .../engine/src/executor/execute-workflow-step.ts   |  14 ++
 packages/engine/src/executor/run-implementation.ts |   5 +
 packages/engine/src/pi.ts                          |  28 ++-
 26 files changed, 576 insertions(+), 281 deletions(-)

Fusion-Task-Id: FN-9114

Fusion-Task-Lineage: fe63ebd1-f947-40d7-be7b-c13d7f1c35c9

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-15 21:57:22 -07:00
gsxdsm
59dc5df5f4 fix(dashboard): show a retryable message when Planning Retry hits a down server
Gateway 502/503/504 non-JSON bodies (for example Traefik "no available server")
were dumped as content-type diagnostics into the Planning error banner.
2026-08-15 21:42:34 -07:00
flexi767
086cd0a505 fix(engine): retry transient post-merge push failures (#3468)
## What

- Retry post-merge target pushes after recognized transient Git
transport failures.
- Use a bounded schedule: the initial attempt plus two retries after 2s
and 5s.
- Apply the same helper to the unified fast path and the shared push
path used by divergence recovery and the soft-deprecated merger.
- Keep retry sleeps and subsequent attempts cancellation-aware.
- Add a patch changeset and regression coverage, including a real bare
remote that rejects the first push.

## Why

Fusion already retries non-fast-forward races, and #1942 made terminal
push failures durable, but a temporary network failure still ended
post-merge delivery after one attempt. That can leave the local
integration branch ahead of the remote even though retrying seconds
later would succeed.

The retry is deliberately provider-neutral. It uses Git error
classification and normal Fusion logs only; it does not add Telegram,
OpenClaw, or any other notification-vendor dependency.

## Behavior and impact

- Retries only transient transport signatures such as connection resets,
DNS failures, unreachable networks, selected HTTP 429/5xx RPC failures,
and unexpected disconnects.
- Permission, authentication, configuration, and ref-rejection errors
keep their existing immediate handling.
- Exhausted retries remain non-fatal to the already-landed merge and
flow through the existing audit/task-log failure reporting.
- Existing non-fast-forward pull/rebase recovery is unchanged apart from
making its backoff cancellation-aware.

## Checks

- [x] `pnpm --filter @fusion/engine exec vitest run
src/__tests__/merger-ai-push-after-merge.test.ts
src/__tests__/merger-prompt-and-utils.test.ts --silent=passed-only
--reporter=dot` (48 tests)
- [x] `pnpm --filter @fusion/engine typecheck`
- [x] `pnpm lint` (0 errors; 2 pre-existing warnings)
- [x] `pnpm check:changesets --strict`
- [x] `pnpm check:fnxc-future-dates`
- [x] `pnpm test` (changed-test gate; static checks and 688 tests
passed)


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

* **Bug Fixes**
* Improved reliability of post-merge pushes by retrying temporary Git
transport failures.
* Added bounded backoff between retries to prevent excessive repeated
attempts.
  * Push retries now stop promptly when an operation is canceled.
* Configuration, authentication, and ref-rejection errors continue to
fail immediately.
* Successful retries and canceled operations now report accurate
outcomes.
* **Tests**
* Added coverage for successful retries, cancellation, and non-retryable
failures.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: flexi767 <flexi767@users.noreply.github.com>
Co-authored-by: v <v@m5.speedport.ip>
2026-08-15 21:42:01 -07:00
gsxdsm
d4d13e2fa5 FN-9111: Add global Quick Add Enter-save preference
Add an operator-level setting that controls whether plain Enter saves a Quick Add task while preserving Cmd/Ctrl+Enter submission.

- add the global quickAddSubmitOnEnter setting, defaults, settings UI, and app context
- update Quick Add keyboard handling with multiline and duplicate/in-flight safeguards
- add focused settings and keyboard regression coverage, localization, documentation, and a release changeset

Files changed:
 .changeset/fn-9111-quick-add-enter.md              |   7 ++
 docs/dashboard-guide.md                            |   2 +
 docs/settings-reference.md                         |   1 +
 .../core/src/__tests__/settings-defaults.test.ts   |  10 ++
 packages/core/src/config/settings-schema.ts        |   5 +
 packages/core/src/types/settings/settings-scope.ts |   5 +
 packages/dashboard/app/App.tsx                     |   4 +
 .../dashboard/app/components/QuickEntryBox.tsx     |  24 ++++-
 .../QuickEntryBox.submit-on-enter.test.tsx         | 118 +++++++++++++++++++++
 .../__tests__/SettingsModal.general.test.tsx       |  18 ++++
 .../app/components/settings/save-split.ts          |   1 +
 .../sections/GlobalGeneralSection.search.ts        |   9 ++
 .../settings/sections/GlobalGeneralSection.tsx     |  10 ++
 .../settings-default-descriptions.test.tsx         |   1 +
 .../__tests__/useQuickAddSubmitOnEnter.test.tsx    |  24 +++++
 packages/dashboard/app/hooks/useAppSettings.ts     |   4 +
 .../app/hooks/useQuickAddSubmitOnEnter.ts          |  21 ++++
 packages/i18n/locales/en/app.json                  |   2 +
 packages/i18n/locales/es/app.json                  |   4 +-
 packages/i18n/locales/fr/app.json                  |   4 +-
 packages/i18n/locales/ko/app.json                  |   4 +-
 packages/i18n/locales/pt-BR/app.json               |   4 +-
 packages/i18n/locales/zh-CN/app.json               |   4 +-
 packages/i18n/locales/zh-TW/app.json               |   4 +-
 packages/i18n/src/resources.d.ts                   |   4 +-
 25 files changed, 284 insertions(+), 10 deletions(-)

Fusion-Task-Id: FN-9111

Fusion-Task-Lineage: 246153a8-5127-48df-838c-d9b60920cd91

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-15 21:24:25 -07:00
gsxdsm
0ec3c76faf fix(FN-9093): eagerly install bundled Cursor runtime plugin at host boot
The Cursor provider card's Enable action only flips useCursorCli in
settings and never registers fusion-plugin-cursor-runtime, so
getRuntimeById("cursor") missed and every cursor-cli selection hit the
runtime-routed fail-fast error even with an authenticated cursor-agent.
Mirror the FN-7761 Grok eager bootstrap in serve, dashboard, and daemon,
guarded by the same source-scan regression test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 21:07:02 -07:00
gsxdsm
d9fcabfaef FN-9112: default Memory Keeper heartbeats to disabled
Default built-in Memory Keeper agents to opt-in heartbeat scheduling while retaining operator choices.

- Provision new Memory Keeper agents with heartbeat disabled and hourly scheduling preconfigured.
- Preserve explicit heartbeat settings during startup convergence and avoid no-op rewrites.
- Add provisioning coverage, operator documentation, and a release changeset.

Files changed:
 .../fn-9112-memory-keeper-heartbeat-default-off.md |  7 +++
 docs/agents.md                                     |  2 +-
 .../__tests__/memory-agent-provisioning.test.ts    | 59 +++++++++++++++++++---
 packages/core/src/agents/agent-store.ts            | 34 ++++++++++---
 4 files changed, 86 insertions(+), 16 deletions(-)

Fusion-Task-Id: FN-9112

Fusion-Task-Lineage: 49edc6d9-3d9b-412f-91a5-c26f4a26a662

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-15 20:17:07 -07:00
gsxdsm
2a9ae0aca3 FN-9109: add resilient cross-runtime Cursor fallback
Route eligible CLI fallback failures into one bounded, auditable Cursor runtime handoff.

- defer cursor-cli fallback selection until a retryable primary prompt failure
- serialize concurrent swaps, retry the primary after failed handoffs, and dispose replacements safely
- transfer text-only conversation context within strict turn and total character limits
- document routing behavior and cover provider, runtime, concurrency, and failure cases

Files changed:
 .../fn-9109-cross-runtime-cursor-fallback.md       |   7 +
 AGENTS.md                                          |   2 +
 docs/cursor-cli-contract.md                        |   8 +
 .../src/__tests__/cli-provider-routing.test.ts     |  18 +-
 .../cli-runtime-routing-conformance.test.ts        |  64 ++++-
 .../src/__tests__/cross-runtime-fallback.test.ts   | 146 +++++++++++
 .../engine/src/agents/agent-session-helpers.ts     | 211 ++++++----------
 packages/engine/src/agents/cli-provider-routing.ts |   4 +-
 .../engine/src/agents/cross-runtime-fallback.ts    | 277 +++++++++++++++++++++
 packages/engine/src/util/run-audit.ts              |   8 +
 10 files changed, 602 insertions(+), 143 deletions(-)

Fusion-Task-Id: FN-9109

Fusion-Task-Lineage: 30664371-8410-4d6f-a263-cc86c8e0dc72

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-15 19:10:55 -07:00
gsxdsm
e9089ee8a1 FN-9110: contain GitHub pull request imports on mobile
Keep GitHub pull-request rows and previews readable within narrow import layouts.

- Let mobile pull-request rows grow with wrapped titles, badges, and branch metadata.
- Break long branch names within list rows and detail previews.
- Cover modal and embedded presentations with layout and interaction regressions.
- Add a patch changeset for the mobile layout fix.

Files changed:
 .changeset/fn-9110-github-import-pulls-mobile.md   |  7 +++
 .../github-import-pulls-mobile-layout.test.ts      | 54 ++++++++++++++++++++++
 .../dashboard/app/components/GitHubImportModal.css | 27 ++++++++++-
 .../__tests__/GitHubImportModal.test.tsx           | 32 +++++++++++++
 4 files changed, 119 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-9110

Fusion-Task-Lineage: 572b5fb3-076e-448a-9f6f-185b836b4161

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-15 17:53:29 -07:00
gsxdsm
66bbeaa28d FN-9108: Restore routed workflow-principal session identity
Restore routed principal attribution throughout workflow prompt and review sessions.

- Thread the graph-selected principal into workflow-step execution.
- Resolve principal runtime configuration, skills, telemetry, and session attribution consistently.
- Fail closed when the routed principal is unavailable and add regression coverage.
- Add a patch changeset for the restored behavior.

Files changed:
 .../fn-9108-workflow-principal-session-identity.md |   7 +
 .../executor-workflow-step-principal.test.ts       | 154 +++++++++++++++++++++
 .../engine/src/executor/execute-workflow-step.ts   |  34 ++++-
 .../engine/src/executor/run-graph-custom-node.ts   |  11 +-
 4 files changed, 198 insertions(+), 8 deletions(-)

Fusion-Task-Id: FN-9108

Fusion-Task-Lineage: ec668551-8ff4-4ced-8c7f-a4aa04eb044f

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-15 17:45:32 -07:00
gsxdsm
872d260ab8 FN-9104: Add mailbox recommendation task actions
Add guarded task creation directly to completed-task recommendation notices.

- Render live recommendation details and task actions in mailbox detail and conversation surfaces.
- Prevent duplicate creates, expose existing task links, and support unavailable and retry states.
- Cover desktop and mobile surfaces, update notice copy and documentation, and add a release changeset.

Files changed:
 .../fn-9104-mailbox-recommendation-create.md       |   7 ++
 docs/dashboard-guide.md                            |   2 +-
 .../__tests__/task-recommendation-notice.test.ts   |   7 ++
 packages/core/src/task-recommendation-notice.ts    |   9 +-
 packages/dashboard/app/components/MailboxModal.tsx |   3 +
 .../app/components/MailboxTaskRecommendations.css  |   9 ++
 .../app/components/MailboxTaskRecommendations.tsx  | 127 +++++++++++++++++++++
 packages/dashboard/app/components/MailboxView.tsx  |   3 +
 .../MailboxTaskRecommendations.surfaces.test.tsx   |  77 +++++++++++++
 .../__tests__/MailboxTaskRecommendations.test.tsx  |  72 ++++++++++++
 10 files changed, 311 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-9104

Fusion-Task-Lineage: 94f53bfe-f57f-42ee-970e-56658129c1e0

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-15 17:36:32 -07:00
gsxdsm
802a4249fb FN-9106: Route non-continuable step sessions through retry recovery
Recover poisoned step-session transcripts before the generic failure sink can retain them.

- Apply bounded fresh-session recovery to incomplete step-session execution failures.
- Preserve completed-work handling ahead of retry classification.
- Add regression coverage and production-shaped executor fixtures.
- Document the published patch behavior in a changeset.

Files changed:
 .changeset/fn-9106-non-continuable-step-session.md |  7 ++++
 .../post-done-continuation-no-wedge.test.ts        | 48 +++++++++++++++++++++-
 packages/engine/src/executor/run-implementation.ts | 11 +++++
 3 files changed, 65 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-9106

Fusion-Task-Lineage: 537ea415-96dd-4b66-ab5d-84dc4603388b

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-15 17:13:20 -07:00
gsxdsm
43a42d8b7b FN-9107: preserve mission completion triggers after reconciliation failures
Keep scheduler mission completion handling active when best-effort reconciliation fails.

- isolate pre- and post-resolution reconciliation failures without suppressing mission execution
- cover custom completion columns, failed in-place updates, fallback behavior, and slice guards
- document the resilience contract and add a patch changeset

Files changed:
 .changeset/fn-9107-mission-trigger.md              |   7 +
 docs/missions.md                                   |   2 +-
 .../mission-validation-trigger-gap.test.ts         |  40 ++++--
 .../scheduler-mission-move-trigger.test.ts         | 153 +++++++++++++++++++++
 packages/engine/src/scheduler.ts                   |  20 ++-
 5 files changed, 203 insertions(+), 19 deletions(-)

Fusion-Task-Id: FN-9107

Fusion-Task-Lineage: a492d0c0-79ca-4dba-a7bc-c8fa54415f28

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-15 17:06:39 -07:00
gsxdsm
5e5b0dbb8f FN-9098: bridge scoped Fusion tools into Cursor
Publish engine-owned Fusion tools to Cursor through a crash-safe, worktree-scoped MCP bridge.

- preserve operator MCP configuration with locking, journaling, quarantine, and lease reconciliation
- enforce identity-scoped fn_* provenance so injected custom and MCP tools are never exposed
- secure loopback dispatch with per-session tokens, heartbeats, cleanup, and normalized tool events
- document the Cursor contract and cover bridge lifecycle, config hygiene, and failure handling

Files changed:
 .changeset/fn-9098-cursor-mcp-bridge.md            |   7 +
 docs/cursor-cli-contract.md                        | 140 ++-------------
 docs/mcp.md                                        |   4 +
 .../src/__tests__/agent-session-helpers.test.ts    |  24 +++
 .../src/__tests__/step-session-executor.test.ts    |  16 ++
 .../src/__tests__/web-fetch-universal.test.ts      |   4 +-
 packages/engine/src/agent-heartbeat.ts             |   3 +-
 packages/engine/src/agents/agent-runtime.ts        |   9 +
 .../engine/src/agents/agent-session-helpers.ts     |  26 +--
 packages/engine/src/execution/reviewer.ts          |   1 +
 .../engine/src/execution/step-session-executor.ts  |  31 ++--
 .../engine/src/executor/execute-workflow-step.ts   |   4 +-
 packages/engine/src/merger.ts                      |   4 +-
 plugins/fusion-plugin-cursor-runtime/README.md     |  18 +-
 plugins/fusion-plugin-cursor-runtime/package.json  |   2 +-
 .../src/__tests__/cursor-mcp-config.test.ts        | 100 +++++++++++
 .../cursor-mcp-server-failure.stream.jsonl         |   3 +
 .../fixtures/cursor-mcp-tool-call.stream.jsonl     |   4 +
 .../src/__tests__/runtime-adapter.test.ts          |  57 +++++-
 .../src/__tests__/worktree-hygiene.test.ts         |  52 ++++++
 .../src/cursor-mcp-config.ts                       | 196 +++++++++++++++++++++
 .../src/mcp-schema-server.cjs                      | 155 ++++++++++++++++
 .../src/prompt-transport.ts                        |   4 +-
 .../src/runtime-adapter.ts                         |  67 +++++--
 .../src/tool-bridge.ts                             |  48 +++++
 .../src/tool-mapping.ts                            |  11 ++
 plugins/fusion-plugin-cursor-runtime/src/types.ts  |   6 +-
 .../src/worktree-hygiene.ts                        | 117 ++++++++++++
 28 files changed, 934 insertions(+), 179 deletions(-)

Fusion-Task-Id: FN-9098

Fusion-Task-Lineage: 11b6cb10-ce0e-4f33-9007-c83f2bbf82ea

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-15 16:51:54 -07:00
gsxdsm
56a087dac9 fix(engine): restore shipped behaviors dropped by the wave-18 executor peel
Full-suite repair, engine harness cluster (~85 red suites). Two causes:
(1) graph dispatch now fails closed without options.agentStore
(FN-8764/FN-8821, intended) — the shared executor test harness now
provisions the workflow-routing agent-store fixture for bare
TaskExecutor constructions, with explicit opt-out for the two tests
asserting the fail-closed park; (2) the wave-18 'pure peel' (#3317)
rebuilt executor.ts from a stale base and silently deleted shipped
behaviors, restored here: FN-8864 agent-activity writers (task
started/handed-off, workflow gate pass/fail, gate principal attribution
via executor/workflow-gate-activity.ts), FN-8768 Plan Review group
recognition, convergence primer, and modified-file review scoping,
FN-6782's fire-time guard on transient resume-after-restart retries,
FN-8868 session usage telemetry boundaries, recommendation-route
withheld-tool guidance, and the per-instance worktree retry cap.
Stale expectations updated for intended changes (FN-8823 shared-member
hold, FN-9060 zero-acquire fail-closed, heartbeat tool inventory,
peeled-module seams, PG harness provisioning). Verified: 23 files /
711 tests green, engine typecheck clean, merge gate green.

Known follow-ups (not addressed here): step-session error routing may
still bypass FN-5866 non-continuable classification
(post-done-continuation-no-wedge red), scheduler mission-loop trigger
gap (mission-validation-trigger-gap red), and executeWorkflowStep lost
routed workflow-principal session identity threading (untested drop
from the same peel).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 15:52:52 -07:00
gsxdsm
987878bd17 fix: close Fusion tracking issues created after a task is already done
Late-created GitHub tracking issues never got a task:moved close, and the
reconcile sweep only scanned the oldest 200 terminal rows.
2026-08-15 15:33:40 -07:00
gsxdsm
f11bb2e899 fix(core): restore title-redirect planning hold and stamp workflow-create partition
Full-suite repair, core cluster. Two real product regressions caught by
the red tests: (1) the wave-18 refactor dropped the task.title argument
FN-8840 added to isDuplicateRedirectOnlyPrompt inside
isTaskAwaitingPlanning, so a title-only DUPLICATE:<ID> redirect read as
executable Ready instead of awaiting planning; (2) FN-8998 scoped every
workflow-definition read by layer.projectId but left the INSERT on the
session-GUC default, so a JS-bound layer created workflow rows it could
never read back — the insert now stamps the bound projectId like the
FN-8997 workflowSteps insert. Test-lag fixes: analytics renamed-lanes
harnesses now bind projectId 'p1' to match FN-8957/FN-8998 scoping,
project-ownership-runtime-scope replaces a hardcoded expired approval
date, schema-applier learns migrations 0059/0060 (115 project tables,
baseline 0060), and builtin-workflow-settings-triage learns FN-8932's
memoryConsolidationEnabled with position-independent lookups.
Verified: 10 files / 128 tests green, core typecheck clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 15:22:33 -07:00
gsxdsm
13525fc0f0 fix: keep Anthropic OAuth login error inside Settings on mobile
The expiry banner was an inline flex sibling of Login, so the sentence overflowed a phone-width Settings card.
2026-08-15 15:21:30 -07:00
gsxdsm
6a2de64381 fix: normalize Anthropic storage ids at the ModelRuntime.login choke point
Third incident of the same class (#1857/FN-7391, FN-9101, GitHub #3462):
Fusion's Anthropic auth-card/storage ids (anthropic-subscription,
anthropic-api-key) leaking into pi, which only registers the execution
provider 'anthropic'. FusionAuthStorage.login is the single seam that hands
a provider id to ModelRuntime.login; it now normalizes via
toExecutionModelProviderId so a future caller bug degrades to a correct
upstream anthropic login instead of a hard 'Unknown provider' failure, with
a regression test pinning the seam. The invariant, incident history, and
guard inventory are captured in
docs/solutions/integration-issues/anthropic-storage-ids-are-never-pi-provider-ids.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 14:52:38 -07:00
gsxdsm
7fa5029ef8 fix: route Anthropic subscription instance login through upstream anthropic provider
The Authentication cards pass an explicit credential-instance id, which sent
dashboard subscription logins through loginInstance. That seam mapped the card
to the anthropic-subscription storage row id and passed it verbatim to
ModelRuntime.login, which pi rejects with 'Unknown provider:
anthropic-subscription' (GitHub #3462) — every subscription login failed while
the credential path itself was healthy. loginInstance now reuses the
Anthropic-aware login seam (upstream login as 'anthropic', credential relocated
to the anthropic-subscription row) with a regression test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 14:48:07 -07:00
gsxdsm
6401fdea89 FN-9101: normalize Anthropic auth provider selections
Route Anthropic subscription and API-key auth selections through the built-in execution provider.

- Add a shared provider-ID normalization helper and export it from core.
- Normalize persisted model selections during session creation and registry lookup.
- Hide credential-only Anthropic provider rows from the dashboard model catalog.
- Add regression coverage and a patch changeset for subscription-backed execution.

Files changed:
 ...9101-anthropic-subscription-model-resolution.md |  7 ++++
 .../__tests__/anthropic-execution-provider.test.ts | 18 ++++++++
 packages/core/src/ai/anthropic-models.ts           | 13 ++++++
 packages/core/src/index.gate.ts                    |  2 +
 packages/core/src/index.ts                         |  2 +
 .../dashboard/src/__tests__/routes-auth.test.ts    |  2 +
 .../dashboard/src/routes/register-model-routes.ts  | 14 ++++---
 ...-session-helpers-anthropic-subscription.test.ts | 49 ++++++++++++++++++++++
 .../src/__tests__/pi-create-fn-agent.test.ts       | 25 +++++++++++
 .../engine/src/agents/agent-session-helpers.ts     | 26 ++++++++----
 packages/engine/src/pi.ts                          | 14 +++++--
 11 files changed, 154 insertions(+), 18 deletions(-)

Fusion-Task-Id: FN-9101

Fusion-Task-Lineage: 72e70e67-b291-44fc-ba3f-12b54d06eba9

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-15 14:19:23 -07:00
gsxdsm
7ed1c39a67 FN-9102: fix active runtime segment accounting
Prevent reopened tasks from double-counting closed execution segments while preserving pre-execution planning time.

- Clear the live execution anchor whenever a WIP segment is banked.
- Clamp legacy poisoned runtime values with separate execution and combined-work wall-clock ceilings.
- Cover cards, detail statistics, core totals, and planner metrics across WIP round trips and historical rows.
- Add a patch changeset for the published Fusion package.

Files changed:
 .changeset/fn-9102-task-runtime-double-count.md    |  7 ++
 .../src/__tests__/reopen-semantics-by-role.test.ts | 95 ++++++++++++++--------
 packages/core/src/tasks/task-timing.ts             | 20 ++++-
 .../core/src/workflows/default-workflow-hooks.ts   | 14 +++-
 .../app/components/__tests__/TaskCard.test.tsx     | 27 ++++++
 .../__tests__/TaskTokenStatsPanel.test.tsx         | 27 ++++++
 .../app/utils/__tests__/taskTiming.test.ts         | 40 +++++++++
 packages/dashboard/app/utils/taskTiming.ts         | 28 +++++--
 .../__tests__/task-planner-chat-metrics.test.ts    | 28 +++++++
 .../dashboard/src/task-planner-chat-metrics.ts     | 22 ++++-
 10 files changed, 260 insertions(+), 48 deletions(-)

Fusion-Task-Id: FN-9102

Fusion-Task-Lineage: 3b42e81f-4e11-4232-80f6-052f51b83f1c

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-15 13:39:24 -07:00