Commit Graph

91 Commits

Author SHA1 Message Date
gsxdsm
f0368e676b fix(ci): exclude dist/ test files from shard count 2026-05-13 17:58:28 -07:00
Fusion
8d9e426353 fix(FN-4409): add merge-base fallback for contamination audit
Fusion-Task-Id: FN-4409
Fusion-Task-Lineage: c608c942-fec7-4489-9970-b8dc314f8be2
2026-05-13 17:44:46 -07:00
Fusion
6301015550 feat(FN-4409): complete Step 1 — add cross-contamination audit script
Fusion-Task-Id: FN-4409
Fusion-Task-Lineage: c608c942-fec7-4489-9970-b8dc314f8be2
2026-05-13 17:44:46 -07:00
Fusion
d6b7e29be3 feat(FN-4207): add tests for ci-test-shard helper
Adds test coverage for the CI shard helper script, covering its core functionality and edge cases.

Fusion-Task-Id: FN-4207
2026-05-13 06:29:35 -07:00
Fusion
1f58bebec3 feat(FN-4126): complete Step 1 — define shard entry model
Fusion-Task-Id: FN-4126
Fusion-Task-Lineage: ed1e7e10-43d3-4347-933b-0dc9e8cd345a
2026-05-13 06:29:35 -07:00
Fusion
51e8313419 feat(FN-4194): add reconciliation script for identity resolution
Adds a reconciliation script for FN-3909 identity issues, includes comprehensive tests verifying the workflow, and documents the process in the storage guide.

Fusion-Task-Id: FN-4194
2026-05-12 17:04:33 -07:00
Fusion
5e74361859 feat(FN-4055): add task ID collision audit script and recovery documentatio
Adds a standalone audit script for detecting task ID collisions, a regression test for store creation collision handling, and documentation of the recovery path; also applies minor UX refinements to ChatView and TaskDetailModal.

Fusion-Task-Id: FN-4055
2026-05-12 17:04:33 -07:00
Fusion
c420e1acd0 feat(FN-4134): stabilize research view layout
Stabilized the ResearchView layout by refactoring CSS and component structure, with 175 lines of fixes spanning the CSS module, component TSX, and new regression tests. Also includes a patch changeset for the release note.

Fusion-Task-Id: FN-4134

Fusion-Task-Lineage: ca3ad67b-766b-4da6-be7f-c3927d718acd
2026-05-12 17:04:32 -07:00
Fusion
fc863f6e96 feat(FN-4067): add squash audit gate to merger with integration tests
Adds a squash-merge audit gate that verifies duplicate-cherry-pick commits and file-overlap losses after any squash merge into main, restoring the post-squash audit step to the merge workflow with test coverage for both the audit logic and the broader merger lifecycle.

Fusion-Task-Id: FN-4067

Fusion-Task-Lineage: 593aa917-5640-495b-b1ae-80c3eaa09d01
2026-05-12 07:47:11 -07:00
Fusion
4d4c44bfa5 feat(FN-4043): implement weighted CI shard balancing
Implements weighted shard planning for the CI test sharding script, with deterministic test coverage and documentation updates to `contributing.md`.

Fusion-Task-Id: FN-4043
2026-05-11 21:48:26 -07:00
Fusion
867c684eec feat(FN-3899): stabilize blockedBy overlap stamping and add recovery utilit
Stabilizes blocked-by overlap stamping in the scheduler and adds a standalone `recover-stale-blocked-by` utility script to clear stale upstream blockers, with corresponding scheduler tests and architecture documentation.

Fusion-Task-Id: FN-3899
2026-05-11 10:36:01 -07:00
Fusion
d152261240 feat(FN-4000): add task state reconciliation script to fix stuck or inconsi
Added a task state reconciliation script (`scripts/reconcile-task-state-consistency.mjs`) with tests to detect and resolve inconsistencies between the task database and git worktree status, with support for explicit project directories and documented usage in the task management docs.

Fusion-Task-Id: FN-4000
2026-05-11 06:47:43 -07:00
Fusion
f6af38318b feat(FN-3967): document executorRuntimeEnv plugin hook
Adds `docs/PLUGIN_AUTHORING.md` documenting the `executorRuntimeEnv` hook with cross-references to the architecture docs, accompanied by tests validating the documentation contract.

Fusion-Task-Id: FN-3967
2026-05-11 06:47:43 -07:00
Aron Prins
10b75bd386 fix(FN-000): address startup review feedback 2026-05-11 13:36:51 +02:00
Aron Prins
12ae8f77fb fix(FN-000): improve local startup UX 2026-05-11 09:52:23 +02:00
gsxdsm
fa8b42cc86 fix(FN-3947): strip forwarded vitest silent flags 2026-05-10 15:33:25 -07:00
Fusion
ff4e7cad78 feat(FN-3937): document architecture recovery layers and lifecycle alignmen
Added documentation for Fusion's architecture recovery layers (deadlock self-healing, paused-aware in-review filtering) and aligned lifecycle docs, with a new test validating that the self-healing docs stay in sync with the source code.

Fusion-Task-Id: FN-3937
2026-05-10 15:33:25 -07:00
gsxdsm
abd2e71609 fix(release): run homebrew-tap git commands inside the tap clone
The tap is a gitignored sibling repo, so `git add` from the main repo
failed. Pass cwd through `run()` and target homebrew-tap/ for the
add/commit/push.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 17:15:40 -07:00
gsxdsm
c6b53e8842 chore(release): bump homebrew tap formula automatically after npm publish
Adds a `bumpHomebrewTap(version)` step that fetches the freshly published
tarball from registry.npmjs.org, recomputes its sha256, rewrites
homebrew-tap/Formula/fusion.rb (url + sha256), and pushes a follow-up
`chore(tap): bump fusion to vX.Y.Z` commit to main. Includes a short
retry loop because the registry can take a few seconds to surface a
just-published tarball. All failures are warnings — they don't abort
the release since the npm publish + tag are already out.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 16:09:57 -07:00
Fusion
b47f6ff288 feat(FN-3878): add restore-merge-sha script for commitSha restoration
Adds a new merge commitSha restoration script (`scripts/restore-merge-sha-fn-3878.mjs`) with test coverage to handle a specific FN-3878 merge case, along with a changeset for publishing and a minor plugin vitest config governance alignment across three plugins.

Fusion-Task-Id: FN-3878
2026-05-09 13:21:47 -07:00
CEO Agent
82fe24e42a fix(FN-3789): add @fusion/dashboard to REQUIRED_BUILD_PACKAGES
@fusion/desktop tests dynamically import('@fusion/dashboard') in
local-runtime.ts. When packages/dashboard/dist/index.js is absent
(fresh checkout, merger verification env, CI without an explicit
dashboard build) Vite fails with 'Failed to resolve entry for package
@fusion/dashboard' before the desktop vitest alias takes effect.

scripts/ensure-test-artifacts.mjs is the canonical bootstrap layer
that pnpm test calls before running suites; register @fusion/dashboard
there so the dist is built on demand. Extends node:test coverage
mirroring the hermes/openclaw patterns.

Unblocks: FN-3789, FN-3793, FN-3795, FN-3803 (and any future task
whose merger verification path runs desktop tests).
2026-05-08 22:43:58 -07:00
Fusion
f8a0903538 fix(FN-3716): stabilize verification and role policy checks
- Add shared agent role policy helpers for implementation task detection and executor-role enforcement
- Provide a standardized role-mismatch error formatter for delegation and assignment paths
- Update test isolation leak detection to ignore ephemeral fusion-test-home-root temp directories while preserving baseline checks

Fusion-Task-Id: FN-3716
2026-05-08 02:00:08 -07:00
Fusion
bea034d1ba feat(FN-3723): harden isolated HOME cleanup and shell connection visibility
- Harden test isolation cleanup retries and allow-list behavior in scripts/test-changed.mjs
- Expand test coverage for cleanup retry logic and allow-list handling in scripts/__tests__/test-changed.test.mjs
- Add shell-native connection status plumbing and UI coverage across dashboard, desktop preload/types, and mobile typings
- Add ShellConnectionStatus and mobile nav wiring plus related app/component test coverage
- Document shell connection contracts and add FN-3568 diagnosis/recovery notes

Fusion-Task-Id: FN-3723
2026-05-08 01:16:54 -07:00
Fusion
42b0cf0416 feat(FN-3725): add --accent-text token per theme for chat message readabili
Adds a `--accent-text` CSS token defined per theme for consistent chat text readability, and highlights the fast mode bolt icon in the task detail modal, with corresponding theme-color and rendering tests.

Fusion-Task-Id: FN-3725
2026-05-08 00:37:39 -07:00
Fusion
a6c4ee2b8c feat(FN-3406): add shell context hook plumbing for dashboard
Adds a new `useShellContext` hook with tests to the dashboard, integrated into `App.tsx` and `Header.tsx` to provide shell context plumbing throughout the UI.

Fusion-Task-Id: FN-3406
2026-05-07 23:21:05 -07:00
gsxdsm
989aae1c6d fix(test-isolation): allow-list known isolated HOMEs to stop FN-3711-style flakes
The leak guard in scripts/check-test-isolation.mjs reported
fusion-test-home-root-* dirs created by scripts/test-changed.mjs as
leaks when transient EBUSY on /var/folders prevented cleanup or the
baseline file got rotated. Track every HOME basename the script mints
and pass it via FUSION_TEST_ISOLATION_IGNORE_NAMES so the check
allow-lists them unconditionally. Surface cleanup rm failures via
console.warn instead of swallowing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 12:25:45 -07:00
Aron Prins
b3e5932a2c test(FN-000): include reverse dependents in changed tests 2026-05-07 18:35:32 +02:00
Aron Prins
409d4efa62 test(FN-000): fix changed-test package cache dirs 2026-05-07 18:26:48 +02:00
Aron Prins
2bc0f53064 test(FN-000): address follow-up review feedback 2026-05-07 18:08:08 +02:00
Aron Prins
06d022670a test(FN-000): address PR review feedback 2026-05-07 17:32:21 +02:00
Aron Prins
46072542cf test(FN-000): harden local test suite 2026-05-07 17:26:51 +02:00
Fusion
2eba5a007c feat(FN-3577): add native shell guide and bridge contract documentation
Adds a native shell integration guide (FN-3577) with fusionShell bridge contract documentation, wired into the docs navigation, plus a regression test; also hardens the dependency graph's task filtering (FN-3085) to include in-review tasks and handle orphan edges, with corresponding test coverage ac

Fusion-Task-Id: FN-3577
2026-05-07 03:59:43 -07:00
Fusion
10b7b3014f feat(FN-3632): remove quick-entry branch handling from dashboard and docs
Removes the `QuickEntryBox` component and its styles as part of FN-3632 cleanup, with its tests refactored accordingly. Also updates the test-changed script and fixes an isolated test home cleanup ordering issue.

Fusion-Task-Id: FN-3632
2026-05-07 01:30:34 -07:00
Fusion
2df61fbc6c feat(FN-3081): replicate task creation across mesh nodes
- Add core mesh task replication flow and task metadata needed for cross-node create propagation
- Wire dashboard task creation routes and mesh routes to trigger/handle replicated task creation
- Prune isolated test homes before isolation checks to avoid false failures in changed-test runs
- Expand core, dashboard, CLI extension, and remote-node client tests; update architecture and task-management docs

Fusion-Task-Id: FN-3081
2026-05-07 00:28:52 -07:00
Fusion
0f69b2e78f feat(FN-3449): implement distributed task-id allocator with mesh API endpoi
Implements a distributed task-ID allocator with mesh networking endpoints for multi-project coordination (FN-3449), alongside substantial ChatView and GitManager mobile polish including improved iOS keyboard handling, rubber-band containment, scroll-drift fixes, and visual viewport stabilization. In

Fusion-Task-Id: FN-3449
2026-05-06 21:16:33 -07:00
Fusion
4fe2a8af65 feat(FN-3615): fix Codex weekly pace parsing
Fixed Codex weekly pace parsing in the usage tracking module, with corresponding test coverage added to verify the fix.

Fusion-Task-Id: FN-3615
2026-05-06 20:54:33 -07:00
Fusion
7fd40c990f fix(FN-3610): isolate test home for changed-package test runs
- Create a disposable HOME/USERPROFILE env for scripts/test-changed.mjs execution
- Run isolation guard checks with the same isolated env, including cache-hit no-op paths
- Clean up temp HOME after test execution to avoid residue
- Update test coverage and contributing docs for the shared isolation behavior

Fusion-Task-Id: FN-3610
2026-05-06 18:57:37 -07:00
Fusion
17f7c0e40d feat(FN-3594): split TaskDetailModal test monolith and improve mobile chat/
The merge brings TaskDetailModal test coverage in line with the project's testing standards by splitting the monolithic 6,745-line test file into five focused suites. It also delivers merger reliability improvements including headline-step subject preference, redundant-merge verification skipping, a

Fusion-Task-Id: FN-3594
2026-05-06 17:51:09 -07:00
Fusion
2fce7b36cf feat(FN-3591): split TaskDetailModal test monolith into focused suites
The monolithic `TaskDetailModal` test suite (6,745 lines) was split into six focused test files covering attachments/tabs, definition/actions, inline editing/integrations, models/progress/workflow, rendering, and responsive/dependencies, with a shared test helpers module added for common utilities.

Fusion-Task-Id: FN-3591
2026-05-06 15:57:08 -07:00
Fusion
725d7fabb9 docs(FN-3589): document fn agent subcommand behavior
- Add dedicated CLI reference sections for fn agent stop/start/mailbox/export with usage, options, and behavior notes
- Document expected no-op and invalid-transition outputs for agent lifecycle commands
- Expand useful options matrix with agent import/export flags
- Add a doc contract test that asserts the new agent subcommand sections remain present

Fusion-Task-Id: FN-3589
2026-05-06 15:21:45 -07:00
Fusion
35ddb05f50 feat(FN-3585): document post-install plugin capabilities and fix mailbox sp
The merge adds a test isolation script (`scripts/check-test-isolation.mjs`) to filter runtime noise from live Fusion app paths, fixes MailboxModal spacing by replacing hardcoded values with design tokens (FN-3585), and documents post-install plugin capabilities in the plugin management guide (FN-358

Fusion-Task-Id: FN-3585
2026-05-06 15:17:07 -07:00
Fusion
149e1eabfb feat(FN-3573): harden plugin setup sync and test-isolation handling
- Add plugin setup API coverage for migration and sync edge cases
- Expand plugin route tests and implementation safeguards for setup state handling
- Update legacy API glue to align plugin setup responses with route behavior
- Keep test-isolation runtime ignore handling compatible with live app activity

Fusion-Task-Id: FN-3573
2026-05-06 14:17:14 -07:00
gsxdsm
d7efe67fe5 chore(test-isolation): use name-only signature to ignore live-app churn
Drop size/mtime from the protected .fusion signature so heartbeat writes
to existing files (fusion.db-wal, settings.json, etc.) no longer trigger
false-positive leak failures when the post-test mutability probe happens
to land in a quiet window. New files still register; tests remain blocked
from writing to the real .fusion via the fs guards in vitest-setup.ts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 13:38:23 -07:00
Fusion
91f187f9ff feat(FN-3603): improve mobile chat with jump-to-latest and bubble width fix
This merge implements FN-3603, adding jump-to-latest controls for the chat view and improving mobile bubble width layout, with corresponding CSS updates in ChatView and QuickChatFAB components. It also includes documentation for the new mobile chat controls, a fix for workspace lint regex escaping,

Fusion-Task-Id: FN-3603
2026-05-06 13:38:23 -07:00
gsxdsm
cd845d39be perf(merger): skip redundant in-merge verification and lockfile-stable installs
Two cuts to wasted work in the merge verification loop:

1. After the in-merge fix agent runs, fingerprint the working tree
   (`git diff HEAD` + `git status --porcelain`, sha256). If the post-fix
   fingerprint matches pre-fix and is non-empty, the agent didn't actually
   change anything — re-running the same failing command can only yield
   the same failure, so log and report the attempt as unsuccessful without
   paying the test/build cost. Empty fingerprints (snapshot tooling failed)
   fall through to the existing re-run path so we never silently swallow a
   real fix.

2. Inside `syncDependenciesForMerge`, hash the active lockfile and compare
   against `node_modules/.fusion-install-marker` (written after each
   successful install). When they match, skip `pnpm install
   --frozen-lockfile` even if `package.json` is staged. Covers the common
   case where `package.json` changes but the lockfile doesn't, and
   amortizes install across auto-recovery re-enqueues that hit the same
   worktree.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 12:24:57 -07:00
gsxdsm
593b42ea79 chore(test-isolation): broaden runtime ignore list for live fusion app paths
Live fusion instances running on a shared HOME write to tasks/, messages/,
memory-insights.md, test-cache.json, HEARTBEAT.md, kb.db.backup-*, and
fusion.db.pre-* snapshots; none were in the runtime ignore list, so the
script flagged them as test-driven mutations and failed merge build
verification. Recursion in collectFusionSignature only filters via top-level
matches, so adding these top-level patterns short-circuits descent into
live-app dirs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 11:53:28 -07:00
Fusion
d8fd83a921 test(FN-3607): harden test workflow verification and isolation checks
- Expand test-changed coverage and shard selection assertions for CI workflows
- Improve vitest worker temp-directory utilities and related core/CLI tests
- Refine test isolation guardrails and runtime ignore handling for live .fusion noise
- Update contributing guidance and root test script usage for the verified workflow

Fusion-Task-Id: FN-3607
2026-05-06 11:51:48 -07:00
Fusion
a8bfb32c70 feat(FN-3590): prioritize workspace source entry for bundled plugins and ad
This merge introduces eval score categorization with a new `eval-scoring.ts` module (FN-3601, FN-3390), hardened bundled plugin entry resolution to prioritize workspace source over installed copies (FN-3590), and documented reply-link threading behavior in the mailbox (FN-3598). It also adds mobile

Fusion-Task-Id: FN-3590
2026-05-06 11:47:41 -07:00
Fusion
828ab8a3bb feat(FN-3598): document reply-link threading behavior
Added documentation to the dashboard guide covering reply-link threading behavior (FN-3598 Step 4).

Fusion-Task-Id: FN-3598
2026-05-06 10:51:07 -07:00
gsxdsm
a14ef9e4a8 chore(test-isolation): tolerate live fusion app noise on shared HOME
Local `pnpm test:isolated` was failing because a concurrently-running
fusion app continually mutates `~/.fusion` (databases, agent sessions,
memory, automations, plugins, logs). Filter those runtime-owned paths
from the protected-dir signature, widen the baseline-stability sampling
window, and re-sample on suspected violations so transient app activity
doesn't masquerade as test pollution.

Tests still cannot legitimately write into these paths — they're skipped
because the *running app* is expected to.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 10:39:54 -07:00