Prevent done-task diff endpoints from counting base-commit-only lineage as task-owned changes.
- add base-boundary handling in done-task merge SHA resolution so `baseCommitSha` is excluded by default and only consulted for boundary checks
- short-circuit `/diff` and `/file-diffs` responses to empty results when resolved done-task SHA is at or below `baseCommitSha`
- export and use an ancestry helper to detect base-boundary cases, while preserving normal and rebase range behavior
- extend done-task diff route tests with FN-5666 cases for no-op merge SHA, lineage association at base commit, normal post-base commits, and rebase ranges
- add a patch changeset for `@runfusion/fusion`
Files changed:
.changeset/fn-5666-base-commit-exclusive.md | 5 +
.../src/__tests__/routes-diff-done-tasks.test.ts | 217 ++++++++++++++++++++-
.../src/routes/register-session-diff-routes.ts | 57 +++++-
3 files changed, 273 insertions(+), 6 deletions(-)
Fusion-Task-Id: FN-5666
Fusion-Task-Lineage: 782f9875-856a-4d31-9505-0bcd638c9c29
Use the shared favorites hook so agent model pickers stay in sync with project favorites.
- Switch AgentDetailView config tab model favorites to use useFavorites instead of local settings update logic.
- Switch NewAgentDialog model favorites to the same shared favorites flow and remove duplicated toggle handlers.
- Extend AgentDetailView/NewAgentDialog tests and dropdown test helpers to exercise provider/model favorite toggles through the shared global settings path.
Files changed:
.../dashboard/app/components/AgentDetailView.tsx | 44 +++------------------
.../dashboard/app/components/NewAgentDialog.tsx | 45 +++-------------------
.../AgentDetailView.advanced-settings.test.tsx | 41 ++++++++++++++++++++
.../__tests__/AgentDetailView.test-helpers.ts | 25 +++++++++++-
.../components/__tests__/NewAgentDialog.test.tsx | 36 +++++++++++++++++
5 files changed, 111 insertions(+), 80 deletions(-)
Fusion-Task-Id: FN-5669
Fusion-Task-Lineage: 8ace8ea1-1c88-409c-a9ae-6b5deb391f46
Prevent mobile settings prose from splitting words mid-token while keeping long code snippets overflow-safe.
- add a CSS regression test that inspects the mobile media-query rules in SettingsModal.css
- switch mobile backup code wrapping to overflow-wrap:anywhere with normal word-break
- update mobile settings helper text to keep break-word wrapping with normal word-break
Files changed:
.../app/__tests__/settings-mobile-wrap.test.ts | 46 ++++++++++++++++++++++
.../dashboard/app/components/SettingsModal.css | 5 ++-
2 files changed, 49 insertions(+), 2 deletions(-)
Fusion-Task-Id: FN-5668
Fusion-Task-Lineage: eb66376e-a535-4d07-adfe-4a2d048b93a7
Enable mission target branch to be viewed and updated from the mission edit form.
- Add `baseBranch` to mission form state and initialize it when opening edit mode.
- Include trimmed `baseBranch` in mission PATCH updates.
- Add target branch input to both MissionManager edit form render paths.
- Add MissionManager tests for pre-filling and saving edited target branch values.
Files changed:
.../dashboard/app/components/MissionManager.tsx | 24 ++++++++
.../components/__tests__/MissionManager.test.tsx | 66 ++++++++++++++++++++++
2 files changed, 90 insertions(+)
Fusion-Task-Id: FN-5665
Fusion-Task-Lineage: b25cf171-b681-4dd8-b5f4-70f0e8714774
Add a deterministic mock-runtime proof path that verifies executor output cites injected active goal IDs.
- add a new engine test for goal-citation proof scaffolding and emitted goal ID extraction
- validate positive behavior when ## Active Goals is present in session system prompt
- add a negative control confirming no citation is emitted without injected goal context
- assert the proof runs on mock/scripted runtime for deterministic, model-free coverage
Files changed:
.../src/__tests__/goal-citation-proof.test.ts | 142 +++++++++++++++++++++
1 file changed, 142 insertions(+)
Fusion-Task-Id: FN-5659
Fusion-Task-Lineage: 35f7c1ec-8de3-4813-8f9e-fc5f72096d91
Replace mock-only goals behavior with live API-backed create/edit/archive flows in GoalsView.
- load goals from GET /api/goals when initial goals are not injected
- add inline create form that POSTs goals and handles active-goal cap 409 errors
- add per-goal edit form that PATCHes title/description changes
- add archive/unarchive actions wired to archive endpoints with inline error handling
- refresh GoalsView docs and expand component tests for loading, CRUD, cap errors, and status transitions
Files changed:
docs/dashboard-guide.md | 18 +-
packages/dashboard/app/components/GoalsView.css | 52 ++-
packages/dashboard/app/components/GoalsView.tsx | 402 +++++++++++++++++----
packages/dashboard/app/components/__tests__/GoalsView.test.tsx | 250 +++++++++++--
4 files changed, 600 insertions(+), 122 deletions(-)
Fusion-Task-Id: FN-5649
Fusion-Task-Lineage: b787c8e3-64c5-4243-ae84-0f20f12ea09e
Add a 4th reviewer axis: the squash commit subject must concisely and
accurately summarize the actual changes. A poor/inaccurate message is an
ADVISORY-severity concern, so it drives a corrective re-merge (which rewrites
the message) up to maxReviewPasses, then lands — it never hard-blocks the merge
over a message nit. Structural correctness (task-id prefix + Fusion-Task-Id /
lineage trailers) remains deterministically guaranteed by
ensureCommitTaskMetadata regardless.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ensureCommitTaskMetadata (was ensureTaskTrailersOnHead) now also prefixes the
commit subject with `<taskId>: ` when includeTaskIdInCommit is on, in addition
to ensuring the Fusion-Task-Id / lineage trailers — so the landed commit both
starts with the task id and carries the board-association trailers even if the
AI agent omits them. Single idempotent amend.
Test: asserts the landed subject matches /^FN-1: / when the agent committed
without a prefix.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Commit message: the merge agent writes a concise change-summary subject (not
just the task title), and every landed squash carries board-association
trailers — `Fusion-Task-Id: <taskId>` plus the canonical lineage trailer when
the task has a lineageId — guaranteed via an idempotent amend
(ensureTaskTrailersOnHead) even if the agent omits them.
- Verify-and-fix: the merge prompt instructs the agent to run the project's
tests / type-check / lint after resolving the merge and fix any NEW failure
the merge introduced (not pre-existing breakage) before committing.
- Editable prompt: the AI merge agent's base persona is the editable "merger"
role prompt (Settings -> Prompts); the clean-room / verification / trailer
rules are always appended so a custom prompt can't drop them.
- Reviewer model: reviewer uses the project reviewer/validator model lane
(resolveValidatorSettingsModel); the bespoke merger.reviewerModel setting is
removed.
Changeset updated to cover all AI merger changes.
Tests: trailer present on landed commit (+ lineage when set), editable-prompt
incorporation, new-breakage verification wording.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Drop the bespoke `merger.reviewerModel` setting. The AI merge reviewer now
resolves its model via `resolveValidatorSettingsModel` — the same
reviewer/validator lane used elsewhere (project validator → global validator →
project default) — falling back to the merger model only if that lane is empty.
Removes the setting from the type, schema default, and the Settings UI.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The AI merge path treated a missing task branch as a benign no-op. That's
correct when the task was never executed or already merged (branch cleaned up
on a re-process), but if the task WAS executed (a baseCommitSha was recorded)
and has no recorded merge, the branch should still exist — its work appears
lost. Now that case throws instead of silently marking the task done; the
benign cases still finalize as a no-op (reason "already-merged" / "no-branch").
Tests: executed+never-merged → throws; already-merged → no-op done;
never-executed → no-op done.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
New default merge path (merger.mode="ai"), self-contained in merger-ai.ts and
dispatched from ProjectEngine.onMerge instead of the legacy aiMergeTask pipeline
(kept for merger.mode="deterministic").
Flow: clean-room detached worktree at the target branch tip → AI agent merges
the task branch + squashes (resolving conflicts) → fresh read-only AI reviewer
audits with corrective retries (blocking vs advisory; advisory lands, unfixable
correctness hard-fails via AiMergeBlockedError; fail-safe verdict parsing) →
land via `git merge --ff-only` when the checkout is on the target (else
update-ref CAS) → sync the local checkout (stash → ff → restore; AI reconciles
a conflicting restore and keeps the original edits in a backup stash;
un-stashable dirt advances the ref + warns) → finalize (delete task branch —
never the integration branch — task→done, remove temp worktree).
- Per-task target branch honored (falls back to the default integration
branch); local checkout synced only when on that target.
- Structurally immune to the dirty-clobber and stale-base/non-FF bug classes of
the legacy path (clean room + FF-by-construction).
- Progress surfaced on the task status pill + task log stream.
- Clear error when the target branch has no local ref.
Settings: merger.mode / merger.reviewerModel / merger.maxReviewPasses, surfaced
in Settings → Merge; legacy merge-mechanics settings hidden when AI mode is on.
Tests: merger-ai.test.ts (verdict parser, clean merge, blocking hard-fail,
advisory land, empty no-op, target-branch isolation, missing-target error,
landSquash clean/other-branch/dirty-restore/AI-resolved). Legacy
merge-orchestration tests pinned to deterministic mode.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Even with FN-5627's merger TOCTOU fix + transient-failure self-healing
sweep + safety-fallback auto-prerebase landed, the merger can still hit
transient failure classes (lease handoff races, brief same-SHA non-FF
advances) for tasks whose branches are particularly out-of-sync. The
self-healing sweep auto-recovers them within bounded budget \u2014 but each
individual failure cycle was firing a ntfy alarm before the recovery
cleared the failed state, producing user-facing alarm spam for tasks
that were never actually stuck.
Two layers of fix:
1. NotificationService.handleTaskUpdated now classifies task.error via
the new shared classifyTransientMergeError helper before scheduling
the deferred failure notification. Transient classes
(lease-handoff-target-not-queued, spurious-concurrent-advance-same-sha)
get logged as suppressed and never schedule a ntfy timer.
2. Defense-in-depth: fireDeferredFailureNotification re-classifies the
error at dispatch time, so a failure scheduled before the suppression
landed on a newer cycle still suppresses if the error matches a
transient class.
The classifier itself moved from self-healing.ts to a new logger-free
transient-merge-error-classifier.ts module so consumers in
NotificationService don't pull createLogger through the import chain and
break test mocks of ../logger.js (per project-memory rule about new
modules using createLogger). self-healing.ts re-exports the symbol for
backward compatibility.
Log prefix for the recovery actions also changed from
'[FN-5627] Auto-recovering...' to 'Auto-recovered:' so that
NotificationService.maybeSuppressTransientFailedNotification's existing
/^Auto-recovered:/ log-prefix check cancels any already-scheduled failure
notification when the sweep runs mid-grace-window.
Tests (3 new):
- transient lease-handoff-target-not-queued failure NOT notified
- transient spurious-concurrent-advance-same-sha failure NOT notified
- genuine different-SHAs concurrent-advance still notifies (control)
Engine suite: 6166 tests pass.
Fusion-Task-Id: FN-5627