Commit Graph

2479 Commits

Author SHA1 Message Date
Fusion
95370d6299 fix(FN-2141): route reflection stores through getFusionDir
- Initialize AgentStore and ReflectionStore with taskStore.getFusionDir() in reflection APIs
- Prevent reflection endpoints from touching root-level fusion.db and agents artifacts
- Add regression coverage to ensure root project files are not created by reflection requests
2026-04-19 10:13:34 -07:00
gsxdsm
57c70fc378 feat(FN-2146): merge fusion/fn-2146 2026-04-19 10:13:34 -07:00
gsxdsm
0f167df7d4 feat(FN-2144): merge fusion/fn-2144 2026-04-19 10:13:34 -07:00
Fusion
c5918f386f fix(FN-2139): wire source export condition into CLI builds
- Add "source" export entries for @fusion/core, @fusion/dashboard, and @fusion/engine package exports
- Configure tsup/esbuild to include the "source" condition when resolving workspace dependencies
- Pass --conditions=source to bun compile so compiled CLI binaries resolve source-conditioned exports consistently
2026-04-19 10:13:34 -07:00
gsxdsm
59fbdc8dab feat(FN-2113): merge fusion/fn-2113 2026-04-19 10:13:34 -07:00
Fusion
a956ce5a4f refactor(FN-2126): align memory handling with canonical .fusion/memory paths
- Update memory docs and contracts to reference canonical .fusion/memory files while treating the legacy top-level memory file as compatibility-only
- Tighten memory backend path normalization messaging and map stale qmd legacy top-level memory results back to .fusion/memory/MEMORY.md
- Remove legacy memory read/write fallback branches from backend initialization paths and rely on ensureOpenClawMemoryFiles() migration behavior
- Preserve migration-seeded legacy content during ensureMemoryFile() bootstrap and add regression coverage for seeded long-term memory creation
2026-04-19 10:13:34 -07:00
gsxdsm
3472c122d4 feat(FN-2123): merge fusion/fn-2123 2026-04-19 10:13:34 -07:00
Fusion
9884f87208 fix(FN-2137): right-align usage modal footer actions
- Wrap the Refresh and Close footer buttons in a dedicated right-aligned action group
- Preserve existing refresh/close behavior while improving footer layout consistency
- Add .usage-actions-right styles with token-based spacing and margin-left auto
2026-04-19 10:13:34 -07:00
gsxdsm
bde0370d03 feat(FN-2135): merge fusion/fn-2135 2026-04-19 10:13:34 -07:00
Fusion
a10e4c2dfe refactor(FN-2129): route agent-instructions warnings through structured logger
- Replace direct console.warn calls in agent-instructions with createLogger("agent-instructions") warnings
- Keep existing truncation and path-validation safeguards while standardizing diagnostic output format
- Add focused diagnostics tests that verify single warning emission for truncation and invalid instructionsPath scenarios
- Add coverage for missing instructions files and project memory read failures to ensure graceful fallback behavior
2026-04-19 10:13:34 -07:00
Fusion
88c4492c1b fix(FN-2124): harden swallowed project-engine error paths
- Replace previously silent catch blocks in auto-merge and settings-listener flows with runtimeLog.warn messages
- Add warning logs for startup and periodic auto-merge sweeps plus poll interval fallback when settings reads fail
- Add regression tests that force each swallowed-error path and assert structured warnings are emitted
- Cover global/engine unpause resumeOrphaned failures and stuck-detector checkNow failures in project-engine tests
2026-04-19 10:13:34 -07:00
Fusion
4c8acea995 fix(FN-2111): select no-task heartbeat prompt by run type
- Promote HEARTBEAT_NO_TASK_SYSTEM_PROMPT as the primary no-task heartbeat constant while keeping a backward-compatible alias.
- Refine no-task heartbeat guidance for lightweight ambient coordination and explicit tool usage.
- Select the no-task prompt for heartbeat runs without task context before appending instruction/rating overlays.
- Update heartbeat regression tests to assert the renamed no-task prompt constant and prompt/tool expectations.
2026-04-19 10:13:34 -07:00
Fusion
95169722df test(FN-2125): add refresh fetch rejection regression coverage
- Add a useBackgroundSessions test for refresh fetch rejection after initial sessions load
- Assert the hook logs the expected warning with the thrown refresh error
- Verify existing sessions remain intact when refresh fails to prevent state regression
2026-04-19 10:13:34 -07:00
Fusion
9a532316cf test(FN-2122): isolate HOME for core and CLI vitest runs
- Add test setup files in core and CLI that override HOME to a per-worker temp directory
- Wire the new isolation setup into core and CLI vitest setupFiles before existing test bootstrap
- Add a core canary test to verify HOME, homedir(), and defaultGlobalDir() resolve under isolated temp paths
- Document how global HOME isolation complements per-fixture isolation in test-project utilities
2026-04-19 10:13:34 -07:00
Fusion
8e00867012 feat(FN-2121): introduce structured logging in plugin loader
- Add a reusable createLogger utility in @fusion/core for prefixed log/warn/error output
- Replace plugin-loader console logging with structured logger calls across load, reload, stop, and hook paths
- Route plugin-scoped logger methods through createLogger, including debug gating on DEBUG=plugins
- Add regression tests that mock logger.js and verify key structured log emissions and error logging flows
2026-04-19 10:13:34 -07:00
gsxdsm
eaaac2282a feat(FN-2120): merge fusion/fn-2120 2026-04-19 10:13:34 -07:00
gsxdsm
dd58a3ec43 feat(FN-2119): merge fusion/fn-2119 2026-04-19 10:13:34 -07:00
Fusion
2f611ce489 fix(FN-2107): normalize task ID handling for task creation tools
- Return the created task ID directly from runTaskPlan and propagate it through fn_task_plan
- Remove hardcoded FN-### log parsing so CLI extension supports structured IDs like PROJ-042
- Add heartbeat fallback parsing from task_create text output when details.taskId is absent
- Expand engine and CLI tests to cover structured task IDs and updated task-plan return behavior
2026-04-19 10:13:34 -07:00
Fusion
a901975ed8 feat(FN-2118): merge fusion/fn-2118 2026-04-19 10:13:33 -07:00
Fusion
11c5791622 fix(FN-2117): log swallowed engine runtime errors
- Add structured warning logs in silent catch paths for IPC worker shutdown, plugin unregistration cleanup, child runtime metrics polling, and merger build rollback reset
- Improve merger rollback warning context to make build-verification reset and retry failures easier to diagnose
- Add regression tests covering each new warning path to ensure errors are surfaced without changing existing control flow
- Add StepSessionExecutor test coverage for cherry-pick abort logging when conflict cleanup fails
2026-04-19 10:13:33 -07:00
Fusion
f947b7dc49 feat(FN-2116): add start action for terminated agent cards
- Add a Start button for terminated agents in board cards alongside Delete
- Add a Start action for terminated agents in list cards with icon + label
- Reuse the existing state transition handler to move terminated agents back to active
- Extend AgentListModal tests to cover Start button visibility and start action behavior
2026-04-19 10:13:33 -07:00
gsxdsm
46aeee0959 feat(FN-2110): merge fusion/fn-2110 2026-04-19 10:13:33 -07:00
gsxdsm
7a920249f8 feat(FN-2105): merge fusion/fn-2105 2026-04-19 10:13:33 -07:00
gsxdsm
cace54db0b feat(FN-2104): merge fusion/fn-2104 2026-04-19 10:13:33 -07:00
Fusion
bee87329da feat(FN-2030): add project markdown explorer to Documents view
- Add recursive markdown file discovery in file-service with excluded directories and sorted metadata output
- Expose GET /api/files/markdown and wire a frontend API client plus useProjectMarkdownFiles hook
- Redesign DocumentsView with project/task tabs, search, task grouping, and desktop/mobile file preview flows
- Add coverage for markdown scanning and DocumentsView behaviors, and update useDocuments tests for new API usage
2026-04-19 10:13:33 -07:00
gsxdsm
9bc570d58c feat(FN-2112): merge fusion/fn-2112 2026-04-19 10:13:33 -07:00
gsxdsm
8fdd532e91 feat(FN-2109): merge fusion/fn-2109 2026-04-19 10:13:33 -07:00
Fusion
43e123b2b3 docs(FN-2097): clarify layered memory layout and legacy fallback semantics
- Update memory architecture and contributing docs to describe .fusion/memory/ as the canonical layered workspace
- Reframe .fusion/memory.md references as a deprecated legacy fallback used only for migration/alias compatibility
- Expand the memory plugin contract with explicit layered layout, migration behavior, and invariant language
- Align settings reference memory-insight file descriptions with the canonical long-term memory model
2026-04-19 10:13:33 -07:00
gsxdsm
a78eaa21bd feat(FN-2099): merge fusion/fn-2099 2026-04-19 10:13:33 -07:00
Fusion
af104006ba feat(FN-2102): merge fusion/fn-2102 2026-04-19 10:13:33 -07:00
Fusion
ca6fefd6ca fix(FN-2098): align no-task heartbeat guidance and stabilize flaky tests
- Update HEARTBEAT_NO_TASK_SYSTEM_PROMPT copy to emphasize inbox, memory, delegation, and heartbeat_done usage
- Expand heartbeat monitor tests to assert no-task prompt/tool alignment and preserve task-scoped prompt behavior
- Harden first-run and App view tests by using a safe cwd fallback and more robust async UI waits
- Add best-effort dashboard performance reporting hooks in App and useProjects via a new reportDashboardPerf API helper
2026-04-19 10:13:33 -07:00
Fusion
d9a806f61a docs(FN-2094): align memory plugin contract with OpenClaw layout
- Rewrite memory backend contract docs to match shipped MemoryBackend interfaces, capabilities, and registry behavior
- Clarify .fusion/memory/ as the canonical layered workspace and keep .fusion/memory.md compatibility-only
- Document backend resolution through memoryBackendType with qmd as the default and qmd-to-file search fallback behavior
- Synchronize architecture, contributing, and settings reference docs with the updated memory model terminology
2026-04-19 10:13:33 -07:00
Fusion
e8dcca6e54 Remove dashboard-load timing instrumentation
The perf logs were temporary diagnostics used to identify that slow
reloads were caused by a registered remote node timing out in
/projects/across-nodes. Root cause is resolved and the short-circuit
for zero-remote setups (already committed in 7ea60382a) remains.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 10:13:33 -07:00
gsxdsm
4b448a2b40 Remove dashboard-load timing instrumentation
The perf logs were temporary diagnostics used to identify that slow
reloads were caused by a registered remote node timing out in
/projects/across-nodes. Root cause is resolved and the short-circuit
for zero-remote setups (already committed in 7ea60382a) remains.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 01:03:36 -07:00
Fusion
7424c843f2 feat(FN-2089): merge fusion/fn-2089 2026-04-19 01:03:36 -07:00
gsxdsm
f3de45b050 fix(teardown): improve cleanup logic to avoid shared directory deletion 2026-04-19 01:03:36 -07:00
Fusion
9d9f0ac3bd Cleanup and fix transient error detection in review 2026-04-19 01:03:36 -07:00
gsxdsm
48b53d1bdb Cleanup and fix transient error detection in review 2026-04-18 23:47:05 -07:00
gsxdsm
bc841e9bf6 test: enforce test-directory isolation across all packages
Introduce a shared test-utils module and global vitest setup that
guarantee tests never write to the real .fusion directory or leak temp
directories under /tmp.

Infrastructure:
- packages/core/src/__test-utils__/workspace.ts — tempWorkspace(),
  useIsolatedCwd(), trackForCleanup(), assertOutsideRealFusion() with
  auto-cleanup in afterEach.
- packages/core/src/__test-utils__/vitest-setup.ts — per-worker guard:
  chdirs each worker into an isolated tmp dir, wraps process.chdir to
  refuse the real .fusion, scopes tmp dirs under fusion-test-workers/
  (skips cwd change in thread-pool workers where chdir isn't supported).
- packages/core/src/__test-utils__/vitest-teardown.ts — globalSetup
  hook that wipes the shared parent even when workers are SIGKILLed.
- scripts/check-test-isolation.mjs + `test:isolated` / `test:check-
  isolation` scripts for CI.
- @fusion/test-utils alias + setupFiles + globalSetup wired into core,
  cli, engine, dashboard, tui vitest configs; matching tsconfig paths.

Test refactors (no behavior change):
- cli provider-settings, auth-paths, provider-auth — switch leaking
  mkdtempSync calls to tempWorkspace().
- core migration, first-run, store-backward-compat — replace manual
  process.chdir save/restore with useIsolatedCwd().
- tui fusion-context — replace 9 hardcoded tmp paths (collision-prone
  under parallelism) with tempWorkspace().
- dashboard useTheme, FileBrowser, TaskCard — resolve source-file reads
  against a PACKAGE_ROOT computed from import.meta.url instead of cwd,
  so tests don't depend on the process working directory.

Verified: full suite (~15,500 tests across 8 packages + plugins) passes
and the orphan-detector reports zero leaked temp directories after a
complete run.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 23:41:47 -07:00
gsxdsm
c77a4a572e feat(FN-2088): merge fusion/fn-2088 2026-04-18 23:22:26 -07:00
gsxdsm
456c8ed6e6 feat(FN-2017): merge fusion/fn-2017 2026-04-18 23:22:20 -07:00
gsxdsm
83458f1eca feat(FN-2108): merge fusion/fn-2108 2026-04-18 22:53:07 -07:00
gsxdsm
ecafaf496c feat(FN-2086): merge fusion/fn-2086 2026-04-18 22:52:33 -07:00
Fusion
d642af311d feat(FN-2087): finalize canonical memory path migration
- Remove legacy .fusion/memory.md fallback references and normalize prompts/docs to .fusion/memory/MEMORY.md
- Stop legacy mirror writes and fallback reads in core memory backend and project memory flows
- Update engine worktree boundary checks and tests for canonical memory file handling
- Align dashboard memory/settings surfaces and route tests with canonical memory behavior
- Add model-favorites persistence test coverage for mission interview and new agent dialogs
2026-04-18 22:47:17 -07:00
gsxdsm
63ecb21c39 feat(FN-2106): merge fusion/fn-2106 2026-04-18 22:37:29 -07:00
gsxdsm
18d2634dbe feat(FN-2103): merge fusion/fn-2103 2026-04-18 22:37:20 -07:00
gsxdsm
614f9b4ddd feat(FN-2082): merge fusion/fn-2082 2026-04-18 22:22:20 -07:00
Fusion
89cc85a499 fix(FN-2090): log and cover engine warning fallbacks
- Add structured warning logs for plugin-runner fallback paths instead of silent catches
- Add warning telemetry in agent-tools for agent-memory directory, QMD search, and index refresh failures
- Log cron-runner session disposal failures and update agent-logger persistence warnings to use logger output
- Expand engine tests to cover warning behavior across plugin-runner, agent-tools, cron-runner, and agent-logger
2026-04-18 22:18:55 -07:00
Fusion
e1171ba24c feat(FN-2101): merge fusion/fn-2101 2026-04-18 22:09:32 -07:00
gsxdsm
4e3e2ca7fe feat(FN-2092): merge fusion/fn-2092 2026-04-18 22:07:20 -07:00