Commit Graph

7452 Commits

Author SHA1 Message Date
gsxdsm
6d66559eb3 fix(FN-5353): reacquire fresh worktree on reuse-handoff refusal
After merge:reuse-handoff-refused with no usable task worktree:
- Acquire a fresh worktree and restore the fusion/<task-id> branch
  from baseCommitSha before continuing merge
- Hard-fail only if fresh acquisition itself fails (not cwd-main fallback)
- Emit merge:reuse-worktree-fresh-acquire / merge:reuse-worktree-fresh-acquired
  audit events around the acquisition lifecycle

Replaces the incorrect cwd-main fallback (499784581) with correct
reacquire path. Updates regression test in merge-reuse-task-worktree.test.ts
to assert fresh-acquire audit trail instead of cwd-main fallback.

Refs: FN-5353
2026-05-20 10:47:35 -07:00
gsxdsm
a03a5de235 fix(FN-5353): re-acquire fresh task worktree instead of cwd-main fallback
When mergeIntegrationWorktree=reuse-task-worktree but the task has no
worktree or the worktree classifies as unusable, the merger now:
1. Creates a fresh worktree at the standard path with the fusion/<id> branch
2. Installs identity-guard hooks
3. Updates task.worktree + task.branch in the store
4. Emits merge:reuse-worktree-fresh-acquire / merge:reuse-worktree-fresh-acquired
5. Retries the handoff from the new worktree

Only falls back to cwd-main as last resort when fresh acquisition also
fails. Lease/liveness conflicts (worktree exists and classifies OK but
handoff refused on active-session or lease grounds) are re-thrown — not
masked with cwd-main.

New audit event types: merge:reuse-worktree-fresh-acquire,
merge:reuse-worktree-fresh-acquired
2026-05-20 10:46:33 -07:00
gsxdsm
4997845812 fix(FN-5353): fallback merge reuse handoff to cwd-main 2026-05-20 10:32:59 -07:00
Fusion (runfusion.ai)
13b564b0f6 feat(FN-5328): guard malformed mission hierarchy data in MissionManager
- test(FN-5328): assert mission detail load error logging path
- test(FN-5328): mock lucide icons in mission recovery regression
- test(FN-5328): add malformed mission detail recovery regression
- fix(FN-5328): guard malformed mission hierarchy payloads

Fusion-Task-Id: FN-5328
2026-05-20 09:42:40 -07:00
Fusion (runfusion.ai)
321c170b90 feat(FN-5143): clear agent logs when task is soft-deleted
Clears agent logs when a task is soft-deleted, with new regression tests covering the end-to-end behavior and documentation updated in the storage guide. The core logic lives in `store.ts` while `store-upsert.test.ts` is updated to reflect the new expectations.

Fusion-Task-Id: FN-5143
2026-05-20 09:42:40 -07:00
gsxdsm
5696823eaa feat(FN-5307): merge fusion/fn-5307 2026-05-20 09:42:40 -07:00
Fusion (runfusion.ai)
c9ff2078b5 feat(FN-5314): add broad-scope advisory chip to TaskCard and banner to Task
Adds broad-scope advisory chips to TaskCard and banner to TaskDetailModal with comprehensive test coverage and a dashboard guide entry. TaskCard gains an inline advisory chip (with styles), TaskDetailModal gets a matching banner, and both components have dedicated test suites covering the new UI ele

Fusion-Task-Id: FN-5314

Fusion-Task-Lineage: cbc88f36-d029-4e4b-ac9c-32a77560b8b9
2026-05-20 09:42:40 -07:00
Fusion (runfusion.ai)
22d59b5f9a feat(FN-5279): add merge integration worktree feature with settings UI and
Implements the `mergeIntegrationWorktree` setting (FN-5279) that allows tasks to reuse their own worktree as the integration root instead of spawning a separate one. Steps 1–2 added the settings schema, types, and SettingsModal surface with documentation; Step 3 wired an integration-root resolver th

Fusion-Task-Id: FN-5279
2026-05-20 09:42:40 -07:00
Fusion (runfusion.ai)
807dc5c8df feat(FN-5275): align TaskChangesTab fallback copy
FN-5275 aligns the fallback copy in TaskChangesTab with updated wording, and updates the corresponding test assertions to match the new text.

Fusion-Task-Id: FN-5275
2026-05-20 09:42:40 -07:00
Fusion (runfusion.ai)
c5e9dc43f1 fix(FN-5304): guard against silent no-op landed-file attribution mismatches
- Add a merger guard that verifies source fusion/FN branch attribution when rebase capture reports zero own commits
- Fail finalize with explicit no-op attribution mismatch handling instead of marking mergeConfirmed on ambiguous no-op ranges
- Type and emit dedicated audit events for mismatch and source-ref-unavailable skip diagnostics
- Expand branch attribution, merger, and reliability interaction tests to cover the full no-op guard matrix

Fusion-Task-Id: FN-5304
2026-05-20 08:23:40 -07:00
Fusion (runfusion.ai)
9011c2107e feat(FN-5320): canonicalize worktrunk binary name and manifest
Implements canonical worktrunk binary naming and manifest handling (FN-5320), adding a worktrunk installer that canonicalizes the executable name and manifest data, with documentation updates for architecture and settings, plus test alignments across routes, audit, and worktree acquisition fixtures.

Fusion-Task-Id: FN-5320
2026-05-20 07:44:57 -07:00
Fusion (runfusion.ai)
232a9fea86 feat(FN-5322): fix main chat composer flex sizing and expand behavior
Fixes the main chat composer flex sizing so the input area properly expands (FN-5322), with regression guards in the autosize test suite and a new browser layout smoke script covering the composer expand behavior.

Fusion-Task-Id: FN-5322
2026-05-20 07:20:01 -07:00
Fusion (runfusion.ai)
cee2c1385a feat(FN-5319): tighten scheduler queued-concurrency memo key to reduce fals
Add regression tests for queued concurrency in the scheduler and tighten the memo key used to track queued tasks, improving correctness of scheduler dispatch decisions.

Fusion-Task-Id: FN-5319
2026-05-20 06:52:11 -07:00
Fusion (runfusion.ai)
9efcf9375a feat(FN-5271): add precommit identity guard for worktree hooks
Adds pre-commit identity guard handling for branch case normalization (FN-5271), updating the worktree hooks implementation and adding a real-git integration test alongside a changeset for `@runfusion/fusion`.

Fusion-Task-Id: FN-5271
2026-05-20 06:42:05 -07:00
gsxdsm
e33f84fb0a feat(FN-5253): merge fusion/fn-5253 2026-05-20 06:32:21 -07:00
Fusion (runfusion.ai)
69c77fa3bf feat(FN-5257): restore visible action icons in SecretsView
Restores visibility of action icons in SecretsView (CSS styling and component adjustments), accompanied by updated test coverage. A test stabilization commit for the process supervisor fallback rounds out the merge.

Fusion-Task-Id: FN-5257
2026-05-20 06:27:44 -07:00
Fusion (runfusion.ai)
dd6ccc67a2 fix(FN-5257): restore SecretsView action icon visibility
- Standardize SecretsView action icon sizing and color so header, row, loading, and modal toggle icons stay visible in dark and light themes
- Expand SecretsView tests to load app CSS and assert icon visibility across both themes
- Stabilize the process supervisor fallback test by removing an unnecessary maxLifetime override

Fusion-Task-Id: FN-5257
2026-05-20 06:20:16 -07:00
Fusion (runfusion.ai)
35b2971f54 feat(FN-5216): sanitize duplicate paths in file scope when parsing task sto
The merge adds a file scope sanitizer to the task store that deduplicates and normalizes path entries, with test coverage in `store-parsing.test.ts`; a small documentation fix accompanies the change in AGENTS.md.

Fusion-Task-Id: FN-5216
2026-05-20 06:14:47 -07:00
Fusion (runfusion.ai)
37d4115bb6 feat(FN-5231): detect and flag broad-scope tasks at triage to prompt scope
- docs(FN-5231): complete Step 6 — AGENTS.md + delivery summary + dashboard follow-up
- test(FN-5231): complete Step 5 — verification gates green
- test(FN-5231): complete Step 4 — reliability interaction regression for broad-scope flag
- feat(FN-5231): complete Step 3 — wire broad-scope flag into finalizeApprovedTask
- feat(FN-5231): complete Step 2 — register broad-scope audit event type
- feat(FN-5231): complete Step 1 — broad-scope heuristic helper

Fusion-Task-Id: FN-5231
2026-05-20 05:28:36 -07:00
Fusion (runfusion.ai)
1a4525e0b9 feat(FN-5219): detect and recover in-progress limbo tasks
The merge adds a new self-healing recovery path for tasks stuck in `in-progress` limbo (no pending step updates but not marked done), hardening `resetTask` and `recoverInProgressLimboTasks` with proper worker binding cleanup, audit event coverage, and integration tests validating the invariant acros

Fusion-Task-Id: FN-5219
2026-05-20 05:27:59 -07:00
Fusion (runfusion.ai)
646e546ef5 feat(FN-5245): swallow deleted-task races in GitHub tracking services
Fixes a race condition where task deletion could race against move-related GitHub tracking logs. Both `GitHubTrackingCommentService` and `GitHubTrackingStateService.handleTaskMoved` are hardened to gracefully swallow deleted-task races, with a regression test covering the delete-after-move scenario.

Fusion-Task-Id: FN-5245
2026-05-20 04:41:04 -07:00
Fusion (runfusion.ai)
1b49cbc94d feat(FN-5284): surface db corruption via health checks, self-healing, and d
- fix(FN-5284): add db corruption audit mutation type
- feat(FN-5284): complete Step 7 — document corruption surfacing
- feat(FN-5284): complete Step 6 — add db corruption banner
- feat(FN-5284): complete Step 5 — extend health payload
- feat(FN-5284): complete Step 3 — surface db corruption in self-healing
- feat(FN-5284): complete Step 2 — add db corruption notification event
- feat(FN-5284): complete Step 1 — expose integrity check errors

Fusion-Task-Id: FN-5284
2026-05-20 04:13:43 -07:00
Fusion (runfusion.ai)
12a6ee9af1 feat(FN-5218): add hash mentions to chat composers and popups
Merges FN-5218: adds hash mention support (`#`) in chat composers, grouping task and file reference results in a unified popup, with wiring into `ChatView` and `QuickChatFAB`, plus test coverage and docs. The hook `useFileMention` is extended and refactored, and the file mention popup UI is updated

Fusion-Task-Id: FN-5218
2026-05-20 04:12:40 -07:00
Fusion (runfusion.ai)
1237168b71 feat(FN-5227): add bulk controls for project agents
- Add project-scoped Pause All Agents and Resume All Agents actions to the AgentsView controls menu
- Load bulk-action eligibility on menu open and skip ephemeral or ineligible agents
- Surface bulk action confirmations, success/error toasts, and refresh agent state after updates
- Add dashboard tests and agent docs coverage for the new bulk controls

Fusion-Task-Id: FN-5227
2026-05-20 03:57:17 -07:00
Fusion (runfusion.ai)
46fb3f0ef7 feat(FN-5305): fix async synchronization in github-tracking-delete and alig
Two test-only commits for FN-5305 improve timing reliability and assertion accuracy in the delete route and GitHub-tracking-delete test suites by replacing unreliable one-tick flushes with explicit async synchronization and aligning expectations with audit context behavior.

Fusion-Task-Id: FN-5305
2026-05-20 03:42:46 -07:00
Fusion (runfusion.ai)
cfc70b21bd feat(FN-5202): add SWR caching for chat agents, skills, and models
This merge introduces SWR-style caching across the dashboard to eliminate redundant fetches for models, agents, and skills, significantly refactoring ChatView.tsx (reduced by ~140 lines) by offloading cache coordination to three new dedicated hooks (`useAgentsMapCache`, `useDiscoveredSkillsCache`, `

Fusion-Task-Id: FN-5202
2026-05-20 03:19:44 -07:00
Fusion (runfusion.ai)
99665009f3 feat(FN-5222): remove docs link from secrets view
Removes a docs link from the SecretsView component and adds a regression test to cover the change.

Fusion-Task-Id: FN-5222
2026-05-20 03:07:48 -07:00
gsxdsm
c89d68dd2d feat(FN-5203): merge fusion/fn-5203 2026-05-20 02:48:39 -07:00
gsxdsm
b1c0a91752 feat(FN-5195): merge fusion/fn-5195 2026-05-20 02:47:34 -07:00
Fusion (runfusion.ai)
c9fd41ef26 feat(FN-5175): thread soft-delete audit context and add reconciliation scri
Adds a reconcile script to recover leaked soft-deleted tasks, threads delete audit context through all callers, and records soft-delete audit events with archive column tracking across core/engine/cli/dashboard, with reliability backstop tests covering caller alignment.

Fusion-Task-Id: FN-5175
2026-05-20 02:46:49 -07:00
Fusion (runfusion.ai)
6ecef44ab3 fix(FN-5193): restore task source typing for workspace typecheck
- Add the optional Task.source field back to the core Task interface
- Preserve durable task creation and import provenance typing alongside sourceIssue metadata
- Unblock workspace typechecking for consumers that read task source metadata

Fusion-Task-Id: FN-5193
2026-05-20 02:04:39 -07:00
Fusion (runfusion.ai)
d34cf8c9aa feat(FN-5181): paginate PR review snapshots
Adds paginated PR review snapshots to the dashboard GitHub module with corresponding test coverage across the unit and route layers.

Fusion-Task-Id: FN-5181
2026-05-20 01:27:22 -07:00
Fusion (runfusion.ai)
ab0a253004 feat(FN-5264): abort in-flight executor/merge/triage work on soft-delete (F
Implements in-flight abort for soft-deleted tasks across all three execution lanes: executor, merger, and triage now check for `deletedAt` before proceeding and emit `task:soft-delete-in-flight-abort` audits rather than continuing work on a deleted task. The 829-line addition is dominated by integra

Fusion-Task-Id: FN-5264

Fusion-Task-Lineage: 4ee8e63b-abf0-43e2-9130-39a05434d8f9
2026-05-20 01:16:06 -07:00
Fusion (runfusion.ai)
93b11c6c0c feat(FN-5241): add atomic in-review handoff seam with executor/self-healing
The merge introduces an atomic review handoff seam in the core store (`packages/core/src/store.ts`) and migrates executor and self-healing transitions to use it, replacing the previous multi-step mutable-state handoff with a single transactional operation. Extensive reliability backstops and regress

Fusion-Task-Id: FN-5241
2026-05-20 01:01:08 -07:00
Fusion (runfusion.ai)
b7ddfc9d20 feat(FN-5171): add near-duplicate task guard to CLI create command
Adds a near-duplicate guard to the CLI task creation command (FN-5171), preventing creation of tasks with titles that are visually or semantically identical to existing ones, with 262 new test cases covering the detection logic and the standard changeset entry.

Fusion-Task-Id: FN-5171
2026-05-20 00:41:33 -07:00
Fusion (runfusion.ai)
f4039266e2 fix(FN-5170): use in-process tar extraction for company imports
- Replace host tar invocation in parseCompanyArchive with in-process archive extraction
- Add core regression coverage for parsing archive contents without shell tar behavior
- Add unmocked dashboard route tests covering CLI company archive imports end to end
- Add a changeset for the published @runfusion/fusion package update

Fusion-Task-Id: FN-5170
2026-05-19 23:55:58 -07:00
Fusion (runfusion.ai)
0191bef404 feat(FN-5161): restore SecretsView eye toggle icon styling
Restores toggle icon styling in `SecretsView.css` and adds test coverage for the eye-toggle reveal/hide behavior in `SecretsView`, completing the FN-5161 test suite for the secrets view.

Fusion-Task-Id: FN-5161
2026-05-19 23:42:00 -07:00
Fusion (runfusion.ai)
61ef09c79c feat(FN-5281): add tablet board overflow handling and regression tests
Adds a tablet board override to fix overflow regressions on the dashboard, with a corresponding test covering the regression path and a hardening fix to the parsing logic.

Fusion-Task-Id: FN-5281
2026-05-19 23:24:00 -07:00
gsxdsm
00af264707 Fix tests 2026-05-19 23:04:12 -07:00
gsxdsm
e908cbcb42 fix(FN-5291): downgrade file-scope invariant failures 2026-05-19 23:00:11 -07:00
gsxdsm
98033bc869 feat(engine): guard one engine per project per machine
Adds a per-machine singleton lock that engages in
ProjectEngineManager.createAndStart() before any engine subsystems
spin up. Two fn dashboard processes can no longer run engines for the
same project on the same host — previously they would share .fusion/
state and corrupt worktrees / task rows for in-process projects.

The guard combines two independent checks:
  - A proper-lockfile file at <project>/.fusion/engine.lock with
    stale-lock recovery (auto-released on process death).
  - A loopback listener on a hashed per-project address — UDS on
    POSIX, named pipe on Windows. Stale UDS files are probed and
    unlinked before a retry bind.

Failures raise EngineAlreadyRunningError. Both guards are released
from stopAll() and pauseProject(); a release on engine.start()
failure lets retries re-acquire cleanly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 22:50:39 -07:00
gsxdsm
959f7cd4eb chore(release): v0.32.0
Version bump via changesets.
2026-05-19 22:09:26 -07:00
gsxdsm
a164e84b46 fix(core): harden fusion.db pragmas against mid-write crashes
Switch synchronous from NORMAL to FULL and restore the default
wal_autocheckpoint of 1000 (was 100). The aggressive checkpoint
cadence + NORMAL fsync left a wide window for torn pages whenever
a writer crashed mid-checkpoint, which is exactly what happened
when node:sqlite SIGSEGV'd inside pager_write and corrupted the
production db.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 22:05:36 -07:00
Fusion (runfusion.ai)
61dd439e20 feat(FN-5252): update done-card files chip display logic
Adds a new files chip on done-state TaskCards showing insertion/deletion counts, backed by new types (`filesChanged`, `insertions`, `deletions`) in core; architecture docs updated to reflect the change. The component implementation is a net reduction of 20 lines, with corresponding test coverage add

Fusion-Task-Id: FN-5252
2026-05-19 21:33:08 -07:00
gsxdsm
c4745caec0 fix(dashboard): grow main chat composer height as message grows
Reorders ChatView's input handler to resize the textarea before the
controlled setMessageInput call (matching QuickChat) so the height
assignment lands in the same frame as the keystroke and isn't lost to
React 18 batching. Also adds a 40px floor to clampChatInputHeight so a
0-scrollHeight measurement can't collapse the composer to zero.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 21:17:44 -07:00
Fusion (runfusion.ai)
6b24b56b81 feat(FN-5242): add merge queue storage and lease API to task store
- docs(FN-5242): complete Step 7 — document merge queue storage
- docs(FN-5242): complete Step 5 — add changeset and exports
- fix(FN-5242): order merge queue audit assertions chronologically
- test(FN-5242): complete Step 4 — cover merge queue leasing
- feat(FN-5242): complete Step 2 — add merge queue lease API
- feat(FN-5242): complete Step 1 — add mergeQueue schema v89

Fusion-Task-Id: FN-5242
2026-05-19 21:14:49 -07:00
Fusion (runfusion.ai)
17eb85ed81 feat(FN-5266): add metadata-driven pre-commit identity guard
Implements metadata-driven pre-commit identity guard hooks in the worktree layer, replacing static hook bodies with configurable metadata; adds regression tests covering shared-hook worktrees and the metadata-driven lock behavior.

Fusion-Task-Id: FN-5266
2026-05-19 21:08:21 -07:00
Fusion (runfusion.ai)
35112e6070 feat(FN-5210): wrap TaskCard footer chip cluster for mobile
Wraps the TaskCard footer chip cluster with CSS changes to prevent layout overflow, backed by a new regression test file and updated board-mobile tests registered in the curated dashboard test gate.

Fusion-Task-Id: FN-5210
2026-05-19 20:59:14 -07:00
Fusion (runfusion.ai)
c047b25654 feat(FN-5169): add create-pr e2e and integration tests for TaskDetailModal
Adds two new integration/end-to-end test suites for the review-tab create-PR flow (FN-5169) alongside targeted test fixes and a small CSS fix to anchor the TaskCard footer chip cluster. Minor updates to agents-view mobile tests and token stats panel coverage also included.

Fusion-Task-Id: FN-5169
2026-05-19 20:45:46 -07:00
Fusion (runfusion.ai)
271b4dd2cf feat(FN-5249): preserve done diff stats for unattributed rebase ranges
Merge adds an FN-5249 fix to preserve `done` diff stats when rebase attribution is unrestricted (attribution-helper failures or zero own commits), plus two soft-delete regression test files covering resurrection blocking and triage write-abort paths, along with related core store and route plumbing.

Fusion-Task-Id: FN-5249
2026-05-19 20:34:03 -07:00