- Update test assertions for bare model IDs
- Add deduplication guard for models with same bare ID
- Add validation for empty model IDs after prefix stripping
- Add test for API key forwarded as env var to spawn
- Add test for deduplication and empty model ID guard
- Extract shared handleOpencodeGoApiKeySaved helper
- Add changeset for the published package
normalizeOpencodeGoModel was prefixing model IDs with 'opencode-go/'
(e.g. 'opencode-go/deepseek-v4-flash'), but the Pi SDK sends the model
id field as the model name in API requests. The OpenCode API expects
bare model names (e.g. 'deepseek-v4-flash'), not prefixed ones.
Now strips the 'opencode/' or 'opencode-go/' prefix entirely so the
registered model ID matches what the API expects.
discoverOpencodeGoModels() spawns 'opencode models opencode --refresh' but
never passed the saved API key as OPENCODE_API_KEY. The opencode CLI's
internal OpencodePlugin checks this env var to decide whether to show
paid models; without it, only free (cost.input === 0) models appear.
Now threads the apiKey from auth storage through to the spawned process
environment, so the CLI sees the user's Go subscription and returns the
full model catalog including paid models like Claude, GPT-5.x, Gemini, etc.
Callers in serve.ts, daemon.ts, and dashboard.ts all updated to read
the key from dashboardAuthStorage and pass it to refreshOpencodeGoModels.
syncStartupModels reads from authStorage in StartupSyncOptions.
Migration (multi-agent sweep over 216 files, 60 batches):
- Every user-visible dashboard + TUI string moved to t() with the exact
English inline default (en rendering byte-identical)
- Catalogs merged from per-batch fragments: en/zh-CN/zh-TW/fr/es now
carry ~5,930 keys each across common/app/errors/cli namespaces;
CLI bundles regenerated (6 locales incl. ko)
Integration fixes:
- 18 type errors: reserved {{count}} interpolations renamed, malformed
plural call, hand-rolled t-param types replaced with TFunction<"app">
- 23 lint errors: superseded label constants/helpers removed
- ExecutorStatusBar hook-order violation (keyboard-open early return
moved below hooks)
- TUI tests wrapped in I18nextProvider (uninitialized fallback renders
literal {{placeholders}}); dashboard vitest.setup boots a minimal en
i18next instance for the same reason
Known WIP (next commits): ~457 residual strings across 50 batches,
Korean drafts for swept keys, and a dashboard test-suite pass that is
still being stabilized (~283 failures under investigation — fake-timer
waitFor interaction, likely stale node_modules vs merged lockfile).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- resolve execFile lazily via namespace import in coordinator/merger/
task-lifecycle so the repo's exec-only child_process test mocks load again
(10+ engine suites failed at import); dashboard.test.ts mock gains execFile
so the argv-based git probes hit the mock instead of spawning real git
- TaskCard: capture optional branchContext.groupId into a const (narrowing
doesn't survive into the onClick closure; app tsconfig caught it in CI)
- planning e2e: bounded poll past the 2.5s listTasks startup memo that served
a pre-landing snapshot on fast CI runs
- ko added to SUPPORTED_LOCALES and every enumeration site (config,
settings enum, help text, tests); Korean catalogs authored for all
current keys; CLI bundles regenerated for 6 locales; 한국어 endonym
- README translated into zh-CN, zh-TW, fr, es, ko; every README carries
a language-switcher line and the localized ones note that English is
canonical
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- abandon (route + CLI) preserves prState 'none' for groups that never had a
PR instead of falsely persisting 'closed'; regression tests both sides
- stale-snapshot write guard extracted to syncGroupPrOnLanding and covered by
a fast in-memory unit test (FN-5048); the slow real-git duplicate removed
Both sides bootstrapped CONCEPTS.md — kept main's broader structure (Missions,
Merge lifecycle, CE sessions) and folded the branch-group vocabulary into its
Merge-lifecycle cluster (enriched Shared branch group + Self-healing sweep;
added Branch assignment mode, Landed, Group promotion). Union-merged core
index/store imports; took main's AGENTS.md discoverability wording. Also adds
execFile to the two child_process test mocks that only stubbed exec (the
coordinator's argv-based git calls now require it).
- syncGroupPrCallback forwards owner/repo to updatePr (multi-project daemons
could 404 or edit an unrelated same-numbered PR via process-cwd fallback)
- merger background reconcile re-reads the group before persisting and skips
the write when the PR snapshot changed (stale-write race vs newer open PR)
- branchContext.groupId trimmed on metadata emit/parse round-trip
- triageSlice non-shared invariant assertions (no groupId, no group row)
Two compounding bugs made the memory-pressure vitest auto-kill a
30-second SIGKILL sweep of anything mentioning vitest:
1. False pressure: getAvailableMemory probed os.availableMemory, which
does not exist, and silently fell back to os.freemem() — on macOS
that reads ~99% used on an idle 256GB machine, permanently above the
90% threshold. Now reads process.availableMemory() (Node 22+) and
refuses to auto-kill when only the unreliable freemem fallback is
available.
2. Overbroad targeting: pgrep -f vitest matches full command lines, so
the sweep also killed wrapper shells (zsh -c '... npx vitest run'),
monitor loops, and anything else whose argv mentions vitest —
stranding exit handlers and taking out unrelated process trees.
New shared findVitestProcessIds (@fusion/core) filters matches to
actual node executables.
Surface enumeration (all vitest-process kill/count surfaces):
- TUI memory-pressure auto-kill (controller.killVitestProcesses)
- TUI manual kill-vitest command (same method)
- dashboard POST /api/kill-vitest
- dashboard GET /api/system-stats vitestProcessCount (display)
All four now route through findVitestProcessIds.
Resolves the remaining review threads:
- Reset to auto-detect across all three layers (Greptile): store passes
language:null through as null-as-delete; dashboard gains an Auto option
(clearLanguage + hasExplicitChoice in useLanguage, re-detects from
navigator, syncs cross-tab); CLI accepts 'fn settings set language auto'.
Catalog keys added for all five locales; tests at every layer.
- CLI i18n test singleton: afterEach locale restore so zh-CN/fr switches
can't leak across cases (CodeRabbit nitpick)
- useLocaleFormat memoized per locale for stable formatter identities
(CodeRabbit nitpick)
- settings-reference.md documents the auto reset path
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Review residuals #5/#7/#8/#11/#12 + #3 wiring: forward the configured GitHub
token to the abandon route's client; guard abandon against finalized/merged
groups; reconcile an open group PR's state from GitHub on single-group reads
(merged out-of-band now flips prState); add fn branch-group abandon for
agent-native parity; block branchName shell injection (execFile argv push +
core-side branch-name validation at group creation); and collapse the
branch-groups list N+1 to a single task fetch via a shared
filterTasksByBranchGroup helper.
- config: explicit Hans script wins over HK/MO region (zh-Hans-HK -> zh-CN),
with regression tests for script-vs-region precedence
- dashboard i18n: detection.caches [] so the detector's init-time auto-persist
can't masquerade as a user choice and suppress server-settings hydration
- LanguageSelector: role=group (radiogroup conflicted with aria-pressed)
- bin: validate --lang against SUPPORTED_LOCALES (fail loudly, not silent
fallback); help text clarifies the flag is terminal-UI-only
- cli i18n test: assert a real fr catalog lookup (defaultValue could mask a
catalog that never loaded); comment the async changeLanguage re-init seam
- assert-locale-chunks: only dirs containing common.json count as locales
- plan doc: merge duplicate Ink 6.8->7.0 risk bullets
- AGENTS.md/solution doc: frontmatter field list + normalizer excerpt synced
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Code review (Tier 2) found two P1s: (1) the early no-op fast-path persisted
mergeConfirmed/mergeTargetBranch without mergeTargetSource, so a shared-group
member landing via it could never satisfy the strict completion predicate —
promotion permanently blocked; thread mergeTarget.source through like the
standard landing sites. (2) createGroupPrCallback's findPrForBranch used
state:'all' and could reuse a closed/merged PR from a prior group, persisting
a terminal prState onto a fresh promotion; create path now matches open PRs
only.
Simplicity pass over the 8-unit diff: delete caller-less closeGroupPrCallback
(CLI), dead dashboard createGroupPullRequest/syncGroupPullRequest (+ their
builders/types/tests — production uses the CLI callbacks), and merge the two
CLI PR-body builders into one parameterized function. ~140 LOC of
parallel-but-unused code from isolated unit implementation.
Extend BranchGroupCard/GroupTaskModal with an Abandon action (open PRs) and
terminal merged/closed badges; promote stays completion-gated. New
fn branch-group list|show|promote (alias fn bg) reaching the same coordinator
path with createGroupPrCallback wired — agent-native parity with the dashboard
promote flow, same completion-gate rejection.
Push the single group PR's body (member checklist, x/N landed) on each member
landing via an injected SyncGroupPrFn — new updatePr/closePr GitHubClient
helpers (gh CLI + API parity); refreshPrInBackground is task-scoped/wrong
direction and intentionally not reused. Sync failures are non-fatal+retryable;
out-of-band closed/merged PRs reconcile prState instead of erroring. New
POST /branch-groups/:id/abandon closes the PR best-effort and marks the group
abandoned. Also fixes the U5-introduced stub-context regression in the U4
dashboard bridge test (missing options).
Group promotion in PR mode previously flipped prState to 'open' without ever
calling GitHub — prNumber/prUrl were never populated. Add an injected
CreateGroupPrFn (mirrors the processPullRequestMerge seam, no engine→dashboard
import): coordinator creates-or-reuses exactly one PR per group, persists
prNumber/prUrl/prState, and leaves state untouched on GitHub failure so
re-promotion retries. Idempotent via persisted prNumber +
getBranchGroupByBranchName. Wired at all three CLI engine-construction sites
(daemon/dashboard/serve).
Wires the ACP runtime plugin into the published CLI (RUNTIME_PLUGIN_IDS in
tsup.config) and the on-demand BUILTIN_PLUGINS catalog (experimental), matching
the untrusted-subprocess security posture. Adds the Risk S1 default-policy
safety: an acpAllowUnrestricted acknowledgement (default false) — without it, a
blanket allow on a sensitive category is escalated to approval rather than
auto-approved under the allow-all default policy, applied in both the permission
floor and fs write gating. Adds docs/acp-contract.md (launch/readiness +
failure taxonomy), a README with the AGENTS.md-required upstream evidence
(SDK repo/docs/release/integrity), a bundle-output test for the staged plugin,
and a @runfusion/fusion minor changeset. Package green at 179 tests.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- settings.test.ts mocks @fusion/core; add SUPPORTED_LOCALES to the mock so the
new language enum import resolves (shard 1).
- LanguageSelector.css used the banned --text-secondary token; switch to the
canonical --text-muted (shard 2 text-token-canonicalization guard).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Extract a shared normalizeToSupportedLocale helper in @fusion/i18n used by
both the CLI env detection and the dashboard navigator detection
(convertDetectedLanguage), fixing multi-subtag navigator tags (zh-Hans-CN)
and unifying Chinese script resolution.
- Add a cross-tab storage listener to useLanguage so a language change in one
tab propagates to others.
- Dedup the namespace lists into packages/i18n/namespaces.json, consumed by
config.ts and all three build scripts (no more 3-way drift risk).
- Add tests: dashboard i18n/index.ts (document.lang mirror, init non-blocking),
useLanguage concurrent-hydration race + cross-tab adoption,
normalizeToSupportedLocale, namespace-source consistency.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Validate GlobalSettings.language at the write boundary (store.ts) via
validateLocale, so invalid locales are dropped not persisted (api-contract P1).
- Fix detectEnvLocale: Traditional-script env tags (zh_Hant/zh_Hant_TW/zh_HK/
zh_MO) now resolve to zh-TW instead of Simplified; use replaceAll for
multi-underscore POSIX tags (adversarial P2). Add coverage.
- Agent-native parity: add 'language' to the CLI settings allowlist
(VALID_SETTINGS + GLOBAL_ONLY + enum) so 'fn settings set language' works
like the dashboard switcher.
- Document --lang in the bin.ts help table (api-contract P3).
- Derive the expected locale-chunk count from the locales dir instead of a
hardcoded 5 (maintainability), and add prebuild:client so a raw vite build
on a fresh clone still syncs catalogs (adversarial P2).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Establish the terminal-UI migration pattern: route BoardView's loading/empty
labels through useTranslation("cli"), keeping single-letter keybinding
accelerators literal via interpolation ([{{key}}]). Add the keys to the en cli
catalog, sync the four locales, and regenerate the CLI import map. Tests cover
the migrated label and accelerator preservation. The remaining TUI labels are
deferred long-tail work; the pattern is in place.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a synchronous Node-side i18next instance built from the generated
@fusion/i18n CLI catalog map (no async backend, first frame localized), with
locale precedence --lang flag -> GlobalSettings.language -> env (LC_ALL/LANG/..)
-> en. Wrap the Ink DashboardApp render in <I18nextProvider> and thread a
--lang flag through runDashboard.
Upgrade ink 6.8 -> 7.0 (native CJK double-width measurement) and raise the
react/@types/react peer floor to ^19.2.0. A spike test confirms react-i18next
works under Ink's custom reconciler: localized first frame + re-render on
changeLanguage (including CJK), retiring the KTD1 unknown.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Use a committed launcher for published CLI bin links to avoid fresh-install warnings.
- point the published fn and fusion bin entries at a committed bin.mjs launcher
- add a launcher that checks for dist/bin.js and forwards execution to the built CLI
- cover bin target invariants across workspace packages and update CLI package config tests
- add a patch changeset for the published @runfusion/fusion package
Files changed:
.changeset/fn-5916-cli-bin-launcher.md | 5 ++
packages/cli/bin.mjs | 20 ++++++
packages/cli/package.json | 5 +-
packages/cli/src/__tests__/bin-targets.test.ts | 85 +++++++++++++++++++++++
packages/cli/src/__tests__/package-config.test.ts | 8 ++-
5 files changed, 118 insertions(+), 5 deletions(-)
Fusion-Task-Id: FN-5916
Fusion-Task-Lineage: 59d40654-ff77-4655-b9ce-3f3421521b2c
Split the dashboard quality Vitest lane into bounded heap-managed shards to avoid signal exits.
- replace the single dashboard quality test command with sequential app and API shard scripts
- add a heap wrapper plus Vitest config shard definitions for foundation, component, App, ChatView, and SettingsModal coverage
- add guard tests for the sharded dashboard test configuration and restore spinner-animation.css.test.ts to foundation-ui coverage
- update the CLI package-config test expectations for the new dashboard test script layout
Files changed:
packages/cli/src/__tests__/package-config.test.ts | 8 +-
packages/dashboard/package.json | 18 +-
packages/dashboard/scripts/run-vitest-with-heap.mjs | 41 ++++
packages/dashboard/src/__tests__/dashboard-test-config-guard.test.ts | 77 ++++++
packages/dashboard/vitest.config.ts | 273 ++++++++++++++++++++-
5 files changed, 407 insertions(+), 10 deletions(-)
Fusion-Task-Id: FN-5849
Fusion-Task-Lineage: 522f3963-4647-4a59-bb6b-a3dacfbf620e
Resolve goal tool lookups to the canonical project store from Fusion worktree directories.
- recognize both legacy .worktrees and .fusion/worktrees paths when resolving the project root for pi extensions
- add CLI coverage proving fn_goal_list and fn_goal_show return dashboard-created goals from a Fusion worktree cwd
- extend core worktree-resolution tests and keep the branch conflict recovery test worktree path isolated in tmpdir
- add a patch changeset for the published CLI fix
Files changed:
.changeset/fn-5851-goal-store-resolution.md | 5 +
packages/cli/src/__tests__/goal-store-resolution.test.ts | 104 +++++++++++++++++++++
packages/core/src/__tests__/pi-extensions.test.ts | 14 ++-
packages/core/src/pi-extensions.ts | 12 ++-
packages/engine/src/__tests__/branch-conflicts-recovery.test.ts | 2 +-
5 files changed, 130 insertions(+), 7 deletions(-)
Fusion-Task-Id: FN-5851
Fusion-Task-Lineage: ec4c8239-b953-4df7-9f72-02e17e4b0851
Clarifies test expectations around onboarding auto-launch and non-matching integration tips.
- Rename the onboarding marker test to describe central DB gating accurately.
- Assert task-list routing when onboarding is skipped after central DB creation.
- Avoid accidental matching SHA construction in the git advance pending test.
Files changed:
packages/cli/src/__tests__/bin.test.ts | 8 ++++++--
packages/dashboard/src/__tests__/routes-git.test.ts | 3 ++-
2 files changed, 8 insertions(+), 3 deletions(-)
Fusion-Task-Id: FN-5848
Fusion-Task-Lineage: c730deb9-875d-4371-9d92-f85281bcb658
CLI onboarding auto-launch now skips once the persisted completion marker is present.
- Load `cliOnboardingCompletedAt` from global settings before launching onboarding when the central DB is missing.
- Preserve existing skip precedence for non-TTY, command, flag, environment, and central DB guards.
- Add unit and backcompat coverage for completion-marker and skipped-central-DB scenarios.
- Document the updated auto-launch behavior and add a patch changeset.
Files changed:
.changeset/fn-5847-onboard-autolaunch-marker.md | 5 ++
docs/cli-reference.md | 12 +--
.../onboard-autolaunch-backcompat-e2e.test.ts | 7 ++
.../onboard-autolaunch-backcompat.test.ts | 8 ++
.../__tests__/onboard-autolaunch-bypass.test.ts | 7 ++
.../commands/__tests__/onboard-autolaunch.test.ts | 93 ++++++++++++++++++++++
packages/cli/src/commands/onboard-autolaunch.ts | 46 ++++++++++-
7 files changed, 171 insertions(+), 7 deletions(-)
Fusion-Task-Id: FN-5847
Fusion-Task-Lineage: db3e474e-e4b8-4299-8087-07b6cd1f4518