gsxdsm
da4e4bca44
FN-9053: prevent workspace acquisition from persisting singular worktrees
...
Keep workspace tasks classified as multi-repository throughout sub-repository worktree acquisition.
- Suppress singular worktree and branch persistence for workspace sub-repo acquisition.
- Preserve the single-repository persistence contract and add regression coverage for acquisition failures.
- Document the workspace acquisition-state invariant and add a patch changeset.
Files changed:
.../fn-9053-workspace-acquisition-atomicity.md | 7 ++
docs/architecture.md | 1 +
.../worktree-acquisition-workspace.test.ts | 98 ++++++++++++++++++++--
.../engine/src/worktree/worktree-acquisition.ts | 66 +++++++++------
4 files changed, 142 insertions(+), 30 deletions(-)
Fusion-Task-Id: FN-9053
Fusion-Task-Lineage: e27d1e90-fc99-4bb6-ac83-033f71abc521
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-14 22:03:16 -07:00
gsxdsm
41d415fe70
FN-9051: report blocked workspace finalization
...
Prevent workspace merge entry points from treating an unfinalized task as a successful merge.
- Add a typed blocked-finalization result and engine handling that avoids retries, failure parking, and branch promotion.
- Return blocked outcomes through dashboard and CLI merge surfaces.
- Cover blocked finalization behavior and publish a patch changeset.
Files changed:
.changeset/fn-9051-workspace-blocked-finalize.md | 7 ++
packages/cli/src/commands/__tests__/task.test.ts | 38 ++++++++
packages/cli/src/commands/dashboard.ts | 22 +++--
packages/cli/src/commands/task.ts | 19 ++--
.../engine/src/__tests__/project-engine.test.ts | 105 ++++++++++++++++++++-
.../engine/src/__tests__/workspace-merger.test.ts | 1 +
packages/engine/src/index.ts | 1 +
packages/engine/src/merge/merger-ai.ts | 28 +++++-
packages/engine/src/project-engine.ts | 42 ++++++++-
9 files changed, 240 insertions(+), 23 deletions(-)
Fusion-Task-Id: FN-9051
Fusion-Task-Lineage: 89d5fcbb-1a00-4429-87ea-fc3e34db2706
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-14 21:51:45 -07:00
gsxdsm
495845023d
FN-9061: gate workspace foreach worktree isolation
...
Reject unsupported workspace projects before per-instance foreach worktree allocation.
- Add a workspace-isolation guard at graph execution and worktree allocation seams.
- Propagate workspace configuration probing through foreach dependencies.
- Cover workspace and non-workspace behavior, and document the limitation.
Files changed: .../fn-9061-foreach-workspace-isolation-gate.md | 7 +++
docs/workflow-steps.md | 2 +
.../workflow-foreach-workspace-isolation.test.ts | 72 ++++++++++++++++++++++
.../src/__tests__/workflow-graph-foreach.test.ts | 56 +++++++++++++++++
.../src/executor/build-foreach-worktree-deps.ts | 34 +++++++++-
packages/engine/src/executor/deps-bags.ts | 1 +
.../src/workflows/workflow-graph-executor.ts | 3 +
.../engine/src/workflows/workflow-graph-foreach.ts | 17 +++++
.../src/workflows/workflow-graph-task-runner.ts | 2 +
9 files changed, 193 insertions(+), 1 deletion(-)
Fusion-Task-Id: FN-9061
Fusion-Task-Lineage: 38772936-a45f-41f1-b7ee-7999997404db
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-14 21:44:18 -07:00
gsxdsm
d6da58d89a
FN-9054: reclaim archived workspace land leases
...
Reclaim stale workspace land leases when their owners are terminal.
- Treat archived and soft-deleted workspace task owners as terminal after the existing staleness floor.
- Preserve active and merge-pending lease protections while recording terminal reclaim reasons.
- Cover archived, renamed archive lane, deleted, missing, and protected-owner lease cases.
Files changed:
AGENTS.md | 2 +-
.../src/__tests__/self-healing-workspace.test.ts | 150 +++++++++++++++++++++
packages/engine/src/self-healing.ts | 50 ++++---
packages/engine/src/util/run-audit.ts | 2 +-
4 files changed, 185 insertions(+), 19 deletions(-)
Fusion-Task-Id: FN-9054
Fusion-Task-Lineage: 747e62f2-732a-4640-8d49-c08869a47964
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-14 21:39:30 -07:00
gsxdsm
010e619628
FN-9046: fix scoped pnpm dependent selector
...
Correct workspace merge verification to test changed packages with their dependents.
- Use pnpm's valid leading dependents selector for scoped merge tests.
- Cover single, multiple, and shell-metacharacter package selectors.
- Add a patch changeset for the verification fix.
Files changed:
.changeset/fn-9046-pnpm-filter-selector.md | 7 +++++
.../src/__tests__/merger-verification.test.ts | 33 +++++++++++++++++++---
.../src/merge/merger-workspace-test-commands.ts | 11 ++++++--
3 files changed, 45 insertions(+), 6 deletions(-)
Fusion-Task-Id: FN-9046
Fusion-Task-Lineage: 07186296-36b7-42bb-aaa8-739dbf5e00d5
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-14 21:32:58 -07:00
gsxdsm
25b03d6e70
FN-9043: fix workspace completion commit detection
...
Resolve workspace configuration consistently so task completion observes commits across acquired repositories.
- Add a host-scoped, memoized workspace configuration resolver and preserve live configuration through executor dependency bags.
- Resolve workspace configuration before planning, worktree, graph, cleanup, and task-done paths.
- Aggregate workspace commit observations and cover partial-repository completion cases.
Files changed:
.changeset/fn-9043-workspace-no-commits.md | 7 ++
.../executor-workspace-config-propagation.test.ts | 116 +++++++++++++++++++++
.../engine/src/executor/cleanup-task-worktree.ts | 6 +-
.../create-authoritative-workflow-seams.ts | 6 +-
packages/engine/src/executor/deps-bags.ts | 74 ++++++++++---
.../executor/ensure-graph-custom-node-worktree.ts | 14 ++-
.../executor/ensure-task-worktree-for-planning.ts | 8 +-
packages/engine/src/executor/get-worktree-path.ts | 3 +
packages/engine/src/executor/mark-stuck-aborted.ts | 6 +-
.../engine/src/executor/run-graph-custom-node.ts | 8 +-
packages/engine/src/executor/run-implementation.ts | 6 +-
.../src/executor/workspace-config-resolver.ts | 40 +++++++
.../src/executor/worktree-task-done-scope-leak.ts | 8 +-
.../src/executor/worktree-verify-invariants.ts | 44 ++++----
14 files changed, 287 insertions(+), 59 deletions(-)
Fusion-Task-Id: FN-9043
Fusion-Task-Lineage: fc012b8e-c9cb-47e8-81a7-c9590a63a980
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-14 14:24:26 -07:00
gsxdsm
873f339ddd
FN-9040: show backup status and preserve schedules
...
Expose database backup inventory and schedule execution evidence while keeping scheduled backups due after unchanged settings saves.
- Display backup files, empty and error states, and automatic schedule details in Settings.
- Reconcile the shared backup routine at engine startup and retain its next run when settings are unchanged.
- Add API, localization, documentation, and regression coverage for backup status and scheduling.
Files changed:
.changeset/fn-9040-database-backups-visibility.md | 7 ++
docs/dashboard-guide.md | 2 +-
docs/settings-reference.md | 4 +
.../src/__tests__/backup-schedule-status.test.ts | 124 +++++++++++++++++++++
.../core/src/automation/global-routine-store.ts | 31 +++++-
packages/core/src/backup/backup.ts | 95 ++++++++++++++--
packages/core/src/index.gate.ts | 4 +-
packages/core/src/index.ts | 4 +-
.../app/api/agents/agent-import-generation.ts | 14 +++
packages/dashboard/app/api/legacy.ts | 1 +
.../dashboard/app/components/SettingsModal.tsx | 12 +-
.../__tests__/SettingsModal.test-harness.tsx | 7 +-
.../__tests__/SettingsModalNodeRouting.test.tsx | 2 +-
.../components/__tests__/settings-mobile.test.tsx | 2 +-
.../settings/sections/DatabaseBackupsSection.css | 24 ++++
.../settings/sections/DatabaseBackupsSection.tsx | 67 ++++++-----
.../__tests__/DatabaseBackupsSection.test.tsx | 45 ++++++++
.../register-system-maintenance-routes.test.ts | 47 +++++++-
.../routes/register-system-maintenance-routes.ts | 46 ++++++--
.../src/__tests__/in-process-runtime.pg.test.ts | 15 ++-
packages/engine/src/runtimes/in-process-runtime.ts | 13 +++
packages/i18n/locales/en/app.json | 17 ++-
packages/i18n/locales/es/app.json | 17 ++-
packages/i18n/locales/fr/app.json | 17 ++-
packages/i18n/locales/ko/app.json | 17 ++-
packages/i18n/locales/pt-BR/app.json | 17 ++-
packages/i18n/locales/zh-CN/app.json | 17 ++-
packages/i18n/locales/zh-TW/app.json | 17 ++-
packages/i18n/src/resources.d.ts | 28 ++++-
29 files changed, 623 insertions(+), 90 deletions(-)
Fusion-Task-Id: FN-9040
Fusion-Task-Lineage: 29a803a2-0784-4a99-b7cb-2f67d105254b
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-13 17:22:46 -07:00
gsxdsm
cb4ab3b6da
FN-9028: guard automatic mission rollup status writers
...
Protect automatic mission and milestone status rollups with a durable writer-coverage ratchet.
- Add source-level coverage for every computed mission and milestone status writer.
- Verify core persistence and engine reconciliation preserve blocked and archived intent.
- Document shared rollup-ownership guard requirements.
Files changed:
docs/missions.md | 2 +-
.../mission-rollup-status-writer-ratchet.test.ts | 170 +++++++++++++++++++++
.../mission-status-recompute-guard.test.ts | 11 ++
.../__tests__/postgres/mission-store.pg.test.ts | 43 ++++--
packages/core/src/missions/mission-types.ts | 4 +-
.../mission-autopilot-rollup-guard.test.ts | 115 ++++++++++++++
6 files changed, 331 insertions(+), 14 deletions(-)
Fusion-Task-Id: FN-9028
Fusion-Task-Lineage: 89b72b57-fc73-4268-a639-5edac05ff8f8
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-13 16:01:57 -07:00
gsxdsm
8b00bab0b0
chore(release): v0.76.0
...
Version bump via changesets.
2026-08-13 01:41:54 -07:00
gsxdsm
a1ea7fe562
chore(release): v0.76.0-beta.3
...
Version bump via changesets.
2026-08-13 01:34:18 -07:00
gsxdsm
19dffe36f6
fix(engine): make the planning->plan-review handoff atomic so planned cards stop stranding in Todo
...
Triage announced specification completion before its finally block marked the
plan work item terminal, so the Plan Review seeder saw its own still-running
predecessor as an "active continuation", bailed, and the discarded result
silently stranded the card until FN-8592 self-healing re-seeded it ~10 minutes
later (529 occurrences in 18 days).
- seedStrandedPlanReviewContinuation gains retirePredecessorId: idle check
excludes the named predecessor, then retires it and installs the successor in
ONE transaction under the task lock; a bailed seed mutates nothing.
- triage threads planningWorkItemId through PlanningHandoffReport; the runtime
reaction passes it as retirePredecessorId.
- reactToSpecificationComplete consumes the seed result: typed quiet parks
(incl. new "no-pre-release-plan-review"), bounded retries with a fresh
task/IR snapshot per attempt (mid-retry pause/needs-replan honored), loud
warning naming self-healing on exhaustion.
- Tests: PG both-orderings/no-mutation-on-bail/cross-task cases, direct engine
seeder handoff cases, reaction retry/park/pause/replan cases.
- docs/solutions: new planning-handoff-race writeup; graph-entry-contract doc
reclassifies the FN-8592 sweep as backstop-only.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
2026-08-12 21:24:53 -07:00
gsxdsm
ea53cbd4ff
FN-9021: send mailbox notices for task recommendations
...
Completed tasks now optionally send captured recommendations to the operator mailbox.
- Add idempotent, non-blocking mailbox notices after accepted task completion.
- Expose a project setting and localized dashboard control for recommendation notices.
- Cover notification dispatch, settings parity, and completion-path behavior with tests.
Files changed:
.../fn-9021-recommendation-mailbox-notice.md | 7 ++
docs/dashboard-guide.md | 2 +-
docs/settings-reference.md | 1 +
.../core/src/__tests__/settings-parity.test.ts | 2 +
.../__tests__/task-recommendation-notice.test.ts | 77 +++++++++++++
packages/core/src/config/settings-schema.ts | 2 +
packages/core/src/index.ts | 9 ++
packages/core/src/task-recommendation-notice.ts | 122 +++++++++++++++++++++
packages/core/src/types/settings/settings-scope.ts | 6 +
.../__tests__/SettingsModal.general.test.tsx | 10 ++
.../app/components/settings/section-keys.ts | 1 +
.../settings/sections/GeneralSection.tsx | 15 +++
.../settings-default-descriptions.test.tsx | 1 +
.../executor-task-recommendations.test.ts | 39 ++++++-
.../executor/completion-recommendation-notice.ts | 52 +++++++++
.../engine/src/executor/create-task-done-tool.ts | 12 ++
packages/engine/src/executor/plan-review-no-op.ts | 12 ++
packages/engine/src/runtimes/in-process-runtime.ts | 14 +++
packages/i18n/locales/en/app.json | 4 +-
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 | 40 ++++++-
26 files changed, 442 insertions(+), 10 deletions(-)
Fusion-Task-Id: FN-9021
Fusion-Task-Lineage: f6c5c93c-a3b6-470b-9efb-79e6b4003985
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-12 21:15:53 -07:00
gsxdsm
c7451ec6b2
chore(release): v0.76.0-beta.2
...
Version bump via changesets.
2026-08-12 17:37:09 -07:00
gsxdsm
8699ff41e2
FN-9016: add manager evaluation tools
...
Enable managers to review report evaluations and record coaching follow-ups.
- Add manager-scoped evaluation read and follow-up extension tools.
- Enforce management-subtree access through action gating and regression tests.
- Document the tool surface and add a minor release changeset.
Files changed:
.changeset/fn-9016-manager-eval-tools.md | 7 +
docs/agent-tool-surface-full-loop.md | 4 +-
docs/agents.md | 8 +-
packages/cli/skill/fusion/SKILL.md | 2 +-
.../cli/skill/fusion/references/extension-tools.md | 22 ++
.../skill/fusion/references/fusion-capabilities.md | 2 +
.../__tests__/extension-manager-eval-tools.test.ts | 159 +++++++++++++++
packages/cli/src/extension.ts | 227 +++++++++++++++++++++
.../engine/src/__tests__/agent-action-gate.test.ts | 1 +
.../src/__tests__/gating-classifications.test.ts | 1 +
.../src/__tests__/permanent-agent-gating.test.ts | 1 +
.../engine/src/execution/gating-classifications.ts | 8 +
12 files changed, 438 insertions(+), 4 deletions(-)
Fusion-Task-Id: FN-9016
Fusion-Task-Lineage: 1ad7c344-0f3c-4565-aabc-acb51481431d
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-12 15:51:22 -07:00
gsxdsm
b0f623b100
FN-9013: fix mission feature reconciliation
...
Preserve mission-store method receivers so active mission reconciliation completes reliably.
- Invoke optional listFeatures with its mission-store receiver.
- Contain reconciliation failures to individual slices and continue remaining work.
- Cover synchronous, asynchronous, fallback, and failing-slice behavior.
Files changed:
.changeset/fn-9013-scheduler-listfeatures-receiver.md | 7 ++
.../mission-stranded-feature-retriage.test.ts | 109 +++++++++++++++++++++
packages/engine/src/scheduler.ts | 51 ++++++----
3 files changed, 146 insertions(+), 21 deletions(-)
Fusion-Task-Id: FN-9013
Fusion-Task-Lineage: 2745383a-3780-4fa4-bf07-bc75419d3384
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-12 15:14:32 -07:00
gsxdsm
c4467b0a5b
FN-9007: upgrade Pi runtime to 0.84.1
...
Upgrade the bundled Pi runtime closure to version 0.84.1.
- Pin direct and transitive Pi runtime packages to a coherent 0.84.1 closure.
- Adapt runtime interfaces and test assertions for Pi 0.84.1 behavior.
- Guard the added Pi client, protocol, and telemetry packages in desktop packaging checks.
Files changed:
.changeset/fn-9007-pi-0-84-1.md | 7 +
packages/cli/package.json | 4 +-
packages/cli/src/__tests__/package-config.test.ts | 6 +-
packages/cli/vitest.config.ts | 2 +-
packages/core/package.json | 2 +-
packages/dashboard/package.json | 4 +-
packages/dashboard/src/routes.ts | 6 +-
packages/engine/package.json | 4 +-
packages/engine/src/__tests__/pi.test.ts | 45 ++--
.../src/__tests__/provider-registration.test.ts | 4 +-
packages/engine/src/auth/auth-storage.ts | 20 +-
packages/engine/src/pi.ts | 5 +
packages/pi-claude-cli/package.json | 8 +-
pnpm-lock.yaml | 283 ++++++++++++---------
pnpm-workspace.yaml | 14 +-
.../__tests__/check-pi-versions-pinned.test.mjs | 27 +-
scripts/check-pi-versions-pinned.mjs | 8 +
17 files changed, 279 insertions(+), 170 deletions(-)
Fusion-Task-Id: FN-9007
Fusion-Task-Lineage: 89045e86-d4c8-4fc3-bbf6-5ba38fc786e7
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-12 14:07:30 -07:00
gsxdsm
36691e54d2
chore(release): v0.76.0-beta.1
...
Version bump via changesets.
2026-08-12 00:17:27 -07:00
gsxdsm
d9a0ed7837
fix(FN-8998): prevent planning lock reentry stalls
2026-08-11 21:44:22 -07:00
gsxdsm
5ce3a973e6
FN-8902: bound and cache model registry refreshes
...
Bound model-catalog refreshes so requests retain available models when providers stall.
- Add timeout-bounded, single-flight engine registry refreshes with fallback model retention.
- Cache refresh outcomes per registry and invalidate them after all credential mutations, including default-instance changes.
- Cover refresh cache and route behavior, and document the resilience contract.
Files changed:
.changeset/fn-8902-models-refresh-bounding.md | 7 +
docs/dashboard-guide.md | 6 +
.../__tests__/model-registry-refresh-cache.test.ts | 77 +++++++
.../register-model-routes-refresh-bounding.test.ts | 246 +++++++++++++++++++++
.../dashboard/src/model-registry-refresh-cache.ts | 153 +++++++++++++
packages/dashboard/src/routes.ts | 5 +
.../dashboard/src/routes/register-auth-routes.ts | 24 +-
.../dashboard/src/routes/register-model-routes.ts | 12 +-
.../src/__tests__/model-registry-refresh.test.ts | 33 +++
packages/engine/src/auth/model-registry-refresh.ts | 125 +++++++----
packages/engine/src/index.ts | 3 +
11 files changed, 642 insertions(+), 49 deletions(-)
Fusion-Task-Id: FN-8902
Fusion-Task-Lineage: 9f0eaf34-6d28-49aa-b065-274be14ea500
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-11 19:00:44 -07:00
gsxdsm
7b4b2b547b
FN-8996: guard engine test module specifiers
...
Ensure engine test dependencies remain valid after module moves.
- Expand the engine test specifier guard to validate Vitest APIs and imports.
- Repair moved worktree, branch-conflict, and lifecycle module references in tests.
- Preserve worktree recovery coverage and document the harness contract.
Files changed:
docs/testing.md | 21 ++-
.../worktrunk-self-healing.test.ts | 14 +-
.../__tests__/vi-mock-specifiers-resolve.test.ts | 149 ++++++++++++++++-----
.../__tests__/workflow-graph-step-rerun.test.ts | 14 +-
...-sync-role-conversion-inert-live-e2e.pg.test.ts | 2 +-
.../__tests__/worktree-acquisition-pinned.test.ts | 52 ++++++-
.../__tests__/worktree-admin-entry-prune.test.ts | 12 +-
7 files changed, 212 insertions(+), 52 deletions(-)
Fusion-Task-Id: FN-8996
Fusion-Task-Lineage: dd93b4a8-cf45-42e2-9823-e5c2e6f84f82
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-11 18:46:48 -07:00
gsxdsm
167e17c697
fix(engine): resume planned mission follow-ups
2026-08-11 17:53:40 -07:00
gsxdsm
0e4c0c713e
FN-8995: reconcile durable-write inventory drift
...
Keep the durable-write inventory synchronized while preserving reviewed lifecycle verdicts.
- Add fail-closed manifest regeneration and regression coverage.
- Reconcile current call-site structure while retaining equivalent verdicts through module moves.
- Clarify durable wedge-notification writer classification and regeneration guidance.
Files changed:
.../merge-orphan-body-durable-write-fences.md | 18 +-
.../__tests__/_merge-durable-write-callsites.ts | 84 +-
.../merge-orphan-durable-write-inventory.json | 15414 +++++++++----------
...ge-orphan-durable-write-inventory-drift.test.ts | 88 +-
4 files changed, 7836 insertions(+), 7768 deletions(-)
Fusion-Task-Id: FN-8995
Fusion-Task-Lineage: df3d27ca-6614-418d-b09f-e1dd9f49f910
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-11 15:29:44 -07:00
gsxdsm
5134a55b77
FN-8958: fence orphaned merge-body writes
...
Prevent cancelled merge generations from writing stale task state.
- Add a signal-aware merge write fence with orphan audit reporting.
- Fence merge finalization, post-push metadata, and recovery-branch task logs.
- Cover durable write callsites and cancellation behavior with tests and guidance.
Files changed:
.changeset/fn-8958-orphan-merge-write-fence.md | 7 +
AGENTS.md | 1 +
.../reliability/orphan-merge-body-write-fence.md | 68 ++
.../__tests__/_merge-durable-write-callsites.ts | 4 +
.../merge-orphan-durable-write-inventory.json | 982 +++++++++++----------
.../merge-orphan-body-durable-writes.test.ts | 38 +-
.../engine/src/__tests__/merge-write-fence.test.ts | 39 +
.../engine/src/merge/auto-merge-finalization.ts | 9 +
packages/engine/src/merge/merge-write-fence.ts | 92 ++
packages/engine/src/merge/merger-ai.ts | 173 ++--
10 files changed, 875 insertions(+), 538 deletions(-)
Fusion-Task-Id: FN-8958
Fusion-Task-Lineage: 5f398c44-4320-4f0c-be15-707184f66aa8
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-11 15:20:19 -07:00
gsxdsm
43141467fb
FN-8955: harden reviewer verdict extraction
...
Recover structured reviewer verdicts from prose containing malformed brace or quote characters.
- Scan and recover JSON verdict candidates after parser desynchronization.
- Prevent unreadable structured verdicts from being treated as prose approvals.
- Cover malformed prose and multi-finding verdict recovery across review gates.
Files changed:
.changeset/fn-8955-verdict-extractor.md | 7 ++
docs/workflow-steps.md | 4 +-
packages/engine/src/__tests__/reviewer.test.ts | 65 +++++++++++++++
.../workflow-malformed-verdict-gate.test.ts | 14 ++++
.../workflow-step-verdict-parsing.test.ts | 86 ++++++++++++++++++--
packages/engine/src/execution/reviewer.ts | 92 ++++++++++++++++++++--
.../engine/src/executor/workflow-step-verdict.ts | 16 ++--
7 files changed, 267 insertions(+), 17 deletions(-)
Fusion-Task-Id: FN-8955
Fusion-Task-Lineage: 84107fd2-b7f3-4162-9e8c-2ec24600d9d5
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-11 15:01:52 -07:00
gsxdsm
778292b484
refactor: package code organization wave 19 (self-healing pure peels) ( #3403 )
...
## Summary
Starts **U5** of the package code-organization program after wave 18
(executor peels) landed.
Peels pure free-function clusters out of `self-healing.ts` into
`packages/engine/src/self-healing/` without behavior changes. Public
imports from `./self-healing.js` remain stable via re-exports.
### Peels
| Symbol | New home |
|--------|----------|
| `autoRecoverWorktreeSessionStartFailure` |
`self-healing/auto-recover-worktree-session.ts` |
| `archiveAsGhostBug` | `self-healing/archive-ghost-bug.ts` |
| `hasStepProgress` / work-complete helpers |
`self-healing/step-progress.ts` |
### Line count
- `self-healing.ts`: ~15456 → ~15231 (baseline ratcheted to post-peel
live; main had already drifted past the prior grandfathered ceiling via
organic growth)
- New modules each well under 2,000 lines
## Test plan
- [x] `pnpm --filter @fusion/engine exec tsc --noEmit`
- [x] `self-healing-trait-rekey.test.ts` (autoRecover requeue)
- [x] `self-healing-paused-abort-recovery.test.ts`
- [x] `self-healing-model-unavailable-recovery.test.ts`
- [ ] CI gate
## Follow-ups
U5 Slice B: domain method clusters (startup, in-review, merge-status,
workspace, surfacing) into additional `self-healing/*.ts` modules.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved automatic recovery when worktree sessions fail to start,
including stale or incomplete session data.
* Tasks can be safely requeued while preserving progress, or escalated
after retry limits are reached.
* Improved handling of completed work and failures where task completion
was not recorded.
* Preserved valid task branches during recovery and provided more
reliable fallback requeue behavior.
* Ghost bugs are automatically archived with recovery details and
activity history.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-08-11 11:29:30 -10:00
gsxdsm
9622a62425
fix(engine): preserve manual handoff holds during recovery ( #3422 )
...
## Summary
Supersedes #3421 — fork head not writable for main-merge. Same change
rebased onto current main so lifecycle-column lint stays green.
## Test plan
- [x] merges cleanly onto main
- [ ] CI green
Co-authored-by: BESA-Franz <49682134+BESA-Franz@users.noreply.github.com >
2026-08-11 11:29:23 -10:00
Phil Larson
ca134c2554
test(engine): align failed notification fixture with recovery ownership ( #3418 )
...
## Summary
- make the already-merged recovery fixture explicit that no maintenance
sweep owns terminal-failure recovery
- preserve the fail-open `task-wedged` notification assertion when no
landed commit is found
## Test plan
- `corepack pnpm --filter @fusion/engine exec vitest run
--silent=passed-only --reporter=dot src/__tests__/self-healing.test.ts`
(460 passed)
- `corepack pnpm --filter @fusion/engine typecheck`
- `node scripts/run-static-gate-checks.mjs` (12 passed)
- `corepack pnpm --filter @fusion/engine test:core` (422 passed)
- `corepack pnpm --filter @fusion/core test:unit-gate` (184 passed)
- `corepack pnpm --filter @runfusion/fusion test:ci-shape` (71 passed)
- `corepack pnpm test:gate` reaches the PostgreSQL harness but cannot
authenticate locally (`empty password returned by client`) before
product assertions
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Tests**
* Updated failure-notification test conditions to cover scenarios
without automatic maintenance processing.
* Added coverage confirming terminal-failure notifications fail open
when no maintenance sweep owns the task.
* Bypassed production debounce timing to make the test behavior
deterministic.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-08-11 11:28:46 -10:00
gsxdsm
66c51038a5
fix(engine): bind self-owned worktree liveness probe ( #3419 )
...
## Summary
Supersedes #3416 — the fork head is not writable from maintainers, so
this branch carries the same fix merged onto current `main`.
## Changes
- Bind the self-owned worktree liveness probe in task-executor pure
facades (from #3416 ).
- Merge current main so the lifecycle-column census baseline stays
green.
## Test plan
- [x] `pnpm check:lifecycle-columns` clean after merge
- [ ] CI green
Closes context from #3416 .
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Fixed cleanup for self-owned worktrees so it no longer crashes before
checking whether an active session is present.
* Improved safety during worktree reconciliation by correctly verifying
that the worktree is still active before removal.
* **Documentation**
* Added a changeset documenting the worktree cleanup fix.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: BESA-Franz <49682134+BESA-Franz@users.noreply.github.com >
2026-08-11 11:28:42 -10:00
gsxdsm
a6ce7f89ef
FN-8987: expose release-gate verdicts for Promote visibility
...
Expose server-evaluated release-gate state so Promote controls accurately reflect approval readiness.
- Attach transient release-gate verdicts to task API responses.
- Preserve only fresh REST verdicts across task snapshots and render them in task cards.
- Align hold-release gating and document the Promote-state contract.
Files changed:
.changeset/fn-8987-release-gate-verdict.md | 7 +
docs/dashboard-guide.md | 4 +
docs/solutions/workflow-learnings/project-union-versus-per-task-lanes.md | 1 +
docs/workflow-steps.md | 4 +
packages/core/src/index.gate.ts | 2 +-
packages/core/src/index.ts | 2 +-
packages/core/src/types.ts | 2 +
packages/core/src/types/task/task-core.ts | 20 +++
packages/dashboard/app/components/TaskCard.tsx | 3 +-
packages/dashboard/app/components/__tests__/TaskCard.test.tsx | 31 ++++
packages/dashboard/app/hooks/__tests__/useTasks.test.ts | 26 ++++
packages/dashboard/app/hooks/useTasks.ts | 135 +++++++++++++++--
packages/dashboard/app/utils/__tests__/releaseGate.contract.test.ts | 29 ++++
packages/dashboard/app/utils/__tests__/releaseGate.test.ts | 49 ++++++
packages/dashboard/app/utils/releaseGate.ts | 26 ++++
packages/dashboard/app/utils/reviewBudgetApproval.ts | 9 ++
packages/dashboard/src/routes/register-task-workflow-routes.ts | 20 ++-
packages/engine/src/__tests__/release-gate-verdict.test.ts | 40 +++++
packages/engine/src/execution/hold-release.ts | 166 +++++++++------------
packages/engine/src/index.ts | 3 +
20 files changed, 469 insertions(+), 110 deletions(-)
Fusion-Task-Id: FN-8987
Fusion-Task-Lineage: 6f1742bc-2b2b-4a32-9be5-92160335d90d
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-11 14:22:14 -07:00
Phil Larson
6cc15fd73d
fix(ci): restore clean-main CLI and lifecycle gates ( #3420 )
...
## Summary
- Complete the isolated `@fusion/core` mock used by the
experiment-finalize extension suite
- Classify three intentional physical/synthetic lifecycle literals
introduced on current main
- Re-record the strict lifecycle census baseline with zero unexamined
guards
## Test plan
- `pnpm --filter @runfusion/fusion exec vitest run
src/__tests__/extension-experiment-finalize.test.ts --silent=passed-only
--reporter=dot`
- `pnpm --filter @fusion/core exec vitest run
src/__tests__/task-intake-owner-resolver.test.ts --silent=passed-only
--reporter=dot`
- `pnpm --filter @fusion/engine exec vitest run --project engine-default
src/__tests__/mission-feature-sync-lanes.test.ts --silent=passed-only
--reporter=dot`
- `pnpm check:lifecycle-columns`
- `node scripts/check-mock-completeness.mjs`
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Bug Fixes**
- Improved mission reconciliation previews for task links, specification
alignment, and lifecycle updates.
- Prevented stale or superseded validation runs from overwriting current
feature status or ownership.
- Improved blocked-feature diagnostics and archived-task handling across
workflow configurations.
- **Documentation**
- Clarified validation, assignment checks, and mission synchronization
behavior.
- **Tests**
- Expanded coverage for reconciliation previews and validator ownership
scenarios.
- **Chores**
- Updated lifecycle baseline data for known archived-task cases.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-08-11 10:57:36 -10:00
gsxdsm
9f24a517cf
FN-8956: track resolved review findings
...
Add durable, scoped resolution states for workflow review findings.
- Persist reviewer-applied and superseded finding receipts without making them actionable.
- Scope supersession claims to a named prior workflow result, preserving duplicate IDs in other review lanes.
- Render informational resolution badges and reject resolved items from revision requests.
Files changed: .changeset/fn-8956-review-finding-resolution.md | 7 +
docs/dashboard-guide.md | 2 +-
docs/workflow-steps.md | 8 +-
.../src/__tests__/review-severity-gate.test.ts | 25 ++++
.../src/__tests__/workflow-step-results.test.ts | 45 +++++-
packages/core/src/index.gate.ts | 6 +
packages/core/src/index.ts | 6 +
packages/core/src/types.ts | 2 +
packages/core/src/types/task/task-review.ts | 4 +
packages/core/src/types/workflow/workflow-steps.ts | 15 +-
.../src/workflows/builtin-code-review-group.ts | 2 +-
.../src/workflows/builtin-plan-review-group.ts | 2 +-
.../core/src/workflows/review-severity-gate.ts | 37 ++++-
.../core/src/workflows/workflow-step-results.ts | 54 ++++++-
packages/dashboard/app/api/agents/run-audit.ts | 1 +
.../dashboard/app/components/TaskReviewTab.css | 22 +++
.../dashboard/app/components/TaskReviewTab.tsx | 36 +++--
.../components/__tests__/TaskReviewTab.test.tsx | 46 ++++++
.../dashboard/src/__tests__/routes-tasks.test.ts | 48 ++++++
.../src/routes/register-task-workflow-routes.ts | 14 +-
.../__tests__/review-finding-supersession.test.ts | 163 +++++++++++++++++++++
.../__tests__/review-findings-injection.test.ts | 22 +++
.../workflow-step-verdict-parsing.test.ts | 16 +-
.../engine/src/executor/execute-workflow-graph.ts | 129 ++++++++--------
.../engine/src/executor/execute-workflow-step.ts | 25 +++-
.../engine/src/executor/run-graph-custom-node.ts | 7 +
.../executor/workflow-step-failure-injection.ts | 8 +-
.../engine/src/executor/workflow-step-verdict.ts | 17 ++-
.../src/workflows/workflow-graph-executor.ts | 15 ++
packages/i18n/locales/en/app.json | 4 +-
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 +-
36 files changed, 703 insertions(+), 109 deletions(-)
Fusion-Task-Id: FN-8956
Fusion-Task-Lineage: 80568280-85aa-4a49-a60a-99b75f88f486
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-11 13:34:27 -07:00
gsxdsm
6ae9299576
FN-8953: defer terminal wedge alerts during recovery
...
Hold terminal wedge alerts until their recovery window has elapsed.
- Persist and settle pending wedge notifications across restarts.
- Clear pending alerts on task progress and reconcile expired holds during self-healing.
- Expose the settle window in notification settings with coverage for store and notification flows.
Files changed:
.changeset/fn-8953-wedge-settle-window.md | 7 +
AGENTS.md | 1 +
docs/architecture.md | 3 +-
docs/settings-reference.md | 1 +
.../core/src/__tests__/store-wedge-pending.test.ts | 56 +++++
packages/core/src/config/settings-schema.ts | 1 +
packages/core/src/store.ts | 46 ++++
packages/core/src/types/settings/settings-scope.ts | 2 +
packages/core/src/types/task/task-core.ts | 15 ++
.../app/components/settings/save-split.ts | 1 +
.../sections/NotificationsSection.search.ts | 9 +
.../settings/sections/NotificationsSection.tsx | 15 ++
.../settings-default-descriptions.test.tsx | 1 +
...self-healing-pending-wedge-notification.test.ts | 148 ++++++++++++
.../__tests__/notification-service.test.ts | 7 +-
.../__tests__/task-wedge-notification.test.ts | 258 ++++++++++++++++++++-
.../src/notification/notification-service.ts | 260 +++++++++++++++++++++
packages/engine/src/self-healing.ts | 38 +++
packages/i18n/locales/en/app.json | 2 +
19 files changed, 850 insertions(+), 21 deletions(-)
Fusion-Task-Id: FN-8953
Fusion-Task-Lineage: fd5b5827-c69d-409f-86d5-01ff23405ee3
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-11 12:34:47 -07:00
gsxdsm
dfd88e7540
fix: resume capacity-parked workflow continuations
...
The planning-continuation drain skipped every due `kind: "task"` row whose
`waitReason` was not "planning", on the premise that such rows "belong to a
different drain". No such drain exists: `listDueWorkflowWorkItems` has exactly
two callers, this pass and the self-healing reclaim sweep, and the sweep
deliberately leaves `runnable`/`retrying` rows alone as "the dispatcher's own
queue". A capacity-parked continuation was therefore owned by nobody — skipped
here every poll with no state change and no audit row, and passed over there by
design.
Observed on the Fusion board: eight cards sat runnable for up to 8h with the
engine unpaused, 0 tasks in progress, and 4 of 10 worktrees used. Three carried
`waitReason: "capacity"` from the capacity-suspend path; five carried NULL. The
09:04 reclaim sweep had just moved them held -> runnable, handing them to this
drain and simultaneously putting them out of its own reach, so the auto-resume
fix tightened the strand it repaired.
Dispatch stays admission-gated by `admitPlanningContinuation`, so a
capacity-parked card resumes only when a slot is genuinely free.
Also repairs two stale path allowlists in planning-claim-single-writer.ts: the
mission stores and replan-target.ts moved into subdirectories, leaving that
ratchet red on main and accusing the two modules it exists to exclude.
Verified: the patched classifier returns `actionable` for all 8 live stranded
rows; gate + lint green.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com >
2026-08-11 10:36:26 -07:00
gsxdsm
eef68fe0b9
FN-8933: capture semantic memory from completed work
...
Add inferred graph relationships and detached recall capture across completed-work memory surfaces.
- Validate and persist deterministic inferred semantic edges with audit outcomes.
- Capture completed tasks, research findings, and insights as bounded recall entries.
- Wire memory semantics through engine, research APIs, and coverage tests.
Files changed:
.changeset/fn-8933-memory-semantics-capture.md | 7 +
AGENTS.md | 1 +
docs/knowledge-graph.md | 10 +-
.../src/__tests__/memory/recall-capture.test.ts | 111 +++++++++++++
.../__tests__/postgres/insight-store.pg.test.ts | 25 +++
.../postgres/research-execution.pg.test.ts | 38 +++++
.../__tests__/research-feature-promotion.test.ts | 39 +++++
.../core/src/async-stores/async-insight-store.ts | 23 ++-
packages/core/src/index.ts | 1 +
.../__tests__/graph-builder-incremental.test.ts | 28 ++++
.../__tests__/inferred-edge-writer.test.ts | 74 +++++++++
packages/core/src/knowledge-graph/graph-builder.ts | 27 ++-
.../src/knowledge-graph/graph-serialization.ts | 2 +-
packages/core/src/knowledge-graph/graph-store.ts | 12 ++
packages/core/src/knowledge-graph/graph-types.ts | 2 +-
packages/core/src/knowledge-graph/index.ts | 1 +
.../src/knowledge-graph/inferred-edge-writer.ts | 96 +++++++++++
packages/core/src/memory/index.ts | 1 +
packages/core/src/memory/recall-capture.ts | 184 +++++++++++++++++++++
.../src/research/research-feature-promotion.ts | 23 ++-
packages/core/src/task-store/task-store-helpers.ts | 13 +-
.../src/__tests__/research-routes.test.ts | 80 ++++++++-
packages/dashboard/src/research-routes.ts | 27 ++-
.../src/__tests__/agent-mission-tools.test.ts | 60 ++++++-
.../src/__tests__/in-process-runtime.pg.test.ts | 28 +++-
.../memory-consolidation-heartbeat-hook.test.ts | 8 +-
.../__tests__/memory-consolidation-ports.test.ts | 17 +-
.../src/__tests__/memory-semantics-pass.test.ts | 115 +++++++++++++
.../engine/src/__tests__/project-engine.test.ts | 65 +++++++-
packages/engine/src/agent-heartbeat.ts | 14 +-
packages/engine/src/agent-tools.ts | 12 +-
packages/engine/src/agents/agent-reflection.ts | 9 +-
packages/engine/src/memory/index.ts | 1 +
.../src/memory/memory-consolidation-adapters.ts | 18 +-
packages/engine/src/memory/memory-consolidation.ts | 13 +-
packages/engine/src/memory/memory-semantics.ts | 67 ++++++++
packages/engine/src/project-engine.ts | 3 +
.../engine/src/research/research-orchestrator.ts | 20 ++-
packages/engine/src/runtimes/in-process-runtime.ts | 12 ++
packages/engine/src/util/run-audit.ts | 11 ++
40 files changed, 1250 insertions(+), 48 deletions(-)
Fusion-Task-Id: FN-8933
Fusion-Task-Lineage: b75a6b23-906f-4255-92f1-7684beb742b8
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-11 05:45:36 -07:00
gsxdsm
5a1853cac6
FN-8934: add memory pre-steering across agent prompts
...
Add bounded memory-first guidance and consolidation observability across agent workflows.
- Apply mode-aware memory pre-steering to execution, triage, reviewer, heartbeat, and merger prompts.
- Export and test shared memory nudges while documenting memory inclusion settings.
- Expose agent memory consolidation history through dashboard API and detail UI.
Files changed:
.changeset/fn-8934-memory-pre-steering.md | 7 ++
docs/agents.md | 4 +
docs/settings-reference.md | 2 +
.../core/src/__tests__/memory-pre-steering.test.ts | 28 +++++++
packages/core/src/__tests__/project-memory.test.ts | 22 ++++++
packages/core/src/index.gate.ts | 7 ++
packages/core/src/index.ts | 7 ++
packages/core/src/memory/index.ts | 1 +
packages/core/src/memory/memory-pre-steering.ts | 41 ++++++++++
packages/core/src/memory/project-memory.ts | 19 +++++
packages/dashboard/app/api/agents/agents.ts | 12 +++
packages/dashboard/app/api/legacy.ts | 2 +
.../dashboard/app/components/AgentDetailView.css | 41 ++++++++++
.../dashboard/app/components/AgentDetailView.tsx | 56 +++++++++++++-
...etailView.memory-consolidation-history.test.tsx | 58 +++++++++++++++
.../__tests__/AgentDetailView.test-helpers.ts | 3 +
.../register-agent-memory-consolidations.test.ts | 87 ++++++++++++++++++++++
.../register-agent-reflection-rating-routes.ts | 36 +++++++++
.../memory-pre-steering-injection.test.ts | 50 +++++++++++++
packages/engine/src/__tests__/reviewer.test.ts | 18 +++++
packages/engine/src/__tests__/triage.test.ts | 18 ++++-
packages/engine/src/agent-heartbeat.ts | 14 +++-
.../engine/src/agents/agent-heartbeat-prompts.ts | 2 +
packages/engine/src/agents/agent-instructions.ts | 16 ++--
packages/engine/src/execution/reviewer.ts | 31 +++++---
packages/engine/src/executor/execution-prompt.ts | 6 +-
packages/engine/src/merger.ts | 9 ++-
packages/engine/src/triage.ts | 12 ++-
28 files changed, 577 insertions(+), 32 deletions(-)
Fusion-Task-Id: FN-8934
Fusion-Task-Lineage: a062cc6b-1277-4d36-9926-b3ecba4945eb
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-11 04:57:14 -07:00
gsxdsm
637854ad36
FN-8932: add durable memory consolidation agent
...
Add a provisioned memory agent that consolidates durable recall material through idempotent heartbeat ticks.
- Provision and configure the durable memory agent with an enabled workflow setting.
- Add consolidation adapters, material collection, recall graph references, and run-audit metadata.
- Expose the setting in the dashboard and document the memory-agent behavior.
- Cover provisioning, heartbeat, consolidation, audit, and recall graph behavior with tests.
Files changed:
.changeset/fn-8932-memory-agent.md | 7 ++
AGENTS.md | 1 +
docs/agents.md | 10 ++
docs/settings-reference.md | 1 +
docs/storage.md | 2 +-
.../memoryConsolidationEnabled-default.test.ts | 22 ++++
.../memory-recall-graph-cross-reference.pg.test.ts | 115 +++++++++++++++++++++
.../__tests__/memory-agent-provisioning.test.ts | 31 ++++++
packages/core/src/agents/agent-store.ts | 85 +++++++++++++++
packages/core/src/agents/memory-agent-defaults.ts | 30 ++++++
packages/core/src/index.gate.ts | 2 +
packages/core/src/index.ts | 9 ++
packages/core/src/memory/recall/index.ts | 1 +
packages/core/src/memory/recall/recall-dedup.ts | 3 +
packages/core/src/memory/recall/recall-store.ts | 35 ++++++-
.../src/workflows/builtin-workflow-settings.ts | 14 +++
.../src/workflows/workflow-settings-resolver.ts | 12 ++-
.../__tests__/WorkflowSettingsPanel.test.tsx | 8 ++
.../__tests__/workflow-setting-display.test.ts | 6 ++
.../app/components/workflow-setting-display.ts | 5 +
.../memory-consolidation-heartbeat-hook.test.ts | 92 +++++++++++++++++
.../__tests__/memory-consolidation-ports.test.ts | 34 ++++++
...memory-consolidation-run-audit-metadata.test.ts | 19 ++++
.../__tests__/memory-consolidation-tick.test.ts | 62 +++++++++++
packages/engine/src/agent-heartbeat.ts | 55 ++++++++++
packages/engine/src/index.ts | 1 +
packages/engine/src/memory/index.ts | 3 +
.../src/memory/memory-consolidation-adapters.ts | 29 ++++++
.../src/memory/memory-consolidation-material.ts | 22 ++++
packages/engine/src/memory/memory-consolidation.ts | 41 ++++++++
packages/engine/src/util/run-audit.ts | 10 ++
31 files changed, 764 insertions(+), 3 deletions(-)
Fusion-Task-Id: FN-8932
Fusion-Task-Lineage: b4fdec50-1f42-4120-af17-0b6f3a94586e
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-11 03:53:11 -07:00
gsxdsm
cb4d94104a
docs(engine): correct the prune-before-remove rationale
...
The comment cited 89 registered worktrees against 20 on disk as evidence of stale
registrations. That comparison was against .worktrees/ alone; all 89 registrations
exist, spread across kb-worktrees, orca workspaces and .claude/worktrees. Prune
still belongs before removal on ordering grounds -- a dangling registration fails
the removal, and the throw skips the trailing prune so the retry never clears it --
but the false measurement should not stand as the justification.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com >
2026-08-11 02:49:01 -07:00
gsxdsm
2b228383d5
test: cover model-target chat creation and non-conflict cleanup failures
...
Both suites are mutation-verified: reverting the corresponding fix fails 4 of the
chat tests and exactly the 3 new self-healing park tests.
The self-healing tests carry a positive control asserting the sweep actually
reached the tip-already-merged arm -- without it the park assertions passed
vacuously against a task shape the candidate filter rejected.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com >
2026-08-11 02:47:24 -07:00
gsxdsm
fd68bb1bea
fix: model-target chats 404, and worktree rmdir races misreported as branch conflicts
...
Two unrelated production failures with a shared symptom of an opaque error.
Chat: FN-8869 hoisted the agent-existence check out of its else branch, so it ran
even when the client supplied an explicit model pair. Model-target chats send the
client-only sentinel `__fn_agent__`, which is never an agent row, so every one of
them 404'd behind the generic "Failed to create chat session" toast. The agent is
now required only when it is the source of model resolution.
Self-healing: a failed `tip-already-merged` cleanup was rethrown and classified
`branch-conflict-unrecoverable`, failing and pausing tasks whose branch was already
an ancestor of the integration ref. Every one of the 78 logged parks carried a
`git worktree remove --force` / `ENOTEMPTY rmdir node_modules` message -- a pnpm
race, not a conflict. Cleanup failure now retries on the next sweep, and prune runs
before removal so a stale registration stops causing the failure it would prevent.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com >
2026-08-11 02:39:56 -07:00
gsxdsm
06ea444339
fix: uncap workflow principals and auto-resume stranded continuations
...
Two independent wedges kept cards silently stuck on the board.
1. Workflow principals were capped. `WorkflowAgentCapacity.acquire` enforced
`settings.maxConcurrent` as a project session budget plus an optional
per-agent `maxWorkflowSessions`, and `routeWorkflowPrincipal`'s availability
test applied the same per-agent ceiling. The workflow roles stand in for
STAGES, not workers, and there is typically one agent per role - so the cap
serialized the entire board behind a single Workflow Executor regardless of
maxConcurrent/maxWorktrees. Admission now always succeeds; the lease survives
as bookkeeping (it is what activeSessions counts and what the renewal timer
keeps warm). `maxProjectSessions` is removed from the input rather than
defaulted, so it cannot be reintroduced without deleting the contract, and
the agent-capacity re-route loops in triage and graph admission are deleted
with the refusal they existed to work around.
2. Continuations that stop in `running` or `held` were never re-polled. The
scheduler's due-poll takes only `runnable`/`retrying`; a row claimed through
a path that leaves `leaseExpiresAt` NULL keeps `state: "running"` forever
after its process dies, and `acquireWorkflowWorkItemLease` can only re-take a
`held` row whose blockedReason matches workflow-principal-%. Observed live:
seven cards `running` behind leases from a process that exited ~9h earlier,
two `held` with a NULL blockedReason for 46h, none emitting a single
run-audit row while stranded. A further 33 active-state rows belonged to
archived+soft-deleted tasks (the FK cascade only fires on hard delete).
New sweep `reconcileStrandedWorkflowContinuations` (startup + periodic)
re-queues both stranded shapes and retires dead tasks' rows, gated by the
canonical liveness triple, a 10-minute grace matching the capacity lease
duration, and a compare-and-set on the scanned state so a real claim wins.
The decision is the pure `evaluateStrandedContinuationReclaim`, shared with
its tests so coverage cannot drift from behavior - the drift that let the
FN-8923 sweep ship covering one ninth of this problem.
Verified: pnpm lint, engine typecheck, pnpm test:gate (606 tests), verify:fast,
and the new suite under mutation (removing either guard fails 3 cases). The two
pre-existing failures in self-healing-orphaned-pending-step-results.test.ts
reproduce identically at HEAD without these changes.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com >
2026-08-11 02:02:51 -07:00
gsxdsm
8f6190910d
FN-8971: add mission blocked-status clearing tool
...
Add an operator-only CLI tool for repairing stale mission blocked badges.
- Register and document fn_mission_clear_blocked with PostgreSQL and status-error handling.
- Withhold the repair action from agent principals and deny it in readonly workflow steps.
- Classify the tool consistently across engine permission gates and add coverage.
- Add a minor CLI changeset for the new operator capability.
Files changed:
.changeset/fn-8971-mission-clear-blocked-tool.md | 7 +++
docs/missions.md | 7 ++-
packages/cli/skill/fusion/SKILL.md | 2 +-
.../cli/skill/fusion/references/extension-tools.md | 9 ++++
.../skill/fusion/references/fusion-capabilities.md | 1 +
.../__tests__/extension-permission-gates.test.ts | 26 ++++++++++
packages/cli/src/__tests__/extension.test.ts | 56 +++++++++++++++++++++-
packages/cli/src/extension.ts | 54 +++++++++++++++++++++
.../src/__tests__/agent-mission-tools.test.ts | 5 +-
.../src/__tests__/gating-classifications.test.ts | 8 ++++
.../workflow-step-readonly-allowlist.test.ts | 5 +-
.../engine/src/execution/gating-classifications.ts | 7 +++
12 files changed, 182 insertions(+), 5 deletions(-)
Fusion-Task-Id: FN-8971
Fusion-Task-Lineage: 650c13b3-c6c4-4dc5-a0b5-9c71d3b94fc5
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-11 01:45:08 -07:00
gsxdsm
844512ed3e
FN-8976: prevent concurrent automatic validator runs
...
Prevent automatic validation from running alongside a fresh manual or non-memoized validator.
- Serialize validator admission around a feature-scoped fresh-running check.
- Report feature-versus-fingerprint blocking scope and preserve memoization semantics.
- Add regression coverage, documentation, and a patch changeset.
Files changed:
.changeset/fn-8976-validator-admission.md | 7 ++
docs/missions.md | 4 +-
.../__tests__/postgres/mission-store.pg.test.ts | 110 +++++++++++++++++++--
.../core/src/async-stores/async-mission-store.ts | 61 ++++++++++--
packages/core/src/missions/mission-types.ts | 2 +
.../src/__tests__/mission-execution-loop.test.ts | 10 +-
6 files changed, 171 insertions(+), 23 deletions(-)
Fusion-Task-Id: FN-8976
Fusion-Task-Lineage: 61b487e8-5542-4cce-94f7-58d5295fe177
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-10 22:57:21 -07:00
gsxdsm
90573e31b0
FN-8963: prevent concurrent mission validation runs
...
Prevent duplicate manual validation runs while preserving recovery from stale validator state.
- Add atomic mission-store claims and release handling for manual validator runs.
- Return a conflict response and disable the validation action while a run is active.
- Cover concurrent claims, API behavior, UI state, and stale-window parity.
Files changed:
.changeset/fn-8963-validate-inflight-guard.md | 7 ++
docs/missions.md | 2 +
.../__tests__/postgres/mission-store.pg.test.ts | 129 +++++++++++++++++++++
.../core/src/async-stores/async-mission-store.ts | 87 ++++++++++++--
packages/core/src/index.ts | 2 +
packages/core/src/missions/mission-store.ts | 69 ++++++++++-
packages/core/src/missions/mission-types.ts | 13 +++
packages/dashboard/app/api/legacy.ts | 2 +
packages/dashboard/app/api/missions/missions.ts | 11 +-
.../dashboard/app/components/MissionManager.tsx | 15 ++-
.../MissionManager.validate-inflight.test.tsx | 77 ++++++++++++
.../mission-validate-inflight-guard.test.ts | 55 +++++++++
packages/dashboard/src/mission-routes.ts | 32 +---
.../src/__tests__/mission-execution-loop.test.ts | 61 +++++++++-
.../validator-run-stale-window-parity.test.ts | 9 ++
15 files changed, 549 insertions(+), 22 deletions(-)
Fusion-Task-Id: FN-8963
Fusion-Task-Lineage: 7e5d0ae4-98ac-4f79-99ca-45fd1450362d
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-10 21:41:47 -07:00
gsxdsm
cef07527f6
FN-8948: reconcile mission state from task ground truth
...
Centralize mission and feature state repair around deterministic task lifecycle evidence.
- Add a reusable mission reconciliation authority with task-move, API, tool, and maintenance callers.
- Repair unambiguous title links while preserving terminal, validation, and audit safeguards.
- Route scheduler moves through the authority and reject duplicate feature-title ownership.
- Expose reconcile controls and document the operator workflow.
Files changed:
.changeset/fn-8948-mission-auto-reconcile.md | 7 +
AGENTS.md | 1 +
docs/missions.md | 8 +-
packages/cli/skill/fusion/SKILL.md | 2 +-
.../cli/skill/fusion/references/extension-tools.md | 9 +
.../skill/fusion/references/fusion-capabilities.md | 1 +
.../extension-experiment-finalize.test.ts | 2 +
.../__tests__/extension-gitlab-tracking.test.ts | 2 +
.../cli/src/__tests__/extension-web-fetch.test.ts | 2 +
packages/cli/src/extension.ts | 14 +
packages/dashboard/src/mission-routes.ts | 24 +-
.../src/__tests__/agent-mission-tools.test.ts | 2 +-
.../engine/src/__tests__/mission-autopilot.test.ts | 8 +-
.../src/__tests__/mission-state-reconcile.test.ts | 67 +++++
packages/engine/src/agent-tools.ts | 6 +
.../engine/src/execution/gating-classifications.ts | 1 +
packages/engine/src/index.ts | 6 +
packages/engine/src/missions/index.ts | 8 +-
packages/engine/src/missions/mission-autopilot.ts | 106 +------
.../engine/src/missions/mission-feature-sync.ts | 1 +
.../engine/src/missions/mission-state-reconcile.ts | 169 +++++++++++
packages/engine/src/runtimes/in-process-runtime.ts | 4 +-
packages/engine/src/scheduler.ts | 331 +++++----------------
packages/engine/src/util/run-audit.ts | 2 +
24 files changed, 426 insertions(+), 357 deletions(-)
Fusion-Task-Id: FN-8948
Fusion-Task-Lineage: 0fbccef3-eeac-46d2-b3d8-aca679b3657e
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-10 20:32:26 -07:00
gsxdsm
b82f1a41f3
FN-8947: add repairable mission validation controls
...
Add repairable mission-validation badges with clear and re-run flows.
- Persist repair metadata and audit events for mission validation state changes.
- Expose validation repair through dashboard routes, UI controls, engine tools, and CLI capabilities.
- Add database, API, UI, engine, and extension coverage plus operator documentation.
Files changed: .changeset/fn-8947-mission-validation-repair.md | 7 +
docs/missions.md | 15 +-
packages/cli/skill/fusion/SKILL.md | 2 +-
.../cli/skill/fusion/references/extension-tools.md | 10 +
.../skill/fusion/references/fusion-capabilities.md | 1 +
.../extension-experiment-finalize.test.ts | 2 +
.../__tests__/extension-gitlab-tracking.test.ts | 2 +
.../cli/src/__tests__/extension-web-fetch.test.ts | 2 +
packages/cli/src/__tests__/extension.test.ts | 24 +++
packages/cli/src/extension.ts | 40 ++++
.../mission-status-event-metadata.test.ts | 23 +++
.../postgres/mission-validation-repair.pg.test.ts | 187 ++++++++++++++++++
.../core/src/async-stores/async-mission-store.ts | 216 ++++++++++++++++++---
packages/core/src/index.gate.ts | 5 +
packages/core/src/index.ts | 5 +-
packages/core/src/missions/mission-types.ts | 49 +++++
packages/core/src/types.ts | 7 +
packages/dashboard/app/api/legacy.ts | 1 +
packages/dashboard/app/api/missions/missions.ts | 13 ++
.../dashboard/app/components/MissionManager.css | 26 ++-
.../dashboard/app/components/MissionManager.tsx | 207 +++++++++++++++++---
.../__tests__/MissionManager.mobile-css.test.ts | 8 +
.../MissionManager.validation-repair.test.tsx | 83 ++++++++
.../__tests__/mission-task-prefix-routes.test.ts | 162 +++++++++++++++-
packages/dashboard/src/mission-routes.ts | 104 +++++++++-
.../src/__tests__/agent-mission-tools.test.ts | 119 +++++++++++-
.../__tests__/mission-feature-sync-lanes.test.ts | 59 +++++-
.../workflow-step-readonly-allowlist.test.ts | 1 +
packages/engine/src/agent-tools.ts | 36 ++++
.../engine/src/execution/gating-classifications.ts | 1 +
packages/engine/src/index.ts | 1 +
.../engine/src/missions/mission-feature-sync.ts | 79 ++++++++
32 files changed, 1430 insertions(+), 67 deletions(-)
Fusion-Task-Id: FN-8947
Fusion-Task-Lineage: b93e5ab6-021c-4d32-bffb-f89f4c3894bc
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-10 19:36:31 -07:00
ischindl
f775039f5b
feat(engine): add typed delivery-pipeline run-audit catalogue ( #3410 )
...
## What
Adds a typed, queryable catalogue for engine run-audit events as the
first step of the delivery-pipeline reliability & observability effort.
- **New module** `packages/engine/src/run-audit/run-audit-catalogue.ts`
— a typed registry describing run-audit event kinds (scheduler,
self-healing, merger, worktree, symbol-lock, …) so pipeline
observability can ingest and reason about them consistently.
- **Parity test** `run-audit-catalogue.test.ts` — asserts the catalogue
matches the emitted run-audit event space.
- **Docs** `docs/run-audit.md` + index pointer.
## Why
Run-audit events are currently emitted ad-hoc without a typed contract.
A catalogue gives:
- a single source of truth for event kinds/names,
- a parity guard so any new or renamed event is caught,
- a foundation for delivery-pipeline reliability dashboards.
## Verification
- `@fusion/engine` `tsc` build → **PASS**
- `vitest run run-audit-catalogue.test.ts` → **3 tests passed**
- No production behavior change outside the new module.
## Scope
New isolated module + its test + docs. No changesets/release artifacts.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Documentation**
* Added a run-audit catalogue covering delivery-pipeline finalization,
self-healing reconciliation, and durable-agent error events.
* Documented recorded outcomes, emission conditions, audit-store
querying, and event catalogue maintenance.
* Added a documentation index entry linking to the new catalogue.
* **Tests**
* Added validation to ensure documented audit events remain complete,
consistently formatted, and synchronized with the supported event
catalogue.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Fusion <noreply@runfusion.ai >
2026-08-10 15:19:43 -10:00
gsxdsm
8c055a6695
fix: keep self-healing sweeps alive across stale task links ( #3417 )
...
## Summary
Supersedes #3405 — the fork head is not writable from maintainers, so
this branch carries the same fix rebased/merged onto current `main`.
## Conflict resolution
- Main already landed the equivalent fail-open path as **FN-8919**
(`readLinkedTaskOrUndefined` + per-agent try/catch).
- Kept the additional `recoverAgentsRunningOnInactiveTasks` regression
that covers task-gone races plus transient lookup isolation.
- Dropped the duplicate changeset (main already has
`fn-8919-agent-link-sweep-fail-open`).
## Test plan
- [x] `git merge-tree` clean against `main`
- [ ] CI green
Closes context from #3405 .
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved recovery handling when task lookups fail.
* Agents linked to deleted or missing tasks are now unlinked, while
agents affected by temporary errors remain preserved.
* Recovery continues for other eligible agents instead of stopping after
an individual lookup failure.
* **Tests**
* Added regression coverage for deleted, missing, and temporarily
unavailable tasks.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: Codex <codex@openai.com >
2026-08-10 15:19:08 -10:00
gsxdsm
d749a11a5b
FN-8923: document orphan merge durable-write fences
...
Record the bounded cancellation frontier for orphaned AI merge bodies.
- Add AST-derived durable-writer inventory and drift guard for the pinned merge closure.
- Characterize orphan and successor merge-lane writes with production-path fixtures.
- Document unresolved follow-ups and link the fence from the architecture guide.
Files changed:
docs/architecture.md | 2 +-
.../merge-orphan-body-durable-write-fences.md | 92 +
.../__tests__/_merge-durable-write-callsites.ts | 938 ++
.../merge-orphan-durable-write-inventory.json | 9965 ++++++++++++++++++++
.../merge-orphan-body-durable-writes.test.ts | 348 +
...ge-orphan-durable-write-inventory-drift.test.ts | 56 +
packages/engine/src/merge/merger-ai.ts | 6 +
packages/engine/src/project-engine.ts | 6 +
8 files changed, 11412 insertions(+), 1 deletion(-)
Fusion-Task-Id: FN-8923
Fusion-Task-Lineage: 5b2d278c-1626-439a-affd-077f2de2aef1
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-10 17:55:46 -07:00
gsxdsm
a839c61929
FN-8926: expose graph and recall through MCP
...
Expose Fusion knowledge graph and durable recall through a built-in MCP transport.
- Add the reserved fusion-memory server with graph and recall MCP tools.
- Resolve built-in availability and enable/disable tombstones across configuration and UI.
- Add CLI transport, documentation, release metadata, and lane coverage tests.
Files changed:
.changeset/fn-8926-memory-mcp-server.md | 7 +
docs/cli-reference.md | 4 +
docs/mcp.md | 10 ++
packages/cli/src/bin.ts | 6 +
.../__tests__/mcp-memory-server-spawn.test.ts | 79 ++++++++++
.../commands/__tests__/mcp-memory-server.test.ts | 83 +++++++++++
packages/cli/src/commands/__tests__/mcp.test.ts | 27 +++-
packages/cli/src/commands/mcp-memory-server.ts | 104 +++++++++++++
packages/cli/src/commands/mcp.ts | 64 ++++++--
packages/core/package.json | 10 ++
.../core/src/__tests__/mcp-builtin-servers.test.ts | 17 +++
packages/core/src/__tests__/mcp-config.test.ts | 12 ++
packages/core/src/config/mcp-builtin-descriptor.ts | 16 ++
packages/core/src/config/mcp-builtin-servers.ts | 18 +++
packages/core/src/config/mcp-config.ts | 40 +++--
packages/core/src/config/mcp-discovery.ts | 3 +-
packages/core/src/index.ts | 6 +
packages/core/src/memory/index.ts | 1 +
.../mcp/__tests__/memory-mcp-handler.test.ts | 36 +++++
.../mcp/__tests__/memory-mcp-serialization.test.ts | 23 +++
packages/core/src/memory/mcp/index.ts | 4 +
.../core/src/memory/mcp/memory-mcp-backends.ts | 39 +++++
packages/core/src/memory/mcp/memory-mcp-handler.ts | 54 +++++++
.../src/memory/mcp/memory-mcp-serialization.ts | 48 ++++++
packages/core/src/memory/mcp/memory-mcp-tools.ts | 64 ++++++++
packages/core/src/types.ts | 10 ++
.../settings/sections/GlobalMcpSection.tsx | 14 +-
.../settings/sections/McpServersCard.tsx | 67 +++++++--
.../settings/sections/ProjectMcpSection.tsx | 15 +-
.../__tests__/McpServersCard.builtin.test.tsx | 45 ++++++
.../dashboard/src/__tests__/chat-manager.test.ts | 24 +++
.../register-config-mcp-pi-settings-routes.ts | 20 ++-
packages/dashboard/vitest.config.ts | 2 +
.../__tests__/mcp-builtin-lane-coverage.test.ts | 163 +++++++++++++++++++++
packages/engine/src/mcp/mcp-resolution.ts | 10 +-
packages/engine/vitest.config.ts | 2 +
36 files changed, 1097 insertions(+), 50 deletions(-)
Fusion-Task-Id: FN-8926
Fusion-Task-Lineage: b2861491-33da-4b05-b9f8-a7c1448c1c8c
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-10 17:50:27 -07:00
gsxdsm
3143f9536f
FN-8908: auto-recover terminal task failures
...
Recover generic terminal task failures through a bounded, durable retry budget before escalating them to operators.
- add fenced task-store recovery claims, retries, budget resets, and audit events
- defer terminal-failure notifications until recovery is exhausted while preserving a single escalation
- expose operator retry budget reset and cover recovery lifecycle behavior
Files changed:
.../fn-8908-terminal-failure-auto-recovery.md | 7 +
AGENTS.md | 1 +
docs/agents.md | 2 +
docs/architecture.md | 2 +
packages/cli/src/commands/task.ts | 2 +
packages/cli/src/extension.ts | 2 +
...terminal-failure-auto-recovery-store.pg.test.ts | 108 +++++++++
.../terminal-failure-auto-recovery.test.ts | 60 +++++
packages/core/src/index.gate.ts | 1 +
packages/core/src/index.ts | 1 +
packages/core/src/store.ts | 179 ++++++++++++++-
.../core/src/task-store/archive-lifecycle-2.ts | 15 ++
packages/core/src/task-store/moves.ts | 48 +++-
packages/core/src/task-store/persistence.ts | 18 +-
packages/core/src/task-store/project-store-ops.ts | 4 +-
.../src/task-store/workflow-task-create-ops.ts | 4 +-
packages/core/src/tasks/index.ts | 1 +
.../src/tasks/terminal-failure-auto-recovery.ts | 114 ++++++++++
packages/core/src/types/task/task-core.ts | 24 ++
.../src/routes/register-task-workflow-routes.ts | 2 +
...-healing-terminal-failure-auto-recovery.test.ts | 199 ++++++++++++++++
.../__tests__/notification-service.test.ts | 86 ++++++-
.../__tests__/task-wedge-notification.test.ts | 2 +-
.../src/notification/notification-service.ts | 103 +++++++--
.../src/notification/task-wedge-notification.ts | 30 ++-
packages/engine/src/self-healing.ts | 251 ++++++++++++++++++++-
packages/engine/src/util/run-audit.ts | 7 +
27 files changed, 1240 insertions(+), 33 deletions(-)
Fusion-Task-Id: FN-8908
Fusion-Task-Lineage: 99e96b16-0306-41f1-87da-8623d69735f7
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-10 16:53:51 -07:00