Commit Graph

2587 Commits

Author SHA1 Message Date
gsxdsm
93b2288d37 FN-6433: rescue non-CLI quarantined tests
Rescue and ratchet non-CLI quarantine state across engine, core, and dashboard suites.

- Empty the core, dashboard, and engine quarantine exclude arrays after proving rescued suites run under package load.
- Replace broad AI-merge active-session registry cleanup with path-scoped unregistering in engine tests.
- Delete the duplicate soft-delete blocker residue suite and clear the quarantine ledger.
- Document the non-CLI quarantine sweep pattern for future rescues.

Files changed:
 docs/testing.md                                    |   2 +
 packages/core/vitest.config.ts                     |  10 +-
 packages/dashboard/vitest.config.ts                |  12 +-
 .../merger-ai-cleanup-active-session.test.ts       |  20 +++-
 .../engine/src/__tests__/merger-ai-cleanup.test.ts |   5 +-
 .../soft-delete-blocker-residue.test.ts            | 128 ---------------------
 packages/engine/vitest.config.ts                   |  12 +-
 scripts/lib/test-quarantine.json                   |  65 +----------
 8 files changed, 40 insertions(+), 214 deletions(-)

Fusion-Task-Id: FN-6433

Fusion-Task-Lineage: 18c37475-e6e1-4358-9350-eca65cf53b68
2026-06-14 15:29:35 -07:00
Phil Larson
93fd220aaf fix: guard stuck-loop park logging
Handle logEntry failures after in-place parking without falling back to executor requeue and tighten the reliability assertion for STUCK_LOOP_EXHAUSTED.
2026-06-14 11:19:11 -07:00
Phil Larson
10ee5954d5 fix: guard stuck-loop in-place park patch failure 2026-06-14 11:09:17 -07:00
Phil Larson
f1ac8d5f6b fix: address stuck-loop parking review comments 2026-06-14 10:59:21 -07:00
Phil Larson
19eca3d74b fix(engine): park incomplete stuck-loop exhaustion
Preserve incomplete task progress after stuck-kill budget exhaustion while marking the task failed and paused for manual intervention instead of making it scheduler-runnable again.
2026-06-14 10:42:36 -07:00
gsxdsm
4482425d4b chore(release): v0.43.0
Version bump via changesets.
2026-06-14 00:43:13 -07:00
gsxdsm
aa71ace101 fix(auth): refresh expired Claude OAuth tokens
Refresh stored Claude OAuth credentials before reporting dashboard auth status or resolving model auth so users do not need to repeatedly re-login after access-token expiry.

Coalesce concurrent refresh attempts, prevent stale refreshes from overwriting newer logins, and route CLI dashboard/serve/daemon/onboard auth wiring through the shared refresh-capable storage.
2026-06-13 23:20:06 -07:00
gsxdsm
be2773b412 FN-6423: fix scheduler capacity accounting
Correct scheduler dispatch diagnostics so capacity decisions use consistent non-negative slot counts.

- Clamp excess semaphore releases at zero and warn once when a slot is returned without an active holder.
- Recompute dispatch capacity at each queue decision, including tasks started earlier in the same scheduler tick.
- Update scheduler and semaphore tests for true binding gates, non-negative diagnostics, and workflow-step env stability.
- Add a patch changeset for the scheduler capacity fix.

Files changed:
 .changeset/fn-6423-scheduler-capacity.md           |   5 +
 packages/engine/src/__tests__/concurrency.test.ts  |  32 ++++++
 .../src/__tests__/executor-step-session.test.ts    |  10 +-
 packages/engine/src/__tests__/scheduler.test.ts    | 122 ++++++++++++++++++++-
 packages/engine/src/concurrency.ts                 |  29 ++++-
 packages/engine/src/scheduler.ts                   | 117 ++++++++++----------
 6 files changed, 248 insertions(+), 67 deletions(-)

Fusion-Task-Id: FN-6423

Fusion-Task-Lineage: a6b2e668-a822-46e9-9cd8-ac267fbde804
2026-06-13 21:23:39 -07:00
gsxdsm
b1ba87e599 FN-6414: preserve built-in Z.ai models after extensions
Keep GLM-5.2 visible when user Z.ai extensions replace the provider registration.

- Add shared helpers to clone and register the built-in Z.ai provider safely.
- Re-merge missing built-in Z.ai models after extension provider registration in daemon, serve, dashboard, and pi flows.
- Cover provider replacement behavior in core and dashboard model route tests, and document the extension-preserving behavior.

Files changed:
 .changeset/FN-6414-glm-5-2-visible.md              |  5 ++
 docs/settings-reference.md                         |  2 +-
 packages/cli/src/commands/daemon.ts                | 12 +--
 packages/cli/src/commands/dashboard.ts             | 12 +--
 packages/cli/src/commands/serve.ts                 | 12 +--
 packages/core/src/__tests__/zai-provider.test.ts   | 33 +++++++-
 packages/core/src/index.ts                         |  7 +-
 packages/core/src/zai-provider.ts                  | 93 +++++++++++++++++++++
 ...register-model-routes-zai-real-registry.test.ts | 97 ++++++++++++++++++++++
 packages/engine/src/pi.ts                          | 12 +--
 10 files changed, 250 insertions(+), 35 deletions(-)

Fusion-Task-Id: FN-6414

Fusion-Task-Lineage: f0990da2-968d-4782-8c00-fbc350d6954f
2026-06-13 21:17:20 -07:00
gsxdsm
7b839069b5 FN-6420: run dependency sync in AI merge worktrees
Run configured or inferred dependency installs before AI merge verification uses the clean-room worktree.

- Add shared dependency-sync helpers with install marker caching for inferred lockfile installs.
- Run dependency sync during AI clean-room merges and audit/log the command, skip reason, and duration.
- Reuse the helper from merger paths while documenting the new behavior and covering install success/failure cases.

Files changed:
 .changeset/fn-6420-ai-merge-dependency-sync.md     |   5 +
 docs/architecture.md                               |   2 +-
 docs/settings-reference.md                         |   2 +-
 .../src/__tests__/executor-step-session.test.ts    |   5 +-
 .../merger-ai-dependency-install.slow.test.ts      | 269 +++++++++++++++++++++
 packages/engine/src/merge-dependency-sync.ts       | 144 +++++++++++
 packages/engine/src/merger-ai.ts                   |  31 +++
 packages/engine/src/merger.ts                      | 120 +++------
 packages/engine/src/run-audit.ts                   |   1 +
 9 files changed, 484 insertions(+), 95 deletions(-)

Fusion-Task-Id: FN-6420

Fusion-Task-Lineage: 49353cb6-4953-4670-b620-a90331f048dc
2026-06-13 21:09:12 -07:00
gsxdsm
821a8fb936 Merge pull request #1672 from Runfusion/feature/ce-workflow-integration
feat: make the compound-engineering workflow run the CE way end-to-end
2026-06-13 16:36:57 -07:00
gsxdsm
9149121bb6 FN-6401: add built-in Z.ai GLM-5.2 support
Add Z.ai's built-in provider registration so GLM-5.2 is selectable across Fusion model settings.

- Define and export a shared Z.ai provider registration with existing GLM models plus GLM-5.2.
- Register the built-in provider for CLI server and engine pi model registries.
- Cover provider availability and CLI auth-provider wrapping with focused tests.
- Document Z.ai model selection and add a minor changeset.

Files changed:
 .changeset/FN-6401-glm-5-2.md                      |   5 +
 docs/settings-reference.md                         |   2 +
 packages/cli/src/commands/__tests__/daemon.test.ts |  11 ++
 .../cli/src/commands/__tests__/dashboard.test.ts   |  13 +++
 packages/cli/src/commands/__tests__/serve.test.ts  |  11 ++
 packages/cli/src/commands/daemon.ts                |   8 ++
 packages/cli/src/commands/dashboard.ts             |   8 ++
 packages/cli/src/commands/serve.ts                 |   8 ++
 packages/core/src/__tests__/zai-provider.test.ts   |  48 ++++++++
 packages/core/src/index.ts                         |   2 +
 packages/core/src/zai-provider.ts                  | 125 +++++++++++++++++++++
 .../src/__tests__/pi-create-fn-agent.test.ts       |   5 +-
 packages/engine/src/pi.ts                          |  20 +++-
 13 files changed, 264 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-6401

Fusion-Task-Lineage: e1f7a90d-0614-4d9f-826f-015605a08baa
2026-06-13 16:30:29 -07:00
gsxdsm
bb810d6f33 FN-6394: relax non-progress userPaused assertion
Update the non-progress churn reliability test to match the Move-Task contract for never-user-paused tasks.

- Treat undefined userPaused as not user-paused instead of requiring false.
- Document why engine rebounds should not write userPaused for never-user-paused tasks.

Files changed:
 .../src/__tests__/reliability-interactions/non-progress-churn.test.ts | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-6394

Fusion-Task-Lineage: 59554c89-4e32-490f-88eb-d22ee7fdca31
2026-06-13 16:30:28 -07:00
gsxdsm
ee6d7acec8 FN-6375: include attachment paths in recovery prompts
Workflow context-limit recovery prompts now direct agents to read task attachments from the project root.

- Pass the project root into reduced workflow step prompts so attachment directories can be absolute when available.
- Replace the autonomous-agent "ask for context" wording with direct file-reading guidance for attachments.
- Cover root-aware, fallback, placement, and context-limit recovery attachment prompt behavior.
- Add a patch changeset for the published Fusion package.

Files changed:
 .../fn-6375-workflow-attachment-recovery-prompt.md |  5 ++
 .../src/__tests__/step-session-executor.test.ts    | 70 +++++++++++++++++++---
 packages/engine/src/step-session-executor.ts       |  8 ++-
 3 files changed, 72 insertions(+), 11 deletions(-)

Fusion-Task-Id: FN-6375
Fusion-Task-Lineage: ed9a5367-1623-49cb-9c7f-116c59ce5117
2026-06-13 16:30:28 -07:00
gsxdsm
dd0ceec7dd Merge main: keep ce-* agent install alongside stale-session recovery; address PR review
Resolves the onLoad conflict in the compound-engineering plugin by keeping both
the bundled ce-* persona-def install (this branch) and main's
recoverStaleSessionsForContext call.

Also addresses PR #1672 review feedback:
- executor: sentinel resume now guards on !live.paused (mirrors
  runAwaitInputNode) so a still-paused task can't consume a reply and re-enter
  the skill early.
- TaskCard: make the Answer-questions button text/title/aria-label fallbacks
  consistent ("Answer questions") for label-in-name a11y; update test.
- ce-work: replace the unshipped `skill: ce-worktree` reference with the real
  git worktree commands so Option B can't dead-end.
- ce-resolve-pr-feedback: invoke bundled scripts by absolute path via the new
  FUSION_CE_SKILLS_DIR env (sessions run with cwd=projectRoot); add the Fusion
  await-input sentinel path instead of AskUserQuestion for workflow steps;
  normalize whitespace-only review bodies like PR comments.
- plugin: expose FUSION_CE_SKILLS_DIR (installed skills root) to step sessions.
- plan doc: add language to fenced block (markdownlint MD040).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 16:08:51 -07:00
gsxdsm
3098478d9e Merge origin/main: align merge-region visited nodes with collapse refactor
main's workflow-graph-executor now collapses the merge-policy region
(merge-gate, branch-group-*, merge-attempt) into a single synthetic
`merge` node. Reconcile the S05 work-item-driver test's visitedNodeIds
assertion to match, and union the `observed` recording-primitive fields
from both branches (executedTasks + merge attempt/run/workflow ids).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 15:47:01 -07:00
gsxdsm
43c54290a9 chore(release): v0.42.0
Version bump via changesets.
2026-06-13 12:11:05 -07:00
gsxdsm
97a49ac196 FN-6382: unquarantine stabilized flaky tests
Restore quarantined tests by fixing their flaky harness seams instead of extending the deletion ratchet.

- Mark active Vitest worker roots and skip live worker roots during prune cleanup.
- Make bubblewrap backend coverage deterministic with an injectable runner and restore it to the engine gate.
- Remove rescued core and bubblewrap tests from the quarantine ledger and Vitest excludes.

Files changed:
 .../core/src/__test-utils__/vitest-teardown.ts     | 10 +++++-
 packages/core/vitest.config.ts                     |  8 +----
 .../__tests__/sandbox/bubblewrap-backend.test.ts   | 29 +++++++++------
 packages/engine/src/sandbox/bubblewrap-backend.ts  |  9 +++--
 packages/engine/vitest.config.ts                   |  1 -
 scripts/__tests__/test-changed.test.mjs            | 23 ++++++++++++
 scripts/lib/test-quarantine.json                   | 34 ++----------------
 scripts/test-changed.mjs                           | 41 ++++++++++++++++++++++
 8 files changed, 102 insertions(+), 53 deletions(-)

Fusion-Task-Id: FN-6382

Fusion-Task-Lineage: 018dc7ac-1ef1-495e-a5fd-96ea44fcd43b
2026-06-13 11:39:37 -07:00
gsxdsm
0d882b4350 FN-6383: add branch canonicalization unit coverage
Expand executor tests around canonical Fusion branch naming behavior.

- Cover standard, lowercase, and case-only variant task IDs.
- Document current prefix behavior for branch-name inputs and malformed edge cases.
- Pin lowercase-only behavior without trimming or slugifying task ID text.

Files changed:
 .../executor-branch-canonicalization.test.ts       | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

Fusion-Task-Id: FN-6383

Fusion-Task-Lineage: cb43e67d-2cb3-4e08-8ea3-eaa7939ae037
2026-06-13 11:08:56 -07:00
gsxdsm
f68775a5a6 FN-6376: preserve user-paused tasks during recovery
Ensure automated resume and recovery paths leave user-paused tasks paused.

- Skip user-paused tasks when cascading agent resume and approval-decision unpauses.
- Preserve userPaused during stuck-task recovery and log skipped recoveries for user-paused tasks.
- Add regression coverage across engine heartbeat, self-healing, and dashboard route surfaces.
- Document the invariant and add a patch changeset.

Files changed:
 .changeset/fn-6376-user-paused-stays-paused.md     |  5 ++++
 docs/architecture.md                               |  1 +
 .../src/__tests__/routes-agent-runs.test.ts        |  4 +++
 .../src/__tests__/routes-approval.test.ts          | 26 +++++++++++++++--
 .../src/routes/register-agent-runtime-routes.ts    |  2 +-
 .../src/routes/register-approval-routes.ts         |  2 +-
 .../src/__tests__/heartbeat-executor.test.ts       | 28 ++++++++++++++++++
 packages/engine/src/__tests__/self-healing.test.ts | 33 +++++++++++++++++++++-
 packages/engine/src/agent-heartbeat.ts             |  3 +-
 packages/engine/src/self-healing.ts                | 12 ++++++--
 10 files changed, 108 insertions(+), 8 deletions(-)

Fusion-Task-Id: FN-6376
Fusion-Task-Lineage: efa00cb1-58e1-496a-919b-69867f8bff3c
2026-06-13 10:44:01 -07:00
gsxdsm
e0ec3d1fbd FN-6368: route task chat steering to active sessions
Ensure task chat messages reach the live execution surface instead of waiting for a future session.

- Track seen steering comments for legacy, step-session, and workflow-step execution paths.
- Forward new task chat steering to active step sessions and workflow step sessions, including parallel step handles.
- Remove misleading inactive-session composer copy and cover the steering paths with regression tests.
- Add a patch changeset for the published Fusion package.

Files changed:
 .changeset/fn-6368-steering-running-session.md     |   5 +
 packages/dashboard/app/components/TaskChatTab.tsx  |  12 +-
 .../app/components/__tests__/TaskChatTab.test.tsx  |  18 +-
 .../src/__tests__/executor-step-session.test.ts    | 108 ++++++++++++
 .../engine/src/__tests__/executor-test-helpers.ts  |   3 +
 .../src/__tests__/step-session-executor.test.ts    |  40 +++++
 packages/engine/src/executor.ts                    | 186 ++++++++++++++-------
 packages/engine/src/step-session-executor.ts       |  16 ++
 8 files changed, 312 insertions(+), 76 deletions(-)

Fusion-Task-Id: FN-6368

Fusion-Task-Lineage: 610a6185-b136-4fea-a4bd-ea78ab5aab47
2026-06-13 09:41:20 -07:00
gsxdsm
00282fbf20 FN-6357: document external integration evidence format
Document the labeled provenance evidence layout expected by spec validation.

- Add an AGENTS.md example for required external integration evidence fields.
- Expand contributing guidance with accepted labels, URL expectations, and checksum rules.
- Add a regression test that keeps the documented example aligned with the evidence gate.

Files changed:
 AGENTS.md                                          | 14 ++++++++
 docs/contributing.md                               | 28 ++++++++++++++++
 .../src/__tests__/docs-evidence-example.test.ts    | 37 ++++++++++++++++++++++
 3 files changed, 79 insertions(+)

Fusion-Task-Id: FN-6357

Fusion-Task-Lineage: 788260ed-d5cf-4592-b117-40af5c45e0a1
2026-06-13 09:18:58 -07:00
gsxdsm
a43639b11a feat(engine): pause workflow on skill-emitted await-input sentinel (U6)
When a skill in a graph workflow step emits ===FUSION_AWAIT_INPUT===,
runGraphCustomNode now parks the task awaiting-user-input with the
question (reusing the runAwaitInputNode pause/watermark model so the
dashboard input banner + task-card button surface it), and halts the
walk. On resume the node re-runs; the resume check consumes the user's
steering reply and lets the skill continue with the answer.

Pure sentinel parser unit-tested (6 cases). End-to-end pause/resume
through the graph interpreter needs verification on a running board.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 09:04:54 -07:00
gsxdsm
e305b1aa4c FN-6361: respect paused tasks during triage planning
Keep triage planning from advancing or continuing work after a task is paused.

- Abort active triage sessions and reviewer subagents when task updates mark the task paused.
- Skip approved-spec recovery and final approved-spec transitions while a task remains paused.
- Add regression coverage for paused planning, pause-driven aborts, and published package changeset metadata.

Files changed:
 .changeset/pause-triage-planning.md                |   5 +
 .../src/__tests__/triage-pause-abort.test.ts       | 237 +++++++++++++++++++++
 packages/engine/src/triage.ts                      |  57 +++++
 3 files changed, 299 insertions(+)

Fusion-Task-Id: FN-6361
Fusion-Task-Lineage: 33d849d5-1461-49ae-9fe0-be98b534ac35
2026-06-13 08:38:59 -07:00
gsxdsm
195f731b9d feat(engine): optional systemPromptOverride for fn_spawn_agent (U2)
Add an optional systemPromptOverride to spawnAgentParams. When non-empty,
the spawned child runs under that persona system prompt instead of the
generic child base prompt (executor instructions still appended), so a
caller can spawn a specific persona — the primitive the compound-
engineering reviewer/research fan-out needs.

Two spikes confirmed the need: fn_spawn_agent had no persona param, and
Fusion has no plugin agent-contribution channel — so the lightweight path
is a generic override here + plugin-local persona defs the skill reads and
passes inline (revised KTD-4/U2/U3 in the plan). Behavioral coverage lands
with U10.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 07:03:10 -07:00
gsxdsm
c850a30cde feat(workflow): headless step signal + bundle CE shipping skills (U1, U8)
U1: workflow-step sessions now carry FUSION_WORKFLOW_STEP=1 (scoped to
the step session, not the main executor) so skills detect autonomous
context and surface questions via await-input instead of a dead blocking
tool.

U8: bundle ce-commit, ce-commit-push-pr, and ce-resolve-pr-feedback
(vendored from compound-engineering 3.9.4) so the CE merge/PR flow has
its skills. Registered in COMPOUND_ENGINEERING_SKILLS; manifest test
updated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 06:56:22 -07:00
gsxdsm
bffae81a98 FN-6277: track and reconcile legacy auto-merge stamps
Track legacy auto-merge stamp provenance and add safe operator cleanup.

- Add autoMergeProvenance storage and migration support so user overrides can be distinguished from legacy review-entry stamps.
- Mark existing ambiguous in-review autoMerge=true tasks as legacy stamps without changing behavior, and expose a dry-run/apply reconciliation API to clear them safely.
- Emit a non-mutating advisory when global auto-merge is disabled while legacy stamped review tasks remain.
- Cover migration, persistence, reconciliation, movement, merge resolution, and advisory behavior with regression tests and docs.

Files changed:
 .../fn-6277-legacy-automerge-stamp-cleanup.md      |   5 +
 docs/architecture.md                               |   2 +-
 docs/settings-reference.md                         |   2 +-
 packages/core/src/__tests__/db-migrate.test.ts     |  30 ++--
 packages/core/src/__tests__/db.test.ts             |  44 +++---
 packages/core/src/__tests__/goals-schema.test.ts   |   2 +-
 packages/core/src/__tests__/insight-store.test.ts  |  10 +-
 .../legacy-automerge-stamp-reconcile.test.ts       | 144 +++++++++++++++++++
 .../src/__tests__/merge-request-record.test.ts     |   2 +-
 packages/core/src/__tests__/mission-store.test.ts  |   2 +-
 packages/core/src/__tests__/run-audit.test.ts      |   4 +-
 .../core/src/__tests__/store-merge-queue.test.ts   |   2 +-
 packages/core/src/__tests__/store-movement.test.ts |  14 ++
 packages/core/src/__tests__/task-documents.test.ts |   2 +-
 packages/core/src/__tests__/task-merge.test.ts     |  16 ++-
 packages/core/src/db.ts                            |  10 +-
 packages/core/src/index.ts                         |   1 +
 packages/core/src/store.ts                         | 157 ++++++++++++++++++++-
 packages/core/src/task-merge.ts                    |   8 +-
 packages/core/src/types.ts                         |  10 +-
 .../automerge-toggle-legacy-advisory.test.ts       | 128 +++++++++++++++++
 packages/engine/src/project-engine.ts              |  68 ++++++++-
 22 files changed, 593 insertions(+), 70 deletions(-)

Fusion-Task-Id: FN-6277

Fusion-Task-Lineage: 22d36519-f2ba-4ca7-8a09-12fc803c9a5b
2026-06-13 05:06:05 -07:00
gsxdsm
7eafa91dd7 FN-6350: accept labeled external integration evidence
Relax the spec-review evidence detector so complete labeled Markdown evidence passes validation.

- Scan dedicated External Integration Evidence sections alongside existing prompt sections.
- Recognize labeled repo, docs, release/download, CLI name, and checksum evidence with flexible Markdown formatting.
- Add regression coverage for FN-6349-style evidence blocks and triage reviewer handoff.

Files changed:
 ...alidation-external-integration-evidence.test.ts | 51 +++++++++++++++++++
 ...triage-review-spec-external-integration.test.ts | 40 ++++++++++++++-
 .../external-integration-evidence.ts               | 59 +++++++++++++++++++---
 3 files changed, 143 insertions(+), 7 deletions(-)

Fusion-Task-Id: FN-6350

Fusion-Task-Lineage: 7d0d9a0a-1f51-41db-9434-d15496293c2c
2026-06-13 04:54:59 -07:00
gsxdsm
2a37ee4e59 FN-6341: settle cli-agent re-entry test promise
Stabilize the cli-agent re-entry regression test by awaiting the original run after the replacement session succeeds.

- Keep the first cli-agent run promise instead of dropping it with void.
- Assert the active task session still points at the first PTY before simulating re-entry.
- Kill and await the first session at the end so no hub or store work outlives teardown.

Files changed:
 packages/engine/src/__tests__/cli-agent-executor.test.ts | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-6341

Fusion-Task-Lineage: 3e365f21-0d05-496a-adec-aa782aa83503
2026-06-13 04:06:17 -07:00
gsxdsm
4e6df035c1 FN-6275: allow verified no-op completions
Allow executors to finish already-satisfied tasks without fabricating commits while preserving existing completion guards.

- Add leading sentinel parsing for premise-stale, no-op, duplicate, and redundant completion summaries.
- Permit zero-commit fn_task_done only for recognized sentinels or existing no-commit contracts, with audit log/activity details.
- Document the verified no-op completion contract and add regression coverage for accepted and refused paths.

Files changed:
 .changeset/fn-6275-no-op-completion.md             |   5 ++
 docs/architecture.md                               |   1 +
 .../src/__tests__/no-op-completion-marker.test.ts  |  55 ++++++++++++
 packages/core/src/agent-prompts.ts                 |   4 +
 packages/core/src/index.ts                         |   5 ++
 packages/core/src/no-op-completion-marker.ts       |  48 ++++++++++
 .../__tests__/executor-task-done-invariant.test.ts | 100 +++++++++++++++++++++
 .../engine/src/__tests__/executor-test-helpers.ts  |   1 +
 packages/engine/src/executor.ts                    |  64 ++++++++++++-
 9 files changed, 279 insertions(+), 4 deletions(-)

Fusion-Task-Id: FN-6275

Fusion-Task-Lineage: 0a2ec21b-415f-411c-bfcd-4f1c19a6a136
2026-06-13 02:54:57 -07:00
gsxdsm
0765913db9 Merge branch 'fix/fn-352-no-commit-coordination' 2026-06-13 00:03:17 -07:00
gsxdsm
000a73b3f0 Merge origin/main into fix/fn-352-no-commit-coordination
Reconcile the FN-352 no-commit coordination guard skip with main's
independently-landed FN-424 work. Both branches added a no_commits
guard bypass at the same fn_task_done call site:

- FN-352 (this branch): getNoCommitEligibilityReason(task) covering
  Review Level 1 coordination prompts with board-only scope and
  explicit no-source intent (e.g. "Do not change product source").
- FN-424 (main): evaluatePromptDerivedNoCommitEligibility(...) plus
  non-blocking audit logging of the skip.

Their prompt phrase-matching differs, so neither alone satisfies the
merged test file. Resolved by OR-ing both eligibility checks and
wrapping the skip in main's audit-logging block. Both helpers still
refuse the contradictory implementation+coordination prompt.

All 18 executor-task-done-invariant tests pass; engine typecheck clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 00:01:30 -07:00
gsxdsm
a9b11399d9 FN-6336: reattach orphaned assigned executions
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
2026-06-12 23:17:28 -07:00
gsxdsm
011b401764 Merge pull request #1668 from plarson/fix/fn-424-plan-only-no-commit
fix(FN-424): allow plan-only no-commit completion
2026-06-12 22:01:03 -07:00
gsxdsm
1450d39976 Merge origin/main into fix/fn-424-plan-only-no-commit
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>
2026-06-12 21:47:57 -07:00
gsxdsm
ac8ad834ce Merge branch 'main' into fix/fn-352-no-commit-coordination 2026-06-12 21:39:07 -07:00
gsxdsm
0457144111 Merge pull request #1665 from plarson/fix/insights-extract-response
fix(dashboard): repair insight extraction and research provider config
2026-06-12 21:36:20 -07:00
gsxdsm
9d0573a2ee Merge pull request #1663 from plarson/fix/fn-343-merge-worktree-cleanup
fix: classify harmless merge worktree cleanup failures
2026-06-12 21:34:51 -07:00
gsxdsm
167f9b0542 FN-6324: allow opted-in engineer backlog auto-claim
Engineer backlog auto-claim now respects an explicit opt-in while keeping the default executor-only behavior.

- Add engineerBacklogAutoClaim settings and runtime overrides for backlog pickup role checks.
- Update heartbeat auto-claim filtering, logs, and no-task prompt guidance for opted-in engineer agents.
- Cover executor/default engineer/opted-in engineer routing with core and heartbeat tests.
- Document the setting and record quarantined unrelated temp-root flakes seen during verification.

Files changed:
 .changeset/FN-6324-engineer-backlog-auto-claim.md  |  5 ++
 docs/agents.md                                     |  3 +
 docs/settings-reference.md                         |  1 +
 .../core/src/__tests__/agent-role-policy.test.ts   | 33 +++++++++-
 packages/core/src/agent-role-policy.ts             | 11 +++-
 packages/core/src/settings-schema.ts               |  1 +
 packages/core/src/types.ts                         |  4 ++
 packages/core/vitest.config.ts                     |  6 ++
 .../src/__tests__/heartbeat-executor.test.ts       | 70 ++++++++++++++++++++++
 packages/engine/src/agent-heartbeat.ts             | 65 +++++++++++++++-----
 scripts/lib/test-quarantine.json                   | 20 +++++++
 11 files changed, 199 insertions(+), 20 deletions(-)

Fusion-Task-Id: FN-6324

Fusion-Task-Lineage: 4d124d98-4ad1-44ce-a76c-f1db3199b3c6
2026-06-12 19:45:37 -07:00
gsxdsm
e17e8b34f8 FN-6319: quarantine flaky engine tests
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
2026-06-12 17:47:02 -07:00
Phil Larson
285f238e92 fix(FN-424): keep audit logging non-blocking 2026-06-12 16:08:00 -07:00
Phil Larson
f331419867 fix(FN-424): simplify prompt scope parsing 2026-06-12 15:59:58 -07:00
Phil Larson
8541db3185 fix(engine): normalize dashboard research providers 2026-06-12 15:57:12 -07:00
Phil Larson
c6bcbe26a2 fix(FN-352): address no-commit review feedback 2026-06-12 15:54:47 -07:00
Phil Larson
3a729f53a9 fix(FN-352): allow no-commit coordination completion 2026-06-12 15:51:50 -07:00
Phil Larson
834ea3c227 fix(FN-343): address follow-up review findings 2026-06-12 15:51:50 -07:00
Phil Larson
16d71e6773 fix(FN-343): address PR review feedback 2026-06-12 15:51:50 -07:00
Phil Larson
92c5503f88 test(FN-343): cover merger temp cleanup visibility
Fusion-Task-Id: FN-343

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-06-12 15:51:45 -07:00
Phil Larson
3cfc3972a5 fix(FN-343): classify pruned temp merge worktree removals
Fusion-Task-Id: FN-343

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-06-12 15:51:45 -07:00
Phil Larson
21afa84b2b test(FN-343): add regression for temp cleanup classification
Fusion-Task-Id: FN-343

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-06-12 15:51:40 -07:00