da616e1cf9a5d17c0d0d162a60bc9d53f4884b86
8 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
478f226a54 |
test: green full-suite CI after main drift (#2229)
## Summary Restores green **Full Suite (non-blocking)** runs on `main`. Recent main merges left i18n key parity, schema baseline bookkeeping (0011→0012), heartbeat tool inventory (FN-8058 `fn_task_logs_read`), and merger whitespace-classification mocks (execFile `git diff -p -w :2: :3:`) out of date, so all four test shards failed. ## Root causes observed on main - **Shard 4 / `@fusion/i18n`**: missing `skipConfirmationDialogs*` + `reviewBudgetExhausted` in non-en locales; orphan `awaitingApprovalPlanReviewReplanCap` - **Shard 3 / `@fusion/core`**: `SCHEMA_BASELINE_VERSION` advanced to `0012` while tests still equated it with `OWNER_PROJECT_ID_SPLIT_VERSION` (`0011`) and omitted `0012` from applied-migration lists - **Shards 1–2 / `@fusion/engine`**: tool count/snapshot drift for `fn_task_logs_read`; merger tests still mocked `git diff-tree` for trivial classification after the execFile `:2:`/`:3:` cutover; mock provider `updateTask` arity drift ## Changes - Locale catalogs: add missing keys, drop orphan key - Schema applier tests: immutable 0011 identity + baseline 0012 lists - Heartbeat + gating snapshots: include `fn_task_logs_read` - Merger unit mocks: recognize `git diff -p -w :2:path :3:path` - Mock provider: accept optional third `updateTask` arg ## Test plan - [x] `pnpm --filter @fusion/i18n exec vitest run` — 23/23 - [x] `pnpm --filter @fusion/core exec vitest run src/__tests__/postgres/schema-applier.test.ts` (immutable + automation upgrade) — pass - [x] `pnpm --filter @fusion/core exec vitest run` project-identity + satellite-fusiondir — pass - [x] Engine suites from failed CI shards (file-scoped, hermes/openclaw/paperclip/grok, reliability post-finalize/mission, heartbeat, gating, merger recovery/prompt, mock-provider, etc.) — pass - [ ] Full Suite workflow green on merge to main <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Improved project data isolation across backend operations. - Added safer optional toast handling when UI components render outside the full application shell. - Added support for reading task logs during agent heartbeat sessions. - **Bug Fixes** - Prevented runtime probes from hanging and avoided scanning large binary files. - Improved path handling for workspaces with missing descendants. - Corrected task retry state resets and GitHub import/issue-close behavior. - **Style** - Improved chat, terminal, and settings spacing. - Added clearer accessibility labeling for the auto-merge control. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
f57dfc03b6 |
FN-8105: remove archived task worktrees safely
Archive task worktrees through a store-scoped, race-safe disposal lifecycle. - Reserve pinned worktree paths during archive cleanup and successor creation. - Reconcile quarantined removals before reusing a pinned path. - Gate PostgreSQL archival before destructive worktree disposal and wire CLI cleanup. Files changed: .changeset/fn-8105-archive-removes-worktree.md | 7 + docs/task-management.md | 4 + .../extension-experiment-finalize.test.ts | 1 + .../src/__tests__/extension-fn-secret-get.test.ts | 1 + .../extension-gitlab-tracking.test.ts | 1 + .../cli/src/__tests__/extension-web-fetch.test.ts | 1 + .../task-command-github-import-tracking.test.ts | 1 + packages/cli/src/commands/__tests__/task.test.ts | 1 + packages/cli/src/commands/task.ts | 8 +- packages/cli/src/extension.ts | 4 + .../__tests__/worktree-path-reservation.test.ts | 58 ++++++++ packages/core/src/archive-worktree-disposer.ts | 21 +++ packages/core/src/index.gate.ts | 13 ++ packages/core/src/index.ts | 13 ++ .../core/src/task-store/archive-lifecycle-2.ts | 8 ++ packages/core/src/task-store/archive-lifecycle.ts | 37 +++++ packages/core/src/worktree-path-reservation.ts | 149 +++++++++++++++++++++ .../src/archive-worktree-disposer-install.ts | 18 +++ packages/engine/src/executor.ts | 16 +++ packages/engine/src/index.ts | 2 + packages/engine/src/runtimes/in-process-runtime.ts | 1 + packages/engine/src/worktree-acquisition.ts | 27 +++- 22 files changed, 388 insertions(+), 4 deletions(-) Fusion-Task-Id: FN-8105 Fusion-Task-Lineage: cabb8f52-093f-4986-bfda-2c7601a72579 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
10b80453c4 |
FN-7978: share GitHub import dedup via sourceIssue-first helper
Unify GitHub issue import deduplication so prior imports stay marked after description edits or owner/repo casing changes. - Extract shared buildGitHubIssueSource and isGitHubIssueAlreadyImported helpers in dashboard github.ts (sourceIssue-first, case-insensitive repo, sourceMetadata + description URL fallbacks) - Route CLI import paths, extension tools, and dashboard single/batch import through the shared helpers - Drop local description-URL-regex-only importedUrls dedup; list existing tasks with slim:false for full provenance - Add regression coverage and changeset for the operator-facing fix Files changed: .changeset/fn-7978-github-import-dedup.md | 7 ++ docs/gitlab-parity-inventory.md | 2 +- packages/cli/src/__tests__/extension.test.ts | 12 ++-- .../task-command-github-import-tracking.test.ts | 6 ++ packages/cli/src/commands/__tests__/task.test.ts | 36 +++++++--- packages/cli/src/commands/task.ts | 82 +++++++++------------- packages/cli/src/extension.ts | 35 ++------- packages/dashboard/src/__tests__/github.test.ts | 22 +++++- .../dashboard/src/__tests__/routes-github.test.ts | 8 +-- packages/dashboard/src/github.ts | 62 +++++++++++++++- packages/dashboard/src/index.ts | 2 +- .../dashboard/src/routes/register-git-github.ts | 33 +-------- 12 files changed, 174 insertions(+), 133 deletions(-) Fusion-Task-Id: FN-7978 Fusion-Task-Lineage: 44f3d555-49fb-41e2-87d0-0a722462f132 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
f7e942e6f4 |
fix: resolve all full-suite failures + add structural mock-completeness gate check (round 10) (#2040)
## Summary
Fixes ALL failing shards from the latest full-suite run (29225946428)
AND adds a structural gate check to prevent the recurring mock-export
drift pattern that has caused every full-suite failure across rounds
1–9.
## What broke (run 29225946428, commit
|
||
|
|
c8999369c3 |
feat: add gate check for CLI dashboard mock completeness — prevents recurring full-suite barrel-export drift (#2035)
## Summary
**Structural fix** for the recurring full-suite failure pattern where a
new `@fusion/dashboard` barrel export is imported by CLI source code but
missing from the hardcoded `vi.mock("@fusion/dashboard")` factory in CLI
tests.
## What's new
### Gate check script:
`scripts/check-cli-dashboard-mock-completeness.mjs`
Added to the merge gate (`pnpm test:gate`). Statically validates that
every hardcoded `vi.mock("@fusion/dashboard")` factory in CLI tests
includes all `@fusion/dashboard` exports that the corresponding source
files import.
- Pure static analysis (regex + depth-aware brace tracking) — no module
evaluation, <0.1s
- Handles named imports (`import { foo } from "@fusion/dashboard"`) AND
namespace imports (`import * as dashboard from "@fusion/dashboard"` →
scans `dashboard.X` usages)
- Filters against the real barrel exports to avoid false positives from
typos
- Resolves test→source mapping by parsing static/dynamic imports in the
test file (not just naming convention)
**Result:** the next time someone adds `export { newFunc } from
"./mod.js"` to `dashboard/src/index.ts` and `cli/src/commands/daemon.ts`
imports it, the gate catches the missing mock before merge instead of
the full-suite failing on main.
### Completed all 9 incomplete CLI dashboard mocks
Added the missing exports identified by the check:
| File | Missing exports added |
|---|---|
| `daemon.test.ts` | `registerGithubTrackingHook` |
| `serve.test.ts` | `registerGithubTrackingHook` |
| `dashboard.test.ts` | `AttachTicketStore`, `CliInputAttributionLog`,
`CliConfirmAdvanceRegistry`, `CliRelaunchRegistry`,
`registerGithubTrackingHook` |
| `task.test.ts` | `registerGithubTrackingHook`, `GitLabClient`,
`resolveGitlabAuth`, `buildGitLabTaskProvenance`,
`isGitLabAlreadyImported`, `buildGitLabTaskDescription` |
| `extension-*.test.ts` (×4) | `GitLabClient`, `resolveGitlabAuth`,
`buildGitLabTaskProvenance`, `isGitLabAlreadyImported`,
`buildGitLabTaskDescription` |
| `task-command-github-import-tracking.test.ts` | Same GitLab exports |
These were latent issues — the mocks were incomplete but tests passed
because the missing exports weren't called during test execution. Any
test change that exercises those code paths would have broken.
## Why not `importActual` spread?
Tried converting daemon.test.ts to `vi.mock("@fusion/dashboard", async
(importOriginal) => { ... })` — fails because the barrel's `export *
from "./plugins/index.js"` transitively imports
`@agentclientprotocol/sdk` which isn't available at test evaluation
time. The static check approach avoids this entirely.
## Verification
- `pnpm test:gate`: exit 0 (includes new check)
- `pnpm lint`: exit 0
- CLI tests: daemon 21/21, serve 58/58, dashboard 91/91, task 149/149 ✅
- Gate script: `✅ CLI dashboard mock completeness: all hardcoded mocks
cover source imports.`
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Tests**
- Added automated validation to ensure CLI test mocks remain aligned
with available dashboard functionality.
- Updated test coverage setup so GitHub, GitLab, daemon, dashboard,
server, and task scenarios use complete dashboard mocks.
- Test verification now reports missing mocked functionality and blocks
the release gate when inconsistencies are detected.
- **Chores**
- Improved reliability and maintainability of automated verification for
CLI and dashboard integrations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
||
|
|
1bf52758e4 | test(cli): fix stale project-context/desktop/core mocks + version pin + engine-tools doc (shard 3) | ||
|
|
a9e2baa9f8 |
FN-7367: link imported GitHub issues to tracking
Imported GitHub issues can now adopt their source issue as the tracking issue without changing ordinary task defaults. - Add the project-scoped githubLinkImportedIssuesToTracking setting with docs, Settings UI, and defaults. - Honor the import-only setting across dashboard, CLI, and extension GitHub issue import paths. - Cover saved settings and import tracking behavior with CLI, dashboard, and parity tests. - Add a minor changeset for the published CLI package. Files changed: .changeset/fn-7367-github-import-tracking.md | 7 +++ docs/settings-reference.md | 3 +- packages/cli/src/__tests__/extension.test.ts | 73 ++++++++++++++++++++++ .../task-command-github-import-tracking.test.ts | 16 +++++ packages/cli/src/commands/__tests__/task.test.ts | 28 +++++++++ packages/cli/src/commands/task.ts | 45 +++++++------ packages/cli/src/extension.ts | 45 +++++++------ .../core/src/__tests__/settings-parity.test.ts | 4 ++ packages/core/src/settings-schema.ts | 1 + packages/core/src/types.ts | 6 ++ .../app/__tests__/settings-save-split.test.ts | 19 ++++++ .../dashboard/app/components/SettingsModal.tsx | 6 ++ .../__tests__/SettingsModal.general.test.tsx | 59 +++++++++++++++++ .../__tests__/SettingsModal.test-harness.tsx | 1 + .../settings/sections/GeneralSection.tsx | 9 +++ .../dashboard/src/__tests__/routes-github.test.ts | 45 +++++++++++++ .../dashboard/src/routes/register-git-github.ts | 7 +++ 17 files changed, 325 insertions(+), 49 deletions(-) Fusion-Task-Id: FN-7367 Fusion-Task-Lineage: 43671cdf-7e0d-4b7a-9ba2-54c9a367dfec Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
8b22dd2ffe |
FN-7090: link imported GitHub issues as tracked tasks
Link GitHub issue imports to existing source issues when tracking defaults are enabled. - Resolve project/global GitHub tracking defaults before CLI, extension, and dashboard issue imports. - Mark imported issue tasks as tracking-enabled so the post-create hook adopts the source issue instead of creating duplicates. - Cover tracked and untracked import behavior across CLI tools, task commands, and dashboard GitHub routes. - Document the import tracking behavior and add a minor changeset for the published CLI. Files changed: .changeset/fn-7090-import-github-tracked.md | 7 ++ docs/cli-reference.md | 2 + docs/settings-reference.md | 2 +- .../__tests__/extension-github-tracking.test.ts | 63 +++++++++++ packages/cli/src/__tests__/extension.test.ts | 125 ++++++++++++++++++++- .../task-command-github-import-tracking.test.ts | 119 ++++++++++++++++++++ packages/cli/src/commands/__tests__/task.test.ts | 64 ++++++++++- packages/cli/src/commands/task.ts | 30 ++++- packages/cli/src/extension.ts | 27 +++++ .../dashboard/src/__tests__/routes-github.test.ts | 74 ++++++++++++ .../dashboard/src/routes/register-git-github.ts | 21 +++- 11 files changed, 524 insertions(+), 10 deletions(-) Fusion-Task-Id: FN-7090 Fusion-Task-Lineage: 1e5510c3-7a98-4ff2-a109-e465ff58b9c2 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |