8fcf4bdbaaadb1c7e5ccced6e345cead4351ae2f
139 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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> |
||
|
|
9838f42076 |
fix: repair core and CLI suites, plus a PG table-registry omission
Core 32 failures -> 0 (5,981 passing); CLI 46 -> 0 (2,021 passing). Three agents per package, root-cause fixes only. One product defect, same class as FN-9059 and found the same way — by a test that leaked state between runs: `projectTableNames` was missing SEVENTEEN tables the schema declares (current_plan_evidence, spec_locks, spec_drift_reports, symbol_locks, configuration_revisions, chat_tags, chat_session_tags, mission_lineage_stops, task_verification_requests, unplanned_execution_blocks, workflow_agent_capacity_leases and the six task_lifecycle_* tables). That list drives BOTH the PG test-harness per-test reset and production health compaction, so those tables were never truncated between tests (a plan-evidence version counter carried forward, making whole-file runs disagree with isolated ones) and never VACUUM/ANALYZEd in production. Registered, with project-table-registry.test.ts as a ratchet — verified it fails on an unregistered new table naming the offender. Everything else was drift behind deliberate changes: branch-write provenance, FN-073 dependency validation, the FN-9191 pre-merge merge gate, U11's triage/ planning lane merge, refinement workflow coming from the ORIGIN selection, async-converted provider registration, a barrel mock missing exports a guard added, and several source-pinned inventories broken by module moves. Tests for removed features were deleted with their removing commit cited. Also fixes a vitest config gap where @fusion/core/mcp-builtin-servers resolved only to dist/, which was breaking test COLLECTION in unrelated CLI files and had been misread as transient cross-agent noise. Quarantines mission-store.pg's concurrent-claim race (second sighting): it holds a transaction open, sleeps 250ms and asserts the rival has not settled, which fails under parallel load. An A/B against the registry change above looked causal on one run and did not reproduce on three — that coincidence is the flake itself, and rescue needs a real lock-wait probe rather than a longer sleep. Core's config now inlines its exclude array, because check-quarantine-ledger.mjs cannot resolve a variable reference and silently reported the ledger unpaired. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
455bdbc007 |
fix: repair the engine suite and the product regressions it was pointing at
Six parallel agents worked the 150 remaining failures. Engine suite: 297 failing tests at baseline |
||
|
|
794dae3196 |
fix(FN-149): advance schema ceiling to 0065 so Fusion stops rejecting its own database
FN-149 shipped migration 0065_fn_149_review_convergence_stage.sql and registered REVIEW_CONVERGENCE_STAGE_VERSION but left SCHEMA_BASELINE_VERSION at "0064". The first store open applied and recorded 0065; the next open (project store, same boot) hit assertBinaryNotOlderThanDatabase, saw 0065 > 0064 and threw StaleBinarySchemaError, so every startup died with "this binary only knows up to 0064" on fresh and upgraded databases alike. - Bump SCHEMA_BASELINE_VERSION to "0065" (marker only: applies no SQL, touches no data). - Move the DB-free migration-wiring assertions out of the PostgreSQL integration file into src/__tests__/migration-wiring-integrity.test.ts and wire it into test:unit-gate, so the ceiling/migration drift now fails the merge gate instead of main's boot. - Refresh the stale migration-identity expectations (0062-0065). Symptom verification: `node scripts/dev-with-memory.mjs --isolated=<tmp> --prebuild none` exited 1 with the guard error before; it now boots and serves the dashboard. |
||
|
|
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> |
||
|
|
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> |
||
|
|
eb3eeb887a |
FN-074: remove task splitting and parent deletion
Remove complex-task splitting and parent-deletion behavior across core, dashboard, and engine. - Remove subtask splitting, breakdown UI, and related API routes and lifecycle handling. - Add the migration and prompt/documentation updates that enforce the simplified task model. - Update affected tests and integrations for the removed behavior. Files changed: .changeset/fn-074-removal.md | 7 + docs/dashboard-guide.md | 17 +- docs/gitlab-parity-inventory.md | 7 +- docs/mcp.md | 6 +- docs/settings-reference.md | 16 +- docs/task-management.md | 31 +- docs/workflow-steps.md | 10 +- .../cli/skill/fusion/references/task-structure.md | 2 +- .../cli/skill/fusion/workflows/specifications.md | 4 +- packages/core/src/__tests__/agent-prompts.test.ts | 19 +- .../builtin-workflow-settings-triage.test.ts | 32 +- .../src/__tests__/postgres/schema-applier.test.ts | 2 +- .../core/src/__tests__/prompt-overrides.test.ts | 3 +- ...-deleted-observed-dispatch-side-effects.test.ts | 3 - .../task-deleted-outbox-consumer-backoff.test.ts | 1 - packages/core/src/agents/agent-prompts.ts | 56 +- packages/core/src/index.ts | 2 +- .../0062_remove_task_subtask_splitting.sql | 2 + packages/core/src/postgres/schema-applier.ts | 14 +- packages/core/src/postgres/schema/project.ts | 1 - packages/core/src/store.ts | 12 +- packages/core/src/task-delete-attribution.ts | 20 +- packages/core/src/task-delete-notice.ts | 7 +- .../__tests__/lifecycle-outbox-writer.test.ts | 4 +- .../core/src/task-store/archive-lifecycle-2.ts | 13 +- packages/core/src/task-store/archive-lifecycle.ts | 6 +- packages/core/src/task-store/lifecycle-outbox.ts | 2 - packages/core/src/task-store/persistence.ts | 2 - packages/core/src/task-store/serialization.ts | 2 - packages/core/src/task-store/task-creation.ts | 2 - .../src/task-store/task-deleted-outbox-consumer.ts | 4 - packages/core/src/task-store/task-mutation-ops.ts | 2 +- packages/core/src/task-store/task-row-mappers.ts | 2 +- packages/core/src/tasks/prompt-overrides.ts | 35 - packages/core/src/types.ts | 12 - packages/core/src/types/mesh/archive-planning.ts | 1 - packages/core/src/types/task/task-core.ts | 3 - .../src/workflows/builtin-workflow-settings.ts | 86 -- packages/dashboard/app/App.tsx | 15 - .../mission-planning-modals-mobile.test.ts | 15 - packages/dashboard/app/api/legacy.ts | 18 +- packages/dashboard/app/api/planning/ai-text.ts | 171 +--- packages/dashboard/app/api/planning/planning.ts | 46 - packages/dashboard/app/api/tasks/tasks.ts | 4 +- packages/dashboard/app/components/AppModals.tsx | 39 +- packages/dashboard/app/components/Board.tsx | 10 +- packages/dashboard/app/components/Column.tsx | 9 +- .../dashboard/app/components/InlineCreateCard.tsx | 63 +- packages/dashboard/app/components/Lane.tsx | 3 +- packages/dashboard/app/components/ListView.tsx | 10 +- packages/dashboard/app/components/NewTaskModal.tsx | 8 +- .../dashboard/app/components/PlanningModeModal.css | 128 --- .../dashboard/app/components/PlanningModeModal.tsx | 566 +---------- .../dashboard/app/components/QuickEntryBox.tsx | 43 +- .../dashboard/app/components/SettingsModal.tsx | 2 - .../app/components/SubtaskBreakdownModal.tsx | 932 ----------------- packages/dashboard/app/components/TaskCard.tsx | 1 - packages/dashboard/app/components/TaskForm.tsx | 23 +- .../__tests__/AgentPromptsManager.test.tsx | 1 - .../app/components/__tests__/AppModals.test.tsx | 92 +- .../app/components/__tests__/Board.test.tsx | 69 +- .../components/__tests__/InlineCreateCard.test.tsx | 170 ---- .../app/components/__tests__/ListView.test.tsx | 38 - .../app/components/__tests__/NewTaskModal.test.tsx | 48 - .../components/__tests__/QuickEntryBox.test.tsx | 293 +----- .../__tests__/SubtaskBreakdownModal.test.tsx | 933 ----------------- ...skDetail.mobile-transition.board-panel.test.tsx | 1 - .../__tests__/TaskDetail.swipe-back.test.tsx | 1 - .../app/components/__tests__/TaskForm.test.tsx | 67 -- .../__tests__/WorkflowSettingsPanel.test.tsx | 51 - .../app/components/__tests__/board-mobile.test.tsx | 20 - .../composer-settings-read-isolation.test.tsx | 30 - .../components/__tests__/migratedModalFixtures.tsx | 2 - .../app/components/dashboard/MainContent.tsx | 5 - .../dashboard/__tests__/DashboardBanners.test.tsx | 1 - .../__tests__/MainContent.graph-popout.test.tsx | 1 - .../dashboard/app/components/dashboard/types.ts | 2 - .../app/components/workflow-setting-display.ts | 10 - ...ckgroundSessions.resume-instrumentation.test.ts | 1 - .../hooks/__tests__/useBackgroundSessions.test.ts | 25 +- .../app/hooks/__tests__/useModalManager.test.ts | 3 - packages/dashboard/app/hooks/modalPersistence.ts | 14 - .../dashboard/app/hooks/useBackgroundSessions.ts | 9 +- packages/dashboard/app/hooks/useModalManager.ts | 58 +- packages/dashboard/app/hooks/useProjectActions.ts | 2 +- packages/dashboard/app/hooks/useTaskHandlers.ts | 9 - packages/dashboard/app/utils/builtinPrompts.ts | 7 - packages/dashboard/app/utils/projectStorage.ts | 1 - .../src/__tests__/ai-session-diagnostics.test.ts | 5 +- .../src/__tests__/github-tracking-state.test.ts | 97 -- .../src/__tests__/gitlab-delete-close.test.ts | 6 +- .../gitlab-parity-inventory-documentation.test.ts | 1 - .../src/__tests__/gitlab-split-close.test.ts | 125 --- .../planning-flow-diagnostics-guardrail.test.ts | 1 - .../src/__tests__/process-lifecycle.test.ts | 1 - .../dashboard/src/__tests__/routes-auth.test.ts | 2 - .../src/__tests__/routes-automation.test.ts | 2 - .../dashboard/src/__tests__/routes-git.test.ts | 2 - .../dashboard/src/__tests__/routes-github.test.ts | 92 -- .../src/__tests__/routes-planning-tracking.test.ts | 130 --- .../src/__tests__/routes-planning.test.ts | 1062 +------------------- .../dashboard/src/__tests__/routes-system.test.ts | 2 - .../dashboard/src/__tests__/routes-tasks.test.ts | 902 ----------------- .../shared-branch-group-entry-points.test.ts | 93 -- packages/dashboard/src/ai-session-diagnostics.ts | 3 +- packages/dashboard/src/ai-session-store.ts | 6 +- packages/dashboard/src/ai-session-timeout.ts | 3 +- packages/dashboard/src/github-tracking-state.ts | 43 +- packages/dashboard/src/gitlab-delete-close.ts | 7 +- packages/dashboard/src/gitlab-lifecycle.ts | 4 +- packages/dashboard/src/gitlab-split-close.ts | 103 -- packages/dashboard/src/gitlab-tracking-state.ts | 2 +- packages/dashboard/src/index.ts | 1 - packages/dashboard/src/planning.ts | 171 ---- packages/dashboard/src/routes.ts | 6 - ...er-planning-subtask-routes.parent-close.test.ts | 120 --- .../dashboard/src/routes/register-git-github.ts | 6 - .../src/routes/register-planning-subtask-routes.ts | 773 +------------- .../src/routes/register-task-workflow-routes.ts | 6 +- packages/dashboard/src/server.ts | 8 - packages/dashboard/src/subtask-breakdown.ts | 833 --------------- packages/dashboard/src/triage-trait.ts | 93 +- .../src/__tests__/agent-task-read-tools.test.ts | 1 - .../triage-duplicate-search-regression.test.ts | 3 - .../triage-split-into-subtasks-delete.test.ts | 222 ---- packages/engine/src/__tests__/triage.test.ts | 519 +--------- packages/engine/src/triage.ts | 239 +---- 127 files changed, 214 insertions(+), 10001 deletions(-) Fusion-Task-Id: FN-074 Fusion-Task-Lineage: 23207799-4ec4-4ec7-bcd7-83cba4d98f53 Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
dfa25335d0 |
FN-066: add task-ID search to Activity Log
Add task-ID filtering across the Activity Log data, API, and dashboard UI.\n\n- Index and expose task IDs in central activity audit queries.\n- Add API, hook, modal, styling, localization, and regression-test coverage for search.\n- Include the published-package changeset and PostgreSQL migration.\n\nFiles changed:\n .changeset/fn-066-activity-log-task-search.md | 7 +++\n .../postgres/activity-log-parity.pg.test.ts | 20 ++++++-\n .../postgres/central-core-backend.test.ts | 16 +++++\n .../src/__tests__/postgres/schema-applier.test.ts | 4 +-\n .../core/src/async-stores/async-central-core.ts | 16 ++++-\n packages/core/src/central/central-core.ts | 5 +\n .../core/src/postgres/migrations/0000_initial.sql | 2 +\n .../0061_fn_066_activity_log_task_id_index.sql | 7 +++\n packages/core/src/postgres/schema-applier.ts | 13 ++++\n packages/core/src/postgres/schema/central.ts | 1 +\n packages/core/src/store.ts | 2 +\n packages/core/src/task-store/async/async-audit.ts | 19 +++--\n packages/dashboard/README.md | 1 +\n .../app/__tests__/activity-log-layout.test.ts | 5 ++\n .../dashboard/app/__tests__/api-projects.test.ts | 4 +\n packages/dashboard/app/api/projects/projects.ts | 4 +\n packages/dashboard/app/api/system/scheduling.ts | 3 +\n .../dashboard/app/components/ActivityLogModal.css | 14 +++++\n .../dashboard/app/components/ActivityLogModal.tsx | 68 +++++++++++-------\n packages/dashboard/app/components/ScriptsModal.css | 21 +++++++\n .../components/__tests__/ActivityLogModal.test.tsx | 58 ++++++++++++++++++\n .../app/hooks/__tests__/useActivityLog.test.ts | 35 +++++++++++\n packages/dashboard/app/hooks/useActivityLog.ts | 14 +++--\n .../src/__tests__/activity-log-route.test.ts | 35 +++++++++++\n .../src/routes/register-setup-activity-routes.ts | 28 +++++---\n packages/i18n/locales/en/app.json | 5 +\n packages/i18n/locales/es/app.json | 5 +\n packages/i18n/locales/fr/app.json | 5 +\n packages/i18n/locales/ko/app.json | 5 +\n packages/i18n/locales/pt-BR/app.json | 5 +\n packages/i18n/locales/zh-CN/app.json | 5 +\n packages/i18n/locales/zh-TW/app.json | 5 +\n packages/i18n/src/resources.d.ts | 3 +\n 33 files changed, 384 insertions(+), 56 deletions(-) Fusion-Task-Id: FN-066 Fusion-Task-Lineage: 055e2383-9701-4b7e-9f7d-92c2fe175049 Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
179f08c2d4 |
FN-9158: recover Windows antivirus-blocked PostgreSQL payloads
Recover quarantined or truncated embedded PostgreSQL runtime files and explain Windows Defender remediation. - Validate materialized payload inventory with v3 markers and repair mismatches atomically. - Surface actionable error 4551 diagnostics through startup failures. - Add regression coverage, operator documentation, and a patch changeset. Files changed: ...-9158-windows-av-blocked-embedded-pg-payload.md | 7 + ...ndows-antivirus-blocks-embedded-postgres-dll.md | 27 +++ docs/storage.md | 4 + .../__tests__/postgres/embedded-lifecycle.test.ts | 139 +++++++++++++- .../src/__tests__/postgres/startup-factory.test.ts | 19 ++ packages/core/src/postgres/embedded-lifecycle.ts | 208 ++++++++++++++++++++- packages/core/src/postgres/startup-factory.ts | 30 +-- 7 files changed, 414 insertions(+), 20 deletions(-) Fusion-Task-Id: FN-9158 Fusion-Task-Lineage: ec2c97d7-0797-49c1-b875-6b147ff26917 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
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> |
||
|
|
bebb46ff41 |
FN-9037: add indexed recommendation task lookups
Keep recommendation task creation responsive without changing duplicate-intake semantics. - Add project-scoped proposal claim and source-lineage persistence reads with supporting indexes. - Use bounded lookups for recommendation replay and same-agent duplicate intake. - Resolve terminal lanes from each candidate's workflow and cover the indexed query paths. Files changed: .changeset/fn-9037-recommendation-create-perf.md | 7 ++ docs/storage.md | 4 + .../intake-duplicate-terminal-lanes.test.ts | 3 +- .../postgres/proposal-claim-lookup.pg.test.ts | 106 +++++++++++++++++++++ .../__tests__/same-agent-duplicate-intake.test.ts | 14 ++- .../0059_fn_9037_tasks_source_agent_index.sql | 3 + packages/core/src/postgres/schema-applier.ts | 12 ++- packages/core/src/postgres/schema/project.ts | 3 + packages/core/src/store.ts | 8 +- .../core/src/task-store/async/async-persistence.ts | 40 ++++++++ packages/core/src/task-store/reads.ts | 18 +++- packages/core/src/task-store/task-creation.ts | 10 +- .../__tests__/task-recommendation-routes.test.ts | 38 +++++++- .../src/routes/register-task-workflow-routes.ts | 20 ++-- 14 files changed, 259 insertions(+), 27 deletions(-) Fusion-Task-Id: FN-9037 Fusion-Task-Lineage: ea44d65c-98cc-4a5b-a116-b3c28f14c292 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
fc56161c9d |
FN-9014: add chat and mailbox message archiving
Add archived-message lifecycle support across chat and mailbox views. - Persist archive state with a PostgreSQL migration and message-store APIs. - Expose archive, restore, and permanent-delete messaging endpoints. - Add archived-message views and archive-by-default actions with regression coverage. - Document storage behavior and add a release changeset. Files changed: .changeset/fn-9014-message-archive.md | 7 ++ docs/dashboard-guide.md | 7 +- docs/storage.md | 2 +- .../__tests__/postgres/message-store.pg.test.ts | 34 +++++++ .../src/__tests__/postgres/schema-applier.test.ts | 9 +- .../core/src/async-stores/async-message-store.ts | 73 +++++++++++--- .../migrations/0058_fn_9014_message_archive.sql | 13 +++ packages/core/src/postgres/schema-applier.ts | 14 ++- packages/core/src/postgres/schema/project.ts | 2 + packages/core/src/stores/message-store.ts | 68 ++++++++++--- packages/core/src/types/messaging/messages.ts | 9 ++ packages/dashboard/app/api/chat/messaging.ts | 37 +++++-- packages/dashboard/app/api/legacy.ts | 2 + packages/dashboard/app/components/ChatView.tsx | 21 +++- packages/dashboard/app/components/MailboxModal.tsx | 74 ++++++++++++-- packages/dashboard/app/components/MailboxView.tsx | 108 +++++++++++++++++++-- .../__tests__/ChatView.core-contracts.test.tsx | 24 +++++ .../components/__tests__/ChatView.test-harness.tsx | 3 + .../app/components/__tests__/MailboxModal.test.tsx | 6 +- .../app/components/__tests__/MailboxView.test.tsx | 10 +- .../dashboard/app/hooks/__tests__/useChat.test.ts | 35 ++++++- packages/dashboard/app/hooks/useChat.ts | 38 +++++++- .../__tests__/messaging-archive-routes.test.ts | 86 ++++++++++++++++ .../src/routes/register-messaging-scripts.ts | 33 ++++++- 24 files changed, 635 insertions(+), 80 deletions(-) Fusion-Task-Id: FN-9014 Fusion-Task-Lineage: 1dbd02c3-1180-4d72-8cbc-9594e5f355dc Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
b6839f4f03 |
FN-9004: reconcile PostgreSQL project ownership defaults
Reconcile PostgreSQL project ownership defaults and schema declarations. - Add an idempotent migration restoring the GitHub check-state project default. - Align Drizzle project ownership defaults and composite keys with PostgreSQL. - Cover schema declarations and upgrade migration behavior. Files changed: .changeset/fn-9004-project-ownership-defaults.md | 7 + docs/storage.md | 1 + ...ema-ownership-declarations-remaining.pg.test.ts | 170 +++++++++++++++++++++ .../src/__tests__/postgres/schema-applier.test.ts | 9 +- ...04_project_ownership_default_reconciliation.sql | 13 ++ packages/core/src/postgres/schema-applier.ts | 13 +- packages/core/src/postgres/schema/project.ts | 47 ++++-- 7 files changed, 248 insertions(+), 12 deletions(-) Fusion-Task-Id: FN-9004 Fusion-Task-Lineage: 43bb14f6-01b7-42be-a47c-7da1128f465e Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
b1dad5c9be |
FN-9003: reconcile approval audit events with project schema
Align approval audit event declarations and reads with PostgreSQL project ownership. - Model composite project-scoped audit event identities in the schema - Scope public audit history reads and cover project isolation behavior - Document the storage contract and add a patch changeset Files changed: .changeset/fn-9003-approval-audit-project-scope.md | 7 + docs/storage.md | 2 +- ...oval-request-audit-project-isolation.pg.test.ts | 183 +++++++++++++++++++++ .../async-stores/async-approval-request-store.ts | 5 +- packages/core/src/postgres/schema/project.ts | 9 +- 5 files changed, 202 insertions(+), 4 deletions(-) Fusion-Task-Id: FN-9003 Fusion-Task-Lineage: 5a9caac3-7c2f-4584-8844-4ac711cc48bb Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
0ed0e53d56 |
FN-9002: model project-owned schema identities
Align project schema declarations with the existing ownership partition. - Model eight project-owned tables with project-leading identities and defaults. - Preserve composite foreign-key and project-scoped uniqueness metadata. - Add PostgreSQL declaration coverage and document deferred runtime predicates. Files changed: ...n-9002-project-schema-ownership-declarations.md | 7 + docs/storage.md | 1 + ...roject-schema-ownership-declarations.pg.test.ts | 245 +++++++++++++++++++++ .../core/src/async-stores/async-secrets-store.ts | 26 +-- packages/core/src/postgres/schema/project.ts | 44 +++- 5 files changed, 298 insertions(+), 25 deletions(-) Fusion-Task-Id: FN-9002 Fusion-Task-Lineage: b6f45d1c-d7d9-4a96-b86e-6d120df3f756 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
11334b1249 |
FN-8998: scope workflow definitions by project
Keep custom workflows isolated within their owning project. - Model workflows with a project-scoped composite key and scope definition mutations. - Preserve globally safe ID occupancy while isolating analytics name lookups. - Add PostgreSQL coverage and document the project partition contract. Files changed: .changeset/fn-8998-workflows-project-partition.md | 7 + docs/storage.md | 1 + .../workflows-project-isolation.pg.test.ts | 146 +++++++++++++++++++++ .../core/src/async-stores/async-workflow-store.ts | 19 ++- packages/core/src/board/workflow-analytics.ts | 7 +- packages/core/src/postgres/schema/project.ts | 17 ++- .../core/src/task-store/workflow-definitions.ts | 25 ++-- packages/core/src/task-store/workflow-ops.ts | 27 +++- 8 files changed, 224 insertions(+), 25 deletions(-) Fusion-Task-Id: FN-8998 Fusion-Task-Lineage: b6e8a100-de4d-4ff9-98df-4504d9050740 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
9c5176f55e |
FN-8997: enforce project ownership for project tables
Enforce project-scoped ownership for chat and workflow records. - Add project ownership columns, migration backfill, and schema validation. - Scope chat-room and workflow CRUD operations to the active project. - Add PostgreSQL regression coverage, storage documentation, and a release changeset. Files changed: .../fn-8997-project-ownership-declaration-drift.md | 7 ++ docs/storage.md | 1 + .../project-ownership-declaration-drift.pg.test.ts | 42 +++++++++ .../src/__tests__/postgres/schema-applier.test.ts | 9 +- packages/core/src/async-stores/async-chat-store.ts | 100 ++++++++++++--------- packages/core/src/chat/chat-store.ts | 38 ++++---- ...fn_8997_project_ownership_declaration_drift.sql | 17 ++++ packages/core/src/postgres/schema-applier.ts | 12 ++- packages/core/src/postgres/schema/project.ts | 43 +++++++-- packages/core/src/task-store/project-store-ops.ts | 7 +- .../core/src/task-store/workflow-definitions.ts | 4 +- packages/core/src/task-store/workflow-ops.ts | 13 +-- .../src/task-store/workflow-task-create-ops.ts | 2 +- 13 files changed, 210 insertions(+), 85 deletions(-) Fusion-Task-Id: FN-8997 Fusion-Task-Lineage: 01cd71b1-8f86-41e5-abdb-5ab00ff91c83 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
3b1c7881a8 |
FN-8988: partition agent ratings by project
Isolate PostgreSQL agent ratings within each project while preserving compatibility behavior. - Add migration 0055 to enforce the (project_id, id) rating identity key and repair drifted composite keys. - Scope rating CRUD operations to bound projects and document the storage contract. - Cover cross-project rating isolation and drifted-key migration repair. Files changed: .changeset/fn-8988-agent-ratings-project-partition.md | 7 ++ docs/storage.md | 1 + packages/core/src/__tests__/postgres/agent-ratings-project-isolation.pg.test.ts | 105 +++++++++++++++++++++ packages/core/src/__tests__/postgres/schema-applier.test.ts | 66 ++++++++++++- packages/core/src/agents/agent-store.ts | 18 +++- packages/core/src/async-stores/async-agent-store.ts | 11 ++- packages/core/src/postgres/migrations/0055_fn_8988_agent_ratings_project_partition.sql | 74 +++++++++++++++ packages/core/src/postgres/schema-applier.ts | 12 ++- packages/core/src/postgres/schema/project.ts | 5 + 9 files changed, 293 insertions(+), 6 deletions(-) Fusion-Task-Id: FN-8988 Fusion-Task-Lineage: 5d3e5e60-1589-4641-8695-1786f1c15c5d Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
25e292d0e6 |
FN-8954: preserve CLI liveness during startup
Ensure CLI startup operations settle before process exit on supported Node runtimes. - Keep awaited QMD probes and ephemeral port selection ref'd until completion. - Add CLI process regressions for init persistence and exit code 13. - Declare the Node 22.4 runtime floor and extend boot smoke coverage. Files changed: .changeset/fn-8954-cli-exit-13.md | 7 ++ docs/testing.md | 4 +- package.json | 3 + packages/cli/agent-browser.mjs | 6 ++ packages/cli/bin.mjs | 7 ++ packages/cli/package.json | 3 + packages/cli/src/__tests__/ci-workflow.test.ts | 9 +++ packages/cli/src/__tests__/cli-exit-code.test.ts | 82 ++++++++++++++++++++++ packages/cli/src/__tests__/package-config.test.ts | 12 ++++ packages/cli/src/bin.ts | 6 ++ .../__tests__/postgres/embedded-free-port.test.ts | 37 ++++++++++ packages/core/src/memory/memory-backend.ts | 17 +++-- packages/core/src/postgres/embedded-lifecycle.ts | 16 +++-- scripts/boot-smoke.mjs | 62 +++++++++++----- 14 files changed, 244 insertions(+), 27 deletions(-) Fusion-Task-Id: FN-8954 Fusion-Task-Lineage: 05303d07-2662-48d5-a442-6d43fa0a4493 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
41bb94ba77 |
FN-8957: isolate PostgreSQL agents by project
Keep durable PostgreSQL agent records and analytics isolated to their bound project. - Scope agent reads, mutations, satellite records, ratings, reassignment links, and analytics task data by project. - Add a project-local agent-ratings migration and schema coverage. - Exercise duplicate agent IDs, ratings, and token analytics across shared PostgreSQL projects. Files changed: .changeset/fn-8957-agent-project-isolation.md | 7 + docs/multi-project.md | 9 + .../postgres/agent-project-isolation.pg.test.ts | 207 +++++++++++++++++++++ .../src/__tests__/postgres/schema-applier.test.ts | 13 +- packages/core/src/agents/agent-store.ts | 52 +++--- .../core/src/async-stores/async-agent-store.ts | 118 ++++++++++-- packages/core/src/board/team-analytics.ts | 20 +- ...0054_fn_8957_agent_rating_project_isolation.sql | 32 ++++ packages/core/src/postgres/schema-applier.ts | 13 +- packages/core/src/postgres/schema/project.ts | 6 +- packages/core/src/task-store/task-artifacts-ops.ts | 19 +- 11 files changed, 443 insertions(+), 53 deletions(-) Fusion-Task-Id: FN-8957 Fusion-Task-Lineage: 02cb3f13-e5d1-4cea-8afb-72bcd9fae890 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> |
||
|
|
5573d042a9 |
FN-8922: add persistent memory recall store
Add PostgreSQL-backed recall records for durable project memory retrieval. - add recall record types, storage, search, deduplication, and prompt instructions - migrate project schemas and expose recall APIs from core memory modules - document plugin and storage contracts, with unit and PostgreSQL coverage Files changed: .changeset/fn-8922-memory-recall-store.md | 7 + docs/memory-plugin-contract.md | 10 + docs/storage.md | 4 + .../__tests__/memory-recall-dedup-search.test.ts | 10 + .../__tests__/memory-recall-instructions.test.ts | 62 +++++ .../postgres/memory-recall-store.pg.test.ts | 296 +++++++++++++++++++++ .../src/__tests__/postgres/schema-applier.test.ts | 15 +- packages/core/src/index.ts | 1 + packages/core/src/memory/index.ts | 1 + packages/core/src/memory/project-memory.ts | 33 ++- packages/core/src/memory/recall/index.ts | 10 + packages/core/src/memory/recall/recall-dedup.ts | 35 +++ .../core/src/memory/recall/recall-instructions.ts | 59 ++++ packages/core/src/memory/recall/recall-search.ts | 20 ++ packages/core/src/memory/recall/recall-store.ts | 51 ++++ packages/core/src/memory/recall/recall-types.ts | 14 + .../0052_fn_8922_memory_recall_records.sql | 17 ++ packages/core/src/postgres/schema-applier.ts | 13 +- packages/core/src/postgres/schema/project.ts | 10 +- 19 files changed, 648 insertions(+), 20 deletions(-) Fusion-Task-Id: FN-8922 Fusion-Task-Lineage: bb98f048-6fcf-46d9-bd1f-09294c2dc005 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> |
||
|
|
8a7ab1dedc |
FN-8911: allow direct database URLs for planning locks
Allow planning lifecycle locks to use non-pooled runtime PostgreSQL connections without a duplicate migration URL. - Select runtime-direct endpoints for direct DATABASE_URL connections and retain migration overrides for pooled endpoints. - Preserve lifecycle transport failures across triage retries and expose lock helpers through the core barrel. - Document the connection behavior and add resolver, advisory-lock, and triage regression coverage. Files changed: .../fn-8911-direct-database-url-planning-lock.md | 7 + docs/architecture.md | 2 +- docs/multi-project.md | 4 +- .../__tests__/postgres/backend-resolver.test.ts | 43 +++++- .../planning-lifecycle-advisory-lock.pg.test.ts | 28 +++- packages/core/src/index.ts | 2 + packages/core/src/postgres/advisory-locks.ts | 6 +- packages/core/src/postgres/backend-resolver.ts | 29 +++- packages/core/src/postgres/index.ts | 5 + ...ge-planning-lifecycle-transport-failure.test.ts | 159 +++++++++++++++++++++ packages/engine/src/triage.ts | 100 +++++++++++-- 11 files changed, 360 insertions(+), 25 deletions(-) Fusion-Task-Id: FN-8911 Fusion-Task-Lineage: ac2ec0d6-f409-40ba-a678-6dd7da7006dd Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
6bd178bdcf |
FN-8864: add durable agent activity stream
Add a persisted, project-scoped agent activity feed with query and live delivery surfaces. - Store sequenced, attributed activity events with privacy-safe metadata and retention. - Emit activity across agents, workflow execution, reviews, approvals, merges, and recovery. - Provide paginated API history and resilient SSE tailing with coverage and documentation. - Renumber the activity migration to 0049 after reconciling main’s 0048 GitHub check-state migration. Files changed: .changeset/fn-8864-agent-activity-events.md | 7 + docs/architecture.md | 8 + docs/diagnostics.md | 4 + docs/storage.md | 1 + .../__tests__/agent-activity-attribution.test.ts | 21 + .../agent-activity-metadata-hygiene.test.ts | 60 +++ .../src/__tests__/agent-activity-writers.test.ts | 94 +++++ .../postgres/agent-activity-events.pg.test.ts | 57 +++ .../src/__tests__/postgres/schema-applier.test.ts | 34 +- packages/core/src/agents/agent-store.ts | 24 ++ packages/core/src/agents/approval-request-store.ts | 15 +- packages/core/src/index.ts | 4 + .../0049_fn_8864_agent_activity_events.sql | 24 ++ packages/core/src/postgres/schema-applier.ts | 15 +- packages/core/src/postgres/schema/project.ts | 19 +- packages/core/src/store.ts | 17 + .../core/src/task-store/agent-activity-outbox.ts | 75 ++++ .../src/task-store/async/async-agent-activity.ts | 71 ++++ packages/core/src/types.ts | 2 + packages/core/src/types/agents/agents.ts | 79 ++++ packages/dashboard/app/api.ts | 54 +++ .../src/__tests__/agent-activity-route.test.ts | 68 ++++ .../src/__tests__/sse-agent-activity.test.ts | 315 +++++++++++++++ packages/dashboard/src/routes/README.md | 2 +- .../src/routes/register-setup-activity-routes.ts | 19 +- packages/dashboard/src/sse.ts | 139 ++++++- .../src/__tests__/agent-activity-writers.test.ts | 442 +++++++++++++++++++++ packages/engine/src/executor.ts | 110 ++++- packages/engine/src/merger.ts | 15 +- packages/engine/src/self-healing.ts | 35 +- 30 files changed, 1809 insertions(+), 21 deletions(-) Fusion-Task-Id: FN-8864 Fusion-Task-Lineage: 4938f35b-a0bc-4eb3-905c-178fed859cc6 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
c7c879905b |
FN-8903: add event-driven GitHub CI merge checks
Persist ingested GitHub CI signals and use them to assess merge readiness. - Store project-scoped GitHub check states with retention maintenance. - Resolve configured required checks from ingested signals during PR merge decisions. - Add delivery, lifecycle, persistence, and retention coverage with operator documentation. Files changed: .changeset/fn-8903-event-driven-checks.md | 7 ++ docs/architecture.md | 1 + docs/settings-reference.md | 2 +- docs/signals-connectors.md | 2 +- .../src/commands/__tests__/task-lifecycle.test.ts | 50 ++++++++- packages/cli/src/commands/task-lifecycle.ts | 7 +- .../core/src/__tests__/ingested-checks.test.ts | 66 +++++++++++ .../postgres/github-check-states.pg.test.ts | 71 ++++++++++++ packages/core/src/config/index.ts | 1 + packages/core/src/config/ingested-checks.ts | 32 ++++++ packages/core/src/index.ts | 10 ++ .../0048_fn_8903_github_check_states.sql | 32 ++++++ packages/core/src/postgres/schema-applier.ts | 15 ++- packages/core/src/postgres/schema/project.ts | 29 ++++- .../core/src/task-store/async/async-ci-checks.ts | 104 ++++++++++++++++++ packages/core/src/task-store/async/index.ts | 1 + packages/core/src/types.ts | 2 + packages/dashboard/src/__tests__/github.test.ts | 121 ++++++++++++++++++++- .../src/__tests__/register-signal-routes.test.ts | 81 +++++++++++++- packages/dashboard/src/github.ts | 74 +++++++++---- .../dashboard/src/routes/register-git-github.ts | 29 +++-- .../dashboard/src/routes/register-signal-routes.ts | 10 +- .../src/routes/register-task-workflow-routes.ts | 14 ++- packages/dashboard/src/signal-source.ts | 23 ++++ packages/dashboard/src/signal-sources/github.ts | 2 + .../self-healing-github-check-retention.test.ts | 121 +++++++++++++++++++++ packages/engine/src/self-healing.ts | 23 ++++ 27 files changed, 878 insertions(+), 52 deletions(-) Fusion-Task-Id: FN-8903 Fusion-Task-Lineage: b2643587-c568-4b6c-8b3a-d50a6165963d Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
d450dbe971 |
FN-8829: add task recommendations
Add persistent task recommendations that agents can create, resolve, and display in task details. - Persist recommendation state and expose task recommendation API routes. - Generate recommendations from executor task completions with duplicate suppression. - Add localized dashboard recommendation tab and settings control with coverage. Files changed: .changeset/fn-8829-recommendations.md | 7 + docs/dashboard-guide.md | 1 + docs/settings-reference.md | 1 + .../postgres/settings-persistence.pg.test.ts | 10 + .../postgres/task-recommendations.pg.test.ts | 191 +++++++++ .../core/src/__tests__/settings-parity.test.ts | 2 + packages/core/src/config/settings-schema.ts | 2 + packages/core/src/index.ts | 2 +- .../0047_fn_8829_task_recommendations.sql | 3 + packages/core/src/postgres/schema-applier.ts | 32 +- packages/core/src/postgres/schema/project.ts | 2 + packages/core/src/store.ts | 12 +- packages/core/src/task-store/persistence.ts | 4 +- packages/core/src/task-store/serialization.ts | 1 + packages/core/src/task-store/settings-ops.ts | 22 + packages/core/src/task-store/task-mutation-ops.ts | 78 +++- packages/core/src/task-store/task-row-mappers.ts | 2 +- packages/core/src/task-store/task-update.ts | 51 ++- packages/core/src/types.ts | 4 + packages/core/src/types/settings/settings-scope.ts | 6 + packages/core/src/types/task/task-core.ts | 18 + .../__tests__/App.openTasksInRightSidebar.test.ts | 3 +- packages/dashboard/app/__tests__/api-tasks.test.ts | 31 ++ packages/dashboard/app/api/legacy.ts | 1 + packages/dashboard/app/api/tasks/tasks.ts | 24 ++ .../dashboard/app/components/TaskDetailModal.tsx | 43 +- .../app/components/TaskRecommendationsTab.css | 71 ++++ .../app/components/TaskRecommendationsTab.tsx | 127 ++++++ .../__tests__/SettingsModal.general.test.tsx | 11 + .../TaskDetailModal.recommendations.test.tsx | 111 +++++ .../app/components/settings/section-keys.ts | 1 + .../settings/sections/GeneralSection.tsx | 14 + .../settings-default-descriptions.test.tsx | 1 + packages/dashboard/app/hooks/useModalManager.ts | 6 + packages/dashboard/app/plugins/types.ts | 7 +- .../__tests__/task-recommendation-routes.test.ts | 472 +++++++++++++++++++++ .../src/routes/register-task-workflow-routes.ts | 263 +++++++++++- .../executor-task-recommendations.test.ts | 128 ++++++ packages/engine/src/executor.ts | 66 ++- packages/i18n/locales/en/app.json | 15 +- packages/i18n/locales/es/app.json | 16 +- packages/i18n/locales/fr/app.json | 16 +- packages/i18n/locales/ko/app.json | 16 +- packages/i18n/locales/zh-CN/app.json | 16 +- packages/i18n/locales/zh-TW/app.json | 16 +- packages/i18n/src/resources.d.ts | 12 + 46 files changed, 1908 insertions(+), 30 deletions(-) Fusion-Task-Id: FN-8829 Fusion-Task-Lineage: 5f60a1fb-9cf8-4577-9bfd-c20a2d402333 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
eaadd153b1 |
FN-8764: route workflow stages through durable role agents
Route workflow stages through task-scoped durable role agents. - Persist normalized multi-role agents and workflow principal fences with migrations. - Route planning, execution, review, and merge workflow nodes through authorized permanent principals with capacity leasing and recovery. - Retire ephemeral workflow-stage workers and expose role-aware agent configuration, workflow editing, and documentation. - Preserve lifecycle-column ratchet coverage by centralizing workflow-role classification rather than adding test exemptions. Files changed: .changeset/fn-8764-workflow-role-agents.md | 7 + CONCEPTS.md | 3 + docs/agents.md | 6 + docs/architecture.md | 6 + docs/cli-reference.md | 2 + docs/dashboard-guide.md | 4 + docs/settings-reference.md | 6 +- docs/storage.md | 2 + docs/workflow-steps.md | 6 + .../src/__tests__/extension-agent-update.test.ts | 11 +- packages/cli/src/__tests__/extension.test.ts | 18 +- packages/cli/src/extension.ts | 41 +- .../core/src/__tests__/agent-permissions.test.ts | 12 + .../core/src/__tests__/agent-role-policy.test.ts | 7 + packages/core/src/__tests__/agent-roles.test.ts | 21 + .../legacy-column-collection-gating-ledger.test.ts | 19 +- .../src/__tests__/postgres/schema-applier.test.ts | 16 +- .../core/src/__tests__/settings-parity.test.ts | 9 +- .../workflow-agent-node-classification.test.ts | 25 + .../src/__tests__/workflow-work-item-cas.test.ts | 38 ++ packages/core/src/agents/agent-permissions.ts | 11 +- packages/core/src/agents/agent-role-policy.ts | 39 +- packages/core/src/agents/agent-store.ts | 190 ++++++- .../core/src/async-stores/async-agent-store.ts | 6 + packages/core/src/config/settings-schema.ts | 5 +- packages/core/src/index.gate.ts | 2 +- packages/core/src/index.ts | 7 +- .../0045_fn_8764_multi_role_workflow_agents.sql | 20 + .../0046_fn_8764_workflow_principal_fence.sql | 49 ++ packages/core/src/postgres/schema-applier.ts | 22 +- packages/core/src/postgres/schema/project.ts | 21 + packages/core/src/store.ts | 2 +- .../task-store/async/async-workflow-workitems.ts | 49 +- packages/core/src/task-store/row-types.ts | 4 + packages/core/src/task-store/settings-helpers.ts | 16 +- packages/core/src/task-store/settings-ops-2.ts | 13 +- packages/core/src/task-store/settings-ops.ts | 16 +- packages/core/src/task-store/task-row-mappers.ts | 4 + .../src/task-store/workflow-task-create-ops.ts | 6 +- .../src/task-store/workflow-workitems-ops-2.ts | 25 +- packages/core/src/types.ts | 2 + packages/core/src/types/agents/agents.ts | 45 +- packages/core/src/types/merge/merge-queue.ts | 17 + packages/core/src/types/settings/settings-scope.ts | 9 +- packages/core/src/workflows/workflow-ir-types.ts | 58 +++ packages/core/src/workflows/workflow-ir.ts | 19 + .../dashboard/app/components/AgentDetailView.css | 14 + .../dashboard/app/components/AgentDetailView.tsx | 34 +- .../dashboard/app/components/NewAgentDialog.tsx | 28 +- .../app/components/WorkflowNodeEditor.tsx | 19 + .../__tests__/AgentDetailView.core.test.tsx | 4 +- .../app/components/__tests__/AgentsView.test.tsx | 2 +- .../__tests__/SettingsModal.general.test.tsx | 86 --- .../__tests__/SettingsModal.test-harness.tsx | 1 - .../components/agent-presets/agentCreatePayload.ts | 9 +- .../app/components/settings/section-keys.ts | 1 - .../settings/sections/GeneralSection.tsx | 8 - .../settings-default-descriptions.test.tsx | 1 - .../app/components/workflow-flow-mapping.ts | 7 + packages/dashboard/src/mission-routes.ts | 26 +- .../src/routes/__tests__/agent-core-routes.test.ts | 23 +- .../src/routes/register-agent-core-routes.ts | 42 +- ...gister-agent-import-export-generation-routes.ts | 21 - .../engine/src/__tests__/agent-action-gate.test.ts | 33 ++ .../engine/src/__tests__/agent-assignment.test.ts | 370 ------------- .../src/__tests__/ephemeral-worker-manager.test.ts | 575 --------------------- ...ecutor-ephemeral-disabled-dispatch-gate.test.ts | 223 -------- .../__tests__/executor-fast-mode-workflows.test.ts | 58 +++ .../engine/src/__tests__/log-severity-manifest.ts | 1 - .../__tests__/log-severity-spam-contract.test.ts | 3 - .../resolved-read-with-literal-filter.test.ts | 4 - .../__tests__/scheduler-ephemeral-toggle.test.ts | 175 ------- .../__tests__/scheduler-workflow-cutover.test.ts | 19 - .../src/__tests__/workflow-agent-capacity.test.ts | 47 ++ .../src/__tests__/workflow-agent-routing.test.ts | 137 +++++ .../src/__tests__/workflow-graph-foreach.test.ts | 15 + .../__tests__/workflow-graph-task-runner.test.ts | 73 +++ .../src/__tests__/workflow-task-runtime.test.ts | 95 ++++ .../src/__tests__/workflow-work-scheduler.test.ts | 20 + packages/engine/src/agents/agent-action-gate.ts | 64 +++ packages/engine/src/agents/agent-assignment.ts | 135 ----- packages/engine/src/agents/agent-reflection.ts | 1 + .../engine/src/agents/ephemeral-worker-manager.ts | 429 --------------- .../engine/src/agents/workflow-agent-capacity.ts | 113 ++++ .../engine/src/agents/workflow-agent-router.ts | 185 +++++++ packages/engine/src/execution/reviewer.ts | 26 +- packages/engine/src/executor.ts | 501 +++++++++++++++--- packages/engine/src/index.ts | 1 - packages/engine/src/merger.ts | 20 +- packages/engine/src/pi.ts | 11 + packages/engine/src/runtimes/in-process-runtime.ts | 37 -- packages/engine/src/scheduler.ts | 114 +--- packages/engine/src/triage.ts | 196 ++++++- .../src/workflows/workflow-graph-executor.ts | 109 +++- .../engine/src/workflows/workflow-graph-loop.ts | 13 +- .../src/workflows/workflow-graph-task-runner.ts | 12 + .../engine/src/workflows/workflow-task-runtime.ts | 125 ++++- .../src/workflows/workflow-work-scheduler.ts | 8 +- 98 files changed, 2722 insertions(+), 2468 deletions(-) Fusion-Task-Id: FN-8764 Fusion-Task-Lineage: 5527fccb-342d-46f6-8108-bbf89142efec Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
b9c5df04af |
FN-8791: prevent NUL-containing chat checkpoints from crashing
Prevent malformed tool output from breaking chat checkpoint persistence. - Sanitize NUL characters at chat JSONB persistence boundaries without mutating clean values. - Observe rejected best-effort checkpoint writes so streaming sessions do not emit unhandled rejections. - Add PostgreSQL, dashboard, and sanitizer regression coverage with operator-facing release notes. Files changed: .changeset/fn-8791-chat-nul-checkpoint.md | 7 ++ .../reliability/chat-jsonb-nul-sanitization.md | 44 +++++++++++ packages/core/src/__tests__/nul-sanitize.test.ts | 21 ++++- .../chat-store-content-search-edit.pg.test.ts | 91 +++++++++++++++++++++- packages/core/src/async-stores/async-chat-store.ts | 61 ++++++++++----- packages/core/src/postgres/nul-sanitize.ts | 17 ++-- .../dashboard/src/__tests__/chat-manager.test.ts | 90 +++++++++++++++++++++ packages/dashboard/src/chat.ts | 21 ++++- 8 files changed, 322 insertions(+), 30 deletions(-) Fusion-Task-Id: FN-8791 Fusion-Task-Lineage: 51e13634-04cc-4827-b72f-f33e40760940 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
1dc636b8b4 |
FN-8785: deduplicate queued dependency and scope logs
Persist queue episodes atomically so repeated scheduler and self-healing passes do not duplicate diagnostics. - Add a queued-episode signature with PostgreSQL migration and task serialization support. - Route dependency and file-scope queue transitions through the atomic deduplication API. - Cover repeated and concurrent queue transitions, and update scheduler mocks for the new store API. Files changed: .changeset/fn-8785-queued-log-deduplication.md | 7 + docs/architecture.md | 1 + .../postgres/queued-episode-transition.pg.test.ts | 158 +++++++++++++++++++++ .../src/__tests__/postgres/schema-applier.test.ts | 9 +- .../core/src/postgres/migrations/0000_initial.sql | 1 + .../0044_fn_8785_queued_episode_signature.sql | 3 + packages/core/src/postgres/schema-applier.ts | 12 +- packages/core/src/postgres/schema/project.ts | 1 + packages/core/src/store.ts | 5 +- packages/core/src/task-store/audit-ops.ts | 80 +++++++++++ packages/core/src/task-store/persistence.ts | 2 + packages/core/src/task-store/serialization.ts | 1 + packages/core/src/types/task/task-core.ts | 5 + ...executor-outer-dispatch-dependency-gate.test.ts | 39 +++-- .../engine/src/__tests__/executor-test-helpers.ts | 7 + .../__tests__/scheduler-overlap-starvation.test.ts | 43 +++++- .../__tests__/scheduler-workflow-cutover.test.ts | 35 +++-- .../self-healing-completion-fanout.test.ts | 37 +++++ packages/engine/src/__tests__/self-healing.test.ts | 25 +++- packages/engine/src/executor.ts | 16 ++- packages/engine/src/scheduler.ts | 26 ++-- packages/engine/src/self-healing.ts | 117 +++++---------- 22 files changed, 491 insertions(+), 139 deletions(-) Fusion-Task-Id: FN-8785 Fusion-Task-Lineage: 8d68c243-f24e-4db4-bd1d-b7eda01309f6 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
9939897aab |
fix: prevent stale planning approvals and review churn (#3327)
## Summary Planning can no longer approve or execute against evidence from a superseded dependency episode. Dependency mutations, approval decisions, recovery, and execution admission now share serialized lifecycle rules, so stale planner work cannot restore an invalid approval or release an unplanned task. Review also converges instead of discovering one blocker per round. Planning performs a repository-grounded completeness pass up front; Plan Review batches all independently discoverable blockers and carries an episode-scoped decision ledger across revisions; code review traces changed invariants through production consumers and tests. Repeated feedback still advances the safety budget, while provider failures and superseded episodes stay outside the remediation ledger. The dashboard now exposes manual approval only for the intended exhausted-review state, and refusal/recovery audit events make rejected lifecycle transitions diagnosable without leaking prompt content. ## Validation - `pnpm verify:fast` — scoped typechecks/builds, CLI build, and boot smoke passed. - Focused Core and Engine regression suites — 511 tests passed. - `pnpm lint`, strict changeset validation, Core/Engine typechecks, and package builds passed. Fixes #3325. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Improved Plan Review approvals, rejections, and replan-cap handling across task workflows. * Added cumulative feedback and attempt tracking across repeated planning reviews. * Added safer recovery for stalled planning handoffs and interrupted approval updates. * **Bug Fixes** * Prevented stale approvals and unplanned execution after dependency changes. * Improved concurrent approval handling, retryability, and refusal-record deduplication. * Refined dashboard approval indicators and responsive approval views. * **Quality Improvements** * Strengthened planning and code-review completeness checks and blocking-finding coverage. * Preserved review history while clearly marking outdated approvals. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
bb17baaacf |
FN-8768: recover planning handoffs after dependency reseeds
Prevent dependency reseeds from leaving completed planning work without a dispatchable continuation. - Serialize dependency invalidation with workflow claims and retire only pending continuations. - Persist dispatch-deduplication state and recover legacy reseeded planning handoffs safely. - Add PostgreSQL migration, integration coverage, architecture guidance, and a patch changeset. Files changed: .changeset/fn-8768-planning-reseed.md | 7 ++ docs/architecture.md | 10 +- .../core/src/__test-utils__/pg-test-harness.ts | 8 ++ .../__tests__/postgres/backend-resolver.test.ts | 5 + .../src/__tests__/postgres/schema-applier.test.ts | 17 ++- .../postgres/task-dependency-mutation.pg.test.ts | 42 ++++++- .../__tests__/task-update-lanes-resolved.test.ts | 20 +++- packages/core/src/postgres/advisory-locks.ts | 122 +++++++++++++++++++++ packages/core/src/postgres/backend-resolver.ts | 13 ++- packages/core/src/postgres/data-layer.ts | 4 + packages/core/src/postgres/embedded-lifecycle.ts | 6 + .../migrations/0043_fn8768_dispatch_dedupe.sql | 17 +++ packages/core/src/postgres/schema-applier.ts | 13 ++- packages/core/src/postgres/schema/project.ts | 15 +++ packages/core/src/store.ts | 56 +++++++++- packages/core/src/task-store/audit-ops.ts | 49 +++++++++ .../core/src/task-store/branch-and-pr-entities.ts | 30 +++++ packages/core/src/task-store/project-store-ops.ts | 55 ++++++++-- packages/core/src/task-store/task-update.ts | 30 ++++- packages/core/src/task-store/update-task-deps.ts | 30 ++++- packages/engine/src/__tests__/triage.test.ts | 66 ++++++++++- packages/engine/src/execution/hold-release.ts | 45 ++++++++ packages/engine/src/scheduler.ts | 3 +- packages/engine/src/triage.ts | 87 ++++++++++++++- 24 files changed, 713 insertions(+), 37 deletions(-) Fusion-Task-Id: FN-8768 Fusion-Task-Lineage: 539ef649-5a13-4eaa-a695-bc68370fed22 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
cb57093d03 |
refactor: domain folder layout (types, API, core, engine) (#2398)
## Summary Wave 17 organizes Fusion into **domain folders** (stacks on #2397). ### Layout - **core/types/** — board, task, agents, settings, merge, workflow, mesh, … - **core/src/** — agents, ai, async-stores, workflows, tasks, config, db, … - **dashboard/app/api/** — client, tasks, agents, git, missions, planning, … - **engine/src/** — agents, auth, execution, merge, missions, overseer, worktree, … Root keepers retained for large entrypoints (`store.ts`, `executor.ts`, `merger.ts`, …). Public barrels (`@fusion/core`, `@fusion/engine`, `app/api.ts` → legacy) stay stable. ## Test plan - [x] `@fusion/core` typecheck - [x] `@fusion/engine` typecheck (pre-existing playwright-core noise only) - [ ] CI merge gate **Stack:** #2394 → #2397 → **this PR** |
||
|
|
73fe461db5 |
fix: demote routine engine log noise to debug
Keep the default TUI for lifecycle transitions (Starting/Specifying/Worktree created/merge/move). Demote expected skips, schedule-trigger echoes, session setup bookkeeping, warm worktree reuse, and fn_run_verification command-fail detail. Pin via severity manifest and contract tests. |
||
|
|
39368f4bb8 |
FN-8694: add content-addressed validation memoization
Memoizes mission validation inputs and bounds repeat failures. - Persist validator input fingerprints and atomically admit validation runs. - Reuse unchanged static passes while enforcing per-fingerprint failure budgets. - Add migration coverage, execution-loop tests, and operator documentation. Files changed: .changeset/fn-8694-validation-memoization.md | 7 + docs/missions.md | 6 + docs/storage.md | 6 + .../__tests__/postgres/mission-store.pg.test.ts | 40 +++- packages/core/src/async-mission-store-queries.ts | 24 ++- packages/core/src/async-mission-store.ts | 65 +++++- packages/core/src/mission-store.ts | 10 +- packages/core/src/mission-types.ts | 19 ++ .../0042_fn_8694_validator_input_fingerprint.sql | 9 + packages/core/src/postgres/schema-applier.ts | 13 +- packages/core/src/postgres/schema/project.ts | 5 + .../src/__tests__/mission-execution-loop.test.ts | 72 ++++++- packages/engine/src/mission-execution-loop.ts | 217 +++++++++++++++++---- 13 files changed, 443 insertions(+), 50 deletions(-) Fusion-Task-Id: FN-8694 Fusion-Task-Lineage: 92a790d5-f2fc-4e71-b9ee-8334ff38b20d Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
006cc40454 |
FN-8685: add durable cross-process task deletion consumers
Deliver durable, replay-safe cross-process task deletion observation. - Add PostgreSQL lifecycle consumer cursors, leases, acknowledgements, retention, and recovery. - Start named consumers in dashboard, serve, and engine runtime paths. - Preserve delete integration metadata while suppressing replayed GitHub and GitLab side effects. - Cover outbox identity, observed delivery, fencing, and reconciliation behavior. Files changed: ...fn-8685-cross-process-task-deleted-observers.md | 7 + .../fn-8685-task-deleted-outbox-consumers.md | 7 + docs/architecture.md | 8 +- ...tgres-cross-process-task-deleted-observation.md | 8 +- docs/storage.md | 10 +- packages/cli/src/commands/dashboard.ts | 9 +- packages/cli/src/commands/serve.ts | 9 +- packages/cli/src/project-context.ts | 9 +- .../task-deleted-outbox-consumer.pg.test.ts | 157 ++++++++ ...-deleted-observed-dispatch-side-effects.test.ts | 36 ++ .../task-lifecycle-consumer-identity.test.ts | 22 ++ packages/core/src/index.ts | 11 + .../0041_fn_8685_task_lifecycle_consumers.sql | 88 +++++ packages/core/src/postgres/schema-applier.ts | 16 +- packages/core/src/postgres/schema/project.ts | 45 +++ packages/core/src/postgres/startup-factory.ts | 4 + packages/core/src/store.ts | 54 ++- .../__tests__/lifecycle-outbox-writer.test.ts | 4 +- .../core/src/task-store/archive-lifecycle-2.ts | 1 + packages/core/src/task-store/lifecycle-ops.ts | 13 +- packages/core/src/task-store/lifecycle-outbox.ts | 2 + packages/core/src/task-store/project-store-ops.ts | 4 +- .../src/task-store/task-deleted-outbox-consumer.ts | 333 +++++++++++++++++ .../task-store/task-lifecycle-consumer-identity.ts | 32 ++ .../task-store/task-lifecycle-consumer-registry.ts | 396 +++++++++++++++++++++ .../task-store/task-lifecycle-event-retention.ts | 104 ++++++ packages/core/src/task-store/task-mutation-ops.ts | 1 + packages/dashboard/src/github-tracking-state.ts | 12 +- packages/dashboard/src/gitlab-delete-close.ts | 3 + packages/dashboard/src/gitlab-split-close.ts | 7 +- packages/dashboard/src/project-store-resolver.ts | 9 +- packages/engine/src/project-manager.ts | 4 +- packages/engine/src/project-runtime.ts | 2 +- packages/engine/src/runtimes/in-process-runtime.ts | 17 +- packages/engine/src/self-healing.ts | 27 ++ 35 files changed, 1439 insertions(+), 32 deletions(-) Fusion-Task-Id: FN-8685 Fusion-Task-Lineage: 63eca9ac-d2af-44b0-ba79-388a950148d3 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
8c9346ee94 |
FN-8684: persist task deletion events transactionally
Persist task-deletion lifecycle events through a transactional PostgreSQL outbox. - Add the task lifecycle outbox schema, migration, and atomic writer. - Route deletion notice persistence through the transaction and preserve non-blocking cleanup. - Cover outbox behavior, schema installation, and caller attribution with tests. Files changed: .changeset/fn-8684-task-deleted-outbox-writer.md | 7 + docs/architecture.md | 6 + docs/storage.md | 6 + .../src/__tests__/postgres/schema-applier.test.ts | 82 ++++++++- .../task-delete-caller-attribution.test.ts | 12 +- .../task-delete-nonblocking-cleanup.test.ts | 13 +- .../core/src/__tests__/task-delete-notice.test.ts | 7 +- .../0040_fn_8684_task_lifecycle_outbox.sql | 44 +++++ packages/core/src/postgres/schema-applier.ts | 15 +- packages/core/src/postgres/schema/project.ts | 27 +++ .../__tests__/lifecycle-outbox-writer.test.ts | 201 +++++++++++++++++++++ .../core/src/task-store/archive-lifecycle-2.ts | 93 ++++++++-- packages/core/src/task-store/async-persistence.ts | 26 ++- packages/core/src/task-store/lifecycle-outbox.ts | 46 +++++ 14 files changed, 557 insertions(+), 28 deletions(-) Fusion-Task-Id: FN-8684 Fusion-Task-Lineage: 1869d221-2d8a-48fb-b245-9cd1af56bda0 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
7334cffebd |
FN-8660: add credential instance selection persistence
Persist optional credential-instance selections across model configuration without changing runtime credential behavior. - Add credential instance IDs to global, project, task, preset, and workflow IR model lanes. - Preserve selected instance IDs through model resolution and task persistence. - Add PostgreSQL migration coverage, unit tests, documentation, and a minor changeset. Files changed: .../fn-8660-credential-instance-selection.md | 7 ++ docs/settings-reference.md | 17 +++++ .../core/src/__tests__/model-resolution.test.ts | 37 ++++++++++ .../credential-instance-selection.pg.test.ts | 81 +++++++++++++++++++++ .../postgres/settings-persistence.pg.test.ts | 83 ++++++++++++++++++++++ .../src/__tests__/workflow-ir-settings.test.ts | 66 +++++++++++++++++ packages/core/src/builtin-workflow-settings.ts | 41 +++++++++++ packages/core/src/model-resolution.ts | 57 ++++++++++++++- .../0039_fn_8660_credential_instance_selection.sql | 9 +++ packages/core/src/postgres/schema-applier.ts | 14 +++- packages/core/src/postgres/schema/project.ts | 4 ++ packages/core/src/settings-schema.ts | 25 +++++++ packages/core/src/store.ts | 2 +- .../core/src/task-store/archive-lifecycle-2.ts | 8 +++ .../core/src/task-store/branch-and-pr-entities.ts | 2 +- packages/core/src/task-store/persistence.ts | 8 +++ packages/core/src/task-store/serialization.ts | 6 ++ packages/core/src/task-store/settings-ops.ts | 30 ++++++++ packages/core/src/task-store/task-creation.ts | 18 ++++- packages/core/src/task-store/task-mutation-ops.ts | 6 +- packages/core/src/task-store/task-row-mappers.ts | 6 +- packages/core/src/task-store/task-update.ts | 24 +++++++ packages/core/src/types/archive-planning.ts | 5 ++ packages/core/src/types/settings-scope.ts | 40 +++++++++++ packages/core/src/types/task-core.ts | 30 ++++++++ packages/core/src/types/workflow-steps.ts | 9 +++ packages/core/src/workflow-ir.ts | 18 +++++ packages/core/src/workflow-settings.ts | 10 +++ 28 files changed, 650 insertions(+), 13 deletions(-) Fusion-Task-Id: FN-8660 Fusion-Task-Lineage: a3f625eb-018c-4084-954e-488b1d37691e Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
577dcb6c0c |
FN-8643: correct TaskWedgeNotifications FNXC timestamp
Correct the TaskWedgeNotifications migration-baseline stamp and remove its obsolete future-date allowance. - Set the baseline FNXC annotation to its intended non-future timestamp. - Remove the resolved migration from the future-date baseline allowlist. Files changed: packages/core/src/postgres/migrations/0000_initial.sql | 2 +- scripts/lib/fnxc-future-dates-baseline.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) Fusion-Task-Id: FN-8643 Fusion-Task-Lineage: 0f27e9e6-0581-4e38-8005-e93f94ad4f78 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
fd795883c5 |
feat(missions): per-mission taskPrefix override for triaged task ids (#2347)
## Summary Maintainer re-land of [#2334](https://github.com/Runfusion/Fusion/pull/2334) (fork `flexi767:feat/per-mission-task-prefix`) after resolving merge conflicts with current `main`. Fork push was unavailable despite `maintainerCanModify`, so this branch carries the conflict resolution. ### Feature - Optional per-mission `taskPrefix` for triaged task ids (inherits project prefix when unset) - Dashboard MissionManager + routes + store/triage plumbing - Postgres migration for `project.missions.task_prefix` ### Conflict resolution - Main claimed migration **0026** (bigint counters) and **0027** (workflow IR pin) - Mission task-prefix migration renumbered **0026 → 0028** - Baseline `0000_initial.sql` includes `task_prefix` on missions - `legacy.ts` keeps code-org re-exports; `missions.ts` carries `taskPrefix` on create/update types ## Test plan - [ ] CI green (lint/typecheck/build/gate) - [ ] Create mission with custom prefix; triage feature → task ids use that prefix - [ ] Clear mission prefix via PATCH null; new tasks inherit project prefix Closes / supersedes #2334 once this lands (or re-point the fork PR). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Missions can now set an optional per-mission task ID prefix (overriding the project default). * Added task prefix support to mission create/edit UI and dashboard APIs, including normalized uppercase values and validation. * **Bug Fixes** * Improved commit hook generation for custom prefixes and special characters, with safer shell handling to prevent unsafe interpretation. * **Chores** * Added PostgreSQL migration and schema-applier support to persist and propagate mission task prefixes, including upgrade/backfill coverage. * **Tests** * Added backend and UI/API test coverage for task-prefix creation, clearing, and ID minting behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
dc50425e98 |
docs: correct 104 future-dated FNXC timestamps across 61 files (#2680)
## What The FNXC convention exists so a reader can place a note against the change that motivated it. A stamp dated *after* the edit landed defeats exactly that. This is program-wide drift, not one author's slip — I contributed to it in my own commits this week, which is how I noticed it. ## Measured, on this tree **104 stamps across 61 files** dated later than the day they were written, from one day ahead to **2026-10-19 (81 days)**: | count | date | count | date | count | date | |---|---|---|---|---|---| | 50 | 2026-07-31 | 6 | 2026-08-05 | 3 | 2026-08-13 | | 17 | 2026-08-01 | 1 | 2026-08-07 | 1 | 2026-08-19 | | 7 | 2026-08-02 | 1 | 2026-08-12 | 2 | 2026-08-26 | | 11 | 2026-08-03 | | | 3 | 2026-10-19 | An earlier number I circulated was ~70. That came from a narrower pathspec and was wrong; **104** is the measurement. ## How Each stamp is rewritten to the date of the commit that introduced **that line**, via per-line `git blame` — deliberately *not* stamped uniformly with today's date. A uniform stamp swaps a wrong date for a different wrong date and flattens the ordering that makes these comments navigable; blame preserves it. Times of day are untouched, and a blame date in the future is clamped rather than trusted. ## Why the verification is listed A docs sweep across 61 files is precisely where a stray edit hides, so the safety claims are mechanical rather than asserted: - every changed line begins with a comment marker — **no code touched**; - **no test asserts an FNXC date later than today**, so no `toContain` assertion on embedded source text can be silently invalidated (several such assertions do exist); - CSS files, which carry several of those assertions, are outside the pathspec. ## Verified lint clean · merge gate green (487 + 158 + 10 + 71) · `census --strict` exit 0 · tsc clean for core, engine, and dashboard (`tsconfig.app.json`). **No behavior change.** Comment text only. ## Not done here A guard preventing recurrence. A check that rejects an FNXC stamp dated after the commit would stop this returning, but it needs a decision about where it runs (lint rule vs. gate) and it is a behavior change to CI — it does not belong riding inside the sweep it would police. |
||
|
|
a54d60ee70 |
fix(core): restore standalone central backend initialization (#2596)
## Summary - restore the owned PostgreSQL backend bootstrap for layer-less `CentralCore.init()` callers - fix node, mesh, and project CLI commands returning empty state and logging `backendHandle is only available in backend mode` during cleanup - add a hermetic regression test for standalone backend ownership and shutdown PR #2454 accidentally added an unconditional early return immediately before the existing standalone bootstrap. Runtime pool sharing remains unchanged: `attachBackendLayer()` releases the central-only connections before adopting the project store layer. ## Verification - RED: regression failed because `createCentralBackendLayer` had zero calls - GREEN: focused regression passes - `pnpm --filter @fusion/core typecheck` - `pnpm --filter @fusion/core build` - `pnpm test` with `FUSION_PG_TEST_SKIP=1`: 482 engine + 132 Core gate + 71 CLI shape + changed regression passed; isolation clean - changeset format check passed The local PostgreSQL merge-gate harness is unavailable without credentials (`empty password returned by client`), so its 10 tests were explicitly skipped rather than misreported. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Restored PostgreSQL central registry access for standalone Node/mesh/project CLI commands without marking the host offline on shutdown. * Improved CentralCore lifecycle handling: concurrent `init()` coalesces, and operations are blocked once `close()` is requested/in progress. * Refined embedded PostgreSQL runtime shutdown: owner stop is coordinated with lease release, registrations are rejected while stopping, and shutdown/teardown uses lease lifecycle consistently. Embedded start failures now treat stopping as retryable. * **Tests** * Expanded coverage for CentralCore close/init/attach races and embedded PostgreSQL lease/shutdown coordination scenarios. * **Documentation** * Updated Changeset notes to clarify CLI and shutdown semantics. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
969c2cdf1d |
capacity part 4: drop the central global_concurrency table (migration 0037) (#2555)
Final piece of the cross-project cap removal. Enforcement (#2509), settings/API/UI (#2529) are merged; this removes the storage. Nothing read the table. `global_max_concurrent` held the deleted machine-wide cap; `currently_active`/`queued_count` were written only by `acquireGlobalSlot`/`releaseGlobalSlot`, measured earlier in this program to have **no production caller**, so those counters were fiction. Live “N running (all projects)” telemetry comes from `CentralCore.getLiveRunningAgentCounts` and is unaffected. Dropped rather than left unread: a lingering table with plausible-looking counters invites a future reader to trust it — the same trap as a readable-but-ignored settings key. ## The trap this hit, because the first attempt looked correct `schema-applier.ts` warns that *“migrations are registered here explicitly (not auto-discovered from the migrations dir), so a new .sql file that is not wired through a version constant + bookkeeping check silently never runs.”* My first pass added the `.sql`, updated the drizzle model and bumped the baseline — **and the table was still present in a fresh database**. It was caught only because the test asserts the table is *gone* (`to_regclass(...) IS NULL`) rather than merely unreferenced; an absence-of-reference assertion would have passed while the table survived. Now registered properly: `DROP_GLOBAL_CONCURRENCY_VERSION = "0037"`, explicit path constant, applied-check, bookkeeping insert. The historical `0000` baseline is deliberately **not** rewritten — a fresh database CREATEs the table then drops it, converging with upgraded databases without editing history, which is how every prior migration here behaves. Also removed: the drizzle model, the `centralTableNames` entry, and the `replacesCentralSeed` special case in the SQLite migrator (a legacy SQLite `globalConcurrency` table now has no destination and is simply not migrated — correct, since its cap is deleted and its counters were never written). ## Verification `pnpm lint` clean · core `tsc` clean · `pnpm test:gate` green (414 + 10 + 71) · `schema-applier` 75/75 · `sqlite-migrator` 43/43 · full core PG suite **1044 passed / 3 failed** — the same 3 pre-existing (`central-archive-secrets` log-prefix, `workflow-settings-project-identity` legacy fallback ×2). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
a9d5b06013 |
FN-8562: add tags to chat conversations
Enable project-scoped reusable tags for Direct chat sessions. - Add tag storage, migrations, and scoped assignment APIs. - Add chat sidebar tag creation, assignment, and filtering controls. - Document tag behavior and cover schema and chat interactions. - Establish the session project/id candidate key before creating scoped tag foreign keys. Files changed: .changeset/fn-8562-chat-conversation-tags.md | 7 ++ docs/dashboard-guide.md | 4 + docs/storage.md | 2 + .../src/__tests__/postgres/schema-applier.test.ts | 8 +- packages/core/src/async-chat-store.ts | 117 ++++++++++++++++++++- packages/core/src/chat-store.ts | 32 ++++++ packages/core/src/chat-types.ts | 14 +++ packages/core/src/index.gate.ts | 3 + packages/core/src/index.ts | 3 + .../postgres/migrations/0036_chat_session_tags.sql | 64 +++++++++++ packages/core/src/postgres/schema-applier.ts | 16 ++- packages/core/src/postgres/schema/project.ts | 34 ++++++ packages/dashboard/app/api.ts | 1 + packages/dashboard/app/api/chat.ts | 18 ++++ packages/dashboard/app/components/ChatView.css | 17 +++ packages/dashboard/app/components/ChatView.tsx | 70 +++++++++++- .../__tests__/ChatView.core-interactions.test.tsx | 27 +++++ .../dashboard/app/hooks/__tests__/useChat.test.ts | 1 + packages/dashboard/app/hooks/useChat.ts | 52 ++++++++- .../dashboard/src/routes/register-chat-routes.ts | 70 ++++++++++++ 20 files changed, 550 insertions(+), 10 deletions(-) Fusion-Task-Id: FN-8562 Fusion-Task-Lineage: 4efe798c-0865-451a-adbd-6b85f9f8b149 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
dfb9ca6630 |
FN-8543: enforce bounded generated-fix remediation
Keep generated fix chains within their root retry budget and preserve intervention stops. - Track retry counts and stop reasons on the canonical root feature. - Persist project-isolated lineage stops across generated-fix removal and archive paths. - Serialize stop recording with generated-fix admission and expose conflict-safe mission resume behavior. Files changed: .changeset/fn-8543-bounded-fix-lineage.md | 7 + docs/missions.md | 6 +- .../__tests__/postgres/mission-store.pg.test.ts | 72 +++++++ packages/core/src/async-mission-store-queries.ts | 91 ++++++++- packages/core/src/async-mission-store.ts | 206 ++++++++++++++++++--- packages/core/src/index.ts | 2 +- packages/core/src/mission-store.ts | 10 + packages/core/src/mission-types.ts | 7 + .../0035_fn_8543_mission_lineage_stop.sql | 31 ++++ packages/core/src/postgres/schema-applier.ts | 18 +- packages/core/src/postgres/schema/project.ts | 21 +++ .../core/src/task-store/archive-lifecycle-2.ts | 15 +- .../core/src/task-store/async-archive-lineage.ts | 10 +- packages/dashboard/src/mission-routes.ts | 14 +- packages/engine/src/mission-execution-loop.ts | 30 ++- 15 files changed, 495 insertions(+), 45 deletions(-) Fusion-Task-Id: FN-8543 Fusion-Task-Lineage: 24c03d63-5914-4072-aa17-16862432fc78 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
e7c9b2ac80 |
FN-8542: separate milestone acceptance from feature validation
Keep feature validation scoped to linked feature assertions while evaluating milestone acceptance at rollup. - Add assertion scope and origin provenance with database migration support - Synchronize milestone acceptance prose to a canonical milestone assertion - Prevent milestone assertions from affecting feature verdicts and document the completion contract - Cover scoped validation and milestone rollup behavior with core and engine tests Files changed: .changeset/fn-8542-feature-validation-scope.md | 7 + docs/missions-completion-contract.md | 25 +- docs/missions.md | 6 +- .../mission-store.sync-loop-transition.test.ts | 53 +++++ packages/core/src/async-mission-store-queries.ts | 17 +- packages/core/src/async-mission-store.ts | 58 ++++- packages/core/src/mission-store.ts | 118 +++++++++- packages/core/src/mission-types.ts | 25 ++ .../core/src/postgres/migrations/0000_initial.sql | 2 + .../0034_milestone_assertion_provenance.sql | 30 +++ packages/core/src/postgres/schema-applier.ts | 24 +- packages/core/src/postgres/schema/project.ts | 1 + .../src/__tests__/mission-execution-loop.test.ts | 161 ++++++++++++- packages/engine/src/mission-execution-loop.ts | 262 ++++++++++++++++----- 14 files changed, 700 insertions(+), 89 deletions(-) Fusion-Task-Id: FN-8542 Fusion-Task-Lineage: cf112d31-376a-456e-be08-225eab5de393 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
2df0c7e90b |
fix(#2411): recover from a stale postmaster.pid instead of joining a dead port
After a hard host crash (SIGKILL, power loss), postmaster.pid survives with no postmaster behind it. The optimistic join handed every subsequent boot a URL to the dead port, so the dashboard could never start again without a manual pid delete. Probe the recorded pid with signal 0: provably dead (ESRCH) rebuts the live-lock presumption and the boot takes an owned start — PostgreSQL itself re-validates and reclaims the stale lock file, so a recycled live pid keeps the old join-then-fail behavior and a genuinely live postmaster still surfaces the lock collision we already join on. EPERM counts as alive (fail-closed). Verified end to end: real cluster started, postmaster SIGKILLed leaving the pid file + interrupted WAL, fresh lifecycle detected the stale lock, ran an owned start, and crash recovery preserved the marker row. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
dc132071d5 |
fix(#2411): let embedded PostgreSQL crash recovery finish instead of racing it
beta.4 follow-up from the issue thread: on an interrupted (not-cleanly-shut-down) cluster, the elevated Windows launcher declared readiness on a bare TCP accept while crash recovery still rejected every connection with 57P03, so ensureDatabase failed and the start cleanup fast-shutdown the recovering postmaster ~0.2s after launch; the retry then joined the instance it had just told to stop, got ECONNREFUSED, and parked the dashboard in a dead shell. The 30s ".pgrunner sharing violation" stall was recovery's SyncDataDirectory fsync walk hitting Fusion's own pgctl log inside the data dir. - Move the pgctl runner dir to a sibling .pgrunner-<dataDirName> outside the data dir (and sweep the legacy in-dataDir .pgrunner), so recovery's fsync walk can never contend with the postmaster's inherited log handle. - Ignore 57P03 recovery rejections in the elevated readiness fatal scan. - Owned starts wait for the cluster to genuinely accept connections (retrying 57P03/socket errors, bounded by the start timeout) before ensureDatabase — never stop a postmaster that is still in recovery. - Join-path database verify retries the 57P03 recovery signal for up to 15s; socket errors keep the instant optimistic-join contract for stale pids. - startup-factory's joined-instance-unreachable retry backs off across ~15s instead of a single 500ms attempt. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |