Merge branch 'main' into feat/fn-024-add-dependencies-to-task-update

This commit is contained in:
gsxdsm
2026-05-25 13:28:32 -07:00
committed by GitHub
522 changed files with 33679 additions and 4303 deletions

View File

@@ -1,5 +0,0 @@
---
"@runfusion/fusion": patch
---
Make `fn agent import` extract `.tar.gz`/`.tgz` Agent Companies archives in-process instead of relying on a host `tar` binary.

View File

@@ -1,11 +0,0 @@
---
"@runfusion/fusion": patch
---
Layer FN-5152's near-duplicate intent guard onto the CLI `fn task create`
direct-store path. Aligned thresholds (≥2 shared high-signal tokens AND
title-token Jaccard ≥ 0.30 within a 7-day window), `--no-dedup` bypass,
`source.sourceMetadata.intentSignature` stamping, and fail-open semantics
match the dashboard `POST /api/tasks` gate. Non-TTY runs refuse with exit
1; TTY runs prompt before creating. GitHub-import and AI-planning paths
intentionally skip the gate (FN-5060 contract).

View File

@@ -1,8 +0,0 @@
---
"@runfusion/fusion": patch
---
Duplicating or restoring a task no longer fails when the source PROMPT.md
contains legacy/invalid File Scope tokens. Invalid tokens are dropped from
the rewritten PROMPT.md with a `[file-scope-sanitize]` log entry. Authoring
paths (createTask, updateTask) continue to reject invalid tokens strictly.

View File

@@ -1,12 +0,0 @@
---
"@runfusion/fusion": patch
---
Block explicit `DUPLICATE: FN-NNNN` redirect tasks from consuming planning
cycles. The triage planning loop now short-circuits when the generated
PROMPT.md is a one-line duplicate marker (bypassing the `fn_review_spec`
APPROVE gate), a self-healing sweep resolves already-stuck duplicate-marker
tasks in `triage`/`todo`, and the dashboard `POST /api/tasks` route
surfaces a `409 duplicate_candidates` with `reason: "explicit-marker"` when
the description is exactly a duplicate redirect. Layered on top of
FN-4829 / FN-4918 / FN-5152; fails open.

View File

@@ -1,5 +0,0 @@
---
"@runfusion/fusion": minor
---
Surface SQLite corruption in notifications, the dashboard health API, and a persistent dashboard banner.

View File

@@ -0,0 +1,5 @@
---
"@runfusion/fusion": patch
---
Fix ntfy notification deep links: project-only links now switch projects, and task links to non-current projects resolve against the correct project before opening the modal.

View File

@@ -0,0 +1,10 @@
---
"@runfusion/fusion": patch
---
Fix two engine reliability bugs surfaced by CI sharding repair:
- Self-healing in-review branch rebind now dedups case-variant candidate refs by resolved SHA rather than lowercase name, so two distinct branches sharing a case-insensitive name on case-sensitive filesystems (Linux) are correctly flagged as ambiguous instead of one being silently picked.
- CI test sharding: removed the `--` separator between `pnpm test` and `--shard`, which vitest's CLI parser was treating as end-of-flags and turning the shard selector into a positional file filter — silently disabling sharding so every shard ran the full suite. Test shards now run their actual slice.
- CI test-shards jobs now check out with `fetch-depth: 0` so engine tests that depend on real git history (merge-base, ref resolution) behave the same on CI as locally.
- PR Checks workflow now also runs on push to `main`, so post-merge regressions surface immediately instead of waiting for the next PR.

View File

@@ -1,20 +0,0 @@
---
"@fusion/engine": minor
---
feat(engine): guard one engine per project per machine
Adds a per-machine singleton lock that engages before each engine
starts, preventing two `fn` dashboard processes from running engines
for the same project on the same host (a scenario that previously
caused worktree corruption and task-state races for in-process
projects).
The guard combines two independent checks:
- A `proper-lockfile`-backed file at `<project>/.fusion/engine.lock`
with stale-lock recovery.
- A loopback listener (UDS on POSIX, named pipe on Windows) on a
hashed per-project address.
Failures throw `EngineAlreadyRunningError`; both guards are released
on `stopAll()` / `pauseProject()`.

View File

@@ -1,5 +0,0 @@
---
"@runfusion/fusion": patch
---
Dashboard git pull now autostashes dirty local changes (including untracked files) before pulling and reapplies them on success. If reapplying conflicts, the stash is preserved and the operation reports `stashConflict` with the stash label so the user can resolve later from the Stashes view. Previously a dirty working tree caused the pull to fail outright with no recovery path.

View File

@@ -1,5 +0,0 @@
---
"@runfusion/fusion": patch
---
Fix reuse-task-worktree merge mode (FN-5279) never applying the squash commit to the project root's local integration branch. The merger detaches HEAD in the task worktree and lands the squash on the detached HEAD; previously nothing advanced the project root's local `main`, so changes never appeared on the user's `main` (and any subsequent `pushAfterMerge` would push the stale ref or fail outright because `parsePushRemoteTarget` can't resolve a branch from a detached HEAD). A new step 5c now applies the squash to the project root's integration branch via `git merge --ff-only`, falling back to a regular merge with AI conflict resolution if `main` has diverged. Push-after-merge (when enabled) now runs from the project root where the integration branch was just advanced.

View File

@@ -1,10 +0,0 @@
---
"@runfusion/fusion": patch
---
Engine reliability: prevent the FN-5345 in-review wedge class.
- Fusion task worktrees now install a `prepare-commit-msg` empty-commit guard that refuses `git commit --allow-empty` and other zero-staged-diff commits, while still allowing legitimate amend / merge / squash / cherry-pick / revert / rebase paths. Amend detection scans `ps -o args=` (with `/proc/$PPID/cmdline` fallback for Alpine/busybox) tokenized, stopping at the first message-supplying flag (`-m`, `-F`, `--message`, `--file`) so a commit message containing the substring `--amend` cannot bypass the guard.
- Merger gains an early empty-own-diff fast-path in `reuse-task-worktree` integration mode: branches with own commits but zero net tree change vs merge-base now auto-finalize as no-op BEFORE any reuse-handoff acquisition runs, preventing `registered-branch-mismatch` + `merge-deadlock-detected: verified content not on main` wedges. The fast-path best-effort cleans up the stranded worktree and `fusion/<id>` branch so empty-own-diff residuals do not accumulate.
- `classifyOwnedLandedEvidence` also detects the empty-own-diff case and returns `proven-no-op` so downstream self-healing and post-handoff finalize paths benefit too.
- Merger's reuse-fallback path now consults `git worktree list --porcelain` before creating a new worktree, reusing extant usable registrations of `fusion/<id>` and pruning stale ones, eliminating FN-5083-class branch-registration double-registration. The direct-reuse shortcut is guarded by FN-4811 (refuses paths owned by a different task in `activeSessionRegistry`) and FN-4954 (skipped when `recycleWorktrees=true` with a pool attached, so `WorktreePool.acquire` lease bookkeeping stays consistent). Two new audit subtypes (`merge:reuse-fallback-pruned-stale-registration`, `merge:reuse-fallback-reused-existing-registration`) replace the prior overloading of `merge:reuse-fallback-new-worktree` for these cases.

View File

@@ -1,7 +0,0 @@
---
"@runfusion/fusion": patch
---
fix(FN-5353): reacquire fresh worktree when merge reuse handoff fails instead of falling back to main
When `mergeIntegrationWorktree=reuse-task-worktree` and no task worktree is available (worktree=null after executor teardown), the merger now acquires a fresh worktree (`git worktree add -b fusion/<id>`) instead of falling back to `cwd-main`. Falls back to `cwd-main` only if fresh acquisition itself throws. New audit events: `merge:reuse-fallback-new-worktree`, `merge:reuse-worktree-fresh-acquire`, `merge:reuse-worktree-fresh-acquired`, `merge:reuse-fallback-cwd-main`.

View File

@@ -1,5 +0,0 @@
---
"@runfusion/fusion": patch
---
Fix merge queue lease race causing all in-review tasks to fail with merge:reuse-handoff-refused (no-lease) when unrelated tasks pollute the queue head. acquireReuseHandoff now targets the specific task ID rather than blindly grabbing the queue head, so the correct task gets the lease regardless of stale queue entries.

View File

@@ -1,5 +0,0 @@
---
"@runfusion/fusion": patch
---
Atomic in-review handoff: introduce `TaskStore.handoffToReview` that performs the column move and `mergeQueue` enqueue inside a single transaction, and migrate every executor + self-healing site that promotes a completed task into `in-review` to use it. Direct `moveTask(taskId, "in-review")` writes now emit a `task:handoff-invariant-violation` run-audit event for forensics. Pairs with FN-5242 (queue schema) and FN-5243 (merger lease consumption).

View File

@@ -1,5 +0,0 @@
---
"@runfusion/fusion": patch
---
Fix Fusion worktree pre-commit identity-guard hook to accept canonical lowercase `fusion/<id>` branches when the on-disk `fusion-task-id` metadata stores an uppercase id, eliminating spurious "refusing commit" rejections that previously required `--no-verify`.

View File

@@ -1,5 +0,0 @@
---
"@runfusion/fusion": minor
---
Add mergeIntegrationWorktree setting (default reuse-task-worktree) to decouple auto-merge from project-root mutation. Legacy cwd-main behavior preserved as an opt-in escape hatch.

View File

@@ -1,5 +0,0 @@
---
"@runfusion/fusion": patch
---
Downgrade merge-time file-scope invariant violations from task-failing errors to warning-only logs so merges can continue while still recording audit telemetry.

View File

@@ -1,5 +0,0 @@
---
"@runfusion/fusion": patch
---
Fix the Worktrunk integration to probe the canonical `wt` binary, point release metadata at the real `max-sixty/worktrunk` upstream, and fail closed when install metadata is still unverified. This preserves default-off behavior when `worktrunk.enabled=false` and hardens enabled setups that rely on an explicit `worktrunk.binaryPath`.

View File

@@ -1,5 +0,0 @@
---
"@runfusion/fusion": patch
---
Add deterministic external-integration safeguards by introducing a shared integration manifest validator, a triage-time spec evidence gate, and registry contract tests that prevent hallucinated third-party repo/binary/checksum metadata from landing.

View File

@@ -1,8 +0,0 @@
---
"@runfusion/fusion": patch
---
Fix main chat composer (direct chat and rooms) so it visually grows on
multi-paragraph paste up to the 640px cap, matching QuickChat behavior.
The 640px cap from FN-5146 was already in place but an ancestor layout
constraint was clipping the rendered height.

View File

@@ -1,7 +0,0 @@
---
"@runfusion/fusion": patch
---
Remove the `fn task branch-recovery` surface and retire orphan-branch auto-rescue wiring.
Fusion now treats orphan `fusion/*` branches as operator-managed git state: branch conflicts still fail loudly with diagnostics, and operators resolve/reclaim/discard branches manually with standard git tooling before retrying.

View File

@@ -1,7 +0,0 @@
---
"@runfusion/fusion": patch
---
Self-healing: remove speculative auto-requeue from `recoverOrphanedExecutions`. The sweep no longer calls lease-manager recovery/reconcile, no longer writes `status: "stuck-killed"` or clears `worktree`/`branch`, no longer writes the `Auto-recovered orphaned executor task` log entry, and no longer moves tasks back to `todo`.
`recoverOrphanedExecutions` is now observation-only and emits `task:orphan-detected-no-action` run-audit events plus `[orphan-detected]` diagnostics when stale in-progress candidates are detected. Proof-based lifecycle recovery remains owned by `recoverInProgressLimbo`, `RestartRecoveryCoordinator`, and explicit executor/merger failure paths (fixes FN-5279 false-positive class).

View File

@@ -1,5 +0,0 @@
---
"@runfusion/fusion": patch
---
Harden cloudflared auto-install (dashboard remote-access opt-in flow): add a pinned release manifest and SHA-256 verification, mirroring the FN-5320 Worktrunk pattern. Auto-download fails closed in `upstream-pending-verification` mode; package-manager paths (`brew`, `winget`) are unchanged. Replaces the previous unverified `releases/latest/download` direct-curl install path.