bf147d6adeac7e8fbdece323116a1266754d6504
526 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
8e8e3233c6 |
Merge remote-tracking branch 'origin/main'
# Conflicts: # docs/dashboard-guide.md # packages/core/src/__tests__/postgres/schema-applier.test.ts # packages/core/src/__tests__/task-merge.test.ts # packages/core/src/merge/task-merge.ts # packages/core/src/postgres/schema-applier.ts # packages/core/src/task-store/merge-queue-ops.ts # packages/dashboard/app/__tests__/App.keyboard-shortcuts.test.tsx # packages/dashboard/app/components/ChatView.css # packages/dashboard/app/components/ChatView.tsx # packages/dashboard/app/components/__tests__/ChatView.core-contracts.test.tsx # packages/dashboard/app/components/__tests__/ChatView.core-interactions.test.tsx # packages/dashboard/app/components/__tests__/ChatView.core.test.tsx # packages/dashboard/app/components/__tests__/ChatView.draft.test.tsx # packages/dashboard/app/components/__tests__/ChatView.message-edit.test.tsx # packages/dashboard/app/components/__tests__/ChatView.mobile-render.test.tsx # packages/dashboard/app/components/__tests__/ChatView.mobile.test.tsx # packages/dashboard/app/components/__tests__/ChatView.new-chat-default.test.tsx # packages/dashboard/app/components/__tests__/ChatView.rooms.test.tsx # packages/dashboard/app/components/__tests__/ChatView.scroll-to-top.test.tsx # packages/dashboard/app/components/__tests__/ChatView.sessions-rooms.test.tsx # packages/dashboard/app/components/__tests__/ChatView.thinking-level.test.tsx # packages/engine/src/__tests__/executor-step-session.test.ts # packages/engine/src/__tests__/merge-abort-clears-transient-status.test.ts # packages/engine/src/__tests__/merger-ai-cleanup.test.ts # packages/engine/src/__tests__/merger-merge-lifecycle.test.ts # packages/engine/src/__tests__/workspace-merger.test.ts # packages/engine/src/merge/auto-merge-finalization.ts # packages/engine/src/merge/merger-ai.ts # packages/engine/src/project-engine.ts # packages/engine/src/run-audit/run-audit-catalogue.ts # packages/engine/src/self-healing.ts # packages/engine/src/worktree/review-diff-fingerprint.ts # packages/i18n/locales/es/app.json # packages/i18n/locales/fr/app.json # packages/i18n/locales/ko/app.json # packages/i18n/locales/pt-BR/app.json # packages/i18n/locales/zh-CN/app.json # packages/i18n/locales/zh-TW/app.json |
||
|
|
cb16f418c7 |
FN-183: ensure local integration branch readiness
Guarantee projects have a usable local integration branch ref across creation, import, and merge workflows. - Add shared integration-branch readiness and repository initialization helpers. - Wire project registration, CLI commands, central storage, and merge execution to establish the ref. - Document the behavior and cover CLI, dashboard, core, and engine integration paths. Files changed: .changeset/fn-183-integration-branch-readiness.md | 7 + docs/architecture.md | 2 +- docs/cli-reference.md | 4 +- docs/getting-started.md | 2 +- docs/settings-reference.md | 2 +- .../auto-git-init-project-registration.md | 21 +++ docs/workspaces.md | 2 +- packages/cli/src/commands/__tests__/init.test.ts | 70 +++++-- .../cli/src/commands/__tests__/project.test.ts | 22 +++ packages/cli/src/commands/init.ts | 26 ++- packages/cli/src/commands/project.ts | 20 ++ packages/core/src/__tests__/git-repository.test.ts | 190 +++++++++++++++++++ .../__tests__/integration-branch-readiness.test.ts | 94 ++++++++++ packages/core/src/central/central-core.ts | 65 +++++-- packages/core/src/git/git-repository.ts | 112 ++++++++++-- .../core/src/git/integration-branch-readiness.ts | 201 +++++++++++++++++++++ packages/core/src/index.gate.ts | 14 ++ packages/core/src/index.ts | 14 ++ packages/core/src/merge/task-merge.ts | 2 +- .../register-project-git-readiness.test.ts | 132 +++++++++++++- .../src/routes/register-project-routes.ts | 31 +++- .../src/__tests__/integration-branch.test.ts | 135 ++++++++++++++ packages/engine/src/__tests__/merger-ai.test.ts | 21 +++ packages/engine/src/merge/integration-branch.ts | 127 ++++++++++++- packages/engine/src/merge/merger-ai.ts | 25 ++- 25 files changed, 1273 insertions(+), 68 deletions(-) Fusion-Task-Id: FN-183 Fusion-Task-Lineage: ee63d45a-3406-4064-b16f-a2fe6dc0ad86 Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
8fcf4bdbaa |
feat: Stash memory backend — session capture, per-chat backfill, opt-in vector search (#3494)
## Summary Adds the **Stash memory backend** (`memory.backendType=stash`) that connects Fusion's agent memory to the [Stash](https://github.com/Fergana-Labs/stash) product — *knowledge bases for the agent era* ([product site: joinstash.ai](https://joinstash.ai)). Fusion becomes a first-class Stash client: complete chat sessions and finished tasks are captured into Stash, memory is recalled during chat, and Stash sessions are kept in sync with the dashboard (including deletes and archival). **Product:** <https://github.com/Fergana-Labs/stash> · [joinstash.ai](https://joinstash.ai) ## What's included ### 1. Stash memory backend (RUFU-068 / RUFU-121) - New `StashMemoryBackend` (`memory.backendType=stash`) with `stashUrl` / `stashApiKey` settings (global secrets-store `stash-api-key` + per-project override). - **Complete-chat-session capture** keyed by ChatSession id. - Sessions are classified into **per-project folders** (get-or-create, `external_key fusion-<projectId>`, 1h per-process cache) and **soft-deleted with their chat** via `DELETE /api/chat/sessions/:id`. - Per-conversation **memory-focus** read-time scoping (new `0066_chat_session_memory_focus.sql` migration — sequence renumbered 0059→0060→0061→0065→0066 as origin/main claimed the lower numbers); event metadata enriched with `project` / `project_name` / `chat_title`. - Recall queries normalized to single-keyword / explicit-OR ASCII (≤100 chars); shared normalizer export reused by per-turn recall. ### 2. Per-task executor transcript capture (RUFU-122) Finished or failed tasks upload their executor transcript (`agent-log.jsonl`) to Stash as a task session. ### 3. Bulk archive Stash sync (RUFU-125) Archived task-planner chats soft-delete their Stash sessions on bulk archival (paged). The snapshot of doomed session ids is taken *before* the local bulk delete, and the Stash sync runs fire-and-forget so a Stash stall can never delay local archival. ### 4. Per-chat "Preserve to Stash" backfill (RUFU-136) A per-chat action that backfills a chat's full history into Stash, with client-side idempotency and a pre-check that skips already-uploaded content (fail-closed, no duplicate upload on transport failure). - **Session-folder naming fix:** the first project folder is now named "Fusion — <project name>" instead of the bare "Fusion" fallback (the backfill now resolves the central-registry project name, best-effort, never blocking the upload). ### 5. Opt-in semantic (vector) recall (RUFU-126) `stashVectorSearch` setting (default `false` — **zero behavior change until enabled**). For multi-word queries the backend tries Stash's semantic-search endpoint first, then falls back byte-identically to the keyword path. Definitive 404/405/501/503 responses are negatively cached per process. Requires a patched Stash server (new endpoint + `sentence-transformers` + embedding backfill); unpatched servers are transparently bypassed after the first 404. ## Safety - **Opt-in / inert by default:** the default backend remains `qmd`; the Stash backend is inert until `memoryBackendType=stash` + `stashUrl` are set. - All Stash I/O is **best-effort, fail-closed, and non-blocking** — a Stash outage never blocks chat, task completion, or archival. No run-audit content is emitted. ## Testing - Backfill + delete-sync suites (20/20), Stash backend suite (68/68), executor memory / session capture suites, `memory-focus-recalling`, description-guard — all green. - `tsc` clean across core / engine / dashboard. - Live verification: bulk backfill of 21/24 chats completed; the "Preserve to Stash" action is idempotent on re-run. ## Changesets - `@runfusion/fusion` **minor** — Stash memory backend + capture (RUFU-068/121), per-task transcript (RUFU-122), bulk archive sync (RUFU-125), per-chat backfill (RUFU-136), opt-in vector search (RUFU-126) - `@runfusion/fusion` **patch** — backfill session-folder naming fix ## Rebase Note (2026-08-23) Rebased onto `origin/main` `3f448f7292` (v0.77.0-beta.7). Conflicts resolved additively: - `packages/core/src/postgres/schema-applier.ts` + test — upstream's 0062-0065 migrations (task/subtask splitting removal, AI merge review reconciliation, task repository scope, FN-149 review convergence) unioned with this PR's `chat_sessions.memory_focus` migration, which is **renumbered 0065 → 0066** (upstream's FN-149 shipped 0065 canonically on origin/main); `SCHEMA_BASELINE_VERSION` advances to `0066`. - `packages/dashboard/app/components/ChatView.tsx` — upstream's docked chat sidebar resize handlers unioned with the RUFU-136 "Preserve to Stash" backfill handler. - New commit: `settings.memory.*` stash-backend i18n keys added to all 6 secondary locales (RUFU-121/122 parity fix; `pnpm i18n:status` no longer reports any violation introduced by this PR). **Deploy note (operator environments that already ran a pre-rebase build of this PR):** the memory-focus SQL may already be in the schema under ledger row `0065`. Remap that row to `0066` (`UPDATE fusion_schema_migrations SET version = '0066' WHERE version = '0065';`) *before* first boot of a 0066-ceiling binary — otherwise the fresh upstream `0065_fn_149_review_convergence_stage.sql` would be skipped as "already applied". Clean databases (no prior memory-focus row) need no action. **CI note — Lint (lifecycle-column census) is red on the merge base:** `pnpm check:lifecycle-columns --strict` fails identically on pure `origin/main` `3f448f7292` with `packages/core/src/db/legacy-adoption.ts: 0 -> 3` (3 column guards in the U9b legacy-adoption table without a baseline entry or `DELIBERATE-LITERAL` marker). Verified by running the census on a clean origin/main checkout — inherited from the base, not introduced by this PR. Fix belongs upstream; tracked separately. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added Stash memory integration with project configuration and optional semantic search. * Added per-chat memory focus controls and a `/focus` command. * Added “Preserve to Stash” for uploading complete chat history. * Added automatic chat, task transcript, and completion-event capture. * Added project-specific Stash session folders and archive/delete synchronization. * **Bug Fixes** * Improved Stash folder naming and handling of missing branches during no-commit tasks. * **Documentation** * Added setup, configuration, integration, vector-search, and performance guidance. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Fusion <noreply@runfusion.ai> Co-authored-by: gsxdsm <gsxdsm@users.noreply.github.com> |
||
|
|
db254241f1 |
FN-180: enforce merge execution and current review gates
Prevent merge progression while execution is active and require current, content-matched review approval before finalization. - Add shared pre-merge approval and content descriptor gates. - Exclude actively executing tasks from merge and reconcile confirmed merges safely. - Centralize step reopening and strengthen merge lifecycle, audit, and regression coverage. Files changed: ...80-merge-execution-exclusion-and-review-gate.md | 7 + docs/architecture.md | 1 + docs/run-audit.md | 2 + docs/testing.md | 5 + docs/workflow-steps.md | 2 + .../confirmed-merge-reconciliation.test.ts | 17 ++ .../src/__tests__/pre-merge-approval-gate.test.ts | 33 ++++ .../__tests__/pre-merge-approval-workspace.test.ts | 30 +++ .../src/__tests__/required-pre-merge-steps.test.ts | 47 ++++- packages/core/src/__tests__/task-merge.test.ts | 9 +- packages/core/src/db/legacy-adoption.ts | 7 + packages/core/src/index.gate.ts | 11 +- packages/core/src/index.ts | 11 +- .../src/merge/confirmed-merge-reconciliation.ts | 34 ++++ .../core/src/merge/merge-content-descriptor.ts | 10 + packages/core/src/merge/pre-merge-approval.ts | 71 +++++++ .../core/src/merge/required-pre-merge-steps.ts | 69 +++++++ packages/core/src/merge/task-merge.ts | 35 ++-- packages/core/src/task-store/merge-queue-ops.ts | 50 ++--- .../src/workflows/workflow-step-reopen-policy.ts | 18 ++ .../__tests__/ChatView.core-contracts.test.tsx | 5 +- .../__tests__/ChatView.core-interactions.test.tsx | 5 +- .../components/__tests__/ChatView.core.test.tsx | 5 +- .../components/__tests__/ChatView.draft.test.tsx | 5 +- .../__tests__/ChatView.message-edit.test.tsx | 5 +- .../__tests__/ChatView.mobile-render.test.tsx | 5 +- .../components/__tests__/ChatView.mobile.test.tsx | 5 +- .../__tests__/ChatView.scroll-to-top.test.tsx | 5 +- .../__tests__/ChatView.sessions-rooms.test.tsx | 5 +- .../__tests__/ChatView.thinking-level.test.tsx | 5 +- .../confirmed-merge-must-finalize.test.ts | 32 ++++ .../src/__tests__/executor-step-session.test.ts | 29 ++- .../src/__tests__/manual-merge-bypass.test.ts | 1 + .../merge-abort-clears-transient-status.test.ts | 66 ++++--- .../merge-content-descriptor-doors.test.ts | 28 +++ .../__tests__/merge-execution-exclusion.test.ts | 65 +++++++ .../__tests__/merge-gate-single-authority.test.ts | 28 +++ .../src/__tests__/merge-inflight-revoke.test.ts | 26 +++ .../merge-worktree-removal-live-session.test.ts | 29 +++ .../engine/src/__tests__/merger-ai-cleanup.test.ts | 8 +- .../src/__tests__/merger-merge-lifecycle.test.ts | 11 +- .../__tests__/step-reopen-single-authority.test.ts | 116 ++++++++++++ .../workflow-graph-optional-step-fix.test.ts | 10 + .../engine/src/__tests__/workspace-merger.test.ts | 13 +- .../engine/src/executor/cleanup-merge-state.ts | 45 +---- .../src/executor/finalize-already-reviewed-task.ts | 20 +- .../src/executor/recover-failed-pre-merge-step.ts | 7 +- .../src/executor/reopen-last-step-for-revision.ts | 41 +---- .../request-pre-merge-optional-step-fix.ts | 13 +- packages/engine/src/executor/reset-merge-state.ts | 7 +- .../src/executor/review-convergence-ladder.ts | 6 + packages/engine/src/executor/run-implementation.ts | 33 +++- .../engine/src/merge/auto-merge-finalization.ts | 49 +++-- packages/engine/src/merge/merge-content-capture.ts | 49 +++++ .../engine/src/merge/merge-execution-exclusion.ts | 47 +++++ packages/engine/src/merge/merger-ai.ts | 204 ++++++++++++++++----- packages/engine/src/merge/merger-errors.ts | 13 ++ packages/engine/src/merger.ts | 29 ++- packages/engine/src/project-engine.ts | 153 ++++++++++++---- .../engine/src/run-audit/run-audit-catalogue.ts | 12 ++ packages/engine/src/self-healing.ts | 36 ++-- packages/engine/src/util/run-audit.ts | 4 + .../engine/src/worktree/review-diff-fingerprint.ts | 36 +++- .../src/worktree/workspace-review-evidence.ts | 2 +- 64 files changed, 1420 insertions(+), 367 deletions(-) Fusion-Task-Id: FN-180 Fusion-Task-Lineage: 4c2cdae0-be25-49c9-a918-60768ddc7686 Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
95ea06b48a |
FN-179: add workspace contention wait-state recovery
Persist workspace acquisition contention as an operator-visible wait state and make recovery, lease authority, and localized dashboard status handling consistent. - Add the contention wait-state schema, persistence, reset, serialization, and audit plumbing. - Coordinate workspace acquisition claims, leases, retries, and self-healing recovery across engine and core. - Surface contention status in task cards and detail views with translated labels and regression coverage. - Document the workspace behavior and add the required changeset. Files changed: .changeset/fn-179-workspace-acquire-contention.md | 7 + AGENTS.md | 1 + docs/architecture.md | 4 +- docs/dashboard-guide.md | 1 + docs/workspaces.md | 4 +- .../src/__tests__/postgres/schema-applier.test.ts | 34 ++++- ...workspace-worktrees-concurrent-merge.pg.test.ts | 35 +++++ .../0066_fn_179_session_contention_wait_state.sql | 3 + packages/core/src/postgres/schema-applier.ts | 12 +- packages/core/src/postgres/schema/project.ts | 2 + packages/core/src/store.ts | 2 +- .../core/src/task-store/branch-and-pr-entities.ts | 2 +- packages/core/src/task-store/persistence.ts | 4 + packages/core/src/task-store/reset-lifecycle.ts | 2 + packages/core/src/task-store/serialization.ts | 2 + packages/core/src/task-store/task-artifacts-ops.ts | 4 + packages/core/src/task-store/task-mutation-ops.ts | 41 +++--- packages/core/src/task-store/task-row-mappers.ts | 2 +- packages/core/src/task-store/task-update.ts | 10 ++ packages/core/src/tasks/manual-retry-reset.ts | 2 + packages/core/src/types/task/task-core.ts | 4 + packages/dashboard/app/components/ListView.tsx | 4 +- packages/dashboard/app/components/TaskCard.tsx | 2 +- .../dashboard/app/components/TaskDetailModal.tsx | 1 + .../taskStatusBadgeLabel.host-inventory.test.ts | 19 +++ .../utils/__tests__/taskStatusBadgeLabel.test.ts | 7 + .../dashboard/app/utils/taskStatusBadgeLabel.ts | 8 ++ .../executor-planning-lock-transport-retry.test.ts | 132 ++++++++++++++++++ ...roject-engine-spec-drift-startup-replay.test.ts | 84 ++++++++++++ .../src/__tests__/self-healing-workspace.test.ts | 58 ++++++++ .../workspace-acquire-claim-release.test.ts | 69 ++++++++++ .../workspace-acquire-contention-hold.test.ts | 75 +++++++++++ .../workspace-acquire-lease-authority.test.ts | 122 +++++++++++++++++ .../worktree-acquisition-workspace.test.ts | 32 +++++ packages/engine/src/agent-tools.ts | 26 +++- .../engine/src/agents/active-session-registry.ts | 9 ++ .../create-authoritative-workflow-seams.ts | 14 +- packages/engine/src/executor/deps-bags.ts | 3 - .../engine/src/executor/execute-workflow-graph.ts | 4 +- packages/engine/src/executor/run-implementation.ts | 34 ++++- .../engine/src/executor/session-contention-hold.ts | 47 +++---- .../engine/src/executor/wire-executor-lifecycle.ts | 32 ++++- packages/engine/src/planning-handoff-recovery.ts | 11 ++ packages/engine/src/project-engine.ts | 8 +- packages/engine/src/self-healing.ts | 63 ++++++++- packages/engine/src/util/run-audit.ts | 4 + .../engine/src/worktree/worktree-acquisition.ts | 147 ++++++++++++++++----- 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 | 2 + 55 files changed, 1103 insertions(+), 118 deletions(-) Fusion-Task-Id: FN-179 Fusion-Task-Lineage: 30f1b365-2847-4ec1-85b3-23a98c92de40 Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
e25f8907d9 |
FN-175: add review-gated verification workflow
Add review-owned verification, remediation, and documentation gates across workflow execution and task progress. - Add built-in review-gated coding workflow and verification/documentation nodes. - Preserve remediation steps and enforce finalize/merge guards after review findings. - Surface review-gate progress in the dashboard and document the workflow and audit behavior. - Add focused core, engine, and dashboard regression coverage. Files changed: .changeset/fn-175-review-gated-workflow.md | 7 ++ docs/architecture.md | 4 + docs/dashboard-guide.md | 4 + docs/run-audit.md | 5 ++ docs/workflow-steps.md | 6 ++ .../builtin-review-gated-coding-workflow.test.ts | 48 +++++++++++ .../__tests__/no-commits-finalize-guard.test.ts | 15 ++++ .../core/src/__tests__/remediation-steps.test.ts | 64 ++++++++++++++ packages/core/src/index.gate.ts | 9 ++ packages/core/src/index.ts | 10 +++ .../core/src/merge/no-commits-finalize-guard.ts | 12 ++- packages/core/src/store.ts | 6 +- .../core/src/task-store/remediation-step-ops.ts | 45 ++++++++++ packages/core/src/tasks/remediation-steps.ts | 48 +++++++++++ packages/core/src/types/task/task-log.ts | 15 ++++ .../builtin-documentation-delivery-group.ts | 32 +++++++ .../src/workflows/builtin-plan-review-group.ts | 11 ++- .../builtin-review-gated-coding-workflow-ir.ts | 60 +++++++++++++ .../workflows/builtin-verification-gate-group.ts | 26 ++++++ .../core/src/workflows/builtin-workflow-prompts.ts | 2 + .../builtin-workflow-remediation-nodes.ts | 20 +++++ packages/core/src/workflows/builtin-workflows.ts | 14 ++++ packages/core/src/workflows/index.ts | 3 + packages/dashboard/app/components/TaskCard.css | 5 ++ packages/dashboard/app/components/TaskCard.tsx | 12 ++- .../__tests__/taskProgress.review-gates.test.ts | 19 +++++ packages/dashboard/app/utils/taskProgress.ts | 2 + .../review-gated-remediation-steps.test.ts | 43 ++++++++++ .../review-gated-step-preservation.test.ts | 32 +++++++ .../review-gated-verification-gate.test.ts | 50 +++++++++++ .../executor/append-review-remediation-steps.ts | 97 ++++++++++++++++++++++ .../engine/src/executor/build-parse-steps-deps.ts | 1 + .../engine/src/executor/cleanup-merge-state.ts | 9 +- packages/engine/src/executor/deps-bags.ts | 9 +- .../src/executor/derive-remediation-steps.ts | 76 +++++++++++++++++ packages/engine/src/executor/free-reexports.ts | 1 + packages/engine/src/executor/impl-bindings.ts | 1 + .../request-pre-merge-optional-step-fix.ts | 17 ++++ packages/engine/src/executor/reset-merge-state.ts | 5 +- .../engine/src/executor/run-graph-custom-node.ts | 7 +- packages/engine/src/executor/run-implementation.ts | 3 + .../engine/src/executor/send-task-back-for-fix.ts | 5 +- .../src/executor/task-executor-session-facades.ts | 1 + packages/engine/src/merge/merger-ai.ts | 19 ++++- packages/engine/src/merger.ts | 27 +++++- packages/engine/src/self-healing.ts | 24 +++++- .../workflow-node-runners/parse-steps-runner.ts | 26 +++++- .../src/workflow-node-runners/verification-gate.ts | 77 +++++++++++++++++ .../src/workflows/workflow-graph-executor.ts | 4 +- 49 files changed, 1014 insertions(+), 24 deletions(-) Fusion-Task-Id: FN-175 Fusion-Task-Lineage: 3c555a09-4cea-4b03-a315-b6a354a2eac3 Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
7d54e86e80 |
FN-159: filter AI merge protocol markers from blocking findings
Prevent the AI merge reviewer from persisting its own protocol syntax as blocking review findings. - Register and filter all review protocol markers and disposition lines. - Aggregate reviewer prose into bounded findings and preserve reconciliation safety. - Release prior findings that are not re-confirmed on approved candidates. - Add reconciliation state, tests, documentation, and a patch changeset. Files changed: .../fn-159-ai-merge-protocol-marker-findings.md | 7 ++ docs/architecture.md | 2 +- packages/core/src/types/task/task-core.ts | 6 ++ .../engine/src/__tests__/merger-ai-prompts.test.ts | 39 ++++++++++ .../src/__tests__/merger-ai-squash-gates.test.ts | 6 ++ .../engine/src/__tests__/merger-ai.test.ts | 58 +++++++++++++++ .../engine/src/__tests__/workspace-merger.test.ts | 3 +- packages/engine/src/merge/merger-ai-prompts.ts | 53 +++++++++++--- packages/engine/src/merge/merger-ai.ts | 84 ++++++++++++++++++---- 9 files changed, 231 insertions(+), 27 deletions(-) Fusion-Task-Id: FN-159 Fusion-Task-Lineage: 6eea1dec-1252-4b8d-b227-c84c24ab60af Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
c1818ea819 |
FN-151: make task reset always complete
Make reset a reliable description-only fresh start by fencing active planning work and cleaning discarded execution state. - Add reset lifecycle disposal for planning sessions, locks, artifacts, and reset worktrees. - Preserve operator-provided descriptions while clearing stale execution and planning projections. - Expose reset routes and add core, dashboard, and engine regression coverage. Files changed: .changeset/fn-151-task-reset-always-completes.md | 7 + docs/architecture.md | 3 + docs/dashboard-guide.md | 6 +- .../postgres/task-reset-publication.pg.test.ts | 71 +++++++++- .../core/src/__tests__/task-move-disposer.test.ts | 38 ++++++ packages/core/src/index.gate.ts | 2 + packages/core/src/index.ts | 2 + packages/core/src/task-store/reset-lifecycle.ts | 38 +++++- packages/core/src/tasks/task-move-disposer.ts | 36 +++++- .../src/__tests__/task-reset-lifecycle.test.ts | 110 +++++++++++++++- .../src/routes/register-task-workflow-routes.ts | 29 +++-- .../src/__tests__/agent-document-tools.test.ts | 49 +++++++ .../src/__tests__/reset-worktree-removal.test.ts | 77 +++++++++++ .../__tests__/triage-reset-planning-fence.test.ts | 118 +++++++++++++++++ packages/engine/src/agent-tools.ts | 60 +++++++-- packages/engine/src/agents/planning-liveness.ts | 19 +++ packages/engine/src/index.ts | 4 + packages/engine/src/plan-artifact-writeback.ts | 27 +++- packages/engine/src/planning-reset-fence.ts | 26 +++ packages/engine/src/triage.ts | 143 +++++++++++++++++++-- packages/engine/src/worktree/remove-reset-worktree.ts | 65 ++++++++++ 21 files changed, 882 insertions(+), 48 deletions(-) Fusion-Task-Id: FN-151 Fusion-Task-Lineage: 1c25d58e-2d23-4340-a489-51f3e2d8a7f4 Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
a786c45bb9 |
FN-149: converge review cycles before human escalation
Add bounded review convergence so disputed review gates can resolve independently before requiring operator intervention. - Add staged remediation, arbitration, dispute tooling, and stale-attempt fencing. - Preserve review history and findings while exposing convergence state in core, dashboard, and audit paths. - Add migration, configuration, documentation, changeset, and regression coverage. Files changed: .changeset/fn-149-review-convergence.md | 7 + AGENTS.md | 2 + docs/architecture.md | 4 + docs/dashboard-guide.md | 4 + docs/run-audit.md | 4 + docs/settings-reference.md | 4 + docs/workflow-steps.md | 8 + .../src/__tests__/default-workflow-hooks.test.ts | 13 + packages/core/src/__tests__/plan-approval.test.ts | 21 ++ .../src/__tests__/reopen-semantics-by-role.test.ts | 25 ++ packages/core/src/__tests__/review-severity-gate.test.ts | 18 +- packages/core/src/__tests__/workflow-step-results.test.ts | 52 +++- packages/core/src/config/settings-schema.ts | 6 + packages/core/src/index.gate.ts | 9 + packages/core/src/index.ts | 9 + packages/core/src/planner/plan-approval.ts | 27 +- .../0065_fn_149_review_convergence_stage.sql | 3 + packages/core/src/postgres/schema-applier.ts | 10 + packages/core/src/postgres/schema/project.ts | 2 + packages/core/src/store.ts | 2 +- packages/core/src/task-store/persistence.ts | 4 + packages/core/src/task-store/reset-lifecycle.ts | 2 + packages/core/src/task-store/serialization.ts | 2 + packages/core/src/task-store/task-mutation-ops.ts | 2 +- packages/core/src/task-store/task-row-mappers.ts | 2 +- packages/core/src/task-store/task-update.ts | 4 + packages/core/src/tasks/in-review-stall.ts | 21 ++ packages/core/src/tasks/manual-retry-reset.ts | 2 + packages/core/src/types/settings/settings-scope.ts | 7 + packages/core/src/types/task/task-core.ts | 3 + packages/core/src/types/task/task-review.ts | 2 +- packages/core/src/types/workflow/workflow-steps.ts | 24 +- .../src/workflows/builtin-workflow-settings.ts | 43 +++ .../core/src/workflows/default-workflow-hooks.ts | 10 +- .../core/src/workflows/workflow-step-results.ts | 185 ++++++++++++- .../dashboard/app/components/TaskReviewTab.tsx | 6 +- .../components/__tests__/TaskReviewTab.test.tsx | 6 +- .../dashboard/src/__tests__/routes-tasks.test.ts | 7 + .../src/routes/register-task-workflow-routes.ts | 4 +- .../__tests__/review-arbitration-release.test.ts | 46 ++++ .../src/__tests__/review-arbitration.test.ts | 57 ++++ .../__tests__/review-convergence-context.test.ts | 95 +++++++ .../review-convergence-escalation.test.ts | 135 +++++++++ .../src/__tests__/review-dispute-tool.test.ts | 113 +++++++ .../__tests__/review-finding-supersession.test.ts | 55 ++- .../review-findings-injection.test.ts | 19 +- .../__tests__/review-history-preservation.test.ts | 186 +++++++++++++ .../__tests__/review-ladder-entry-points.test.ts | 304 +++++++++++++++++++++ ...un-audit-sink-health-review-convergence.test.ts | 251 +++++++++++++++++ .../workflow-graph-optional-step-fix.test.ts | 59 ++-- packages/engine/src/execution/replan-target.ts | 6 +- .../clear-terminal-step-failures-for-retry.ts | 8 +- .../src/executor/create-review-dispute-tool.ts | 126 +++++++++ packages/engine/src/executor/deps-bags.ts | 2 +- .../engine/src/executor/execute-workflow-graph.ts | 71 ++++- packages/engine/src/executor/execute-workflow-step.ts | 16 +- packages/engine/src/executor/free-reexports.ts | 1 + packages/engine/src/executor/impl-bindings.ts | 1 + .../engine/src/executor/optional-step-revision.ts | 33 ++- .../src/executor/recover-failed-pre-merge-step.ts | 43 ++- .../request-pre-merge-optional-step-fix.ts | 85 +++--- packages/engine/src/executor/review-arbitration.ts | 233 +++++++++++++++ .../src/executor/review-convergence-ladder.ts | 237 +++++++++++++++ .../route-graph-failure-to-execution-resume.ts | 16 +- .../route-retryable-remediation.ts | 9 +- .../engine/src/executor/run-graph-custom-node.ts | 1 + packages/engine/src/executor/run-implementation.ts | 2 + .../src/executor/task-executor-session-facades.ts | 3 +- .../engine/src/executor/workflow-rerun-bounce.ts | 13 +- .../executor/workflow-step-failure-injection.ts | 23 +- .../engine/src/executor/workflow-step-failures.ts | 16 +- .../engine/src/executor/workflow-step-verdict.ts | 2 + packages/engine/src/self-healing.ts | 5 +- packages/engine/src/util/run-audit.ts | 9 +- .../src/workflows/workflow-graph-executor.ts | 8 +- .../engine/src/worktree/review-diff-fingerprint.ts | 21 +++ .../src/worktree/workspace-review-evidence.ts | 9 +- 77 files changed, 2719 insertions(+), 166 deletions(-) Fusion-Task-Id: FN-149 Fusion-Task-Lineage: 9330df9d-5086-4b40-8daa-66f0ea31cf3e Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
8b681775ae |
FN-122: fix local workspace integration across repositories
Make multi-repository workspace merges resolve and land against the correct local integration targets. - Add local integration-target resolution and durable merge-dispatch leasing. - Harden workspace merge fencing, failure handling, audit logging, and CLI/dashboard controls. - Document the workflow and add regression coverage for workspace integration and task-log deduplication. - Complete the CLI engine mock for the new public lease export. Files changed: .changeset/fn-122-local-workspace-integration.md | 7 + docs/architecture.md | 1 + docs/dashboard-guide.md | 4 + docs/settings-reference.md | 4 +- docs/testing.md | 10 ++ .../task-command-github-import-tracking.test.ts | 2 + packages/cli/src/commands/__tests__/task.test.ts | 1 + packages/cli/src/commands/dashboard.ts | 15 +- packages/cli/src/commands/task.ts | 14 +- .../__tests__/postgres/task-log-dedupe.pg.test.ts | 30 ++++ packages/core/src/index.ts | 2 +- packages/core/src/store.ts | 5 +- packages/core/src/task-store/audit-ops.ts | 38 ++++ packages/core/src/types.ts | 2 + packages/core/src/types/task/task-core.ts | 16 +- packages/core/src/types/task/task-log.ts | 2 + .../app/components/WorkspaceWorktreesSummary.tsx | 15 +- .../settings/sections/WorktreesSection.tsx | 3 +- .../engine/src/__tests__/workspace-e2e.test.ts | 198 ++++++++++++++++----- .../__tests__/workspace-integration-target.test.ts | 75 ++++++++ .../src/__tests__/workspace-merger-lease.test.ts | 42 ++++- packages/engine/src/index.ts | 6 + packages/engine/src/merge/merger-ai.ts | 152 +++++++++++----- packages/engine/src/merge/workspace-fence-ref.ts | 17 +- .../src/merge/workspace-integration-target.ts | 87 +++++++++ .../engine/src/merge/workspace-land-failure.ts | 6 +- .../src/merge/workspace-merge-dispatch-lease.ts | 54 ++++++ packages/engine/src/project-engine.ts | 25 +++ 28 files changed, 715 insertions(+), 118 deletions(-) Fusion-Task-Id: FN-122 Fusion-Task-Lineage: 9364bba4-cebc-44e7-b2ae-60967fbc025c Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
10c399d01e |
FN-120: fix workspace review evidence and landing recovery
Harden workspace review evidence and automatic landing recovery across workflow execution and merge paths. - Preserve per-repository review evidence and reroute recoverable workspace review failures. - Improve workflow lifecycle validation, continuation handling, and automatic recovery for workspace landing. - Add regression coverage and document the updated workspace behavior. Files changed: .changeset/fn-120-workspace-review-landing.md | 7 ++ docs/architecture.md | 4 + ...e-empty-merge-boundary-finalization-livelock.md | 4 + docs/testing.md | 4 + docs/workflow-steps.md | 4 + docs/workspaces.md | 6 + .../__tests__/builtin-coding-workflow-ir.test.ts | 11 +- ...workspace-worktrees-concurrent-merge.pg.test.ts | 20 +++ packages/core/src/db/legacy-adoption.ts | 4 + packages/core/src/store.ts | 5 +- .../task-store/async/async-workflow-workitems.ts | 21 ++++ packages/core/src/task-store/task-mutation-ops.ts | 20 ++- .../src/task-store/workflow-workitems-ops-2.ts | 6 +- .../workflows/builtin-coding-ideas-workflow-ir.ts | 9 +- .../src/workflows/builtin-coding-workflow-ir.ts | 20 ++- .../builtin-stepwise-coding-workflow-ir.ts | 21 +++- ...tin-stepwise-final-review-coding-workflow-ir.ts | 13 +- .../src/workflows/workflow-lifecycle-validation.ts | 28 ++++- .../__tests__/builtin-workflows-lifecycle.test.ts | 4 + .../engine/src/__tests__/project-engine.test.ts | 79 ++++++++++++ .../graph-node-missing-worktree-recovery.test.ts | 32 ++++- .../src/__tests__/reviewer-workspace.test.ts | 2 + .../src/__tests__/task-pipeline-smoke.test.ts | 10 +- .../src/__tests__/workflow-task-runtime.test.ts | 10 +- .../engine/src/__tests__/workspace-e2e.test.ts | 29 +++++ .../engine/src/__tests__/workspace-merger.test.ts | 4 +- .../__tests__/workspace-review-evidence.test.ts | 58 +++++++++ packages/engine/src/execution/reviewer.ts | 2 + .../create-authoritative-workflow-seams.ts | 59 +++++---- .../engine/src/executor/execute-workflow-graph.ts | 29 ++++- packages/engine/src/executor/graph-failure-pure.ts | 6 + .../engine/src/executor/handle-graph-failure.ts | 26 ++++ ...-unusable-worktree-graph-failure-to-recovery.ts | 22 +++- .../engine/src/executor/run-graph-custom-node.ts | 4 +- .../src/executor/workspace-review-per-repo.ts | 55 +++++---- packages/engine/src/merge/merger-ai.ts | 137 ++++++++++----------- .../engine/src/merge/workspace-review-reroute.ts | 52 ++++++++ packages/engine/src/project-engine.ts | 47 +++++++ .../self-healing/auto-recover-worktree-session.ts | 2 +- .../src/workflows/workflow-graph-executor.ts | 28 ++++- .../engine/src/workflows/workflow-merge-nodes.ts | 6 +- .../src/worktree/workspace-review-evidence.ts | 110 +++++++++++++++++ .../engine/src/worktree/worktree-acquisition.ts | 24 +++- 43 files changed, 874 insertions(+), 170 deletions(-) Fusion-Task-Id: FN-120 Fusion-Task-Lineage: 61c36613-89bd-44ca-8676-de77662bf53e Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
2430ce69b0 |
FN-112: capture workspace merge evidence from task worktrees
Capture workspace merge evidence from immutable acquisition baselines to persisted task branches so real linked task worktrees land reviewed changes reliably. - Compare review fingerprints and landing ranges against the persisted task branch rather than the live worktree HEAD. - Add linked-task-worktree regression coverage for per-repository landing proof and exactly-once finalization. - Document the regression and publish the workspace merge fix in a patch changeset. Files changed: .../fn-112-workspace-task-worktree-evidence.md | 7 ++++ docs/architecture.md | 1 + ...e-empty-merge-boundary-finalization-livelock.md | 8 +++- .../engine/src/__tests__/_workspace-fixture.ts | 15 ++++++++ .../engine/src/__tests__/workspace-e2e.test.ts | 31 ++++++++++++--- .../__tests__/workspace-merger-scope-gates.test.ts | 2 +- .../engine/src/__tests__/workspace-merger.test.ts | 45 +++++++++++++++++++++- packages/engine/src/merge/merger-ai.ts | 29 ++++++++++++-- 8 files changed, 125 insertions(+), 13 deletions(-) Fusion-Task-Id: FN-112 Fusion-Task-Lineage: 66e8498e-13f2-461b-ae38-bf750383115b Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
a010dc42bf |
FN-9185: enforce effective task concurrency limits
Unify task concurrency around authoritative project settings and expose the effective admission ceiling. - Resolve maxConcurrent and maxWorktrees through a shared core capacity model with consistent defaults. - Apply the effective limit across scheduler, engine, runtime, CLI, API, and project-manager admission paths. - Surface configured and binding concurrency values in dashboard controls, status views, diagnostics, and documentation. - Add regression coverage for settings persistence, routing, scheduling, UI surfaces, and worktree-bound capacity. Files changed: .../fn-9185-max-concurrent-effective-limit.md | 7 + docs/architecture.md | 8 +- docs/cli-reference.md | 1 + docs/dashboard-guide.md | 4 + docs/settings-reference.md | 4 +- .../dashboard-concurrency-settings.test.ts | 166 +++++++++++++++++++++ packages/cli/src/commands/dashboard.ts | 28 ++-- packages/cli/src/commands/onboard.ts | 4 +- packages/cli/src/project-resolver.ts | 27 +++- .../concurrency-capacity-resolver.test.ts | 46 ++++++ .../src/__tests__/worktree-capacity-limit.test.ts | 51 +++++-- packages/core/src/index.gate.ts | 2 +- packages/core/src/index.ts | 2 +- packages/core/src/workflows/workflow-capacity.ts | 61 ++++++-- packages/dashboard/app/App.tsx | 2 + .../app/__tests__/concurrency-ui-surfaces.test.tsx | 155 +++++++++++++++++++ .../scheduling-effective-concurrency.test.tsx | 48 ++++++ packages/dashboard/app/api/projects/projects.ts | 10 +- packages/dashboard/app/api/settings/settings.ts | 14 +- packages/dashboard/app/components/Board.tsx | 7 +- packages/dashboard/app/components/Column.tsx | 13 +- .../dashboard/app/components/EngineControlMenu.tsx | 17 ++- .../command-center/CommandCenterControls.tsx | 17 ++- .../components/command-center/areas/TeamArea.tsx | 10 +- .../app/components/dashboard/MainContent.tsx | 3 + .../dashboard/app/components/dashboard/types.ts | 2 + .../settings/sections/SchedulingSection.tsx | 12 +- packages/dashboard/app/hooks/useAppSettings.ts | 9 +- packages/dashboard/app/hooks/useExecutorStats.ts | 10 +- .../app/utils/__tests__/worktreeGrouping.test.ts | 12 +- packages/dashboard/app/utils/worktreeGrouping.ts | 8 +- packages/dashboard/src/routes.ts | 6 +- ...concurrency-authoritative-source-routes.test.ts | 90 +++++++++++ .../register-config-mcp-pi-settings-routes.test.ts | 29 +++- .../register-config-mcp-pi-settings-routes.ts | 17 ++- .../src/routes/register-project-routes.ts | 14 +- .../concurrency-effective-limit-surfaces.test.ts | 34 +++++ .../src/__tests__/project-engine-manager.test.ts | 19 +++ .../__tests__/scheduler-workflow-cutover.test.ts | 6 +- packages/engine/src/concurrency/concurrency.ts | 23 ++- packages/engine/src/concurrency/hybrid-executor.ts | 35 ++++- .../engine/src/executor/create-spawn-agent-tool.ts | 8 +- packages/engine/src/project-engine-manager.ts | 50 +++++-- packages/engine/src/project-engine.ts | 12 +- packages/engine/src/project/project-manager.ts | 26 +++- packages/engine/src/runtimes/in-process-runtime.ts | 12 +- packages/engine/src/scheduler.ts | 31 ++-- packages/engine/src/triage.ts | 15 +- 48 files changed, 1028 insertions(+), 159 deletions(-) Fusion-Task-Id: FN-9185 Fusion-Task-Lineage: 6294456c-d417-40a5-a5fa-2035c6b964a6 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
74dacd0758 |
FN-9188: respect externally managed updates
Managed deployments can now suppress self-update offers while unsupported installs receive actionable guidance. - Add an install-level environment policy for externally managed updates across CLI, server, and dashboard surfaces. - Detect missing npm shell failures and replace raw stderr with deployment-aware remediation. - Document managed-update behavior and add regression coverage for checks, installs, automation, and UI actions. Files changed: .changeset/fn-9188-managed-updates.md | 7 +++ docs/architecture.md | 6 +-- docs/cli-reference.md | 2 +- docs/dashboard-guide.md | 2 +- docs/settings-reference.md | 4 +- packages/cli/src/__tests__/update-cache.test.ts | 11 ++++- .../update-command-externally-managed.test.ts | 39 +++++++++++++++ packages/cli/src/commands/update.ts | 42 +++++++++++----- packages/cli/src/update-cache.ts | 3 +- .../core/src/__tests__/update-management.test.ts | 15 ++++++ packages/core/src/config/update-management.ts | 21 ++++++++ packages/core/src/index.gate.ts | 5 ++ packages/core/src/index.ts | 5 ++ packages/dashboard/app/api/client/health.ts | 3 ++ .../dashboard/app/components/SettingsModal.tsx | 4 ++ .../__tests__/SettingsModal.general.test.tsx | 20 ++++++++ .../__tests__/UpdateAvailableBanner.test.tsx | 26 ++++++++++ .../components/__tests__/settings-mobile.test.tsx | 24 +++++++++- .../__tests__/SystemControlsArea.test.tsx | 20 ++++++++ .../command-center/areas/SystemControlsArea.tsx | 6 +++ .../app/hooks/__tests__/useUpdateCheck.test.ts | 1 + packages/dashboard/app/hooks/useUpdateCheck.ts | 3 +- .../dashboard/src/__tests__/auto-update.test.ts | 10 ++++ .../dashboard/src/__tests__/update-check.test.ts | 56 ++++++++++++++++++++++ packages/dashboard/src/auto-update.ts | 9 +++- .../__tests__/register-update-check-routes.test.ts | 24 +++++++++- .../src/routes/register-update-check-routes.ts | 47 +++++++++++++++++- packages/dashboard/src/update-check.ts | 50 ++++++++++++++++--- 28 files changed, 433 insertions(+), 32 deletions(-) Fusion-Task-Id: FN-9188 Fusion-Task-Lineage: 60b114b9-8bf7-434f-9d26-0c954aea45ba Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
1a3230ff93 |
FN-9186: Bound no-progress self-healing requeues
Bound no-progress self-healing retries so persistent failures stop consuming agent sessions. - Persist a three-attempt retry budget with exponential backoff and an idempotent terminal sentinel. - Prevent restart and wedge recovery paths from reopening exhausted failures. - Emit bounded retry and exhaustion audit events with regression coverage and operator documentation. Files changed: .changeset/fn-9186-no-progress-requeue-budget.md | 7 ++ AGENTS.md | 1 + docs/architecture.md | 2 + docs/run-audit.md | 2 + docs/self-healing-backward-move-audit.md | 2 +- .../src/__tests__/default-workflow-hooks.test.ts | 18 +++ .../non-executor-run-audit-sink-health.test.ts | 43 +++++++ .../__tests__/restart-recovery-coordinator.test.ts | 14 +++ ...self-healing-no-progress-requeue-budget.test.ts | 131 +++++++++++++++++++++ packages/engine/src/__tests__/self-healing.test.ts | 59 ++++++---- .../src/healing/no-progress-requeue-budget.ts | 7 ++ .../src/healing/restart-recovery-coordinator.ts | 10 +- .../__tests__/task-wedge-notification.test.ts | 10 +- .../src/notification/task-wedge-notification.ts | 9 ++ packages/engine/src/self-healing.ts | 95 +++++++++++++-- packages/engine/src/util/run-audit.ts | 3 + 16 files changed, 378 insertions(+), 35 deletions(-) Fusion-Task-Id: FN-9186 Fusion-Task-Lineage: 06d29a60-b6ad-4506-a3c1-f3c52411946a Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
96ad20c93d |
FN-9187: Bound auto-archive failure retries
Prevent stale done-task retention from retrying permanently blocked archives forever. - Pre-filter tasks with live lineage children while honoring renamed archive lanes. - Bound repeated archive failures by reason and reset budgets when candidates or failure classes change. - Emit one bounded audit event and operator-facing task log when retries are exhausted. - Cover retry, escalation, reset, lineage, and renamed-lane behavior and document the retention contract. Files changed: .changeset/fn-9187-bounded-auto-archive.md | 7 ++ AGENTS.md | 1 + docs/architecture.md | 2 + docs/run-audit.md | 1 + docs/settings-reference.md | 2 +- .../live-lineage-children-lanes.pg.test.ts | 3 +- .../core/src/task-store/archive-lifecycle-2.ts | 11 +- packages/engine/src/__tests__/self-healing.test.ts | 117 +++++++++++++++++++++ .../engine/src/run-audit/run-audit-catalogue.ts | 3 + packages/engine/src/self-healing.ts | 93 +++++++++++++++- packages/engine/src/util/run-audit.ts | 2 + 11 files changed, 231 insertions(+), 11 deletions(-) Fusion-Task-Id: FN-9187 Fusion-Task-Lineage: cc9a6adc-4b6d-44da-a84b-5633d4b80a10 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
c91e5ce42d |
FN-106: prevent workspace finalization livelock
Repair workspace merge-boundary finalization so empty repository sets cannot loop indefinitely. - Track workspace merge readiness and durable per-repository obligations. - Gate landing and recovery on scope, blockers, leases, and checkout ownership. - Preserve remediation state, add recovery paths, documentation, and regression coverage. Files changed: .../fn-106-workspace-finalization-livelock.md | 7 ++ docs/architecture.md | 6 ++ ...e-empty-merge-boundary-finalization-livelock.md | 40 ++++++++++ docs/workflow-steps.md | 4 + packages/cli/src/commands/__tests__/task.test.ts | 2 + ...workspace-worktrees-concurrent-merge.pg.test.ts | 23 ++++++ packages/core/src/store.ts | 9 ++- packages/core/src/task-store/task-mutation-ops.ts | 49 +++++++++++- packages/core/src/task-store/task-update.ts | 6 +- packages/core/src/types/task/task-core.ts | 7 ++ .../engine/src/__tests__/executor-test-helpers.ts | 6 ++ .../executor-workspace-main-checkout-guard.test.ts | 8 +- .../executor-workspace-session-cwd.test.ts | 37 +++++++++ .../engine/src/__tests__/project-engine.test.ts | 14 +++- .../src/__tests__/reviewer-workspace.test.ts | 72 ++++++++++++++++- .../__tests__/workspace-merge-readiness.test.ts | 46 +++++++++++ .../workspace-merger-idempotency.slow.test.ts | 15 ++-- .../src/__tests__/workspace-merger-lease.test.ts | 4 +- .../workspace-root-worktree-routing.test.ts | 47 +++++++++++ .../create-authoritative-workflow-seams.ts | 2 + .../engine/src/executor/create-task-done-tool.ts | 15 ++++ .../executor/ensure-graph-custom-node-worktree.ts | 8 ++ .../request-pre-merge-optional-step-fix.ts | 49 +++++++++++- .../engine/src/executor/run-graph-custom-node.ts | 24 ++++-- packages/engine/src/executor/run-implementation.ts | 9 +++ packages/engine/src/executor/send-task-back-for-fix.ts | 4 +- .../src/executor/workspace-main-checkout-guard.ts | 26 +++++- .../src/executor/workspace-review-remediation.ts | 54 +++++++++++++ .../src/executor/worktree-verify-invariants.ts | 2 +- packages/engine/src/merge/merger-ai.ts | 93 +++++++++++++++++----- .../engine/src/merge/workspace-merge-readiness.ts | 64 +++++++++++++++ packages/engine/src/project-engine.ts | 37 +++++++-- packages/engine/src/self-healing.ts | 54 ++++++++++--- .../engine/src/worktree/worktree-acquisition.ts | 20 ++++- 34 files changed, 787 insertions(+), 76 deletions(-) Fusion-Task-Id: FN-106 Fusion-Task-Lineage: 70b5c13d-9e17-419d-90ac-7258697657ef Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
3717fc5af1 |
FN-107: block single-repository worktree acquisition
Prevent single-repository worktree acquisition from proceeding without explicit multi-repository workspace context. - Require workspace-aware acquisition for single-repository tasks. - Propagate acquisition origin and workspace configuration through executor, merger, and recovery paths. - Add regression coverage, documentation, and a release changeset for the blocked behavior. Files changed: .changeset/fn-107-single-repo-worktree.md | 7 ++ docs/architecture.md | 4 + docs/testing.md | 4 + packages/core/src/branch/branch-assignment.ts | 12 +++ packages/core/src/index.gate.ts | 1 + packages/core/src/index.ts | 1 + packages/core/src/task-store/task-creation.ts | 4 +- packages/core/src/task-store/task-update.ts | 4 +- .../src/routes/register-planning-subtask-routes.ts | 1 + .../engine/src/__tests__/executor-test-helpers.ts | 12 +++ .../engine/src/__tests__/executor-worktree.test.ts | 44 ++++++--- .../src/__tests__/node-worktree-isolation.test.ts | 7 +- .../task-branch-write-origin-census.test.ts | 49 ++++++++++ .../worktree-acquisition-workspace.test.ts | 6 +- .../src/__tests__/worktree-acquisition.test.ts | 103 ++++++++++++++++++--- .../engine/src/executor/handle-graph-failure.ts | 16 +++ .../src/executor/workspace-config-resolver.ts | 1 + .../executor/worktree-branch-conflict-handle.ts | 1 + packages/engine/src/merger.ts | 3 +- packages/engine/src/self-healing.ts | 6 + .../self-healing/auto-recover-worktree-session.ts | 10 +- .../src/workflows/workflow-graph-executor.ts | 7 +- .../engine/src/worktree/worktree-acquisition.ts | 73 +++++++++++++- 23 files changed, 334 insertions(+), 42 deletions(-) Fusion-Task-Id: FN-107 Fusion-Task-Lineage: 80df9dae-59a0-416e-8a02-6ab2dba9bb00 Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
b2125aeb2d |
FN-104: preserve update restart state
Preserve a pending update across Settings reopen while coordinating installation and restart behavior. - Add pending-update install state and coordinator flows across dashboard and system controls. - Expose health/settings update APIs and retain restart state through modal reopen. - Cover desktop/mobile UX, route behavior, coordinator logic, and document the update flow. Files changed: .changeset/fn-104-pending-update-restart.md | 7 ++ docs/architecture.md | 3 + docs/assets/fn-104-pending-update-desktop.png | Bin 0 -> 10926 bytes docs/assets/fn-104-pending-update-mobile.png | Bin 0 -> 6101 bytes docs/dashboard-guide.md | 2 +- docs/settings-reference.md | 2 +- packages/core/src/task-store/task-creation.ts | 1 - packages/dashboard/app/api/client/health.ts | 12 ++++ packages/dashboard/app/api/settings/settings.ts | 3 + .../dashboard/app/components/SettingsModal.tsx | 46 ++++++++----- .../app/components/UpdateAvailableBanner.tsx | 20 ++++-- .../__tests__/SettingsModal.general.test.tsx | 6 ++ .../__tests__/SettingsModal.models-auth.test.tsx | 72 +++++++++++++++++++ .../__tests__/UpdateAvailableBanner.test.tsx | 2 + .../components/__tests__/settings-mobile.test.tsx | 3 + .../command-center/areas/SystemControlsArea.tsx | 18 +++-- .../__tests__/usePendingUpdateInstall.test.ts | 44 ++++++++++++ .../dashboard/app/hooks/usePendingUpdateInstall.ts | 76 +++++++++++++++++++++ packages/dashboard/app/hooks/useUpdateCheck.ts | 8 +++ .../dashboard/src/__tests__/auto-update.test.ts | 18 +++++ .../__tests__/update-install-coordinator.test.ts | 36 ++++++++++ packages/dashboard/src/auto-update.ts | 14 +++- .../__tests__/register-update-check-routes.test.ts | 14 ++++ .../src/routes/register-update-check-routes.ts | 31 ++++++++- .../dashboard/src/update-install-coordinator.ts | 23 +++++++ 25 files changed, 425 insertions(+), 36 deletions(-) Fusion-Task-Id: FN-104 Fusion-Task-Lineage: c754b258-654d-4efe-9b12-1addc7ed190b Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
bbca7a1ffc |
FN-094: add mono- and multi-repository lifecycle parity
Extend workspace lifecycle behavior so mono-repository and multi-repository tasks share the same durable scope, workflow, review, and merge semantics. - Add repository-scope persistence, migrations, serialization, and task mutation support. - Align dashboard task creation, detail, and workspace worktree views with repository-aware lifecycle state. - Extend executor, reviewer, merger, triage, and self-healing paths with parity coverage and tests. - Document the lifecycle contract and publish the operator-facing changeset. Files changed: .changeset/fn-094-multi-repository-lifecycle.md | 7 + docs/agents.md | 8 + docs/architecture.md | 6 + docs/dashboard-guide.md | 4 + docs/multi-project.md | 6 + docs/settings-reference.md | 2 +- docs/testing.md | 12 ++ docs/workspaces.md | 6 + ...workspace-worktrees-concurrent-merge.pg.test.ts | 19 +++ packages/core/src/index.ts | 2 +- .../core/src/postgres/migrations/0000_initial.sql | 1 + .../0064_fn_094_task_repository_scope.sql | 2 + packages/core/src/postgres/schema-applier.ts | 13 +- packages/core/src/postgres/schema/project.ts | 2 + packages/core/src/store.ts | 21 ++- .../core/src/task-store/branch-and-pr-entities.ts | 2 +- packages/core/src/task-store/persistence.ts | 4 +- packages/core/src/task-store/serialization.ts | 2 + packages/core/src/task-store/task-creation.ts | 31 ++++ packages/core/src/task-store/task-mutation-ops.ts | 131 +++++++++++++++- packages/core/src/task-store/task-row-mappers.ts | 2 +- packages/core/src/task-store/task-update.ts | 55 +++++-- packages/core/src/tasks/repository-scope.ts | 29 ++++ packages/core/src/types.ts | 4 + packages/core/src/types/task/task-core.ts | 35 ++++- packages/core/src/types/workflow/workflow-steps.ts | 21 +++ packages/dashboard/app/api/tasks/tasks.ts | 14 ++ packages/dashboard/app/components/NewTaskModal.tsx | 16 +- .../dashboard/app/components/TaskDetailModal.css | 27 ++++ .../dashboard/app/components/TaskDetailModal.tsx | 15 +- .../app/components/WorkspaceWorktreesSummary.tsx | 68 ++++++++- .../app/components/__tests__/NewTaskModal.test.tsx | 1 + .../__tests__/WorkspaceWorktreesSummary.test.tsx | 27 +++- .../src/routes/register-task-workflow-routes.ts | 48 ++++++ .../__tests__/executor-workspace-taskdone.test.ts | 20 +++ .../src/__tests__/reviewer-workspace.test.ts | 170 ++++++++++++++++++++- .../src/__tests__/self-healing-workspace.test.ts | 4 + .../workflow-graph-optional-group.test.ts | 32 ++++ .../workflow-graph-optional-step-fix.test.ts | 58 +++++++ .../engine/src/__tests__/workspace-e2e.test.ts | 91 ++++++++++- .../__tests__/workspace-lifecycle-parity.test.ts | 61 ++++++++ .../src/__tests__/workspace-merger-lease.test.ts | 25 +++ .../__tests__/workspace-merger-scope-gates.test.ts | 58 +++++++ .../engine/src/__tests__/workspace-merger.test.ts | 59 ++++++- packages/engine/src/agent-tools.ts | 92 ++++++++++- packages/engine/src/execution/reviewer.ts | 10 +- .../create-authoritative-workflow-seams.ts | 95 ++++++++++-- .../engine/src/executor/execute-workflow-graph.ts | 37 ++++- .../request-pre-merge-optional-step-fix.ts | 70 +++++++++ .../engine/src/executor/run-graph-custom-node.ts | 124 ++++++++++----- .../engine/src/executor/workflow-step-verdict.ts | 6 +- .../src/executor/workspace-review-per-repo.ts | 118 +++++++++++++- .../src/executor/worktree-task-done-scope-leak.ts | 109 ++++++++++++- packages/engine/src/merge/merger-ai.ts | 88 ++++++++++- packages/engine/src/self-healing.ts | 19 ++- packages/engine/src/triage.ts | 9 ++ .../src/workflows/workflow-graph-executor.ts | 73 +++++++-- .../engine/src/workflows/workflow-node-handlers.ts | 12 +- 58 files changed, 1962 insertions(+), 121 deletions(-) Fusion-Task-Id: FN-094 Fusion-Task-Lineage: 483f958f-cc67-474e-9383-26856c329543 Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
f714e45bda |
FN-090: reconcile AI merge review state
Reconcile AI merge-review outcomes with durable task state and operator-visible workflow controls. - Persist merge-review findings and reconciliation metadata through the core task store and schema migration. - Update merger prompts, execution, recovery handling, and workflow routes for approved review outcomes. - Add dashboard task-detail presentation and release documentation for the reconciliation flow. Files changed: .../fn-090-ai-merge-review-reconciliation.md | 7 + docs/architecture.md | 6 + .../src/__tests__/postgres/schema-applier.test.ts | 2 +- .../0063_fn_090_ai_merge_review_reconciliation.sql | 2 + packages/core/src/postgres/schema-applier.ts | 19 +- packages/core/src/postgres/schema/project.ts | 1 + packages/core/src/store.ts | 24 +- packages/core/src/task-store/persistence.ts | 2 + packages/core/src/task-store/reset-lifecycle.ts | 1 + packages/core/src/task-store/serialization.ts | 1 + packages/core/src/task-store/task-mutation-ops.ts | 2 +- packages/core/src/task-store/task-row-mappers.ts | 2 +- packages/core/src/task-store/task-update.ts | 5 + packages/core/src/types/task/task-core.ts | 27 ++ .../dashboard/app/api/tasks/tasks-lifecycle.ts | 9 + .../dashboard/app/components/TaskDetailModal.css | 19 ++ .../dashboard/app/components/TaskDetailModal.tsx | 29 ++ .../src/routes/register-task-workflow-routes.ts | 17 ++ .../src/__tests__/merge-error-recovery.test.ts | 5 +- packages/engine/src/__tests__/merger-ai.test.ts | 234 +++++---------- packages/engine/src/merge/merger-ai-prompts.ts | 31 +- packages/engine/src/merge/merger-ai.ts | 319 ++++++++++----------- packages/engine/src/project-engine.ts | 4 +- 23 files changed, 416 insertions(+), 352 deletions(-) Fusion-Task-Id: FN-090 Fusion-Task-Lineage: 13450a9f-f17f-46b4-ab39-4887520c2a82 Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
926dda6fc7 |
FN-078: repair multi-repository workspace merge coordination
Keep long-running workspace land operations live and enforce repository-local scope isolation. - Renew workspace land leases throughout dependency sync, AI merge, push, and intent resolution. - Abort stale land bodies before durable or remote commit points and fence lease-dependent writes. - Centralize repository File Scope resolution across squash, completion, and checkout guards. - Add regression coverage, architecture documentation, and a patch changeset. Files changed: .changeset/fn-078-workspace-lease-and-scope.md | 7 + docs/architecture.md | 3 +- .../executor-workspace-main-checkout-guard.test.ts | 13 ++ .../__tests__/executor-workspace-taskdone.test.ts | 21 +++ .../src/__tests__/workspace-merger-lease.test.ts | 195 ++++++++++++++++++++- .../src/executor/workspace-main-checkout-guard.ts | 4 +- .../src/executor/worktree-task-done-scope-leak.ts | 4 +- .../engine/src/merge/merger-ai-squash-gates.ts | 9 +- packages/engine/src/merge/merger-ai.ts | 55 +++++- packages/engine/src/worktree/workspace-paths.ts | 26 +++ 10 files changed, 321 insertions(+), 16 deletions(-) Fusion-Task-Id: FN-078 Fusion-Task-Lineage: 8ddfa438-d6c0-4d3a-972a-3594bfc05ffb Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
e099511b10 | docs(FN-062): retain merge review architecture guidance | ||
|
|
3f85c4cf84 |
FN-034: route workspace tasks through repository worktrees
Route multi-repository planning and graph execution through declared repository worktrees instead of workspace roots. - Acquire declared repository worktrees for planning and custom graph nodes. - Filter planning coordinator selection to configured repositories and preserve workspace routing metadata. - Add workspace worktree recovery, concurrency coverage, and release documentation. Files changed: .changeset/fn-034-workspace-worktree-routing.md | 7 ++ docs/architecture.md | 1 + ...workspace-worktrees-concurrent-merge.pg.test.ts | 36 +++++++ packages/core/src/store.ts | 10 ++ packages/core/src/task-store/task-mutation-ops.ts | 60 +++++++++++- .../executor-workspace-session-cwd.test.ts | 29 ++++-- packages/engine/src/__tests__/self-healing.test.ts | 17 ++-- .../workspace-root-worktree-routing.test.ts | 107 +++++++++++++++++++++ .../create-authoritative-workflow-seams.ts | 48 ++++++--- .../executor/ensure-graph-custom-node-worktree.ts | 45 +++++++- .../executor/ensure-task-worktree-for-planning.ts | 38 ++++++-- .../src/executor/reset-steps-if-work-lost.ts | 12 ++- .../engine/src/executor/run-graph-custom-node.ts | 83 ++++++++++++++-- packages/engine/src/executor/run-implementation.ts | 59 ++++++++++-- .../src/executor/workspace-config-resolver.ts | 30 +++++- .../src/executor/workspace-review-per-repo.ts | 29 +++++- .../executor/worktree-missing-session-recovery.ts | 26 ++++- packages/engine/src/self-healing.ts | 50 +++++++--- .../self-healing/auto-recover-worktree-session.ts | 31 +++++- .../engine/src/worktree/worktree-acquisition.ts | 65 +++++++++++- 20 files changed, 702 insertions(+), 81 deletions(-) Fusion-Task-Id: FN-034 Fusion-Task-Lineage: 59c5f273-d676-4b7f-b006-c12dc6c3abe6 Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
c3ff663c1c |
FN-030: route refinement tasks directly to planning
Route refinement and duplicate-task handling through the planning path while preserving task metadata and API behavior.\n\n- Route CLI refinement commands directly into planning.\n- Harden dependency updates and duplicate-task refinement persistence.\n- Expand PostgreSQL, CLI, and dashboard authorization coverage.\n- Document the refined task lifecycle and add the published-package changeset.\n\nFiles changed:\n .changeset/fn-030-refinement-planning-route.md | 7 ++\n docs/architecture.md | 20 ++--\n docs/task-management.md | 11 +-\n packages/cli/src/commands/__tests__/task.test.ts | 9 +-\n packages/cli/src/commands/task.ts | 2 +-\n .../postgres/refine-duplicate-task.pg.test.ts | 130 +++++++++++++++++++++\n .../__tests__/postgres/store-comments.pg.test.ts | 32 +++++\n packages/core/src/task-store/update-task-deps.ts | 17 +--\n packages/dashboard/app/__tests__/api-auth.test.ts | 5 +-\n 9 files changed, 207 insertions(+), 26 deletions(-) Fusion-Task-Id: FN-030 Fusion-Task-Lineage: 885c0a9f-d8bf-4abf-9ec9-dca5a01648e8 Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
84d9a59e7e |
FN-9169: retry Windows worktree cleanup failures
Make clean-room removal resilient to transient Windows filesystem locks without weakening worktree ownership safeguards. - add bounded errno-based directory removal retries with Windows read-only recovery - reuse cleanup retries across AI merge teardown, self-healing sweeps, and native backend fallback - preserve residual registrations and expose retry outcomes through cleanup audit metadata - cover retry, idempotency, residual, and ownership-aware cleanup behavior Files changed: .../fn-9169-windows-ai-merge-worktree-cleanup.md | 7 + docs/architecture.md | 4 +- .../engine/src/__tests__/merger-ai-cleanup.test.ts | 195 ++++++++++++++++++++- .../__tests__/self-healing-tempdir-sweep.test.ts | 109 ++++++++++-- .../engine/src/__tests__/worktree-backend.test.ts | 39 ++++- .../src/__tests__/worktree-removal-retry.test.ts | 64 +++++++ packages/engine/src/merge/merger-ai-worktree.ts | 103 ++++++----- packages/engine/src/self-healing.ts | 26 ++- packages/engine/src/worktree/worktree-backend.ts | 15 +- .../engine/src/worktree/worktree-removal-retry.ts | 110 ++++++++++++ 10 files changed, 592 insertions(+), 80 deletions(-) Fusion-Task-Id: FN-9169 Fusion-Task-Lineage: 4719bd4f-27bf-4a2b-8f31-350658523127 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
416c6a0215 |
FN-9170: Preserve structured merge failure sentinels
Keep merge-unavailable intact across workflow merge dispatch so graph routing receives the engine's structured result. - preserve merge-unavailable alongside implementation-incomplete during primitive classification - cover direct and legacy merge paths, audit context, normalization, and non-terminal retry behavior - document the structured sentinel invariant and add a patch changeset Files changed: .changeset/fn-9170-merge-unavailable.md | 7 ++ docs/architecture.md | 2 + .../merge-unavailable-classification.test.ts | 113 +++++++++++++++++++++ .../src/__tests__/workflow-merge-nodes.test.ts | 47 ++++++++- .../engine/src/workflows/workflow-merge-nodes.ts | 13 ++- 5 files changed, 176 insertions(+), 6 deletions(-) Fusion-Task-Id: FN-9170 Fusion-Task-Lineage: 99cc501f-8a25-49f5-b81a-74dd2e6e872b Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
d280fa6f54 |
FN-9166: preserve implementation-incomplete merge failures
Keep structured incomplete-implementation failures intact so graph recovery can resume or fail closed without retrying a no-op merge. - Preserve normalized implementation-incomplete reasons during direct merge-attempt classification. - Cover primitive, legacy seam, resumable, fail-closed, and cancellation paths. - Document the merge-boundary invariant and add a patch changeset. Files changed: .../fn-9166-preserve-implementation-incomplete.md | 7 ++ docs/architecture.md | 2 +- .../merge-node-paused-abort-retryable.test.ts | 76 ++++++++++++++++++++++ .../__tests__/workflow-merge-cancellation.test.ts | 15 ++++- .../src/__tests__/workflow-merge-nodes.test.ts | 46 +++++++++++++ .../engine/src/workflows/workflow-merge-nodes.ts | 13 +++- 6 files changed, 155 insertions(+), 4 deletions(-) Fusion-Task-Id: FN-9166 Fusion-Task-Lineage: 1b7946bf-62e3-42f0-8c8c-09230fef22bb Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
7b55a02e51 |
FN-9157: fix workflow merge boundary proof and retry routing
Make workflow merge admission accept valid foreach completion and terminate retries when proof is unavailable. - Treat fully terminal live foreach steps as implementation proof for Review Level 0 workflows. - Preserve merge-boundary-unproven as a terminal graph failure and park blocked retries visibly. - Add unit, graph-boundary, and PostgreSQL regression coverage plus operator documentation and a patch changeset. Files changed: .changeset/fn-9157-merge-boundary.md | 7 +++ docs/architecture.md | 4 ++ docs/workflow-steps.md | 6 ++ .../src/__tests__/workflow-merge-proof.test.ts | 11 +++- packages/core/src/workflow-merge-proof.ts | 20 +++++-- .../src/__tests__/executor-graph-boundary.test.ts | 64 +++++++++++++++++++++- ...xecutor-merge-boundary-foreach-proof.pg.test.ts | 10 ++++ .../__tests__/merge-boundary-unproven-park.test.ts | 48 ++++++++++++++++ .../create-authoritative-workflow-primitives.ts | 13 ++++- .../create-authoritative-workflow-seams.ts | 6 +- .../executor/evaluate-workflow-merge-boundary.ts | 18 +++++- .../executor/route-graph-merge-failure-to-retry.ts | 26 ++++++++- packages/engine/src/executor/task-predicates.ts | 2 + .../engine/src/executor/workflow-merge-boundary.ts | 29 +++++++--- .../engine/src/workflows/workflow-merge-nodes.ts | 13 +++++ 15 files changed, 253 insertions(+), 24 deletions(-) Fusion-Task-Id: FN-9157 Fusion-Task-Lineage: 7c68dfe2-28fb-4353-9ae6-df0ddbaf799a Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
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 --> |
||
|
|
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 --> |
||
|
|
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>
|
||
|
|
9fa8b386ee |
FN-9059: add durable workspace coordination leases
Prevent overlapping multi-node workspace operations and duplicate repository landings. - Add durable coordination leases, fence tokens, and land-intent persistence. - Fence workspace merge dispatches and repository publication across engine nodes. - Reconcile expired coordination state safely and cover lease lifecycle behavior. Files changed: .../fn-9059-workspace-durable-coordination.md | 7 + AGENTS.md | 1 + docs/architecture.md | 2 + docs/multi-project.md | 48 ++++ .../workspace-coordination-leases.pg.test.ts | 56 ++++ .../__tests__/postgres/workspace-leases.pg.test.ts | 112 ++++++++ packages/core/src/engine-node-identity.ts | 22 ++ packages/core/src/index.ts | 3 + .../0060_fn_9059_workspace_coordination_leases.sql | 10 + packages/core/src/postgres/schema-applier.ts | 13 +- packages/core/src/postgres/schema/project.ts | 31 ++ packages/core/src/store.ts | 18 ++ packages/core/src/task-store/workspace-leases.ts | 261 +++++++++++++++++ packages/core/src/tasks/workspace-lease-types.ts | 24 ++ .../engine/src/__tests__/project-engine.test.ts | 69 ++++- .../src/__tests__/self-healing-workspace.test.ts | 63 ++++- .../workspace-durable-coordination.test.ts | 49 ++++ .../src/__tests__/workspace-merger-lease.test.ts | 312 ++++++++++++++++++++- packages/engine/src/merge/merger-ai.ts | 277 ++++++++++++++++-- packages/engine/src/merge/workspace-fence-ref.ts | 171 +++++++++++ packages/engine/src/project-engine.ts | 175 ++++++++++-- packages/engine/src/runtimes/in-process-runtime.ts | 4 +- packages/engine/src/self-healing.ts | 191 ++++++++++++- packages/engine/src/util/run-audit.ts | 2 + .../engine/src/worktree/worktree-acquisition.ts | 43 ++- 25 files changed, 1901 insertions(+), 63 deletions(-) Fusion-Task-Id: FN-9059 Fusion-Task-Lineage: e51e3f54-69ee-4337-a218-4895d87474aa Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
2f99a8fb59 |
FN-9052: add atomic workspace worktree entry merges
Serialize per-repository workspace worktree state updates across concurrent Fusion processes. - Add advisory-locked store-level per-entry workspace worktree merges. - Route acquisition, landing, failure, and recovery updates through atomic merges. - Cover concurrent sibling repository writes and document the invariant. Files changed: .../fn-9052-workspace-worktree-atomic-merge.md | 7 ++ docs/architecture.md | 1 + ...workspace-worktrees-concurrent-merge.pg.test.ts | 90 ++++++++++++++++++++++ packages/core/src/store.ts | 10 ++- packages/core/src/task-store/task-mutation-ops.ts | 52 ++++++++++++- packages/core/src/types.ts | 2 + packages/core/src/types/task/task-core.ts | 17 +++- .../merge-orphan-body-durable-writes.test.ts | 8 ++ .../src/__tests__/self-healing-workspace.test.ts | 49 +++++++++--- .../src/__tests__/workspace-merger-lease.test.ts | 12 +++ .../engine/src/__tests__/workspace-merger.test.ts | 12 +-- .../worktree-acquisition-workspace.test.ts | 82 +++++++++++++++++++- packages/engine/src/merge/merger-ai.ts | 21 ++--- .../engine/src/merge/workspace-land-failure.ts | 19 +++-- packages/engine/src/self-healing.ts | 15 +++- .../engine/src/worktree/worktree-acquisition.ts | 25 +++--- 16 files changed, 370 insertions(+), 52 deletions(-) Fusion-Task-Id: FN-9052 Fusion-Task-Lineage: 2168085a-74a7-4a0f-954e-50db99eb98b7 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
43889bc684 |
FN-9058: block workspace main-checkout edits
Prevent workspace tasks from completing after task-era edits in configured sub-repository main checkouts. - Detect dirty and recent commit evidence across every workspace main checkout before invariant checks. - Block attributable edits with bounded retries while warning safely for inconclusive evidence. - Add audit telemetry, documentation, changeset, and real-git regression coverage. Files changed: .../fn-9058-workspace-main-checkout-guard.md | 7 + AGENTS.md | 1 + docs/architecture.md | 1 + .../engine/src/__tests__/_workspace-fixture.ts | 3 +- .../executor-workspace-main-checkout-guard.test.ts | 164 +++++++++++++++++++++ packages/engine/src/executor/execution-prompt.ts | 3 +- .../src/executor/workspace-main-checkout-guard.ts | 128 ++++++++++++++++ .../src/executor/worktree-verify-invariants.ts | 45 +++++- packages/engine/src/util/run-audit.ts | 2 + 9 files changed, 351 insertions(+), 3 deletions(-) Fusion-Task-Id: FN-9058 Fusion-Task-Lineage: b5dd58bd-4bd9-41fd-b3d5-e07270f3abca Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
1372218b1f |
FN-9047: invalidate stale workspace landing proof after revert
Preserve workspace landing attribution while allowing cleanly reverted work to land again. - Record a per-repository revert boundary after clean git-mode workspace reverts. - Reject recorded and trailer landing proof at or behind that boundary, then clear it on a fresh landing. - Persist boundaries through the revert route and cover re-land behavior with git tests. Files changed: .changeset/fn-9047-workspace-revert-landed-sha.md | 7 +++ docs/architecture.md | 2 + packages/core/src/types/task/task-core.ts | 7 ++- .../src/routes/register-session-diff-routes.ts | 2 +- .../src/routes/register-task-workflow-routes.ts | 11 ++++ .../task-revert.workspace.real-git.test.ts | 27 ++++++++++ ...orkspace-land-predicate.revert-boundary.test.ts | 60 ++++++++++++++++++++++ packages/engine/src/execution/task-revert.ts | 42 +++++++++++++-- packages/engine/src/index.ts | 1 + packages/engine/src/merge/merger-ai.ts | 5 +- .../engine/src/merge/workspace-land-predicate.ts | 25 +++++++-- packages/engine/src/self-healing.ts | 9 +++- 12 files changed, 185 insertions(+), 13 deletions(-) Fusion-Task-Id: FN-9047 Fusion-Task-Lineage: 8ac41347-3c76-4f54-8d69-f16f82084305 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
4bc0a32d60 |
FN-9050: enforce AI squash scope and diff-volume gates
Validate approved AI squashes before any integration ref advances. - Enforce task file scope and diff-volume checks for single-repo and workspace lands. - Reset rejected clean rooms to the integration tip so invalid approved squashes cannot be recovered on retry. - Add audit events, documentation, a changeset, and regression coverage for land gates. Files changed: .changeset/fn-9050-ai-merge-scope-gates.md | 7 + docs/architecture.md | 2 + docs/workflow-steps.md | 4 +- .../src/__tests__/merger-ai-squash-gates.test.ts | 188 +++++++++++++++++++++ .../__tests__/merger-file-scope-invariant.test.ts | 29 ++++ .../__tests__/workspace-merger-scope-gates.test.ts | 118 +++++++++++++ .../engine/src/merge/merger-ai-squash-gates.ts | 66 ++++++++ packages/engine/src/merge/merger-ai.ts | 21 ++- .../engine/src/merge/merger-diff-volume-gate.ts | 14 +- packages/engine/src/merge/merger-file-scope.ts | 33 +++- packages/engine/src/util/run-audit.ts | 1 + 11 files changed, 474 insertions(+), 9 deletions(-) Fusion-Task-Id: FN-9050 Fusion-Task-Lineage: 9ecd8b8c-5c00-45ea-98e9-2aa8a8040c53 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
db8e715452 |
FN-9056: reclaim safe terminal workspace worktrees
Reclaim safely abandoned workspace worktrees and canonical task branches without disrupting live or recoverable tasks. - Tear down eligible complete, idle failed, and soft-deleted per-repository worktrees with bounded retries. - Veto live, paused, scheduled-recovery, ambiguous, and unsafe-path cleanup candidates. - Verify failed-task landing evidence against each repository integration branch before deleting canonical branches. - Cover liveness and stale landed-SHA safety regressions. Files changed: .changeset/fn-9056-workspace-terminal-teardown.md | 7 + AGENTS.md | 2 +- docs/architecture.md | 1 + .../src/__tests__/self-healing-workspace.test.ts | 319 ++++++++++++++++++++- .../engine/src/executor/cleanup-task-worktree.ts | 8 +- packages/engine/src/self-healing.ts | 268 ++++++++++++----- packages/engine/src/util/run-audit.ts | 7 +- 7 files changed, 525 insertions(+), 87 deletions(-) Fusion-Task-Id: FN-9056 Fusion-Task-Lineage: 4353f7d9-063b-442b-88d3-6f3da1c9aae8 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
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> |
||
|
|
b7604a94bf |
FN-9041: remove agent state-change activity logs
Remove durable agent state-change events and hide retained state-change rows from activity displays. - Stop AgentStore update and reconciliation paths from writing state-change activity events. - Filter historical state-change events in activity stores and panels while retaining live roster notifications. - Document the retained activity contract, add coverage, and include a patch changeset. Files changed: .changeset/fn-9041-removal.md | 7 ++++ docs/agent-activity-contract.md | 4 ++ docs/architecture.md | 2 +- docs/dashboard-guide.md | 2 +- .../src/__tests__/agent-activity-writers.test.ts | 23 ++++++----- packages/core/src/agents/agent-store.ts | 28 +++++-------- .../app/components/agentsOrgChartActivity.ts | 12 ++++++ .../command-center/AgentActivityPanel.tsx | 25 +++++++---- .../__tests__/AgentActivityPanel.test.tsx | 48 ++++++++++++++++++++++ .../app/hooks/__tests__/agentActivityStore.test.ts | 39 +++++++++++++++++- packages/dashboard/app/hooks/agentActivityStore.ts | 3 +- 11 files changed, 153 insertions(+), 40 deletions(-) Fusion-Task-Id: FN-9041 Fusion-Task-Lineage: 532724b1-5945-4904-b5cd-2c27909805de Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
f7bf3f91d1 |
FN-9022: add task recommendations to Insights
Expose actionable task recommendations in the Insights view. - Add recommendation list API, client hook, and Insights rendering states. - Localize recommendation content and document the Insights workflow. - Cover recommendation retrieval, routes, hooks, API, and view behavior. Files changed: .changeset/fn-9022-insights-recommendations.md | 7 ++ docs/architecture.md | 1 + docs/dashboard-guide.md | 3 +- .../__tests__/task-recommendations-list.test.ts | 136 +++++++++++++++++++++ packages/core/src/index.ts | 2 +- packages/core/src/store.ts | 5 +- packages/core/src/task-store/reads.ts | 48 +++++++- packages/core/src/types.ts | 4 + packages/core/src/types/task/task-core.ts | 19 +++ packages/dashboard/app/__tests__/api-tasks.test.ts | 24 ++++ packages/dashboard/app/api/legacy.ts | 3 + packages/dashboard/app/api/tasks/tasks.ts | 22 ++++ packages/dashboard/app/components/InsightsView.css | 27 ++++ packages/dashboard/app/components/InsightsView.tsx | 47 +++++-- .../app/components/__tests__/InsightsView.test.tsx | 117 ++++++++++++++++++ .../hooks/__tests__/useTaskRecommendations.test.ts | 130 ++++++++++++++++++++ .../dashboard/app/hooks/useTaskRecommendations.ts | 116 ++++++++++++++++++ .../__tests__/task-recommendation-routes.test.ts | 26 ++++ .../src/routes/register-task-workflow-routes.ts | 33 +++++ packages/i18n/locales/en/app.json | 11 +- packages/i18n/locales/es/app.json | 11 +- packages/i18n/locales/fr/app.json | 11 +- packages/i18n/locales/ko/app.json | 11 +- packages/i18n/locales/pt-BR/app.json | 11 +- packages/i18n/locales/zh-CN/app.json | 11 +- packages/i18n/locales/zh-TW/app.json | 11 +- packages/i18n/src/resources.d.ts | 9 ++ 27 files changed, 835 insertions(+), 21 deletions(-) Fusion-Task-Id: FN-9022 Fusion-Task-Lineage: b83f1074-37af-4f87-9ec0-2bd9bb9bf64d Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
d4db29f3e6 |
fix(dashboard): surface mergeTaskSnapshot on useTasks mocks to fix task-detail tests (#3409)
## Problem
`app/components/__tests__/navigation-history.test.tsx`,
`TaskDetail.swipe-back.test.tsx`, and
`TaskDetail.mobile-transition.board-panel.test.tsx` fail to load.
FN-8796 (`132026545`, "stabilize task-detail lifecycle snapshots") added
`mergeTaskSnapshot` to `hooks/useTasks.ts`, which
`App.tsx`/`MainContent.tsx` now import. The curated test suites that
`vi.mock("../../hooks/useTasks")` still only expose `useTasks`, so the
fixture throws at import time:
```
No "mergeTaskSnapshot" export is defined on the useTasks mock
```
Confirmed on `origin/main`: `mergeTaskSnapshot` is present in
`useTasks.ts` and imported by `App.tsx`, while these tests' `vi.mock`
shims don't surface it.
## Fix
Update the mocks to surface every export the rendered components import,
using a partial `importOriginal` mock so `mergeTaskSnapshot` keeps its
real implementation (a `vi.fn()` returning `undefined` would make
`App.tsx:2179` `liveTask.id` throw):
```ts
vi.mock("../../hooks/useTasks", async (importOriginal) => {
const actual = await importOriginal();
return { ...actual, useTasks: (_options?: any) => mockUseTasks() };
});
```
## Verification
- `FUSION_DASHBOARD_DEEP=1 vitest run navigation-history swipe-back
board-panel` → **14 files, 116 tests passed**
- Pre-existing on `origin/main`, fixes a regression introduced by
FN-8796.
## Scope
Tests + a one-line docs note only. No production behavior change.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Documentation**
- Documented improved worktree recovery behavior, including safer
handling of incomplete, inactive, and unregistered directories.
- Added guidance for recovery across different storage locations and
bounded cleanup of recognized entries.
- Clarified protections that prevent internal recovery containers from
being treated as worktrees.
- **Tests**
- Improved dashboard test coverage and reliability for task detail
rendering, mobile transitions, swipe-back navigation, and navigation
history.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Fusion <noreply@runfusion.ai>
Co-authored-by: gsxdsm <gsxdsm@users.noreply.github.com>
|
||
|
|
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> |
||
|
|
4c9f14e21a |
FN-8965: restore explicit intake owner routing
Restore deliberate engineer and authorized override assignments while preserving executor-only automatic routing. - Accept eligible engineers as explicit intake owners through normal and reserved-ID task creation. - Honor metadata-authorized role overrides without weakening runtime, state, or assignment-policy gates. - Add resolver and PostgreSQL coverage plus release and architecture documentation. Files changed: .../fn-8965-intake-owner-explicit-routing.md | 7 +++ docs/architecture.md | 2 +- .../postgres/create-task-reserved-id.pg.test.ts | 29 ++++++++++++ .../__tests__/task-intake-owner-resolver.test.ts | 51 ++++++++++++++++++++-- packages/core/src/task-store/task-creation.ts | 7 +++ .../core/src/tasks/task-intake-owner-resolver.ts | 38 ++++++++++++---- 6 files changed, 121 insertions(+), 13 deletions(-) Fusion-Task-Id: FN-8965 Fusion-Task-Lineage: 4ecf7fc8-e966-49c8-abf6-e50ae26d8224 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
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> |
||
|
|
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> |
||
|
|
00ddafd5fe |
FN-8845: persist deterministic spec alignment
Persist approved-plan drift alignment on linked mission features. - Store spec alignment across PostgreSQL and SQLite mission feature projections - Reconcile and render durable alignment instead of browser-side task joins - Preserve migration identities and cover drift persistence regressions Files changed: docs/architecture.md | 2 + docs/missions.md | 2 +- .../core/src/__tests__/planner/spec-lock.test.ts | 1 + .../src/__tests__/postgres/schema-applier.test.ts | 9 ++++- .../async-stores/async-mission-store-queries.ts | 5 +++ packages/core/src/missions/mission-store.ts | 9 ++++- packages/core/src/missions/mission-types.ts | 10 +++++ packages/core/src/planner/spec-lock.ts | 7 +++- .../0053_mission_feature_spec_alignment.sql | 3 ++ packages/core/src/postgres/schema-applier.ts | 13 +++++- packages/core/src/postgres/schema/project.ts | 2 + packages/dashboard/app/api/missions/missions.ts | 2 + .../dashboard/app/components/MissionManager.tsx | 40 ++++++------------ packages/dashboard/app/components/mission-types.ts | 2 + .../src/__tests__/plan-approval-status.pg.test.ts | 4 +- .../src/__tests__/mission-feature-sync.test.ts | 37 ++++++++++++++++- .../src/__tests__/spec-drift-reconciler.test.ts | 14 +++++++ packages/engine/src/missions/mission-autopilot.ts | 17 +++++--- .../engine/src/missions/mission-feature-sync.ts | 47 +++++++++++++++++++++- packages/engine/src/project-engine.ts | 3 +- packages/engine/src/scheduler.ts | 40 +++++++++++------- packages/engine/src/spec-drift-reconciler.ts | 5 +++ 22 files changed, 215 insertions(+), 59 deletions(-) Fusion-Task-Id: FN-8845 Fusion-Task-Lineage: d4a30472-f1c3-41ba-a61b-3f2be1ad32ab Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
82b5d78bf8 |
FN-8945: invalidate approved lineage fingerprints
Invalidate stale approval evidence atomically when a parent task leaves lineage. - Lock and revalidate lineage children before parent deletion or archival. - Clear affected approvals, append invalidation evidence, and reconcile cleared children. - Cover lifecycle races, evidence collisions, and async archive/delete paths. Files changed: .changeset/fn-8945-lineage-approval-invalidation.md | 7 + docs/architecture.md | 6 + .../lineage-approval-invalidation.pg.test.ts | 379 +++++++++++++++++++++ .../planning-lifecycle-advisory-lock.pg.test.ts | 58 ++++ .../postgres/runtime-lifecycle-async.test.ts | 4 + .../__tests__/postgres/taskstore-lifecycle.test.ts | 3 +- packages/core/src/postgres/advisory-locks.ts | 164 ++++++--- packages/core/src/store.ts | 26 +- .../core/src/task-store/archive-lifecycle-2.ts | 123 +++++-- .../src/task-store/async/async-archive-lineage.ts | 27 +- .../core/src/task-store/async/async-lifecycle.ts | 89 +-- .../task-store/lineage-approval-invalidation.ts | 168 +++++++++ 12 files changed, 939 insertions(+), 115 deletions(-) Fusion-Task-Id: FN-8945 Fusion-Task-Lineage: be7dd6c8-5411-4b0e-8734-9fe63b9d1d9f Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
e610c72034 |
FN-8943: reconcile spec-lock divergence history
Preserve prior divergence when a task is re-locked after plan changes. - Persist immutable spec locks, current-plan evidence, and drift reports. - Reconcile retained divergence into re-approved alignment state across engine, API, and dashboard views. - Fence Plan Review acceptance and schema upgrades while retaining migration identity parity. Files changed: .changeset/fn-8845-spec-lock-drift-report.md | 7 + .changeset/fn-8943-spec-lock-divergence.md | 7 + docs/architecture.md | 17 +- docs/dashboard-guide.md | 3 + docs/missions.md | 4 + .../core/src/__tests__/planner/spec-lock.test.ts | 158 ++++++++++++++ .../src/__tests__/postgres/schema-applier.test.ts | 30 ++- .../postgres/task-dependency-mutation.pg.test.ts | 74 +++++++ packages/core/src/index.gate.ts | 4 + packages/core/src/index.ts | 4 + packages/core/src/planner/drift-report.ts | 152 +++++++++++++ packages/core/src/planner/spec-lock.ts | 182 ++++++++++++++++ .../migrations/0050_spec_lock_drift_report.sql | 29 +++ .../0051_spec_lock_source_revision_bigint.sql | 3 + packages/core/src/postgres/schema-applier.ts | 25 ++- packages/core/src/postgres/schema/project.ts | 13 ++ packages/core/src/store.ts | 242 ++++++++++++++++++++- .../core/src/task-store/branch-and-pr-entities.ts | 32 ++- packages/core/src/task-store/project-store-ops.ts | 34 ++- packages/core/src/task-store/task-update.ts | 66 +++++- packages/core/src/task-store/update-task-deps.ts | 31 ++- packages/dashboard/app/api.ts | 3 + packages/dashboard/app/api/tasks/tasks.ts | 22 ++ .../dashboard/app/components/MissionManager.css | 21 ++ .../dashboard/app/components/MissionManager.tsx | 41 +++- .../dashboard/app/components/TaskDetailModal.css | 26 +++ .../dashboard/app/components/TaskDetailModal.tsx | 62 +++++- .../__tests__/TaskDetailModal.spec-lock.test.tsx | 80 +++++++ .../__tests__/TaskDetailModal.test-helpers.ts | 2 + .../src/__tests__/plan-approval-status.pg.test.ts | 81 ++++++- .../src/routes/register-task-workflow-routes.ts | 59 ++++- .../src/__tests__/mission-feature-sync.test.ts | 15 +- .../src/__tests__/spec-drift-reconciler.test.ts | 108 +++++++++ .../engine/src/executor/execute-workflow-graph.ts | 49 ++++- .../engine/src/missions/mission-feature-sync.ts | 55 ++++- packages/engine/src/project-engine.ts | 33 +++ packages/engine/src/spec-drift-reconciler.ts | 105 +++++++++ packages/engine/src/triage.ts | 29 +++ 38 files changed, 1842 insertions(+), 66 deletions(-) Fusion-Task-Id: FN-8943 Fusion-Task-Lineage: 2a7f8a38-99aa-4c4b-8c36-41d14c466d21 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
a5c3476cb2 |
fix: harden pinned worktree recovery cleanup (#3402)
## Summary - serialize pinned-path classification, orphan preservation, quarantine reconciliation, and recreation under one reservation - preserve cross-filesystem orphans atomically beside the configured worktree root and retain the newest 10 generated entries per recovery root - exclude recovery containers from pool and self-healing scans, with fail-closed symlink and active-session guards - document recovery location and retention behavior ## Test plan - `pnpm --filter @fusion/engine exec vitest run src/__tests__/worktree-acquisition.test.ts src/__tests__/worktree-paths.test.ts src/__tests__/worktree-pool.test.ts src/__tests__/self-healing-tempdir-sweep.test.ts --silent=passed-only --reporter=dot` - `pnpm --filter @fusion/engine typecheck` - `pnpm --filter @fusion/engine build` - `pnpm test:gate:static` - `pnpm check:changesets --strict` - `pnpm check:fnxc-future-dates` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Preserves orphaned pinned worktrees during recovery, including across filesystems. * Retains the 10 most recent recovery entries and safely skips active or invalid entries. * Keeps recovery data separate from normal worktree discovery, cleanup, and capacity checks. * Adds safeguards for path containment, active-session ownership, and concurrent recovery. * **Bug Fixes** * Prevents pinned worktree data from being lost during recreation or quarantine cleanup. * Ensures recovery cleanup failures do not interrupt worktree acquisition. * **Documentation** * Documented orphan recovery, retention, fallback behavior, and cleanup safeguards. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |