Self-healing now resumes stranded assigned in-progress work when an agent has no active run or execution.
- Add a self-healing pass that groups stale assigned in-progress tasks by durable agent and calls the executor resume seam without moving tasks backward.
- Emit run-audit telemetry for reattached orphaned executions and wire the resume hook through the in-process runtime.
- Cover grace windows, pause/active-run/active-execution guards, task filtering, and registration order with engine tests.
- Document the recovery behavior and add a patch changeset for the published CLI package.
Files changed:
.changeset/fn-6336-reattach-orphaned-executions.md | 5 +
docs/agents.md | 2 +
docs/architecture.md | 2 +
...lf-healing-reattach-orphaned-executions.test.ts | 217 +++++++++++++++++++++
packages/engine/src/run-audit.ts | 1 +
packages/engine/src/runtimes/in-process-runtime.ts | 1 +
packages/engine/src/self-healing.ts | 122 ++++++++++++
7 files changed, 350 insertions(+)
Fusion-Task-Id: FN-6336
Fusion-Task-Lineage: 6d8519b9-d8b0-4726-9b45-bfa445b7883e
Resolve conflicts from main's FN-6232 single-source triage prompt refactor:
- Drop the inline FAST_TRIAGE_SYSTEM_PROMPT const removed by main; the fast
triage prompt now lives in agent-prompts.ts (planning-fast seam).
- Migrate the PR's no-commit/operational-routing heuristic edits into the
fast block of agent-prompts.ts (standard block already carried them).
- Point triage tests at FAST_PLANNING_PROMPT/TRIAGE_POLICY_PROMPT instead of
the removed const.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Quarantine unrelated engine test flakes so the gate avoids known unstable fixtures.
- Add the soft-delete blocker residue reliability test to the quarantine ledger and reliability interaction exclusions.
- Add the bubblewrap sandbox backend test to the quarantine ledger and engine-core exclusions.
Files changed:
packages/engine/vitest.config.ts | 6 +++++-
scripts/lib/test-quarantine.json | 10 ++++++++++
2 files changed, 15 insertions(+), 1 deletion(-)
Fusion-Task-Id: FN-6319
Fusion-Task-Lineage: 9a47ae20-76b8-47d8-8858-f4fe51ea807e
Move frontend UX criteria out of triage self-instructions and into deterministic workflow policy.
- Add a shared frontend UX policy helper that matches frontend file scopes and injects the byte-equivalent checklist idempotently.
- Apply the policy during triage finalization and persist the updated PROMPT.md when applicable.
- Replace the legacy prompt-based injection instructions with a pointer to the deterministic policy.
- Cover path matching, insertion behavior, and checklist parity with focused core tests.
- Add a minor changeset for the published Fusion package.
Files changed:
.changeset/fn-6237-frontend-ux-policy.md | 5 +
.../core/src/__tests__/frontend-ux-policy.test.ts | 119 +++++++++++++++++
packages/core/src/agent-prompts.ts | 29 +---
packages/core/src/frontend-ux-policy.ts | 148 +++++++++++++++++++++
packages/core/src/index.ts | 1 +
packages/engine/src/triage.ts | 19 ++-
6 files changed, 291 insertions(+), 30 deletions(-)
Fusion-Task-Id: FN-6237
Fusion-Task-Lineage: 7ac95064-9ec6-4760-8609-20c35075aca1
Stabilize the self-healing dirty worktree recovery test by avoiding timer and async cleanup races.
- Force real timers for branch conflict reclaim tests.
- Provide explicit integration branch settings and dispatcher behavior for the recovery path.
- Use synchronous fixture setup and cleanup around the recovery patch assertion.
Files changed:
packages/engine/src/__tests__/self-healing.test.ts | 77 +++++++++++++---------
1 file changed, 46 insertions(+), 31 deletions(-)
Fusion-Task-Id: FN-6280
Fusion-Task-Lineage: ef93f14a-1d16-4cca-ac6d-3cfd7249ca21
Ensure assigned agents resume task work even when their heartbeat loop is idle.
- add deferred assignment refiring when an agent is assigned work without an active heartbeat run
- track in-process runtime activity so scheduled work is not double-started
- cover idle, active, and concurrent heartbeat assignment paths with scheduler and runtime tests
- document the deferred assignment wake-up behavior and add a changeset
Files changed:
.changeset/fn-6284-deferred-assignment-refire.md | 5 +
docs/agents.md | 2 +
docs/architecture.md | 1 +
.../src/__tests__/heartbeat-scheduler.test.ts | 174 ++++++++++++++++++++-
packages/engine/src/agent-heartbeat.ts | 109 ++++++++++++-
.../runtimes/__tests__/in-process-runtime.test.ts | 24 +++
packages/engine/src/runtimes/in-process-runtime.ts | 3 +
7 files changed, 311 insertions(+), 7 deletions(-)
Fusion-Task-Id: FN-6284
Fusion-Task-Lineage: cf8a9abe-163e-45c6-961a-095891e45ea5
Deduplicate self-healing log entries for queued tasks that remain blocked by the same active file-scope overlap.
- Track the last active overlap blocker logged per task and skip duplicate preserved-queued log entries across self-healing passes.
- Clear the memo when blockers change, resolve, or the manager stops so legitimate future recoveries are still logged.
- Cover unchanged blockers, blocker changes, resolved blockers, stop/reset behavior, and FN-5488 stale-blockedBy preservation with regression tests.
Files changed:
packages/engine/src/__tests__/self-healing.test.ts | 123 +++++++++++++++++++++
packages/engine/src/self-healing.ts | 61 ++++++++--
2 files changed, 177 insertions(+), 7 deletions(-)
Fusion-Task-Id: FN-6276
Fusion-Task-Lineage: 169d4402-ec4e-4fa9-8225-2f545c11a3f7
Keep task detail PR and review affordances synchronized with the current project auto-merge setting.
- Thread the live auto-merge value into task detail modals and list split-pane detail views.
- Prefer the live auto-merge setting over the stale fetched modal snapshot while preserving task-level overrides.
- Cover PR and review tab behavior for auto-merge on/off and document the dashboard behavior.
- Evict flaky engine gate entries and add a patch changeset for the published CLI package.
Files changed:
.changeset/fn-6247-automerge-off-modal-stale.md | 5 +
docs/dashboard-guide.md | 1 +
packages/dashboard/app/App.tsx | 3 +-
packages/dashboard/app/components/AppModals.tsx | 2 +
packages/dashboard/app/components/ListView.tsx | 3 +
.../dashboard/app/components/TaskDetailModal.tsx | 4 +-
.../__tests__/TaskDetailModal.create-pr.test.tsx | 171 ++++++++++++++++++++-
packages/engine/vitest.config.ts | 2 -
8 files changed, 182 insertions(+), 9 deletions(-)
Fusion-Task-Id: FN-6247
Fusion-Task-Lineage: 1321c03a-216d-4b15-bf4f-95621d68c9ae
Rescue the already-merged self-healing real-git test while quarantining a separate flaky merger AI suite.
- Call the already-merged recovery path directly in the rescued test and assert specific audit event types instead of exact total counts.
- Remove self-healing-already-merged.real-git.test.ts from the engine default quarantine list and ledger.
- Add merger-ai.test.ts to the engine default quarantine list and quarantine ledger with FN-6238 evidence.
Files changed:
.../self-healing-already-merged.real-git.test.ts | 20 +++++++++++++-------
packages/engine/vitest.config.ts | 2 +-
scripts/lib/test-quarantine.json | 10 +++++-----
3 files changed, 19 insertions(+), 13 deletions(-)
Fusion-Task-Id: FN-6238
Fusion-Task-Lineage: b04451e3-fbd3-4dee-aca2-f542d1036d20
Quarantines the flaky active-session pruning coverage without hiding the rest of merger cleanup tests.
- Move the active-session pruning scenario into its own focused test file.
- Keep the broader merger cleanup suite in the reliability project.
- Point the quarantine ledger and engine default exclude at only the isolated flaky test.
Files changed:
.../merger-ai-cleanup-active-session.test.ts | 60 ++++++++++++++++++++++
.../engine/src/__tests__/merger-ai-cleanup.test.ts | 22 ++------
packages/engine/vitest.config.ts | 2 +-
scripts/lib/test-quarantine.json | 4 +-
4 files changed, 66 insertions(+), 22 deletions(-)
Fusion-Task-Id: FN-6207
Fusion-Task-Lineage: b5e806cb-aec8-4893-83ef-d27164250a5c
Restore Pi-upgraded workspaces to keep Fusion resources accessible and recover title generation when configured models go stale.
- Mark read-only Fusion/Pi provider settings views as project-trusted so extension loading keeps working after Pi upgrades.
- Retry task title summarization with automatic model resolution when the configured provider model is missing from the Pi registry.
- Cover provider settings trust behavior and stale summarizer fallback paths with regression tests.
- Document the read-only settings trust contract and add a patch changeset.
Files changed:
.changeset/fn-6218-pi-upgrade-regressions.md | 5 +
docs/settings-reference.md | 2 +
docs/task-management.md | 2 +
.../commands/__tests__/provider-settings.test.ts | 16 ++++
packages/cli/src/commands/provider-settings.ts | 5 +
packages/core/src/__tests__/ai-summarize.test.ts | 102 +++++++++++++++++++++
packages/core/src/ai-summarize.ts | 85 ++++++++++++-----
.../src/__tests__/pi-create-fn-agent.test.ts | 32 +++++++
packages/engine/src/pi.ts | 7 +-
9 files changed, 233 insertions(+), 23 deletions(-)
Fusion-Task-Id: FN-6218
Fusion-Task-Lineage: 3d6aca32-a56a-43a0-a57b-8e6abc839ce9
The idle-worktree sweep (cleanupOrphans) and cap-enforcement sweep only
guarded isWorktreeResumeReserved (CLI resume sessions), not in-process
active sessions. scanIdleWorktrees treats a worktree as active only while
a non-done task points at it, but the executor transiently moves tasks to
done or nulls the worktree field mid-run — so a checkout backing a live
executor/merger/step/workflow session could be removed before the work
finished. Add the activeSessionRegistry.isPathActive guard to both loops,
mirroring reapUnregisteredOrphans (FN-4811/FN-5065).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>