Commit Graph

1337 Commits

Author SHA1 Message Date
Fusion (runfusion.ai)
e6c7dcdd64 feat(FN-5139): wire lineage unlink delete and archive flows
Fusion-Task-Id: FN-5139
Fusion-Task-Lineage: c16f4245-bfda-4b9a-bd98-ffc44b45f5a0
2026-05-19 18:56:24 -07:00
gsxdsm
2d42476dac fix(dashboard): fire github tracking on duplicate and refine routes
The duplicate and refine task routes returned without invoking
createTrackingIssueForTask, depending on TaskStore's internal
task-created hook to do it. That works in production with a real
TaskStore but leaves no path through mocked test stores — which is why
routes-tasks-ops's duplicate/refine tests expecting createIssue calls
were failing.

Call createTrackingIssueForTask explicitly after duplicateTask and
refineTask, in a best-effort try/catch so a tracking failure can't
block the response. Mirrors the existing PATCH /tasks/:id flow.

Also wire registerGithubTrackingHook with a test logger in
routes-planning-tracking.test.ts and have the mock store fire the hook
after createTask so the planning create-task flow's expectations land.

Fix the two PATCH tests in routes-tasks-ops that mocked getTask to
already return a linked issue — using mockResolvedValueOnce for the
pre-creation state and mockResolvedValue for the post-creation state
so createTrackingIssueForTask sees the unlinked task first.

Fixes 9 failing tests across routes-tasks-ops.test.ts (6) and
routes-planning-tracking.test.ts (3).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 18:52:36 -07:00
gsxdsm
9a541f09e8 test(dashboard): drop stale invokeTaskCreatedHook expectation from routes-planning
The planning routes no longer pass { invokeTaskCreatedHook: false } as
the second arg to store.createTask — they let the hook fire so
GitHub tracking and other post-creation listeners run. The
toHaveBeenCalledWith assertions still expected the legacy second arg
and failed across 12 test cases.

Strip the second argument from each toHaveBeenCalledWith spec. Fixes 8
failing tests in routes-planning.test.ts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 18:42:05 -07:00
gsxdsm
dbbb9b1524 test(dashboard): align mission-e2e expectations with new store-arg signatures
createMissionInterviewSession, submitMissionInterviewResponse,
retryMissionInterviewSession, and submitTargetInterviewResponse now
take a TaskStore as an additional argument (after rootDir). The e2e
expectations still asserted on the pre-store positional shape and
failed. Insert expect.anything() in the store slot of each
toHaveBeenCalledWith assertion.

Fixes 10 failing tests in mission-e2e.test.ts (interview start/respond/
retry scoping suite + milestone interview respond regression).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 18:40:59 -07:00
gsxdsm
1c706769f3 test(dashboard): add deterministicGuardLocks to remaining @fusion/core mocks
8 more test files were failing to load because their vi.mock("@fusion/core")
factories didn't include the deterministicGuardLocks export that
register-task-workflow-routes pulls in at module-load time. Add the
empty Map to each mock's return object. Unblocks the suite-level
collection for these files (previously the entire file's tests counted
as 0/failed because the module never loaded).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 18:33:36 -07:00
gsxdsm
236bfeeabc fix(dashboard): plumb TaskStore through mission-interview rehydration
Mirror the planning.ts fix: capture store/rootDir on MissionInterviewSession
at creation, fall back to the captured values in
ensureMissionInterviewAgent when callers don't plumb them through. Then
update the session/mission test files so their createSession,
createMissionInterviewSession, and rehydrated submitResponse/retry calls
pass a real TaskStore where they were previously passing undefined.

Fixes 10 failing tests across mission-interview.test.ts,
milestone-slice-interview.test.ts, session-error-recovery.test.ts,
session-persistence-roundtrip.test.ts, session-resume-history.test.ts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 18:26:18 -07:00
gsxdsm
329b74416d fix(dashboard): plumb TaskStore through submit/retry/rewind planning APIs
createSession captured a TaskStore but submitResponse/retrySession/
rewindSession had no way to receive one — so rehydrated sessions
(loaded from SQLite, no prior createSession call) failed with
"Planning session has no task store and cannot be resumed without
project context" when they needed to rebuild an agent.

- Add optional `store` to Session and capture it on createSession.
- Extend submitResponse, retrySession, rewindSession to accept and
  propagate a store argument; ensureSessionAgent falls back to the
  session-captured value when the caller doesn't plumb one.
- Update planning.test.ts rehydration paths to pass MOCK_TASK_STORE
  where they previously relied on the implicit error to test against.

Fixes 7 failing tests in planning.test.ts (rehydration + retry/rewind
flows). Same pattern applies to mission-interview.ts and the related
session-* test files but is deferred to a separate commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 18:21:35 -07:00
gsxdsm
44f662e8ce test(dashboard): pass store to createSession in session-reconnect test
createSession now requires a TaskStore (planning.ts:765); the reconnect
test had a TaskStore in scope but was still passing undefined as the
third arg. Hook it up. Fixes the 1 failing test in this file.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 18:11:58 -07:00
gsxdsm
8e2d0b6d20 test(dashboard): satisfy server.ts contract on sandbox-audit MockStore
routes-sandbox-audit.test.ts mocked @fusion/core without
deterministicGuardLocks (causing the workflow-routes import to throw)
and its MockStore lacked getDatabase, which createServer now calls
when wiring ChatStore. Add both. Fixes 3 failing tests.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 18:09:35 -07:00
gsxdsm
38adeba79f test(dashboard): stub getSelfHealingManager on remote-access engine mock
server.ts createServer now invokes engine.getSelfHealingManager() to
wire the self-healing branch-rebind hook. The headless engine fake in
remote-access-headless.test.ts hadn't been updated. Add a vi.fn() stub
so the mock satisfies the engine surface contract.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 17:51:40 -07:00
gsxdsm
061d28a8a6 test(dashboard): fix insight-run-sweeper Database constructor usage
createDatabase(":memory:") fails the absolute-path guard added to the
Database constructor. Use a real tmp dir with inMemory: true, and call
db.init() to materialize project_insight_runs before InsightStore is
constructed. Fixes 5 failing tests.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 17:51:07 -07:00
gsxdsm
cfd20d319a test(dashboard): add deterministicGuardLocks to @fusion/core mocks
proxy-routes and routes-agent-skills tests mock @fusion/core but omit
the deterministicGuardLocks Map that register-task-workflow-routes
imports at module-load time. Add the export so the mock satisfies the
shape consumers expect. Fixes 24 failing tests across the two files.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 17:44:53 -07:00
Fusion (runfusion.ai)
818db4a714 feat(FN-5189): complete Step 3 — migrate supervised spawns
Fusion-Task-Id: FN-5189
Fusion-Task-Lineage: 4caa3f0a-af81-4c60-88e8-de229ed72e08
2026-05-19 17:19:02 -07:00
Fusion (runfusion.ai)
6431c972e8 test(FN-5152): complete Step 4 — add near-duplicate route regressions
Fusion-Task-Id: FN-5152
Fusion-Task-Lineage: 954570d8-82e1-4519-a739-c52ee790d2db
2026-05-19 11:30:54 -07:00
Fusion (runfusion.ai)
97035f2d87 feat(FN-5152): complete Step 3 — add dashboard near-duplicate gate
Fusion-Task-Id: FN-5152
Fusion-Task-Lineage: 954570d8-82e1-4519-a739-c52ee790d2db
2026-05-19 11:30:54 -07:00
gsxdsm
abfbbcda1e feat(FN-5140): merge fusion/fn-5140 2026-05-19 10:29:42 -07:00
Fusion (runfusion.ai)
ba1604835b feat(FN-5144): add create PR metadata and preflight routes
- Add dashboard routes to generate PR title/body metadata for task branches
- Add PR preflight diagnostics for base branch resolution, remote branch checks, commit summaries, changed files, conflicts, and gh auth state
- Cover the new Create PR route contracts and metadata preflight behavior with dashboard tests
- Add a changeset for the published @runfusion/fusion package

Fusion-Task-Id: FN-5144
2026-05-19 10:25:37 -07:00
Fusion (runfusion.ai)
247437ef30 fix(FN-5154): satisfy strict null checks in attribution helper
Fusion-Task-Id: FN-5154
Fusion-Task-Lineage: 1ca8d162-343b-4d55-bcba-c34efa331ac4
2026-05-19 09:25:01 -07:00
Fusion (runfusion.ai)
d33cfaa7eb test(FN-5154): align legacy rebase-range expectation with attribution fallback
Fusion-Task-Id: FN-5154
2026-05-19 09:24:51 -07:00
Fusion (runfusion.ai)
f1b9cb9af6 test(FN-5154): complete Step 3 — cover attribution-restricted done diffs
Fusion-Task-Id: FN-5154
Fusion-Task-Lineage: 1ca8d162-343b-4d55-bcba-c34efa331ac4
2026-05-19 09:24:51 -07:00
Fusion (runfusion.ai)
fc21c69cbc test(FN-5154): align rebase-range fixtures with attribution semantics
Fusion-Task-Id: FN-5154
Fusion-Task-Lineage: 1ca8d162-343b-4d55-bcba-c34efa331ac4
2026-05-19 09:24:50 -07:00
Fusion (runfusion.ai)
d849539198 feat(FN-5154): complete Step 1 — restrict done rebase diff ranges
Fusion-Task-Id: FN-5154
Fusion-Task-Lineage: 1ca8d162-343b-4d55-bcba-c34efa331ac4
2026-05-19 09:24:49 -07:00
Fusion (runfusion.ai)
4e3a4731aa feat(FN-5154): complete Step 0 — add done-range attribution helper
Fusion-Task-Id: FN-5154
Fusion-Task-Lineage: 1ca8d162-343b-4d55-bcba-c34efa331ac4
2026-05-19 09:24:49 -07:00
Fusion (runfusion.ai)
ee92b71533 test(FN-5135): lock deletedAt SSE payload contract
Fusion-Task-Id: FN-5135
Fusion-Task-Lineage: 182c496e-4e3a-4353-be53-86dd4cc5ba19
2026-05-19 08:13:06 -07:00
Fusion (runfusion.ai)
17ace6fef0 test(FN-5098): align deterministic dedup warning expectation
Fusion-Task-Id: FN-5098
Fusion-Task-Lineage: 67ff982f-f0fa-453a-9b73-32ddc3ae5b3a
2026-05-19 01:59:22 -07:00
Fusion (runfusion.ai)
0b17d7915c fix(FN-5103): complete Step 8 — resolve verification regressions
Fusion-Task-Id: FN-5103
Fusion-Task-Lineage: e4e4d9ba-4884-4feb-b18b-a30e799c3fb1
2026-05-19 01:24:55 -07:00
Fusion (runfusion.ai)
045616b39f fix(FN-5113): repair dashboard route self-healing resolver reference
Fusion-Task-Id: FN-5113
Fusion-Task-Lineage: f29c2128-79a3-4958-8039-3765b84757f5
2026-05-19 01:17:46 -07:00
Fusion (runfusion.ai)
febd1f872c fix(FN-5108): restore recover-branch-binding route and lock failure boundary
Fusion-Task-Id: FN-5108
Fusion-Task-Lineage: 1b273c01-9f58-40ed-82f3-5706802cc2fc
2026-05-19 00:46:35 -07:00
gsxdsm
06d1911aec fix(lint): prefix unused resolveSelfHealingManager destructuring with underscore
Resolve @typescript-eslint/no-unused-vars error in register-task-workflow-routes.ts.
The import is kept in deps for potential future use but prefixed to satisfy lint.
2026-05-19 00:33:14 -07:00
Fusion (runfusion.ai)
093ae0bac8 feat(FN-5096): fix dashboard typecheck and stabilize verification gates
- fix(FN-5096): restore dashboard typecheck and stabilize verification gates

Fusion-Task-Id: FN-5096
2026-05-18 23:14:48 -07:00
Fusion (runfusion.ai)
76790c424f feat(FN-5053): fix verification gate registration for workspace test stabil
Fix FN-5053 restores workspace test stability for the verification gate by adjusting the duplicate guard and task workflow route registration, with updated coverage in the branch-conflicts and diff-volume-gate test suites.

Fusion-Task-Id: FN-5053

Fusion-Task-Lineage: cc8a561a-fd56-4275-b06c-0966c80c2868
2026-05-18 23:14:27 -07:00
Fusion (runfusion.ai)
070ad28151 feat(FN-5060): complete Step 7 — testing and verification
Fusion-Task-Id: FN-5060
Fusion-Task-Lineage: 35434cc4-583f-4e50-9ca3-c12546d220c1
2026-05-18 22:47:51 -07:00
Fusion (runfusion.ai)
d5438ebc11 feat(FN-5060): complete Step 2 — stabilize shared dedup guard exports
Fusion-Task-Id: FN-5060
Fusion-Task-Lineage: 35434cc4-583f-4e50-9ca3-c12546d220c1
2026-05-18 22:47:51 -07:00
Fusion (runfusion.ai)
0820b64d1a fix(FN-5095): restore workspace verification gates
Fusion-Task-Id: FN-5095
Fusion-Task-Lineage: dff589e4-5142-429d-8ca2-53352eaeaac6
2026-05-18 22:02:54 -07:00
Fusion (runfusion.ai)
39db6157e4 test(FN-5094): stabilize dashboard API tests for current route exports
Fusion-Task-Id: FN-5094
Fusion-Task-Lineage: c6c9710c-51fe-40e9-bfad-bfb6d589c7f4
2026-05-18 21:44:35 -07:00
Fusion (runfusion.ai)
68b5694cba feat(FN-5060): complete Step 8 — update docs and changeset 2026-05-18 19:45:58 -07:00
gsxdsm
daa1edf1dc feat(FN-5060): complete Step 4 — refactor dashboard dedup route to shared helper 2026-05-18 19:44:33 -07:00
Fusion (runfusion.ai)
211c361cd7 feat(FN-5083): complete Step 4 — add recover branch binding route 2026-05-18 18:26:52 -07:00
gsxdsm
f46629ef10 feat(FN-5084): merge fusion/fn-5084 2026-05-18 17:53:00 -07:00
gsxdsm
0046fc92e2 feat(FN-4918): merge fusion/fn-4918 2026-05-18 16:23:06 -07:00
gsxdsm
aad1219037 feat(FN-4967): merge fusion/fn-4967 2026-05-18 15:50:48 -07:00
gsxdsm
fabcb5387a feat(FN-5074): merge fusion/fn-5074 2026-05-18 15:36:23 -07:00
gsxdsm
6c1732d234 feat(FN-5076): merge fusion/fn-5076 2026-05-18 14:46:20 -07:00
gsxdsm
9aa7518bad feat(FN-5057): merge fusion/fn-5057 2026-05-18 11:46:43 -07:00
gsxdsm
40cdf23cfd feat(FN-4966): complete Step 4 — wire diagnostics into PR refresh routes
Fusion-Task-Id: FN-4966
Fusion-Task-Lineage: 8f5ea300-feaa-469c-aeed-f7304a5a1b6d
2026-05-18 08:45:17 -07:00
gsxdsm
d3297a8612 feat(FN-4966): complete Step 3 — add PR conflict diagnostics collection
Fusion-Task-Id: FN-4966
Fusion-Task-Lineage: 8f5ea300-feaa-469c-aeed-f7304a5a1b6d
2026-05-18 08:45:17 -07:00
Fusion (runfusion.ai)
60d3da7394 feat(FN-4993): wire pr create flags router and AI metadata parity
Fusion-Task-Id: FN-4993
Fusion-Task-Lineage: 20ce6d5f-ef33-49e6-8519-648d769cc473
2026-05-18 05:57:43 -07:00
Fusion (runfusion.ai)
09491671ea feat(FN-4993): complete Step 1 — add draft and reviewer support in GitHubClient
Fusion-Task-Id: FN-4993
Fusion-Task-Lineage: 20ce6d5f-ef33-49e6-8519-648d769cc473
2026-05-18 05:57:43 -07:00
Fusion (runfusion.ai)
29cd4aab9b feat(FN-4984): complete Step 1 — add sync passphrase routes
Fusion-Task-Id: FN-4984
Fusion-Task-Lineage: 8fdf7a19-b101-4b33-8e60-44fcbf402256
2026-05-18 04:46:56 -07:00
Fusion (runfusion.ai)
c97ebde1d3 test(FN-4981): complete Step 4 — enforce apiKey guard ordering
Fusion-Task-Id: FN-4981
Fusion-Task-Lineage: 0b3fae6a-a86b-44d5-94e8-4c94429d4767
2026-05-18 04:31:25 -07:00