Files
fusion/packages/engine
Fusion Agent c8b2b10732 test(FN-WF): add multi-repository workspace support to the pipeline smoke harness
The smoke lane was single-repository only, so the workspace path — the one that
actually broke in production — was never driven end to end. Adds:

- `createPipelineWorkspaceFixture`: a real workspace project whose ROOT is a plain
  container (no Git metadata) holding per-repository checkouts with their own
  origins and a `.fusion/workspace.json`. The single-repo fixture cannot express
  this shape, because there the root and the repository are the same directory —
  which is why a node resolving the root as a worktree still worked by accident.
- `PipelineGitFixture.integrationRepoDir`: integration git (`rev-parse main`,
  ancestry, status, worktree prune) now targets a repository rather than the
  project root. Single-repo fixtures answer `repoDir`, so nothing changes there.
- `PipelineSmokeHarness.create(pg, { workspace: true })` and an optional confirmed
  `repositoryScope` on `createPipelineTask`, which workspace acquisition requires
  before any write-capable node runs.
- The executor mock now resolves the repository it can commit in. Its
  `existsSync(cwd/.git)` guard skipped the whole implementation block on a
  workspace session (cwd is the task directory), so no commit existed and Code
  Review reported "No changes — not reviewed" on an untouched scoped repository.

Measured with these in place, a workspace task on builtin:coding-ideas-v2 now
clears plan, plan-review, parse, verification, documentation-delivery and code
review ("All 1 modified in-scope sub-repo(s) approved"). That is the direct
end-to-end confirmation that the FN-158-shaped session-boundary fix works: the
write-capable documentation gate runs in a workspace instead of dying with
"Refusing to start coding agent in incomplete worktree".

It then fails at the workspace LAND step with "Workspace repository repo1 could
not land". The underlying cause is written to the task log rather than stdout and
is not yet identified, so the end-to-end workspace drive test is deliberately NOT
committed: shipping it red would put a permanently failing test in the lane, and
weakening it to assert only the progress reached would be appeasement. Mono-repo
coverage is unchanged and green (63 tests, 19/19 scenarios).
2026-08-24 14:18:50 +00:00
..
2026-07-31 18:03:13 -07:00
2026-08-23 14:49:26 -07:00