167e17c697c75ab9d0ff6748bc44f738fbc46fae
2920 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
a6ce7f89ef |
FN-8987: expose release-gate verdicts for Promote visibility
Expose server-evaluated release-gate state so Promote controls accurately reflect approval readiness. - Attach transient release-gate verdicts to task API responses. - Preserve only fresh REST verdicts across task snapshots and render them in task cards. - Align hold-release gating and document the Promote-state contract. Files changed: .changeset/fn-8987-release-gate-verdict.md | 7 + docs/dashboard-guide.md | 4 + docs/solutions/workflow-learnings/project-union-versus-per-task-lanes.md | 1 + docs/workflow-steps.md | 4 + packages/core/src/index.gate.ts | 2 +- packages/core/src/index.ts | 2 +- packages/core/src/types.ts | 2 + packages/core/src/types/task/task-core.ts | 20 +++ packages/dashboard/app/components/TaskCard.tsx | 3 +- packages/dashboard/app/components/__tests__/TaskCard.test.tsx | 31 ++++ packages/dashboard/app/hooks/__tests__/useTasks.test.ts | 26 ++++ packages/dashboard/app/hooks/useTasks.ts | 135 +++++++++++++++-- packages/dashboard/app/utils/__tests__/releaseGate.contract.test.ts | 29 ++++ packages/dashboard/app/utils/__tests__/releaseGate.test.ts | 49 ++++++ packages/dashboard/app/utils/releaseGate.ts | 26 ++++ packages/dashboard/app/utils/reviewBudgetApproval.ts | 9 ++ packages/dashboard/src/routes/register-task-workflow-routes.ts | 20 ++- packages/engine/src/__tests__/release-gate-verdict.test.ts | 40 +++++ packages/engine/src/execution/hold-release.ts | 166 +++++++++------------ packages/engine/src/index.ts | 3 + 20 files changed, 469 insertions(+), 110 deletions(-) Fusion-Task-Id: FN-8987 Fusion-Task-Lineage: 6f1742bc-2b2b-4a32-9be5-92160335d90d Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
6cc15fd73d |
fix(ci): restore clean-main CLI and lifecycle gates (#3420)
## Summary - Complete the isolated `@fusion/core` mock used by the experiment-finalize extension suite - Classify three intentional physical/synthetic lifecycle literals introduced on current main - Re-record the strict lifecycle census baseline with zero unexamined guards ## Test plan - `pnpm --filter @runfusion/fusion exec vitest run src/__tests__/extension-experiment-finalize.test.ts --silent=passed-only --reporter=dot` - `pnpm --filter @fusion/core exec vitest run src/__tests__/task-intake-owner-resolver.test.ts --silent=passed-only --reporter=dot` - `pnpm --filter @fusion/engine exec vitest run --project engine-default src/__tests__/mission-feature-sync-lanes.test.ts --silent=passed-only --reporter=dot` - `pnpm check:lifecycle-columns` - `node scripts/check-mock-completeness.mjs` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved mission reconciliation previews for task links, specification alignment, and lifecycle updates. - Prevented stale or superseded validation runs from overwriting current feature status or ownership. - Improved blocked-feature diagnostics and archived-task handling across workflow configurations. - **Documentation** - Clarified validation, assignment checks, and mission synchronization behavior. - **Tests** - Expanded coverage for reconciliation previews and validator ownership scenarios. - **Chores** - Updated lifecycle baseline data for known archived-task cases. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
9f24a517cf |
FN-8956: track resolved review findings
Add durable, scoped resolution states for workflow review findings. - Persist reviewer-applied and superseded finding receipts without making them actionable. - Scope supersession claims to a named prior workflow result, preserving duplicate IDs in other review lanes. - Render informational resolution badges and reject resolved items from revision requests. Files changed: .changeset/fn-8956-review-finding-resolution.md | 7 + docs/dashboard-guide.md | 2 +- docs/workflow-steps.md | 8 +- .../src/__tests__/review-severity-gate.test.ts | 25 ++++ .../src/__tests__/workflow-step-results.test.ts | 45 +++++- packages/core/src/index.gate.ts | 6 + packages/core/src/index.ts | 6 + packages/core/src/types.ts | 2 + packages/core/src/types/task/task-review.ts | 4 + packages/core/src/types/workflow/workflow-steps.ts | 15 +- .../src/workflows/builtin-code-review-group.ts | 2 +- .../src/workflows/builtin-plan-review-group.ts | 2 +- .../core/src/workflows/review-severity-gate.ts | 37 ++++- .../core/src/workflows/workflow-step-results.ts | 54 ++++++- packages/dashboard/app/api/agents/run-audit.ts | 1 + .../dashboard/app/components/TaskReviewTab.css | 22 +++ .../dashboard/app/components/TaskReviewTab.tsx | 36 +++-- .../components/__tests__/TaskReviewTab.test.tsx | 46 ++++++ .../dashboard/src/__tests__/routes-tasks.test.ts | 48 ++++++ .../src/routes/register-task-workflow-routes.ts | 14 +- .../__tests__/review-finding-supersession.test.ts | 163 +++++++++++++++++++++ .../__tests__/review-findings-injection.test.ts | 22 +++ .../workflow-step-verdict-parsing.test.ts | 16 +- .../engine/src/executor/execute-workflow-graph.ts | 129 ++++++++-------- .../engine/src/executor/execute-workflow-step.ts | 25 +++- .../engine/src/executor/run-graph-custom-node.ts | 7 + .../executor/workflow-step-failure-injection.ts | 8 +- .../engine/src/executor/workflow-step-verdict.ts | 17 ++- .../src/workflows/workflow-graph-executor.ts | 15 ++ packages/i18n/locales/en/app.json | 4 +- packages/i18n/locales/es/app.json | 4 +- packages/i18n/locales/fr/app.json | 4 +- packages/i18n/locales/ko/app.json | 4 +- packages/i18n/locales/pt-BR/app.json | 4 +- packages/i18n/locales/zh-CN/app.json | 4 +- packages/i18n/locales/zh-TW/app.json | 4 +- 36 files changed, 703 insertions(+), 109 deletions(-) Fusion-Task-Id: FN-8956 Fusion-Task-Lineage: 80568280-85aa-4a49-a60a-99b75f88f486 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
6ae9299576 |
FN-8953: defer terminal wedge alerts during recovery
Hold terminal wedge alerts until their recovery window has elapsed. - Persist and settle pending wedge notifications across restarts. - Clear pending alerts on task progress and reconcile expired holds during self-healing. - Expose the settle window in notification settings with coverage for store and notification flows. Files changed: .changeset/fn-8953-wedge-settle-window.md | 7 + AGENTS.md | 1 + docs/architecture.md | 3 +- docs/settings-reference.md | 1 + .../core/src/__tests__/store-wedge-pending.test.ts | 56 +++++ packages/core/src/config/settings-schema.ts | 1 + packages/core/src/store.ts | 46 ++++ packages/core/src/types/settings/settings-scope.ts | 2 + packages/core/src/types/task/task-core.ts | 15 ++ .../app/components/settings/save-split.ts | 1 + .../sections/NotificationsSection.search.ts | 9 + .../settings/sections/NotificationsSection.tsx | 15 ++ .../settings-default-descriptions.test.tsx | 1 + ...self-healing-pending-wedge-notification.test.ts | 148 ++++++++++++ .../__tests__/notification-service.test.ts | 7 +- .../__tests__/task-wedge-notification.test.ts | 258 ++++++++++++++++++++- .../src/notification/notification-service.ts | 260 +++++++++++++++++++++ packages/engine/src/self-healing.ts | 38 +++ packages/i18n/locales/en/app.json | 2 + 19 files changed, 850 insertions(+), 21 deletions(-) Fusion-Task-Id: FN-8953 Fusion-Task-Lineage: fd5b5827-c69d-409f-86d5-01ff23405ee3 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
eef68fe0b9 |
FN-8933: capture semantic memory from completed work
Add inferred graph relationships and detached recall capture across completed-work memory surfaces. - Validate and persist deterministic inferred semantic edges with audit outcomes. - Capture completed tasks, research findings, and insights as bounded recall entries. - Wire memory semantics through engine, research APIs, and coverage tests. Files changed: .changeset/fn-8933-memory-semantics-capture.md | 7 + AGENTS.md | 1 + docs/knowledge-graph.md | 10 +- .../src/__tests__/memory/recall-capture.test.ts | 111 +++++++++++++ .../__tests__/postgres/insight-store.pg.test.ts | 25 +++ .../postgres/research-execution.pg.test.ts | 38 +++++ .../__tests__/research-feature-promotion.test.ts | 39 +++++ .../core/src/async-stores/async-insight-store.ts | 23 ++- packages/core/src/index.ts | 1 + .../__tests__/graph-builder-incremental.test.ts | 28 ++++ .../__tests__/inferred-edge-writer.test.ts | 74 +++++++++ packages/core/src/knowledge-graph/graph-builder.ts | 27 ++- .../src/knowledge-graph/graph-serialization.ts | 2 +- packages/core/src/knowledge-graph/graph-store.ts | 12 ++ packages/core/src/knowledge-graph/graph-types.ts | 2 +- packages/core/src/knowledge-graph/index.ts | 1 + .../src/knowledge-graph/inferred-edge-writer.ts | 96 +++++++++++ packages/core/src/memory/index.ts | 1 + packages/core/src/memory/recall-capture.ts | 184 +++++++++++++++++++++ .../src/research/research-feature-promotion.ts | 23 ++- packages/core/src/task-store/task-store-helpers.ts | 13 +- .../src/__tests__/research-routes.test.ts | 80 ++++++++- packages/dashboard/src/research-routes.ts | 27 ++- .../src/__tests__/agent-mission-tools.test.ts | 60 ++++++- .../src/__tests__/in-process-runtime.pg.test.ts | 28 +++- .../memory-consolidation-heartbeat-hook.test.ts | 8 +- .../__tests__/memory-consolidation-ports.test.ts | 17 +- .../src/__tests__/memory-semantics-pass.test.ts | 115 +++++++++++++ .../engine/src/__tests__/project-engine.test.ts | 65 +++++++- packages/engine/src/agent-heartbeat.ts | 14 +- packages/engine/src/agent-tools.ts | 12 +- packages/engine/src/agents/agent-reflection.ts | 9 +- packages/engine/src/memory/index.ts | 1 + .../src/memory/memory-consolidation-adapters.ts | 18 +- packages/engine/src/memory/memory-consolidation.ts | 13 +- packages/engine/src/memory/memory-semantics.ts | 67 ++++++++ packages/engine/src/project-engine.ts | 3 + .../engine/src/research/research-orchestrator.ts | 20 ++- packages/engine/src/runtimes/in-process-runtime.ts | 12 ++ packages/engine/src/util/run-audit.ts | 11 ++ 40 files changed, 1250 insertions(+), 48 deletions(-) Fusion-Task-Id: FN-8933 Fusion-Task-Lineage: b75a6b23-906f-4255-92f1-7684beb742b8 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
5a1853cac6 |
FN-8934: add memory pre-steering across agent prompts
Add bounded memory-first guidance and consolidation observability across agent workflows. - Apply mode-aware memory pre-steering to execution, triage, reviewer, heartbeat, and merger prompts. - Export and test shared memory nudges while documenting memory inclusion settings. - Expose agent memory consolidation history through dashboard API and detail UI. Files changed: .changeset/fn-8934-memory-pre-steering.md | 7 ++ docs/agents.md | 4 + docs/settings-reference.md | 2 + .../core/src/__tests__/memory-pre-steering.test.ts | 28 +++++++ packages/core/src/__tests__/project-memory.test.ts | 22 ++++++ packages/core/src/index.gate.ts | 7 ++ packages/core/src/index.ts | 7 ++ packages/core/src/memory/index.ts | 1 + packages/core/src/memory/memory-pre-steering.ts | 41 ++++++++++ packages/core/src/memory/project-memory.ts | 19 +++++ packages/dashboard/app/api/agents/agents.ts | 12 +++ packages/dashboard/app/api/legacy.ts | 2 + .../dashboard/app/components/AgentDetailView.css | 41 ++++++++++ .../dashboard/app/components/AgentDetailView.tsx | 56 +++++++++++++- ...etailView.memory-consolidation-history.test.tsx | 58 +++++++++++++++ .../__tests__/AgentDetailView.test-helpers.ts | 3 + .../register-agent-memory-consolidations.test.ts | 87 ++++++++++++++++++++++ .../register-agent-reflection-rating-routes.ts | 36 +++++++++ .../memory-pre-steering-injection.test.ts | 50 +++++++++++++ packages/engine/src/__tests__/reviewer.test.ts | 18 +++++ packages/engine/src/__tests__/triage.test.ts | 18 ++++- packages/engine/src/agent-heartbeat.ts | 14 +++- .../engine/src/agents/agent-heartbeat-prompts.ts | 2 + packages/engine/src/agents/agent-instructions.ts | 16 ++-- packages/engine/src/execution/reviewer.ts | 31 +++++--- packages/engine/src/executor/execution-prompt.ts | 6 +- packages/engine/src/merger.ts | 9 ++- packages/engine/src/triage.ts | 12 ++- 28 files changed, 577 insertions(+), 32 deletions(-) Fusion-Task-Id: FN-8934 Fusion-Task-Lineage: a062cc6b-1277-4d36-9926-b3ecba4945eb Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
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> |
||
|
|
637854ad36 |
FN-8932: add durable memory consolidation agent
Add a provisioned memory agent that consolidates durable recall material through idempotent heartbeat ticks. - Provision and configure the durable memory agent with an enabled workflow setting. - Add consolidation adapters, material collection, recall graph references, and run-audit metadata. - Expose the setting in the dashboard and document the memory-agent behavior. - Cover provisioning, heartbeat, consolidation, audit, and recall graph behavior with tests. Files changed: .changeset/fn-8932-memory-agent.md | 7 ++ AGENTS.md | 1 + docs/agents.md | 10 ++ docs/settings-reference.md | 1 + docs/storage.md | 2 +- .../memoryConsolidationEnabled-default.test.ts | 22 ++++ .../memory-recall-graph-cross-reference.pg.test.ts | 115 +++++++++++++++++++++ .../__tests__/memory-agent-provisioning.test.ts | 31 ++++++ packages/core/src/agents/agent-store.ts | 85 +++++++++++++++ packages/core/src/agents/memory-agent-defaults.ts | 30 ++++++ packages/core/src/index.gate.ts | 2 + packages/core/src/index.ts | 9 ++ packages/core/src/memory/recall/index.ts | 1 + packages/core/src/memory/recall/recall-dedup.ts | 3 + packages/core/src/memory/recall/recall-store.ts | 35 ++++++- .../src/workflows/builtin-workflow-settings.ts | 14 +++ .../src/workflows/workflow-settings-resolver.ts | 12 ++- .../__tests__/WorkflowSettingsPanel.test.tsx | 8 ++ .../__tests__/workflow-setting-display.test.ts | 6 ++ .../app/components/workflow-setting-display.ts | 5 + .../memory-consolidation-heartbeat-hook.test.ts | 92 +++++++++++++++++ .../__tests__/memory-consolidation-ports.test.ts | 34 ++++++ ...memory-consolidation-run-audit-metadata.test.ts | 19 ++++ .../__tests__/memory-consolidation-tick.test.ts | 62 +++++++++++ packages/engine/src/agent-heartbeat.ts | 55 ++++++++++ packages/engine/src/index.ts | 1 + packages/engine/src/memory/index.ts | 3 + .../src/memory/memory-consolidation-adapters.ts | 29 ++++++ .../src/memory/memory-consolidation-material.ts | 22 ++++ packages/engine/src/memory/memory-consolidation.ts | 41 ++++++++ packages/engine/src/util/run-audit.ts | 10 ++ 31 files changed, 764 insertions(+), 3 deletions(-) Fusion-Task-Id: FN-8932 Fusion-Task-Lineage: b4fdec50-1f42-4120-af17-0b6f3a94586e Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
0eaa3c7b9a |
FN-8990: clean up plugin reload scratch files
Keep plugin hot-reload cache-busting copies ephemeral and remove legacy tracked artifacts. - Delete tracked plugin reload scratch files. - Remove temporary import copies after successful and failed reloads. - Add cleanup and tracked-artifact regression coverage. Files changed: .changeset/fn-8990-plugin-reload-scratch-cleanup.md | 7 ++ packages/core/src/__tests__/plugin-hot-reload.test.ts | 25 ++++ - packages/core/src/plugins/plugin-loader.ts | 16 ++- plugins/fusion-plugin-droid-runtime/src/.index.reload-1.ts | 84 ---------------- plugins/fusion-plugin-droid-runtime/src/.index.reload-2.ts | 84 ---------------- plugins/fusion-plugin-hermes-runtime/src/.index.reload-1.ts | 108 -------------------- plugins/fusion-plugin-hermes-runtime/src/.index.reload-2.ts | 108 -------------------- plugins/fusion-plugin-hermes-runtime/src/.index.reload-3.ts | 108 -------------------- plugins/fusion-plugin-openclaw-runtime/src/.index.reload-1.ts | 95 ----------------- plugins/fusion-plugin-paperclip-runtime/src/.index.reload-1.ts | 112 --------------------- scripts/__tests__/no-tracked-plugin-reload-artifacts.test.mjs | 27 +++++ 11 files changed, 72 insertions(+), 702 deletions(-) Fusion-Task-Id: FN-8990 Fusion-Task-Lineage: 2221ebaf-b8ab-4a3c-8934-addfa348c98c 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> |
||
|
|
7ddcf7e2a6 |
FN-8979: remove legacy mission resume blockers
Retire the deprecated v0 mission-resume blocker payload in favor of canonical descriptors. - Remove legacy blocker types, conversions, exports, and HTTP payload mirrors. - Deduplicate canonical blocker descriptors and update clients, tests, and documentation. - Add a major changeset for the breaking API removal. Files changed: .changeset/fn-8979-removal.md | 7 +++++ docs/missions.md | 4 +-- .../suite-only-flakes-observed-register.md | 14 +++++++++ .../src/__tests__/mission-blocked-clear.test.ts | 23 ++++++++++++++- .../core/src/__tests__/mission-blockers.test.ts | 26 +++++++++++------ .../__tests__/postgres/mission-store.pg.test.ts | 5 +--- .../core/src/async-stores/async-mission-store.ts | 7 +---- packages/core/src/index.gate.ts | 3 +- packages/core/src/index.ts | 3 +- packages/core/src/missions/mission-blockers.ts | 34 +++++++++++++--------- packages/core/src/missions/mission-types.ts | 9 ++---- packages/core/src/types.ts | 2 +- packages/dashboard/app/api/missions/missions.ts | 25 +++++----------- .../MissionManager.blocked-repair.test.tsx | 17 +++++++---- .../MissionManager.resume-conflict.test.tsx | 9 ++++-- .../src/__tests__/mission-resume-conflict.test.ts | 11 ++++--- packages/dashboard/src/mission-routes.ts | 10 +++---- 17 files changed, 127 insertions(+), 82 deletions(-) Fusion-Task-Id: FN-8979 Fusion-Task-Lineage: 2a0dd0b6-43ca-44ad-b992-79f4ef8eda67 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
844512ed3e |
FN-8976: prevent concurrent automatic validator runs
Prevent automatic validation from running alongside a fresh manual or non-memoized validator. - Serialize validator admission around a feature-scoped fresh-running check. - Report feature-versus-fingerprint blocking scope and preserve memoization semantics. - Add regression coverage, documentation, and a patch changeset. Files changed: .changeset/fn-8976-validator-admission.md | 7 ++ docs/missions.md | 4 +- .../__tests__/postgres/mission-store.pg.test.ts | 110 +++++++++++++++++++-- .../core/src/async-stores/async-mission-store.ts | 61 ++++++++++-- packages/core/src/missions/mission-types.ts | 2 + .../src/__tests__/mission-execution-loop.test.ts | 10 +- 6 files changed, 171 insertions(+), 23 deletions(-) Fusion-Task-Id: FN-8976 Fusion-Task-Lineage: 61b487e8-5542-4cce-94f7-58d5295fe177 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
918a4c4bfa |
FN-8973: add versioned mission resume blockers
Expose versioned mission resume blockers across API and UI. - Add versioned blocker descriptors with fail-closed legacy normalization and v0 compatibility projections. - Return typed resume-conflict envelopes and render root stop details in Mission Manager. - Cover descriptor behavior, route conflicts, UI handling, and PostgreSQL persistence. Files changed: .changeset/fn-8973-mission-blocker-descriptor.md | 7 ++ docs/missions.md | 2 +- .../src/__tests__/mission-blocked-clear.test.ts | 18 ++--- .../core/src/__tests__/mission-blockers.test.ts | 43 ++++++++++++ .../__tests__/postgres/mission-store.pg.test.ts | 22 ++++-- .../core/src/async-stores/async-mission-store.ts | 23 +++--- packages/core/src/index.gate.ts | 4 ++ packages/core/src/index.ts | 4 ++ packages/core/src/missions/mission-blockers.ts | 43 ++++++++++++ packages/core/src/missions/mission-types.ts | 81 ++++++++++------------ packages/core/src/types.ts | 4 +- packages/dashboard/app/api/legacy.ts | 1 + packages/dashboard/app/api/missions/missions.ts | 46 +++++++----- .../dashboard/app/components/MissionManager.tsx | 11 +-- .../MissionManager.blocked-repair.test.tsx | 10 +-- .../MissionManager.resume-conflict.test.tsx | 24 +++++++ .../__tests__/mission-blocked-clear-routes.test.ts | 2 +- .../src/__tests__/mission-resume-conflict.test.ts | 42 +++++++++++ packages/dashboard/src/mission-routes.ts | 12 +++- 19 files changed, 297 insertions(+), 102 deletions(-) Fusion-Task-Id: FN-8973 Fusion-Task-Lineage: 5d36c9c9-dc0f-4cb0-bd0c-ad41c8dde5c0 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
9571f73666 |
FN-8972: preserve blocked mission status during rollups
Protect explicitly blocked or archived hierarchy statuses from automatic recomputation. - Restrict mission and milestone rollups to statuses they own. - Make asynchronous recomputations transactional and preserve status events. - Cover guarded rollups in SQLite and PostgreSQL tests. Files changed: .../fn-8972-mission-recompute-blocked-guard.md | 7 ++ docs/missions.md | 2 + .../mission-status-recompute-guard.test.ts | 85 +++++++++++++++++ .../__tests__/postgres/mission-store.pg.test.ts | 105 +++++++++++++++++++++ .../core/src/async-stores/async-mission-store.ts | 67 +++++++++++-- packages/core/src/missions/mission-store.ts | 12 ++- packages/core/src/missions/mission-types.ts | 21 +++++ 7 files changed, 286 insertions(+), 13 deletions(-) Fusion-Task-Id: FN-8972 Fusion-Task-Lineage: 07ede656-dec0-4d3e-b35c-06e0f6304b74 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
90573e31b0 |
FN-8963: prevent concurrent mission validation runs
Prevent duplicate manual validation runs while preserving recovery from stale validator state. - Add atomic mission-store claims and release handling for manual validator runs. - Return a conflict response and disable the validation action while a run is active. - Cover concurrent claims, API behavior, UI state, and stale-window parity. Files changed: .changeset/fn-8963-validate-inflight-guard.md | 7 ++ docs/missions.md | 2 + .../__tests__/postgres/mission-store.pg.test.ts | 129 +++++++++++++++++++++ .../core/src/async-stores/async-mission-store.ts | 87 ++++++++++++-- packages/core/src/index.ts | 2 + packages/core/src/missions/mission-store.ts | 69 ++++++++++- packages/core/src/missions/mission-types.ts | 13 +++ packages/dashboard/app/api/legacy.ts | 2 + packages/dashboard/app/api/missions/missions.ts | 11 +- .../dashboard/app/components/MissionManager.tsx | 15 ++- .../MissionManager.validate-inflight.test.tsx | 77 ++++++++++++ .../mission-validate-inflight-guard.test.ts | 55 +++++++++ packages/dashboard/src/mission-routes.ts | 32 +--- .../src/__tests__/mission-execution-loop.test.ts | 61 +++++++++- .../validator-run-stale-window-parity.test.ts | 9 ++ 15 files changed, 549 insertions(+), 22 deletions(-) Fusion-Task-Id: FN-8963 Fusion-Task-Lineage: 7e5d0ae4-98ac-4f79-99ca-45fd1450362d Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
5dd3031e34 |
FN-8962: add mission blocked status repair controls
Add explicit diagnostics and repair paths for stale mission blocked badges. - Expose audited core and REST APIs that recompute and clear stale mission blocked status without resuming automation. - Add mission-manager controls, blocker diagnostics, responsive styling, and operator documentation. - Cover clear conflicts, persistence, routes, and desktop/mobile UI behavior. Files changed: .changeset/fn-8962-mission-blocked-clear.md | 7 ++ docs/missions.md | 12 ++- .../src/__tests__/mission-blocked-clear.test.ts | 40 ++++++++ .../__tests__/postgres/mission-store.pg.test.ts | 71 ++++++++++++++ .../core/src/async-stores/async-mission-store.ts | 90 +++++++++++++++-- packages/core/src/index.gate.ts | 4 + packages/core/src/index.ts | 5 +- packages/core/src/missions/mission-types.ts | 62 ++++++++++++ packages/dashboard/app/api/legacy.ts | 3 + packages/dashboard/app/api/missions/missions.ts | 29 ++++++ .../dashboard/app/components/MissionManager.css | 6 ++ .../dashboard/app/components/MissionManager.tsx | 90 ++++++++++++++++- .../MissionManager.blocked-repair.test.tsx | 106 +++++++++++++++++++++ .../__tests__/MissionManager.mobile-css.test.ts | 8 ++ .../__tests__/mission-blocked-clear-routes.test.ts | 71 ++++++++++++++ packages/dashboard/src/mission-routes.ts | 49 ++++++++++ 16 files changed, 638 insertions(+), 15 deletions(-) Fusion-Task-Id: FN-8962 Fusion-Task-Lineage: 38cab277-a0c3-4c60-af3e-dd25d2f88dea Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
33d4fa46c5 |
FN-8969: fix plan evidence version collisions
Prevent plan writes from permanently failing when durable and snapshot evidence versions diverge. - Centralize conflict-tolerant plan-evidence appends with durable version allocation - Reuse the helper for prompt, lineage, and project evidence writes - Cover version drift, retry, deduplication, and concurrent PostgreSQL writes Files changed: .../fn-8969-plan-evidence-version-collision.md | 7 ++ .../__tests__/plan-evidence-next-version.test.ts | 49 ++++++++++++++ .../plan-evidence-version-collision.pg.test.ts | 72 ++++++++++++++++++++ packages/core/src/store.ts | 40 ++++++----- .../core/src/task-store/async/async-lifecycle.ts | 49 +++++++------- packages/core/src/task-store/plan-evidence.ts | 77 ++++++++++++++++++++++ packages/core/src/task-store/project-store-ops.ts | 47 +++++++------ 7 files changed, 276 insertions(+), 65 deletions(-) Fusion-Task-Id: FN-8969 Fusion-Task-Lineage: 5fba0bc8-bcf6-42ea-b617-3484919ed2fa Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
b82f1a41f3 |
FN-8947: add repairable mission validation controls
Add repairable mission-validation badges with clear and re-run flows. - Persist repair metadata and audit events for mission validation state changes. - Expose validation repair through dashboard routes, UI controls, engine tools, and CLI capabilities. - Add database, API, UI, engine, and extension coverage plus operator documentation. Files changed: .changeset/fn-8947-mission-validation-repair.md | 7 + docs/missions.md | 15 +- packages/cli/skill/fusion/SKILL.md | 2 +- .../cli/skill/fusion/references/extension-tools.md | 10 + .../skill/fusion/references/fusion-capabilities.md | 1 + .../extension-experiment-finalize.test.ts | 2 + .../__tests__/extension-gitlab-tracking.test.ts | 2 + .../cli/src/__tests__/extension-web-fetch.test.ts | 2 + packages/cli/src/__tests__/extension.test.ts | 24 +++ packages/cli/src/extension.ts | 40 ++++ .../mission-status-event-metadata.test.ts | 23 +++ .../postgres/mission-validation-repair.pg.test.ts | 187 ++++++++++++++++++ .../core/src/async-stores/async-mission-store.ts | 216 ++++++++++++++++++--- packages/core/src/index.gate.ts | 5 + packages/core/src/index.ts | 5 +- packages/core/src/missions/mission-types.ts | 49 +++++ packages/core/src/types.ts | 7 + packages/dashboard/app/api/legacy.ts | 1 + packages/dashboard/app/api/missions/missions.ts | 13 ++ .../dashboard/app/components/MissionManager.css | 26 ++- .../dashboard/app/components/MissionManager.tsx | 207 +++++++++++++++++--- .../__tests__/MissionManager.mobile-css.test.ts | 8 + .../MissionManager.validation-repair.test.tsx | 83 ++++++++ .../__tests__/mission-task-prefix-routes.test.ts | 162 +++++++++++++++- packages/dashboard/src/mission-routes.ts | 104 +++++++++- .../src/__tests__/agent-mission-tools.test.ts | 119 +++++++++++- .../__tests__/mission-feature-sync-lanes.test.ts | 59 +++++- .../workflow-step-readonly-allowlist.test.ts | 1 + packages/engine/src/agent-tools.ts | 36 ++++ .../engine/src/execution/gating-classifications.ts | 1 + packages/engine/src/index.ts | 1 + .../engine/src/missions/mission-feature-sync.ts | 79 ++++++++ 32 files changed, 1430 insertions(+), 67 deletions(-) Fusion-Task-Id: FN-8947 Fusion-Task-Lineage: b93e5ab6-021c-4d32-bffb-f89f4c3894bc Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
4c9f14e21a |
FN-8965: restore explicit intake owner routing
Restore deliberate engineer and authorized override assignments while preserving executor-only automatic routing. - Accept eligible engineers as explicit intake owners through normal and reserved-ID task creation. - Honor metadata-authorized role overrides without weakening runtime, state, or assignment-policy gates. - Add resolver and PostgreSQL coverage plus release and architecture documentation. Files changed: .../fn-8965-intake-owner-explicit-routing.md | 7 +++ docs/architecture.md | 2 +- .../postgres/create-task-reserved-id.pg.test.ts | 29 ++++++++++++ .../__tests__/task-intake-owner-resolver.test.ts | 51 ++++++++++++++++++++-- packages/core/src/task-store/task-creation.ts | 7 +++ .../core/src/tasks/task-intake-owner-resolver.ts | 38 ++++++++++++---- 6 files changed, 121 insertions(+), 13 deletions(-) Fusion-Task-Id: FN-8965 Fusion-Task-Lineage: 4ecf7fc8-e966-49c8-abf6-e50ae26d8224 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
a839c61929 |
FN-8926: expose graph and recall through MCP
Expose Fusion knowledge graph and durable recall through a built-in MCP transport. - Add the reserved fusion-memory server with graph and recall MCP tools. - Resolve built-in availability and enable/disable tombstones across configuration and UI. - Add CLI transport, documentation, release metadata, and lane coverage tests. Files changed: .changeset/fn-8926-memory-mcp-server.md | 7 + docs/cli-reference.md | 4 + docs/mcp.md | 10 ++ packages/cli/src/bin.ts | 6 + .../__tests__/mcp-memory-server-spawn.test.ts | 79 ++++++++++ .../commands/__tests__/mcp-memory-server.test.ts | 83 +++++++++++ packages/cli/src/commands/__tests__/mcp.test.ts | 27 +++- packages/cli/src/commands/mcp-memory-server.ts | 104 +++++++++++++ packages/cli/src/commands/mcp.ts | 64 ++++++-- packages/core/package.json | 10 ++ .../core/src/__tests__/mcp-builtin-servers.test.ts | 17 +++ packages/core/src/__tests__/mcp-config.test.ts | 12 ++ packages/core/src/config/mcp-builtin-descriptor.ts | 16 ++ packages/core/src/config/mcp-builtin-servers.ts | 18 +++ packages/core/src/config/mcp-config.ts | 40 +++-- packages/core/src/config/mcp-discovery.ts | 3 +- packages/core/src/index.ts | 6 + packages/core/src/memory/index.ts | 1 + .../mcp/__tests__/memory-mcp-handler.test.ts | 36 +++++ .../mcp/__tests__/memory-mcp-serialization.test.ts | 23 +++ packages/core/src/memory/mcp/index.ts | 4 + .../core/src/memory/mcp/memory-mcp-backends.ts | 39 +++++ packages/core/src/memory/mcp/memory-mcp-handler.ts | 54 +++++++ .../src/memory/mcp/memory-mcp-serialization.ts | 48 ++++++ packages/core/src/memory/mcp/memory-mcp-tools.ts | 64 ++++++++ packages/core/src/types.ts | 10 ++ .../settings/sections/GlobalMcpSection.tsx | 14 +- .../settings/sections/McpServersCard.tsx | 67 +++++++-- .../settings/sections/ProjectMcpSection.tsx | 15 +- .../__tests__/McpServersCard.builtin.test.tsx | 45 ++++++ .../dashboard/src/__tests__/chat-manager.test.ts | 24 +++ .../register-config-mcp-pi-settings-routes.ts | 20 ++- packages/dashboard/vitest.config.ts | 2 + .../__tests__/mcp-builtin-lane-coverage.test.ts | 163 +++++++++++++++++++++ packages/engine/src/mcp/mcp-resolution.ts | 10 +- packages/engine/vitest.config.ts | 2 + 36 files changed, 1097 insertions(+), 50 deletions(-) Fusion-Task-Id: FN-8926 Fusion-Task-Lineage: b2861491-33da-4b05-b9f8-a7c1448c1c8c Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
8cba8d3e92 |
fix(core): make TaskStore.emit override assignable to EventEmitter<TaskStoreEvents> signature (#3407)
## Problem
Dashboard typecheck fails with **TS2416** in `@fusion/core`'s
`TaskStore`:
```
Property 'emit' in type 'TaskStore' is not assignable to the same property in base type 'EventEmitter<TaskStoreEvents>'.
```
The `override emit<E extends string | symbol>(event, ...args)` generic
conflicts with the base class's generic `emit<K>(eventName: keyof
TaskStoreEvents | K, ...)`. This breaks the dashboard typecheck / CI
merge gate.
## Fix
Change the override to:
```ts
override emit(event: unknown, ...args: any[]): boolean {
return EventEmitter.prototype.emit.call(this, event as string, ...args);
}
```
`event: unknown` remains assignable to the base's generic signature
while still forwarding non-typed runtime keys (`agent:log`,
`settings:updated`, …). Internal `EventEmitter.prototype.emit` calls
cast `event as string`. Behavior-preserving.
## Verification
- `@fusion/dashboard` `tsc --noEmit` → **PASS** (previously failed with
TS2416)
- `eslint` on touched file → clean
- Single-file change (`packages/core/src/store.ts`, +6/−3)
## Scope
No behavior change, no changesets required.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved task event handling to support a broader range of event
identifiers.
* Preserved cached-lane information for single-argument task update
events.
* Maintained support for custom and arbitrary event names without
disrupting existing behavior.
* Improved classification of workflow roles, session purposes, and
outcome-related status checks in lifecycle analysis, producing more
accurate findings and reducing misleading results.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
||
|
|
3143f9536f |
FN-8908: auto-recover terminal task failures
Recover generic terminal task failures through a bounded, durable retry budget before escalating them to operators. - add fenced task-store recovery claims, retries, budget resets, and audit events - defer terminal-failure notifications until recovery is exhausted while preserving a single escalation - expose operator retry budget reset and cover recovery lifecycle behavior Files changed: .../fn-8908-terminal-failure-auto-recovery.md | 7 + AGENTS.md | 1 + docs/agents.md | 2 + docs/architecture.md | 2 + packages/cli/src/commands/task.ts | 2 + packages/cli/src/extension.ts | 2 + ...terminal-failure-auto-recovery-store.pg.test.ts | 108 +++++++++ .../terminal-failure-auto-recovery.test.ts | 60 +++++ packages/core/src/index.gate.ts | 1 + packages/core/src/index.ts | 1 + packages/core/src/store.ts | 179 ++++++++++++++- .../core/src/task-store/archive-lifecycle-2.ts | 15 ++ packages/core/src/task-store/moves.ts | 48 +++- packages/core/src/task-store/persistence.ts | 18 +- packages/core/src/task-store/project-store-ops.ts | 4 +- .../src/task-store/workflow-task-create-ops.ts | 4 +- packages/core/src/tasks/index.ts | 1 + .../src/tasks/terminal-failure-auto-recovery.ts | 114 ++++++++++ packages/core/src/types/task/task-core.ts | 24 ++ .../src/routes/register-task-workflow-routes.ts | 2 + ...-healing-terminal-failure-auto-recovery.test.ts | 199 ++++++++++++++++ .../__tests__/notification-service.test.ts | 86 ++++++- .../__tests__/task-wedge-notification.test.ts | 2 +- .../src/notification/notification-service.ts | 103 +++++++-- .../src/notification/task-wedge-notification.ts | 30 ++- packages/engine/src/self-healing.ts | 251 ++++++++++++++++++++- packages/engine/src/util/run-audit.ts | 7 + 27 files changed, 1240 insertions(+), 33 deletions(-) Fusion-Task-Id: FN-8908 Fusion-Task-Lineage: 99e96b16-0306-41f1-87da-8623d69735f7 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
7b3bd75268 |
fix(engine): wire the Plan Review replan cap and tombstone its dead predecessor
Investigating the "dead cap" turned up the opposite of what it looked like, plus a worse problem next to it. The Plan Review replan loop was NOT unbounded. U3 re-owned the cap-park in the graph: requestPreMergeOptionalStepFix parks via parkPlanReviewReplanCapExhausted at awaiting-approval with reason plan-review-replan-cap, on both an explicit finite budget and the unbounded default. That capability has been live throughout. What was actually dead: 1. PLAN_REVIEW_GATE_REPLAN_CAP = 8 — an unread constant belonging to the out-of-graph triage gate (runPlanReviewBeforeExecution) that U10/R4 deleted. Its companion column Task.planReviewReplanCount was persisted, serialized and reset but never incremented or compared. A constant and a column that look like a live safety ceiling while enforcing nothing are worse than no ceiling: they answer "is this loop bounded?" with a confident yes. Deleted, ratcheted in legacy-tombstones.test.ts, and the column documented as legacy/never-written with the live owner named. 2. planReviewReplanCap — an operator-facing setting, declared, validated, documented in settings-reference.md and editable in the Workflow Editor, that NOTHING read. Lowering it changed nothing. The unbounded backstop was instead hardcoded to PLAN_REVIEW_FEEDBACK_HISTORY_LIMIT — a bound on how much reviewer PROSE is replayed into the next planning prompt, whose own comment says it is "bounded independently of persistence and retry accounting". Two unrelated concerns shared one number, so trimming prompt history would have silently tightened a safety ceiling. The backstop now resolves from the setting, defaulting to the new DEFAULT_PLAN_REVIEW_REPLAN_CAP = 15 — the previously-effective value, so this is a pure re-wiring rather than a silent behavior change. The existing 15-attempt regression test passes unchanged, which is the evidence for that. 0 is honored as park-on-first-REVISE. An explicit planReviewMaxRevisions / node maxRevisions budget remains a stricter, earlier gate. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
c05d44d44a |
fix(engine): bound planning retries and cap the planning turn
Three changes to the triage planning path.
1. Unclassified planning failures are bounded. specifyTask's catch-all branch —
the one reached by every error the classifiers above do not recognize — restored
the card's claimable status and wrote nothing else: no counter, no
nextRecoveryAt, no park. Triage rediscovery re-admitted the card on the very next
poll, and replaceActiveTaskWorkflowContinuation replaced the terminal work item
with a fresh one carrying no attempt count, so nothing recorded that the task had
already failed N times. It now consumes the same recoveryRetryCount/nextRecoveryAt
budget the transient branch uses (MAX_RECOVERY_RETRIES = 3, 60s/120s/300s jittered
backoff) and parks status:"failed" with a PLANNING_FAILED_EXHAUSTED: error once
spent — status:"failed" is what suppresses rediscovery. Classifying one error
string fixes one symptom; this budget is what makes the NEXT unrecognized error
fail safely instead of looping for a day.
2. The planning turn has a ceiling. Fusion set no timeout on it at all:
workflowStepTimeoutMs covers pre-merge workflow steps only, and the provider SDK's
300s APIConnectionTimeoutError caps time-to-first-byte and is cleared once headers
arrive, after which the stream is uncapped. configureHttpDispatcher, which would
install undici idle timeouts, is only called from pi's CLI entrypoints and never
in the in-process engine. Observed consequence: single attempts ran to 126 minutes,
with failed-attempt durations spread smoothly from 1 to 126 min and no clustering —
the signature of nothing enforcing a bound. New workflow-native planningTimeoutMs
(default 90 min) aborts the session; the failure consumes one bounded attempt.
The default is deliberately generous rather than tight. Successful planning work
items measured over 7 days ran p50 12.7 / p90 39.5 / p99 105.7 minutes, so a
tighter bound would abort legitimate plans and pay for the restart — the churn
this work exists to remove. It bounds hung turns, not slow ones.
3. [event:task:moved] executor tracing dropped from log to debug. It fires on
every dispatch, rebound, requeue, archive and self-healing move across every task,
which made it the loudest line in engine output and buried operator-actionable
events. No test pins the level; the information remains at debug.
Also fixes a test break shipped in
|
||
|
|
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> |
||
|
|
963dba6f80 |
feat: gate review verdicts on finding severity and preserve remediation sessions
Review remediation loops were the dominant cost of task wall-clock: over 14 days,
tasks with >=5 post-review fix rounds were 22% of tasks but consumed 78% of all
task active time, and 311 of 331 recorded findings were spec-internal-consistency
complaints that changed no delivered behavior.
Two causes compounded. Plan/Code Review remediation was unbounded by default, and
the review policy ordered a full re-derivation of the artifact after every edit
("distrust the edit ... fresh holistic pass"), so each round surfaced a fresh crop
of previously-acceptable observations as new blockers.
Make the already-persisted WorkflowReviewFinding.severity load-bearing instead of
decorative: a REVISE only blocks when it carries a finding at or above the review
kind's threshold (plan: P0+P1, code: P0). Non-blocking findings are still parsed,
persisted, and handed to the implementer as advisory notes in PROMPT.md. Fails
closed — a REVISE with no findings, or with any unclassified finding, still blocks,
so prose-only and custom reviewers keep full blocking power. The gate only ever
relaxes a verdict, never promotes one.
Reviewer prompts now request the structured findings schema (Plan Review emitted
none before), define severity by consequence as P0/P1/P2, omit nits entirely rather
than filing them as low-severity findings, and use an incremental re-review contract.
Remediation renders findings grouped by priority and sanctions an explicit decline
with rationale, so a disputed finding has a terminal state.
Also preserve the implementation session across a review bounce: sendTaskBackForFix
no longer nulls sessionFile when preserving resume state, and the executor's finally
no longer clears it on a review handoff. Remediation rounds continue the conversation
instead of re-reading the repo and re-deriving the change they just wrote. The resume
prompt now directs a PROMPT.md re-read, without which a resumed agent would never see
the new findings.
New per-workflow settings planReviewBlockingSeverity / codeReviewBlockingSeverity;
set either to "any" to restore the previous behavior.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
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> |
||
|
|
0fc6f3d849 |
FN-8946: enable attributed agent mission status updates
Enable authorized agents to update feature and mission statuses with transactional, attributed audit events. - Add mission and feature status tools to the Fusion extension and engine allowlists. - Record bounded actor, reason, and hierarchy metadata for status transitions across every writer. - Guard linked feature transitions and document the agent-facing workflow. Files changed: .changeset/fn-8946-mission-status-writes.md | 7 + docs/missions.md | 7 +- packages/cli/skill/fusion/SKILL.md | 2 +- .../cli/skill/fusion/references/extension-tools.md | 20 +++ .../skill/fusion/references/fusion-capabilities.md | 2 + packages/cli/src/__tests__/extension.test.ts | 46 ++++++ packages/cli/src/extension.ts | 27 +++ .../mission-status-event-metadata.test.ts | 50 ++++++ .../__tests__/postgres/mission-store.pg.test.ts | 160 +++++++++++++++++- .../core/src/async-stores/async-mission-store.ts | 182 +++++++++++++++------ packages/core/src/index.ts | 5 + packages/core/src/missions/mission-store.ts | 7 +- packages/core/src/missions/mission-types.ts | 99 +++++++++-- .../src/__tests__/chat-toolset-permissions.test.ts | 24 +++ packages/dashboard/src/mission-routes.ts | 3 +- .../src/__tests__/agent-mission-tools.test.ts | 42 ++++- .../src/__tests__/heartbeat-executor.test.ts | 4 +- .../workflow-step-readonly-allowlist.test.ts | 2 + packages/engine/src/agent-tools.ts | 18 ++ .../engine/src/execution/gating-classifications.ts | 2 + 20 files changed, 635 insertions(+), 74 deletions(-) Fusion-Task-Id: FN-8946 Fusion-Task-Lineage: 473cc0e0-e632-48b3-ac84-adaaeb81db4b Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
27cb2d2621 |
FN-8921: add deterministic knowledge graph tooling
Add a committable, provenance-tagged knowledge graph layer with CLI generation and query support. - Extract TypeScript, Markdown, and FNXC knowledge into deterministic graph nodes and edges. - Persist recoverable graph artifacts outside ignored Fusion state and expose build/query CLI commands. - Document configuration and add core and CLI coverage for graph structure, serialization, and recovery. Files changed: .changeset/fn-8921-knowledge-graph.md | 7 + .gitattributes | 3 + AGENTS.md | 1 + docs/README.md | 2 + docs/cli-reference.md | 4 + docs/knowledge-graph.md | 37 +++++ docs/settings-reference.md | 4 + docs/storage.md | 2 + packages/cli/package.json | 3 +- .../__tests__/knowledge-graph-bundle-shape.test.ts | 4 + .../src/__tests__/knowledge-graph-command.test.ts | 115 ++++++++++++++ packages/cli/src/bin.ts | 19 +++ packages/cli/src/commands/knowledge-graph.ts | 79 ++++++++++ packages/cli/tsup.config.ts | 2 + packages/core/package.json | 4 +- packages/core/src/config/settings-schema.ts | 2 + packages/core/src/index.ts | 1 + .../__tests__/derive-modules.test.ts | 11 ++ .../__tests__/extract-file-composition.test.ts | 20 +++ .../knowledge-graph/__tests__/extract-fnxc.test.ts | 33 ++++ .../__tests__/extract-markdown.test.ts | 21 +++ .../__tests__/extract-typescript.test.ts | 30 ++++ .../__tests__/file-discovery.test.ts | 26 ++++ .../graph-artifact-not-gitignored.test.ts | 15 ++ .../__tests__/graph-builder-equivalence.test.ts | 76 ++++++++++ .../__tests__/graph-builder-incremental.test.ts | 52 +++++++ .../__tests__/graph-identity.test.ts | 11 ++ .../knowledge-graph/__tests__/graph-query.test.ts | 13 ++ .../__tests__/graph-serialization.test.ts | 29 ++++ .../__tests__/graph-store-recovery.test.ts | 106 +++++++++++++ .../__tests__/resolve-imports.test.ts | 10 ++ .../core/src/knowledge-graph/derive-modules.ts | 4 + packages/core/src/knowledge-graph/extract-file.ts | 6 + packages/core/src/knowledge-graph/extract-fnxc.ts | 168 +++++++++++++++++++++ .../core/src/knowledge-graph/extract-markdown.ts | 9 ++ .../core/src/knowledge-graph/extract-typescript.ts | 107 +++++++++++++ .../core/src/knowledge-graph/file-discovery.ts | 85 +++++++++++ packages/core/src/knowledge-graph/graph-builder.ts | 141 +++++++++++++++++ .../core/src/knowledge-graph/graph-manifest.ts | 4 + packages/core/src/knowledge-graph/graph-query.ts | 126 ++++++++++++++++ .../src/knowledge-graph/graph-serialization.ts | 134 ++++++++++++++++ packages/core/src/knowledge-graph/graph-store.ts | 97 ++++++++++++ packages/core/src/knowledge-graph/graph-types.ts | 54 +++++++ packages/core/src/knowledge-graph/index.ts | 14 ++ .../core/src/knowledge-graph/resolve-imports.ts | 4 + packages/core/src/types/settings/settings-scope.ts | 2 + pnpm-lock.yaml | 12 +- 47 files changed, 1700 insertions(+), 9 deletions(-) Fusion-Task-Id: FN-8921 Fusion-Task-Lineage: 7014d0f1-fc47-454b-afe5-5f0d9b229f33 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> |
||
|
|
0fbeba50d1 |
FN-8937: rescue project engine test quarantine
Rescue the project engine suite by making subprocess watchdog behavior deterministic. - Capture real timer APIs for subprocess watchdogs and isolate failure ownership. - Mock integration-branch resolution to prevent host git during lifecycle tests. - Add watchdog regression coverage and remove the expired quarantine exclusion. Files changed: docs/testing.md | 3 + packages/core/src/__test-utils__/vitest-setup.ts | 74 ++++++++++- .../__tests__/subprocess-guard-fake-timers.test.ts | 140 +++++++++++++++++++++ .../engine/src/__tests__/project-engine.test.ts | 63 +++++++--- packages/engine/vitest.config.ts | 12 +- scripts/lib/test-quarantine.json | 8 +- 6 files changed, 265 insertions(+), 35 deletions(-) Fusion-Task-Id: FN-8937 Fusion-Task-Lineage: 9fe166b5-b101-4683-bb2b-4855ee73df10 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> |
||
|
|
6cf95433bf |
FN-8928: evict flaky workflow IR PG gate canary
Remove the flaky sync-workflow-IR PostgreSQL canary from the blocking merge gate while preserving non-blocking coverage. - Remove the default workflow-IR PostgreSQL test from the gate canary script. - Update gate-policy coverage expectations and flake-eviction documentation. - Record the observed setup-hook timeout and retained regression coverage. Files changed: .../suite-only-flakes-observed-register.md | 25 +++++++++++++-- docs/testing.md | 6 ++-- packages/core/package.json | 2 +- .../sync-workflow-ir-is-always-default.pg.test.ts | 6 ++++ .../__tests__/engine-vitest-gate-policy.test.mjs | 37 +++++++++++----------- 5 files changed, 51 insertions(+), 25 deletions(-) Fusion-Task-Id: FN-8928 Fusion-Task-Lineage: b725ba1a-fb33-4d49-89b4-277a64246cdd Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
5b9e6643d6 |
FN-8869: inherit project model overrides for role agents
Role-based permanent agents now consistently use their effective project model and thinking settings. - Resolve permanent-agent model and thinking inheritance by workflow role in core. - Apply inherited settings to Agent views, Chat sessions, routes, and heartbeat sessions. - Cover role-specific inheritance and preserve the lifecycle-column ratchet classification. Files changed: .changeset/fn-8869-role-agent-project-model-override.md | 7 ++ docs/agents.md | 9 +- docs/settings-reference.md | 4 +- packages/core/src/__tests__/agent-effective-model.test.ts | 97 +++++++++++++++++++ packages/core/src/__tests__/no-hardcoded-lifecycle-columns.test.ts | 2 + packages/core/src/ai/agent-effective-model.ts | 82 +++++++++++++++++ packages/core/src/ai/model-resolution.ts | 14 +++ packages/core/src/index.gate.ts | 7 ++ packages/core/src/index.ts | 7 ++ packages/core/src/types.ts | 7 ++ packages/dashboard/app/components/AgentDetailView.tsx | 49 ++++++--- packages/dashboard/app/components/AgentsView.tsx | 11 ++- packages/dashboard/app/components/__tests__/AgentDetailView.effective-model.test.tsx | 55 +++++++++++ packages/dashboard/app/components/__tests__/AgentDetailView.settings.test.tsx | 22 +++++ packages/dashboard/app/components/__tests__/AgentsView.test.tsx | 25 +++++ packages/dashboard/src/__tests__/chat-manager.test.ts | 45 +++++++++ packages/dashboard/src/__tests__/routes-chat-sessions-project-model.test.ts | 103 +++++++++++++++++++++ packages/dashboard/src/chat.ts | 65 +++++-------- packages/dashboard/src/routes/register-chat-routes.ts | 37 +++++--- packages/engine/src/__tests__/agent-session-helpers-test-mode.test.ts | 13 +++ packages/engine/src/__tests__/agent-session-helpers.test.ts | 54 +++++++++++ packages/engine/src/agent-heartbeat.ts | 10 +- packages/engine/src/agents/agent-session-helpers.ts | 6 +- 23 files changed, 648 insertions(+), 83 deletions(-) Fusion-Task-Id: FN-8869 Fusion-Task-Lineage: 00227aaf-b33b-43f1-bcbb-2203c9930dbc Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
51437558ac |
fix(workflow): give a stranded planning hold a retry owner, and stop status erasure
FN-8923 sat silent in Todo for 7+ hours with zero run-audit rows. Its plan node held on principal routing, triage correctly recorded `needs-replan`, and then dependency auto-unblock nulled that status when its blocker completed. From that moment the card was invisible to both lanes: triage saw a fully-written spec with no replan flag and skipped it, while the executor's `isUnplannedForExecution` refused to dispatch because no capacity-boundary continuation existed. Not stuck in a retry loop -- unowned. - Dependency auto-unblock clears only the `queued` marker it owns, at all four sites (scheduler.ts plus three in self-healing.ts). `status` is a shared lifecycle channel and `needs-replan` is the only signal that re-admits a hold-column card whose PROMPT.md is already a real spec. - New self-healing sweep `reconcilePrincipalHeldPlanningContinuations` re-queues planning for a card whose sole active continuation is a principal-routing hold. A planning hold otherwise has no retry owner at all. Gated on the planning lane, effective auto-merge, an owned (null) status, and the shared planning lifecycle lock, so it cannot clobber a triage claim or launder a `failed` / `stuck-killed` / `queued` card into a replan. - Workflow node-instance-id materialization is idempotent across foreach, loop, and optional-group containers. It re-wrapped its own output on every dispatch, so FN-8869 grew a ~1.8 KB `run_id` of ~30 repeated segments on a hot indexed column and every retry read as a distinct run. - An unresolvable node instance or absent IR now fails closed instead of being treated as an edited-away override -- the previous shape would have discarded a real reviewer fence and handed a named review to the pool. - Mirror the routing exports into the gate-safe core barrel; the reduced barrel resolved them to `undefined`, a latent trap for any suite reaching the router. Findings from a multi-reviewer pass; 9 of 11 confirmed by an independent validator. Each fix carries a regression asserting the invariant across its surfaces, not the single reported case -- the optional-group accretion test was verified to fail without the fix. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
37d32357e9 |
fix(workflow): keep assigned tasks executing instead of holding on a dead principal
Workflow principal routing conflated two different questions: whether an agent CAN run a node, and whether it can run it RIGHT NOW. Both produced a hold, and a named principal never falls through to the role pool — so an agent that could never satisfy the node wedged the task permanently. FN-8869, FN-8928, and FN-8845 were each explicitly assigned to a permanent engineer-role agent (which the assignment policy allows). Their `step-execute` nodes took that owner as `task-assignee` authority, found no `executor` tag, and held closed. Each card re-dispatched and re-held every ~15 minutes for hours while two idle `Workflow Executor` pool agents were never consulted. The only thing still touching them was the owner's hourly heartbeat, which logged "progressing, no blockers" and exited: heartbeat observation had replaced execution. - Structural incapability (wrong role, agent deleted, authority edited away) is no longer authority for the node. Routing continues to the column binding and then the role pool. - A resumed continuation whose fence proves stale discards it and re-routes, instead of re-asserting a dead principal on every dispatch. - Availability is unchanged and still fail-closed: a role-capable principal that is paused, disabled, or at session capacity holds, and is never silently replaced by a pool member. - An explicitly assigned engineer-role agent is now valid task-assignee authority for an executor node, so the assigned agent executes its own task continuously under graph dispatch. The role pool stays strict, since automatic backlog pickup by engineers is a separate opt-in. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
51a5e1c275 |
fix(agents): separate heartbeat runtime from workflow routability
runtimeConfig.enabled answered two different questions. Every consumer in the
engine reads it as "run this agent's own durable heartbeat loop" — heartbeat
scheduling, error recovery, self-healing, in-process runtime — except the
workflow router, which also read it as "may own a workflow stage".
That conflation caused both failures:
- Built-in owners ship with the heartbeat off, which is CORRECT (they are
invoked by the workflow engine and must not run autonomous loops or auto-claim
work). That silently made every built-in role unroutable and deadlocked the
board.
- Enabling the heartbeat to restore routing then gave four agents autonomous
loops and auto-claiming nobody asked for.
Separate the flag:
- runtimeConfig.enabled governs the heartbeat runtime ONLY
- isWorkflowPrincipalEligible answers routability, and treats the four built-in
role owners as routable structurally — there is no fallback if a role cannot
route, so "unroutable" is not a state an operator can meaningfully select
- provision built-ins { enabled: false, autoClaimRelevantTasks: false }
- paused/errored still outranks the exemption, so it can never resurrect a
broken principal
Removes the earlier write-seam coercion that forced enabled:true — the invariant
is now structural rather than fought for on every write.
Also re-applies the principal-hold backoff ladder (15s -> 5m, checked before
graph entry) into executor/execute-workflow-graph.ts. PR #3317's executor peel
rewrote executor.ts from a pre-change base and dropped it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
1cf86baa1c |
refactor: package code organization wave 18 (executor pure peels) (#3317)
## Summary
Wave 18 continues the package code-organization program after wave 17
domain folders (U4 Slice A from
`docs/plans/2026-07-14-001-refactor-package-code-organization-plan.md`).
### What changed
Peel **pure, behavior-preserving** helpers out of
`packages/engine/src/executor.ts` into domain modules under
`packages/engine/src/executor/`, with **stable re-exports** from
`executor.ts` so deep imports and `vi.mock("../executor.js")` keep
working.
| New module | Symbols |
|------------|---------|
| `executor/task-done-refusal.ts` | `evaluateTaskDoneRefusal`,
`determineRevisionResetStart`, skip-bypass refusal helper |
| `executor/workflow-feedback-paths.ts` |
`extractReferencedPathsFromWorkflowFeedback`,
`isAlwaysAllowedScopeLeakPath`, `workflowPathMatchesDeclaredScope` |
| `executor/workflow-step-verdict.ts` |
`FUSION_WORKFLOW_STEP_CONVENTIONS_PREAMBLE`, `parseWorkflowStepVerdict`
/ `parseWorkflowStepOutput`, step outcome types |
| `executor/await-input-parse.ts` | `parseAwaitInputSentinel`,
`parseAwaitInputQuestionToolCall` |
| `executor/no-commit-eligibility.ts` | `getNoCommitEligibilityReason`
(+ prompt heuristics) |
`executor.ts` live LOC ~**22817 → ~22427** (first pure-peel batch; more
peels needed to approach the 2k cap).
### Shims
- `old path` `executor.ts` public exports → `new path` `executor/*.ts` →
delete-when consumer deep-imports are re-pointed (not this PR)
### Test plan
- [x] `@fusion/engine` typecheck
- [x] Oracle: task-done refusal, skip-bypass, workflow malformed
verdict, scope-leak allowlist, executor-step-session, executor-prompt
- [x] `vitest --project=engine-core` (merge-gate curated suite)
- [ ] CI merge gate
**Stack:** wave17 (merged) → **this PR**
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Improved recognition of workflow outcomes from structured and
conversational responses.
* Added support for extracting questions from await-input responses and
tool calls.
* Improved workflow feedback handling for referenced files and declared
scope patterns.
* Added clearer guidance for task execution, approvals, verification,
and available tools.
* **Bug Fixes**
* Prevented completion when required review approvals are missing or
revisions remain pending.
* Improved handling of workflows that legitimately require no code
changes.
* Added clearer refusal messages and more reliable revision restarts.
* Sanitized repository paths in Git remediation instructions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
||
|
|
e573178e31 |
fix(agents): never let a built-in workflow role agent be unroutable
The board stopped moving. Work items churned held -> running -> held at ~3.5/sec across every task, pinning a core and writing ~19k workflowWorkItem audit rows/hour while nothing executed. Hold reason: workflow-principal-role-pool-exhausted:executor. provisionBuiltinWorkflowRoleAgents seeded the four permanent owners (triage, executor, reviewer, merger) with runtimeConfig.enabled=false, while the router's available() treats enabled===false as unavailable. The only permanent principals for every built-in role were unroutable BY CONSTRUCTION — shipped that way, so any instance without operator-created role agents deadlocks at its first workflow node. Nothing self-recovers: a pool only changes by operator action. Routability of these four is an invariant, not a setting. Unlike an operator's agent, disabling one does not opt an agent out — it removes the only thing that can run that stage, and there is no fallback. - seed built-ins enabled; converge existing rows on provisioning - enforceBuiltinWorkflowRoleRoutability coerces enabled back at the durable writeAgent seam, so no REST/UI/plugin/restore path can reintroduce the deadlock. Other runtimeConfig keys are preserved; operator-owned agents keep their off switch - share the static routability predicate (isWorkflowPrincipalEligible) between provisioning and the router so the two cannot drift apart again Also fix the spin itself: a principal hold had no cooldown, so the scheduler re-dispatched instantly and the run re-entered only to re-fence and re-park. It now records a backoff ladder (15s -> 5m) checked before graph entry, and logs once per distinct reason instead of every pass — the same self-recovering shape as holdForSessionContention. The hold never increments `attempt`, so no existing guard could ever fire. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
a09e0cb87f |
feat(i18n): add Português (Brasil) (pt-BR) locale (#3347)
## Summary Adds **Português (Brasil)** (`pt-BR`) as a supported locale: - Selectable as **Translation target language** (project settings) and as the dashboard / terminal UI language. - Full machine-drafted catalogs (`app`, `cli`, `common`), disclosed in `packages/i18n/locales/TRANSLATION_STATUS.md` following the pattern #1352 established — reviewed for glossary/register consistency (0.18% untranslated, matching only keys that are empty in `en`), but native-speaker corrections are welcome. - Brazilian Portuguese content-language detection (accent-stripped stopword list — the scorer strips diacritics before matching, so accented entries never match; `com`/`mais` deliberately omitted to avoid bare-domain `.com` and French collisions, with regression tests for both directions). - `pt`/`pt-PT` browser and environment locales resolve to `pt-BR` on all three detection paths (`FALLBACK_LNG` routing plus a `pt` branch in `normalizeToSupportedLocale`, mirroring the existing `zh` handling). - `README.pt-BR.md` + switcher links in all READMEs, docs updates (`settings-reference`, `cli-reference`, `i18n-contributing`, `--lang` help text), changeset (`minor`). Drive-by fixes bundled: `TRANSLATION_STATUS.md` was missing the `ko` row; the LanguageSelector endonym test was missing `한국어`; `docs/i18n-contributing.md` now names the two compile-enforced display maps (`LOCALE_LABELS`, `localeDisplayName`) a new locale must update; the `--lang` CLI help text no longer drifts from its validator. ## Test plan - `pnpm i18n:status` (key parity gate) green; catalogs are `i18n:sync`-idempotent. - Updated/extended suites: core `locale-settings`, i18n `config`/`parity`/`db-banner-catalog`/`i18n-gate-coverage`, dashboard `useLanguage`/`LanguageSelector`/`GeneralSection.importTranslate`/`detectContentLanguage` (incl. new pt-BR detection + bare-domain regression tests), CLI `settings`. - `pnpm verify:fast` (typecheck, build, boot smoke), `pnpm lint`, `pnpm check:changesets`, and the bounded `pnpm test` lane all green locally (the three `test:pg-gate` files fail locally only for lack of a Postgres instance; they fail identically on clean `main`). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added Brazilian Portuguese (Português (Brasil)) across the dashboard, terminal interface, settings, and translation tools. * Added Portuguese translations for common interface and CLI content. * Added automatic Portuguese language detection, locale normalization, and fallback support. * Added a Portuguese (Brazil) README with product, setup, and usage documentation. * **Documentation** * Updated language selectors, CLI references, settings documentation, and translation guidance. * Added Portuguese README links to translated documentation. * Added French to the documented dashboard language options. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: gsxdsm <gsxdsm@users.noreply.github.com> |
||
|
|
6bd8004ba1 |
FN-8915: document agent activity API contract
Publish an inspectable contract for durable agent-activity history and pagination. - Define the route wire shape, cursor semantics, retention, and SSE recovery behavior. - Add PostgreSQL and dashboard coverage for documented pagination and truncation guarantees. - Link architecture and diagnostics guidance to the canonical contract and validate its prerequisite lineage. Files changed: .changeset/fn-8864-agent-activity-events.md | 2 +- AGENTS.md | 1 + docs/agent-activity-contract.md | 94 ++++++++++++++++++++++ docs/architecture.md | 2 +- docs/diagnostics.md | 2 +- .../agent-activity-cursor-contract.pg.test.ts | 90 +++++++++++++++++++++ .../src/__tests__/agent-activity-route.test.ts | 10 +++ .../src/__tests__/sse-agent-activity.test.ts | 12 ++- scripts/check-fn-8864-ancestry.sh | 35 ++++++++ 9 files changed, 244 insertions(+), 4 deletions(-) Fusion-Task-Id: FN-8915 Fusion-Task-Lineage: da3f8c96-3b58-4e6d-a413-c51bdd643f26 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> |
||
|
|
3aa32a846c |
FN-8910: allow held tasks to remediate review findings
Allow pre-merge remediation to proceed under project-level merge holds while preserving task-level operator holds. - Restrict remediation holds to operator-authored task-level auto-merge settings - Record remediation and revision-budget refusals for parked review tasks - Keep fire-and-forget remediation failures in their review lane - Cover shared-branch recovery behavior and document the policy Files changed: .changeset/fn-8910-premerge-remediation-hold.md | 7 ++ docs/workflow-steps.md | 2 + packages/core/src/__tests__/task-merge.test.ts | 44 ++++++------- packages/core/src/merge/task-merge.ts | 20 +++--- .../__tests__/executor-graph-requeue-gate.test.ts | 60 ++++++++++++++++- ...cutor-live-branch-group-auto-merge-hold.test.ts | 63 ++++++++++++++++-- .../workflow-graph-optional-step-fix.test.ts | 24 +++++-- .../src/__tests__/workflow-task-runtime.test.ts | 10 ++- packages/engine/src/executor.ts | 76 ++++++++++++++++++---- 9 files changed, 244 insertions(+), 62 deletions(-) Fusion-Task-Id: FN-8910 Fusion-Task-Lineage: b5e10f87-67cf-4acf-b125-91be5ade17a8 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> |
||
|
|
ad91795dac |
FN-8843: assign eligible executors to new tasks
Assign durable executor ownership during shared task intake. - Resolve eligible executor owners for API, dashboard, and reserved-ID task creation. - Preserve explicit assignments, reject invalid owners, and audit unresolved ownerless intake. - Cover routing and PostgreSQL intake behavior with regression tests and document the contract. Files changed: .changeset/fn-8843-intake-agent-assignment.md | 7 + docs/architecture.md | 6 + docs/workflow-steps.md | 12 +- .../postgres/create-task-reserved-id.pg.test.ts | 187 +++++++++++++++ .../__tests__/task-intake-owner-resolver.test.ts | 141 ++++++++++++ packages/core/src/store.ts | 29 ++- packages/core/src/task-store/task-creation.ts | 251 +++++++++++++++++---- .../core/src/tasks/task-intake-owner-resolver.ts | 239 ++++++++++++++++++++ .../dashboard/src/__tests__/routes-tasks.test.ts | 47 ++++ .../__tests__/task-create-intake-owner.pg.test.ts | 195 ++++++++++++++++ .../src/routes/register-task-workflow-routes.ts | 12 +- .../src/__tests__/workflow-agent-routing.test.ts | 19 +- .../engine/src/agents/workflow-agent-router.ts | 37 ++- 13 files changed, 1120 insertions(+), 62 deletions(-) Fusion-Task-Id: FN-8843 Fusion-Task-Lineage: b94728b4-d9e8-4a26-8fbc-7096eb797839 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
29bb6d0dc2 |
FN-8868: restore durable agent activity telemetry
Restore Activity telemetry for durable agent sessions. - Emit session-start and usage events across durable agent lanes. - Count durable agent sessions and user messages in Activity analytics. - Cover lifecycle wiring and telemetry persistence with tests. Files changed: .../fn-8868-durable-agent-activity-telemetry.md | 7 + docs/dashboard-guide.md | 8 +- .../message-store-user-message-telemetry.test.ts | 73 ++++++++++ ...mmand-center-activity-durable-agents.pg.test.ts | 158 +++++++++++++++++++++ packages/core/src/board/activity-analytics.ts | 12 +- packages/core/src/stores/message-store.ts | 16 +++ packages/core/src/task-store/async/async-events.ts | 11 ++ .../dashboard/src/__tests__/chat-manager.test.ts | 88 ++++++++++++ packages/dashboard/src/chat.ts | 17 +++ .../__tests__/agent-usage-telemetry-lanes.test.ts | 84 +++++++++++ .../__tests__/agent-usage-telemetry-wiring.test.ts | 119 ++++++++++++++++ .../src/__tests__/agent-usage-telemetry.test.ts | 33 +++++ .../engine/src/__tests__/executor-prompt.test.ts | 8 ++ packages/engine/src/__tests__/merger-ai.test.ts | 11 ++ .../src/__tests__/merger-merge-lifecycle.test.ts | 21 ++- packages/engine/src/__tests__/reviewer.test.ts | 58 +++++++- .../src/__tests__/step-session-executor.test.ts | 37 ++++- packages/engine/src/__tests__/triage.test.ts | 31 ++++ packages/engine/src/agent-heartbeat.ts | 43 ++++++ packages/engine/src/agents/agent-logger.ts | 30 +++- .../engine/src/agents/agent-usage-telemetry.ts | 30 ++++ packages/engine/src/execution/reviewer.ts | 41 +++++- .../engine/src/execution/step-session-executor.ts | 12 ++ packages/engine/src/executor.ts | 27 +++- packages/engine/src/merge/merger-ai.ts | 7 + packages/engine/src/merger.ts | 120 +++++++++++++++- packages/engine/src/triage.ts | 5 + 27 files changed, 1085 insertions(+), 22 deletions(-) Fusion-Task-Id: FN-8868 Fusion-Task-Lineage: 0aa2ee4e-4d40-4adc-a510-bf8f4b1c0233 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> |
||
|
|
569d2eee91 |
FN-8885: add GitHub CI signal ingestion
Ingest signed GitHub CI webhook outcomes into Command Center incidents. - Support check_suite, workflow_run, and status events with HMAC verification. - Resolve the latest matching open incident for successful recovery events without creating tasks. - Document GitHub signal configuration and add connector, route, and monitor-store coverage. Files changed: .changeset/fn-8885-github-signals-connector.md | 7 ++ docs/dashboard-guide.md | 2 +- docs/settings-reference.md | 1 + docs/signals-connectors.md | 31 ++++- .../core/src/task-store/async/async-monitor.ts | 30 ++--- packages/dashboard/README.md | 5 +- .../src/__tests__/github-signal-source.test.ts | 49 ++++++++ .../src/__tests__/monitor-store.pg.test.ts | 35 ++++++ .../src/__tests__/register-signal-routes.test.ts | 132 +++++++++++++++++++- packages/dashboard/src/monitor-store.ts | 28 ++--- .../dashboard/src/routes/register-signal-routes.ts | 25 ++++ packages/dashboard/src/signal-source.ts | 17 ++- packages/dashboard/src/signal-sources/github.ts | 135 +++++++++++++++++++++ 13 files changed, 461 insertions(+), 36 deletions(-) Fusion-Task-Id: FN-8885 Fusion-Task-Lineage: d2e9f6ed-95fe-4387-81bd-2ee67b2e1283 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
3d6a908b95 |
FN-8898: document inert prerebase settings
Clarify that legacy prerebase settings are inert on the production merge path. - Mark retained prerebase configuration and audit events as legacy-only. - Add a static validator and tests preventing new prerebase callers. - Update merge architecture, testing, and settings documentation. Files changed: AGENTS.md | 2 +- docs/architecture.md | 3 +- docs/settings-reference.md | 6 +- docs/testing.md | 2 +- package.json | 6 +- packages/core/src/types/settings/settings-scope.ts | 32 +++-- .../src/errors/transient-merge-error-classifier.ts | 12 +- packages/engine/src/merge/merger-auto-prerebase.ts | 12 +- packages/engine/src/util/run-audit.ts | 2 + scripts/__tests__/check-prerebase-inert.test.mjs | 73 +++++++++++ scripts/__tests__/run-static-gate-checks.test.mjs | 1 + scripts/__tests__/verify-fast.test.mjs | 1 + scripts/check-prerebase-inert.mjs | 146 +++++++++++++++++++++ scripts/lib/source-projection.mjs | 87 ++++++++++++ 14 files changed, 359 insertions(+), 26 deletions(-) Fusion-Task-Id: FN-8898 Fusion-Task-Lineage: 9cfd836d-17c2-44a0-a076-56fef0917935 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
2643f4e567 |
FN-8884: enable GitHub-native PR auto-merge
Enable opt-in GitHub-managed auto-merge for pull requests. - Add a project setting and dashboard control for GitHub native auto-merge. - Arm individual, group, dashboard, and workflow PRs with `gh pr merge --auto` or GraphQL, including while checks are pending. - Preserve deferred PR reconciliation, unavailable-feature errors, project-scoped runtime configuration, tests, documentation, and a release changeset. Files changed: .changeset/fn-8884-github-native-auto-merge.md | 7 + docs/settings-reference.md | 5 + packages/cli/src/commands/__tests__/daemon.test.ts | 16 +++ packages/cli/src/commands/__tests__/serve.test.ts | 14 ++ .../src/commands/__tests__/task-lifecycle.test.ts | 158 +++++++++++++++++++++ packages/cli/src/commands/daemon.ts | 11 +- packages/cli/src/commands/dashboard.ts | 11 +- packages/cli/src/commands/serve.ts | 11 +- packages/cli/src/commands/task-lifecycle.ts | 45 ++++-- .../core/src/__tests__/settings-defaults.test.ts | 4 + packages/core/src/config/settings-schema.ts | 1 + packages/core/src/types/settings/settings-scope.ts | 8 ++ .../settings/__tests__/section-keys.test.ts | 1 + .../app/components/settings/section-keys.ts | 1 + .../components/settings/sections/MergeSection.tsx | 14 +- .../settings-default-descriptions.test.tsx | 1 + .../src/__tests__/github-native-auto-merge.test.ts | 114 +++++++++++++++ .../src/__tests__/routes-pr-merge.test.ts | 84 +++++++++++ packages/dashboard/src/github.ts | 88 +++++++++++-- packages/dashboard/src/index.ts | 2 +- .../dashboard/src/routes/register-git-github.ts | 33 +++-- .../project-engine-deferred-startup.test.ts | 21 +++ packages/engine/src/project-engine-manager.ts | 2 + packages/engine/src/project-engine.ts | 6 + packages/engine/src/project/project-runtime.ts | 6 + packages/engine/src/runtimes/in-process-runtime.ts | 9 +- packages/i18n/locales/en/app.json | 4 +- 27 files changed, 634 insertions(+), 43 deletions(-) Fusion-Task-Id: FN-8884 Fusion-Task-Lineage: cf1b1ea4-7ef7-4050-bd87-25933456a5b6 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |