017ebd5059f40619fce2bf40c7a54c9192728bdf
18 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
017ebd5059 |
FN-201: park workspace review revisions for human resolution
Preserve multi-repository review findings and route unresolved REVISE outcomes to human review. - Qualify workspace findings by repository for durable scope and remediation tracking. - Preserve findings through graph outcomes and stabilize remediation signatures. - Park multi-repository review revisions for human resolution with regression coverage. Files changed: .changeset/fn-201-workspace-review-findings.md | 7 + docs/workflow-steps.md | 2 +- .../__tests__/workspace-review-findings.test.ts | 198 +++++++++++++++++ .../workspace-review-remediation-routing.test.ts | 235 +++++++++++++++++++++ .../executor/append-review-remediation-steps.ts | 116 +++++++++- .../request-pre-merge-optional-step-fix.ts | 7 +- .../engine/src/executor/run-graph-custom-node.ts | 54 +++-- .../src/executor/workspace-review-per-repo.ts | 46 +++- .../src/executor/workspace-review-remediation.ts | 7 +- 9 files changed, 638 insertions(+), 34 deletions(-) Fusion-Task-Id: FN-201 Fusion-Task-Lineage: cb83c4cc-b6fc-4e4c-bd3d-5c855bf2093b Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
ca624f0584 |
fix(FN-WF): a blocking gate must not approve without a usable verdict
Restores FN-6582's rule, which a later operator request had relaxed — deleting its test
along with it.
Operator decision, now carrying the reason the first reversal lacked: the only legitimate
reason to stop a task is an LLM problem; everything else is fixed at the source, or the AI
is made unable to return anything but what is expected — and if it does anyway, restart
cleanly.
Restarting cleanly already happens, twice, inside executeWorkflowStep: a malformed primary
retries on the fallback model, or self-retries once on the primary when no fallback is
configured. So `malformed` reaching this decision does not mean "one fumbled response" — it
means the reviewer failed to return a usable verdict across every attempt. That IS the
LLM-class condition an operator accepts as a legitimate stop. What it must never mean is
approval.
Measured: a reviewer reported in prose that the deliverables were absent, carried no verdict
JSON, and the gate recorded success. Unreviewed work merged on a rejection nobody could see.
A prose classifier cannot close this — that text held no rejection marker at all ("revise",
"reject", "must fix" all absent) because it was a factual statement of absence. Only the
ABSENCE of a verdict is detectable, so absence must not approve.
Advisory gates keep the relaxation: a step that was never allowed to hold a card does not
start holding one, which is where the original operator ask actually applies.
pnpm lint 0 errors, test:gate green, engine typecheck clean, pipeline-smoke 90/90.
|
||
|
|
24adc4bf40 |
fix(FN-WF): review each workspace repository against its own diff base
A workspace Code Review runs the review step once per SUB-REPOSITORY worktree. `executeWorkflowStep` captured the reviewer's scope with the singular `task.baseCommitSha` regardless, and that base does not resolve inside a sub-repository: `captureModifiedFiles` returned [] and the prompt told the reviewer "(no modified files detected for this task)". Measured on a real multi-repo card whose executor had COMMITTED in both repositories. The reviewer went looking, could not see the committed fixtures inside its own scope, and reported them as never delivered — a confident, factual rejection produced entirely by a wrong diff base. It then vanished, because prose carrying no verdict JSON is classified malformed and passes a blocking gate. Two defects in series: one manufactured a false rejection, the other swallowed it. This fixes the first. The per-repo base was already recorded and already used by the evidence capture in workspace-review-per-repo.ts; it simply never reached the reviewer. `diffBaseCommitSha` threads it through, and a singular task with no override still uses the task field, so the ordinary path is unchanged. pnpm lint 0 errors, test:gate green, engine typecheck clean, pipeline-smoke 90/90. |
||
|
|
9a54fe362d |
fix(FN-WF): give the Documentation milestone a way to actually persist anything
It had no writer, and its prompt did not know that.
A workflow step running `toolMode: "readonly"` is limited to read/grep/find/ls, fn_web_fetch
and a few read-only task reads; `fn_task_create` is explicitly DENIED there. The prompt asked
for four tool calls — fn_task_done(summary=…), fn_task_document_write, fn_artifact_register,
and creating follow-up tasks. It could make none of them. Every run produced a well-formed
report and persisted NOTHING. And because this milestone replaced `completion-summary`, which
used the working contract, cards quietly lost their agent-authored summary and fell back to
the deterministic backfill.
This is the same failure the reviewer prompt was fixed for — a session instructed to do what
its tool policy forbids — on a node nobody re-checked.
Both durable outputs now travel by PROJECTION, the only channel a writer-less node has.
`summaryTarget: "task"` persists its prose as the card summary. New
`recommendationsTarget: "task"` reads a trailing {"recommendations":[…]} payload, normalizes
it through the SAME rules the store boundary enforces (relocated to
tasks/recommendation-validation.ts so a second producer cannot drift from a copied regex),
and projects it to task.recommendations — the Recommendations tab, where an OPERATOR turns a
proposal into a task. An in-review agent proposes; it never creates board rows. Normalization
drops bad entries rather than throwing: a stray character in a suggestion must not wedge a
card whose code is already approved.
`summaryTarget` also removes this node's verdict requirement, so a reporter can no longer emit
the REVISE that held the merge door and bounced the card with nothing to do.
The guard that should have caught all of this asserted a PROMPT STRING —
`prompt.includes("fn_task_done(summary=")` — as proof a summary gets written. It was green
throughout. It now asserts the projection contract, including inside optional-group templates,
because the executing node of a group is its template child.
pnpm lint 0 errors, test:gate green, core + engine typecheck clean, pipeline-smoke 90/90.
|
||
|
|
28a8205645 |
fix(FN-WF): run the Verification gate instead of silently passing it
Your Verification step completed in 46ms and reported PASS without executing anything. It had never run. `GateNodeRunner` recognised exactly two executable shapes, `prompt` and `scriptName`. A gate carrying `workflowAction: "deterministic-verification"` matched neither and fell through to the method's closing `return success`. The code that runs testCommand/buildCommand was never reached — so the strictest gate in the review lane was decorative, and it was supplying the merge evidence a task is allowed to rely on. The existing unit tests were green throughout, because every one of them called `runDeterministicVerificationGate` directly. Testing a function proves the function; it does not prove the graph calls it. The new wiring suite asserts the routing itself and fails when the fix is removed — verified by removing it. DRY: `verification-gate.ts` re-derived the command list and re-ran the loop, a second implementation of a rule that `runExecutorDeterministicVerification` (FN-3345, run-implementation.ts) already owned. The two had already drifted — the copy treated "no command configured" as a hard failure while the original treats it as not-applicable. The gate now delegates, so timeouts, per-command logging, and settings precedence can only be fixed in one place. NOT in this change, and deliberately so: recording an unrunnable gate as `skipped` rather than `passed`. It is the right model and it was implemented end-to-end, but `pre-merge-approval` clears a `skipped` step only for an audited operator bypass, so it made every task on a project without a test command unmergeable — 25 of 90 smoke tests. Narrowing the acceptance left one unexplained failure (S09 sentinel, 120s timeout). Shipping that half-understood would trade a visible false green for an invisible merge deadlock. FN-189 owns it with the full evidence. pnpm lint 0 errors, test:gate, engine-pipeline-smoke 90/90, and three consecutive full runs: 150.9s, 152.8s, 154.5s of the 175s budget. |
||
|
|
3efdc42ad4 |
fix(FN-WF): repair the review-gated planning seam, prompt, and workspace gate boundary
Four defects found by pointing the FN-182 pipeline-smoke harness at a review-gated
workflow. Three of them also affected builtin:review-gated-coding, where they had
been latent because that graph dies earlier on the review seal.
1. `planning-implementation-only` is a PROMPT key, never an executable seam.
`resolveSeamName` accepts exactly seven seam names and throws
`Unsupported workflow seam` otherwise, so the `plan` node threw on every task:
the graph failed at `plan`, the card bounced to todo, and the board reported
"Execution dispatch refused — task is still unplanned" — pressing Start
appeared to do nothing. The seam is now `planning`; only the prompt differs.
2. The seam prompt contradicted itself. It was the full triage prompt — whose
template MANDATES `### Step {N-1}: Testing & Verification` and
`### Step {N}: Documentation & Delivery` — plus one appended line asking for
neither. The template won, so tasks emitted both steps and ran them in
in-progress, duplicating the review gates. The template region is now removed
and replaced by an explicit prohibition. The parse node's
`implementationOnlySteps` is not a backstop: it only audits, by design.
3. `requireImplementationOnlySteps` was inert when set on an already-built
plan-review node: the prompt is assembled by `planReviewOptionalGroupNode`
and no engine code reads the flag, so the reviewer never received its
criterion. Both derived workflows now call `applyImplementationOnlyStepReview`.
4. Write-capable graph nodes declared no session boundary on workspace tasks, so
the single-repo assertion resolved the task DIRECTORY (a container of per-repo
worktrees, no `.git`) as a worktree and refused: "Refusing to start coding
agent in incomplete worktree", failing the gate before a verdict and requeuing
the task. FN-158 gave Code Review the `workspace-task-dir` boundary but not the
generic prompt path. Extracted as a pure `resolveGraphNodeSessionBoundary`.
Also reorders coding-ideas-v2 to `verification -> documentation-delivery ->
completion-summary -> code-review -> merge`. The summary escapes the review seal
(readonly) but still acquires a worktree, and any node between the review and the
merge invalidates FN-180's review-diff fingerprint.
Known incomplete: builtin:coding-ideas-v2 still does not converge end to end —
pipeline-smoke S01 reaches merge and is refused with "task has no provable
approval for the content being merged". Not yet root-caused; the workflow must be
treated as unusable until it is.
|
||
|
|
e25f8907d9 |
FN-175: add review-gated verification workflow
Add review-owned verification, remediation, and documentation gates across workflow execution and task progress. - Add built-in review-gated coding workflow and verification/documentation nodes. - Preserve remediation steps and enforce finalize/merge guards after review findings. - Surface review-gate progress in the dashboard and document the workflow and audit behavior. - Add focused core, engine, and dashboard regression coverage. Files changed: .changeset/fn-175-review-gated-workflow.md | 7 ++ docs/architecture.md | 4 + docs/dashboard-guide.md | 4 + docs/run-audit.md | 5 ++ docs/workflow-steps.md | 6 ++ .../builtin-review-gated-coding-workflow.test.ts | 48 +++++++++++ .../__tests__/no-commits-finalize-guard.test.ts | 15 ++++ .../core/src/__tests__/remediation-steps.test.ts | 64 ++++++++++++++ packages/core/src/index.gate.ts | 9 ++ packages/core/src/index.ts | 10 +++ .../core/src/merge/no-commits-finalize-guard.ts | 12 ++- packages/core/src/store.ts | 6 +- .../core/src/task-store/remediation-step-ops.ts | 45 ++++++++++ packages/core/src/tasks/remediation-steps.ts | 48 +++++++++++ packages/core/src/types/task/task-log.ts | 15 ++++ .../builtin-documentation-delivery-group.ts | 32 +++++++ .../src/workflows/builtin-plan-review-group.ts | 11 ++- .../builtin-review-gated-coding-workflow-ir.ts | 60 +++++++++++++ .../workflows/builtin-verification-gate-group.ts | 26 ++++++ .../core/src/workflows/builtin-workflow-prompts.ts | 2 + .../builtin-workflow-remediation-nodes.ts | 20 +++++ packages/core/src/workflows/builtin-workflows.ts | 14 ++++ packages/core/src/workflows/index.ts | 3 + packages/dashboard/app/components/TaskCard.css | 5 ++ packages/dashboard/app/components/TaskCard.tsx | 12 ++- .../__tests__/taskProgress.review-gates.test.ts | 19 +++++ packages/dashboard/app/utils/taskProgress.ts | 2 + .../review-gated-remediation-steps.test.ts | 43 ++++++++++ .../review-gated-step-preservation.test.ts | 32 +++++++ .../review-gated-verification-gate.test.ts | 50 +++++++++++ .../executor/append-review-remediation-steps.ts | 97 ++++++++++++++++++++++ .../engine/src/executor/build-parse-steps-deps.ts | 1 + .../engine/src/executor/cleanup-merge-state.ts | 9 +- packages/engine/src/executor/deps-bags.ts | 9 +- .../src/executor/derive-remediation-steps.ts | 76 +++++++++++++++++ packages/engine/src/executor/free-reexports.ts | 1 + packages/engine/src/executor/impl-bindings.ts | 1 + .../request-pre-merge-optional-step-fix.ts | 17 ++++ packages/engine/src/executor/reset-merge-state.ts | 5 +- .../engine/src/executor/run-graph-custom-node.ts | 7 +- packages/engine/src/executor/run-implementation.ts | 3 + .../engine/src/executor/send-task-back-for-fix.ts | 5 +- .../src/executor/task-executor-session-facades.ts | 1 + packages/engine/src/merge/merger-ai.ts | 19 ++++- packages/engine/src/merger.ts | 27 +++++- packages/engine/src/self-healing.ts | 24 +++++- .../workflow-node-runners/parse-steps-runner.ts | 26 +++++- .../src/workflow-node-runners/verification-gate.ts | 77 +++++++++++++++++ .../src/workflows/workflow-graph-executor.ts | 4 +- 49 files changed, 1014 insertions(+), 24 deletions(-) Fusion-Task-Id: FN-175 Fusion-Task-Lineage: 3c555a09-4cea-4b03-a315-b6a354a2eac3 Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
bfaa0f42da |
FN-158: enforce workspace multi-repo merge boundaries
Support workspace tasks across a shared root with scope-driven repositories and verifiable merge gates. - Route task work through one workspace directory with per-repository acquisition and isolation. - Add sandbox session policies and per-repository verification command handling. - Enforce required pre-merge checks and honest merge blocking for workspace changes. - Update workspace, workflow, and sandbox documentation and release metadata. Files changed: .changeset/fn-158-workspace-single-root.md | 7 + docs/sandbox.md | 6 +- docs/workflow-steps.md | 6 +- docs/workspaces.md | 12 +- .../core/src/__tests__/legacy-adoption.test.ts | 15 +- .../src/__tests__/required-pre-merge-steps.test.ts | 25 ++++ .../core/src/__tests__/store-bypass-review.test.ts | 24 ++- packages/core/src/__tests__/task-merge.test.ts | 24 +++ .../core/src/__tests__/worktree-layout.test.ts | 29 ++++ packages/core/src/db/legacy-adoption.ts | 20 ++- packages/core/src/index.gate.ts | 4 + packages/core/src/index.ts | 4 + .../core/src/merge/required-pre-merge-steps.ts | 26 ++++ packages/core/src/merge/task-merge.ts | 35 ++++- packages/core/src/store.ts | 59 ++++++-- packages/core/src/task-store/lifecycle-ops.ts | 1 + packages/core/src/task-store/merge-queue-ops.ts | 5 +- packages/core/src/task-store/moves.ts | 13 +- packages/core/src/task-store/task-artifacts-ops.ts | 11 +- packages/core/src/tasks/worktree-layout.ts | 43 +++++- packages/core/src/types/workflow/workflow-steps.ts | 3 +- .../executor-workspace-session-cwd.test.ts | 42 ++++-- .../src/__tests__/node-worktree-isolation.test.ts | 13 +- .../src/__tests__/pi-create-fn-agent.test.ts | 16 ++ .../engine/src/__tests__/project-engine.test.ts | 20 ++- .../src/__tests__/reviewer-workspace.test.ts | 30 +++- .../src/__tests__/run-verification-command.test.ts | 90 +++++++++++- .../__tests__/sandbox/sandbox-exec-policy.test.ts | 16 +- .../src/__tests__/sandbox/session-policy.test.ts | 45 ++++++ .../__tests__/workspace-add-repo-midflight.test.ts | 9 ++ .../engine/src/__tests__/workspace-e2e.test.ts | 13 +- .../workspace-root-worktree-routing.test.ts | 18 +-- packages/engine/src/agent-tools.ts | 15 +- packages/engine/src/agents/agent-runtime.ts | 19 +++ .../engine/src/agents/agent-session-helpers.ts | 15 ++ packages/engine/src/execution/hold-release.ts | 29 ++++ .../engine/src/execution/run-verification-tool.ts | 114 ++++++++++++++- .../create-authoritative-workflow-seams.ts | 20 +-- packages/engine/src/executor/deps-bags.ts | 5 +- .../executor/ensure-graph-custom-node-worktree.ts | 24 ++- .../executor/ensure-task-worktree-for-planning.ts | 36 ++--- .../engine/src/executor/execute-workflow-step.ts | 4 +- .../src/executor/finalize-already-reviewed-task.ts | 6 +- .../src/executor/prepare-graph-node-execution.ts | 14 +- .../engine/src/executor/run-graph-custom-node.ts | 161 +++++++++++++-------- packages/engine/src/executor/run-implementation.ts | 117 ++++++++++++--- packages/engine/src/merge/merger-ai.ts | 16 +- packages/engine/src/merger.ts | 20 ++- packages/engine/src/pi.ts | 150 ++++++++++++++++--- packages/engine/src/project-engine.ts | 10 +- packages/engine/src/runtimes/in-process-runtime.ts | 4 +- packages/engine/src/sandbox/bubblewrap-backend.ts | 55 ++++++- packages/engine/src/sandbox/bubblewrap-policy.ts | 10 +- packages/engine/src/sandbox/index.ts | 1 + .../engine/src/sandbox/sandbox-exec-backend.ts | 45 +++++- packages/engine/src/sandbox/sandbox-exec-policy.ts | 18 ++- packages/engine/src/sandbox/session-policy.ts | 41 ++++++ packages/engine/src/sandbox/types.ts | 11 ++ packages/engine/src/self-healing.ts | 1 + packages/engine/src/triage.ts | 10 ++ .../engine/src/worktree/worktree-acquisition.ts | 53 ++++--- 61 files changed, 1393 insertions(+), 315 deletions(-) Fusion-Task-Id: FN-158 Fusion-Task-Lineage: ba57f5a2-fa69-4210-8ea7-3d124be3deb2 Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
a786c45bb9 |
FN-149: converge review cycles before human escalation
Add bounded review convergence so disputed review gates can resolve independently before requiring operator intervention. - Add staged remediation, arbitration, dispute tooling, and stale-attempt fencing. - Preserve review history and findings while exposing convergence state in core, dashboard, and audit paths. - Add migration, configuration, documentation, changeset, and regression coverage. Files changed: .changeset/fn-149-review-convergence.md | 7 + AGENTS.md | 2 + docs/architecture.md | 4 + docs/dashboard-guide.md | 4 + docs/run-audit.md | 4 + docs/settings-reference.md | 4 + docs/workflow-steps.md | 8 + .../src/__tests__/default-workflow-hooks.test.ts | 13 + packages/core/src/__tests__/plan-approval.test.ts | 21 ++ .../src/__tests__/reopen-semantics-by-role.test.ts | 25 ++ packages/core/src/__tests__/review-severity-gate.test.ts | 18 +- packages/core/src/__tests__/workflow-step-results.test.ts | 52 +++- packages/core/src/config/settings-schema.ts | 6 + packages/core/src/index.gate.ts | 9 + packages/core/src/index.ts | 9 + packages/core/src/planner/plan-approval.ts | 27 +- .../0065_fn_149_review_convergence_stage.sql | 3 + packages/core/src/postgres/schema-applier.ts | 10 + packages/core/src/postgres/schema/project.ts | 2 + packages/core/src/store.ts | 2 +- packages/core/src/task-store/persistence.ts | 4 + packages/core/src/task-store/reset-lifecycle.ts | 2 + packages/core/src/task-store/serialization.ts | 2 + packages/core/src/task-store/task-mutation-ops.ts | 2 +- packages/core/src/task-store/task-row-mappers.ts | 2 +- packages/core/src/task-store/task-update.ts | 4 + packages/core/src/tasks/in-review-stall.ts | 21 ++ packages/core/src/tasks/manual-retry-reset.ts | 2 + packages/core/src/types/settings/settings-scope.ts | 7 + packages/core/src/types/task/task-core.ts | 3 + packages/core/src/types/task/task-review.ts | 2 +- packages/core/src/types/workflow/workflow-steps.ts | 24 +- .../src/workflows/builtin-workflow-settings.ts | 43 +++ .../core/src/workflows/default-workflow-hooks.ts | 10 +- .../core/src/workflows/workflow-step-results.ts | 185 ++++++++++++- .../dashboard/app/components/TaskReviewTab.tsx | 6 +- .../components/__tests__/TaskReviewTab.test.tsx | 6 +- .../dashboard/src/__tests__/routes-tasks.test.ts | 7 + .../src/routes/register-task-workflow-routes.ts | 4 +- .../__tests__/review-arbitration-release.test.ts | 46 ++++ .../src/__tests__/review-arbitration.test.ts | 57 ++++ .../__tests__/review-convergence-context.test.ts | 95 +++++++ .../review-convergence-escalation.test.ts | 135 +++++++++ .../src/__tests__/review-dispute-tool.test.ts | 113 +++++++ .../__tests__/review-finding-supersession.test.ts | 55 ++- .../review-findings-injection.test.ts | 19 +- .../__tests__/review-history-preservation.test.ts | 186 +++++++++++++ .../__tests__/review-ladder-entry-points.test.ts | 304 +++++++++++++++++++++ ...un-audit-sink-health-review-convergence.test.ts | 251 +++++++++++++++++ .../workflow-graph-optional-step-fix.test.ts | 59 ++-- packages/engine/src/execution/replan-target.ts | 6 +- .../clear-terminal-step-failures-for-retry.ts | 8 +- .../src/executor/create-review-dispute-tool.ts | 126 +++++++++ packages/engine/src/executor/deps-bags.ts | 2 +- .../engine/src/executor/execute-workflow-graph.ts | 71 ++++- packages/engine/src/executor/execute-workflow-step.ts | 16 +- packages/engine/src/executor/free-reexports.ts | 1 + packages/engine/src/executor/impl-bindings.ts | 1 + .../engine/src/executor/optional-step-revision.ts | 33 ++- .../src/executor/recover-failed-pre-merge-step.ts | 43 ++- .../request-pre-merge-optional-step-fix.ts | 85 +++--- packages/engine/src/executor/review-arbitration.ts | 233 +++++++++++++++ .../src/executor/review-convergence-ladder.ts | 237 +++++++++++++++ .../route-graph-failure-to-execution-resume.ts | 16 +- .../route-retryable-remediation.ts | 9 +- .../engine/src/executor/run-graph-custom-node.ts | 1 + packages/engine/src/executor/run-implementation.ts | 2 + .../src/executor/task-executor-session-facades.ts | 3 +- .../engine/src/executor/workflow-rerun-bounce.ts | 13 +- .../executor/workflow-step-failure-injection.ts | 23 +- .../engine/src/executor/workflow-step-failures.ts | 16 +- .../engine/src/executor/workflow-step-verdict.ts | 2 + packages/engine/src/self-healing.ts | 5 +- packages/engine/src/util/run-audit.ts | 9 +- .../src/workflows/workflow-graph-executor.ts | 8 +- .../engine/src/worktree/review-diff-fingerprint.ts | 21 +++ .../src/worktree/workspace-review-evidence.ts | 9 +- 77 files changed, 2719 insertions(+), 166 deletions(-) Fusion-Task-Id: FN-149 Fusion-Task-Lineage: 9330df9d-5086-4b40-8daa-66f0ea31cf3e Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
10c399d01e |
FN-120: fix workspace review evidence and landing recovery
Harden workspace review evidence and automatic landing recovery across workflow execution and merge paths. - Preserve per-repository review evidence and reroute recoverable workspace review failures. - Improve workflow lifecycle validation, continuation handling, and automatic recovery for workspace landing. - Add regression coverage and document the updated workspace behavior. Files changed: .changeset/fn-120-workspace-review-landing.md | 7 ++ docs/architecture.md | 4 + ...e-empty-merge-boundary-finalization-livelock.md | 4 + docs/testing.md | 4 + docs/workflow-steps.md | 4 + docs/workspaces.md | 6 + .../__tests__/builtin-coding-workflow-ir.test.ts | 11 +- ...workspace-worktrees-concurrent-merge.pg.test.ts | 20 +++ packages/core/src/db/legacy-adoption.ts | 4 + packages/core/src/store.ts | 5 +- .../task-store/async/async-workflow-workitems.ts | 21 ++++ packages/core/src/task-store/task-mutation-ops.ts | 20 ++- .../src/task-store/workflow-workitems-ops-2.ts | 6 +- .../workflows/builtin-coding-ideas-workflow-ir.ts | 9 +- .../src/workflows/builtin-coding-workflow-ir.ts | 20 ++- .../builtin-stepwise-coding-workflow-ir.ts | 21 +++- ...tin-stepwise-final-review-coding-workflow-ir.ts | 13 +- .../src/workflows/workflow-lifecycle-validation.ts | 28 ++++- .../__tests__/builtin-workflows-lifecycle.test.ts | 4 + .../engine/src/__tests__/project-engine.test.ts | 79 ++++++++++++ .../graph-node-missing-worktree-recovery.test.ts | 32 ++++- .../src/__tests__/reviewer-workspace.test.ts | 2 + .../src/__tests__/task-pipeline-smoke.test.ts | 10 +- .../src/__tests__/workflow-task-runtime.test.ts | 10 +- .../engine/src/__tests__/workspace-e2e.test.ts | 29 +++++ .../engine/src/__tests__/workspace-merger.test.ts | 4 +- .../__tests__/workspace-review-evidence.test.ts | 58 +++++++++ packages/engine/src/execution/reviewer.ts | 2 + .../create-authoritative-workflow-seams.ts | 59 +++++---- .../engine/src/executor/execute-workflow-graph.ts | 29 ++++- packages/engine/src/executor/graph-failure-pure.ts | 6 + .../engine/src/executor/handle-graph-failure.ts | 26 ++++ ...-unusable-worktree-graph-failure-to-recovery.ts | 22 +++- .../engine/src/executor/run-graph-custom-node.ts | 4 +- .../src/executor/workspace-review-per-repo.ts | 55 +++++---- packages/engine/src/merge/merger-ai.ts | 137 ++++++++++----------- .../engine/src/merge/workspace-review-reroute.ts | 52 ++++++++ packages/engine/src/project-engine.ts | 47 +++++++ .../self-healing/auto-recover-worktree-session.ts | 2 +- .../src/workflows/workflow-graph-executor.ts | 28 ++++- .../engine/src/workflows/workflow-merge-nodes.ts | 6 +- .../src/worktree/workspace-review-evidence.ts | 110 +++++++++++++++++ .../engine/src/worktree/worktree-acquisition.ts | 24 +++- 43 files changed, 874 insertions(+), 170 deletions(-) Fusion-Task-Id: FN-120 Fusion-Task-Lineage: 61c36613-89bd-44ca-8676-de77662bf53e Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
c91e5ce42d |
FN-106: prevent workspace finalization livelock
Repair workspace merge-boundary finalization so empty repository sets cannot loop indefinitely. - Track workspace merge readiness and durable per-repository obligations. - Gate landing and recovery on scope, blockers, leases, and checkout ownership. - Preserve remediation state, add recovery paths, documentation, and regression coverage. Files changed: .../fn-106-workspace-finalization-livelock.md | 7 ++ docs/architecture.md | 6 ++ ...e-empty-merge-boundary-finalization-livelock.md | 40 ++++++++++ docs/workflow-steps.md | 4 + packages/cli/src/commands/__tests__/task.test.ts | 2 + ...workspace-worktrees-concurrent-merge.pg.test.ts | 23 ++++++ packages/core/src/store.ts | 9 ++- packages/core/src/task-store/task-mutation-ops.ts | 49 +++++++++++- packages/core/src/task-store/task-update.ts | 6 +- packages/core/src/types/task/task-core.ts | 7 ++ .../engine/src/__tests__/executor-test-helpers.ts | 6 ++ .../executor-workspace-main-checkout-guard.test.ts | 8 +- .../executor-workspace-session-cwd.test.ts | 37 +++++++++ .../engine/src/__tests__/project-engine.test.ts | 14 +++- .../src/__tests__/reviewer-workspace.test.ts | 72 ++++++++++++++++- .../__tests__/workspace-merge-readiness.test.ts | 46 +++++++++++ .../workspace-merger-idempotency.slow.test.ts | 15 ++-- .../src/__tests__/workspace-merger-lease.test.ts | 4 +- .../workspace-root-worktree-routing.test.ts | 47 +++++++++++ .../create-authoritative-workflow-seams.ts | 2 + .../engine/src/executor/create-task-done-tool.ts | 15 ++++ .../executor/ensure-graph-custom-node-worktree.ts | 8 ++ .../request-pre-merge-optional-step-fix.ts | 49 +++++++++++- .../engine/src/executor/run-graph-custom-node.ts | 24 ++++-- packages/engine/src/executor/run-implementation.ts | 9 +++ packages/engine/src/executor/send-task-back-for-fix.ts | 4 +- .../src/executor/workspace-main-checkout-guard.ts | 26 +++++- .../src/executor/workspace-review-remediation.ts | 54 +++++++++++++ .../src/executor/worktree-verify-invariants.ts | 2 +- packages/engine/src/merge/merger-ai.ts | 93 +++++++++++++++++----- .../engine/src/merge/workspace-merge-readiness.ts | 64 +++++++++++++++ packages/engine/src/project-engine.ts | 37 +++++++-- packages/engine/src/self-healing.ts | 54 ++++++++++--- .../engine/src/worktree/worktree-acquisition.ts | 20 ++++- 34 files changed, 787 insertions(+), 76 deletions(-) Fusion-Task-Id: FN-106 Fusion-Task-Lineage: 70b5c13d-9e17-419d-90ac-7258697657ef Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
bbca7a1ffc |
FN-094: add mono- and multi-repository lifecycle parity
Extend workspace lifecycle behavior so mono-repository and multi-repository tasks share the same durable scope, workflow, review, and merge semantics. - Add repository-scope persistence, migrations, serialization, and task mutation support. - Align dashboard task creation, detail, and workspace worktree views with repository-aware lifecycle state. - Extend executor, reviewer, merger, triage, and self-healing paths with parity coverage and tests. - Document the lifecycle contract and publish the operator-facing changeset. Files changed: .changeset/fn-094-multi-repository-lifecycle.md | 7 + docs/agents.md | 8 + docs/architecture.md | 6 + docs/dashboard-guide.md | 4 + docs/multi-project.md | 6 + docs/settings-reference.md | 2 +- docs/testing.md | 12 ++ docs/workspaces.md | 6 + ...workspace-worktrees-concurrent-merge.pg.test.ts | 19 +++ packages/core/src/index.ts | 2 +- .../core/src/postgres/migrations/0000_initial.sql | 1 + .../0064_fn_094_task_repository_scope.sql | 2 + packages/core/src/postgres/schema-applier.ts | 13 +- packages/core/src/postgres/schema/project.ts | 2 + packages/core/src/store.ts | 21 ++- .../core/src/task-store/branch-and-pr-entities.ts | 2 +- packages/core/src/task-store/persistence.ts | 4 +- packages/core/src/task-store/serialization.ts | 2 + packages/core/src/task-store/task-creation.ts | 31 ++++ packages/core/src/task-store/task-mutation-ops.ts | 131 +++++++++++++++- packages/core/src/task-store/task-row-mappers.ts | 2 +- packages/core/src/task-store/task-update.ts | 55 +++++-- packages/core/src/tasks/repository-scope.ts | 29 ++++ packages/core/src/types.ts | 4 + packages/core/src/types/task/task-core.ts | 35 ++++- packages/core/src/types/workflow/workflow-steps.ts | 21 +++ packages/dashboard/app/api/tasks/tasks.ts | 14 ++ packages/dashboard/app/components/NewTaskModal.tsx | 16 +- .../dashboard/app/components/TaskDetailModal.css | 27 ++++ .../dashboard/app/components/TaskDetailModal.tsx | 15 +- .../app/components/WorkspaceWorktreesSummary.tsx | 68 ++++++++- .../app/components/__tests__/NewTaskModal.test.tsx | 1 + .../__tests__/WorkspaceWorktreesSummary.test.tsx | 27 +++- .../src/routes/register-task-workflow-routes.ts | 48 ++++++ .../__tests__/executor-workspace-taskdone.test.ts | 20 +++ .../src/__tests__/reviewer-workspace.test.ts | 170 ++++++++++++++++++++- .../src/__tests__/self-healing-workspace.test.ts | 4 + .../workflow-graph-optional-group.test.ts | 32 ++++ .../workflow-graph-optional-step-fix.test.ts | 58 +++++++ .../engine/src/__tests__/workspace-e2e.test.ts | 91 ++++++++++- .../__tests__/workspace-lifecycle-parity.test.ts | 61 ++++++++ .../src/__tests__/workspace-merger-lease.test.ts | 25 +++ .../__tests__/workspace-merger-scope-gates.test.ts | 58 +++++++ .../engine/src/__tests__/workspace-merger.test.ts | 59 ++++++- packages/engine/src/agent-tools.ts | 92 ++++++++++- packages/engine/src/execution/reviewer.ts | 10 +- .../create-authoritative-workflow-seams.ts | 95 ++++++++++-- .../engine/src/executor/execute-workflow-graph.ts | 37 ++++- .../request-pre-merge-optional-step-fix.ts | 70 +++++++++ .../engine/src/executor/run-graph-custom-node.ts | 124 ++++++++++----- .../engine/src/executor/workflow-step-verdict.ts | 6 +- .../src/executor/workspace-review-per-repo.ts | 118 +++++++++++++- .../src/executor/worktree-task-done-scope-leak.ts | 109 ++++++++++++- packages/engine/src/merge/merger-ai.ts | 88 ++++++++++- packages/engine/src/self-healing.ts | 19 ++- packages/engine/src/triage.ts | 9 ++ .../src/workflows/workflow-graph-executor.ts | 73 +++++++-- .../engine/src/workflows/workflow-node-handlers.ts | 12 +- 58 files changed, 1962 insertions(+), 121 deletions(-) Fusion-Task-Id: FN-094 Fusion-Task-Lineage: 483f958f-cc67-474e-9383-26856c329543 Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
7563fcfe1b |
FN-037: configure AI-authored task output language
Configure a persisted output-language setting and apply it across AI-authored task text and workflow summaries. - Add project/global output-language settings with defaults, validation, UI controls, translations, and documentation. - Propagate the selected language through planning, execution, review, summaries, and task creation. - Add focused coverage for language resolution and update affected dashboard, engine, and localization tests. Files changed: .changeset/fn-037-task-output-language.md | 7 ++ docs/settings-reference.md | 4 + docs/task-management.md | 4 + .../core/src/__tests__/ai-output-language.test.ts | 21 +++++ packages/core/src/ai/ai-output-language.ts | 42 +++++++++ packages/core/src/ai/ai-summarize.ts | 16 +++- packages/core/src/config/settings-schema.ts | 2 + packages/core/src/index.gate.ts | 2 + packages/core/src/index.ts | 2 + packages/core/src/task-store/settings-ops.ts | 7 ++ packages/core/src/task-store/task-creation.ts | 4 + packages/core/src/types/settings/settings-scope.ts | 2 + .../app/__tests__/settings-sections.test.tsx | 21 +++-- .../__tests__/SettingsModal.models-auth.test.tsx | 10 +- .../app/components/settings/section-keys.ts | 2 +- .../sections/ProjectModelsSection.search.ts | 13 ++- .../settings/sections/ProjectModelsSection.tsx | 28 ++++-- .../settings-default-descriptions.test.tsx | 4 +- .../src/__tests__/github-tracking.test.ts | 4 +- .../__tests__/planning-prompt-resolution.test.ts | 29 ++++-- .../src/__tests__/routes-planning.test.ts | 32 ++++++- packages/dashboard/src/ai-session-store.ts | 15 ++- packages/dashboard/src/github-tracking.ts | 3 + packages/dashboard/src/planning.ts | 75 +++++++++++++-- .../routes/register-ai-text-assistant-routes.ts | 11 ++- .../src/routes/register-planning-subtask-routes.ts | 6 +- .../src/routes/register-task-workflow-routes.ts | 9 +- packages/dashboard/src/shared/settings-sections.ts | 2 +- .../__tests__/ce-workflow-step-executor.test.ts | 45 ++++++++- .../__tests__/executor-review-artifacts.test.ts | 65 +++++++++++++ packages/engine/src/__tests__/triage.test.ts | 7 +- .../src/__tests__/workflow-task-runtime.test.ts | 23 +++++ .../create-authoritative-workflow-primitives.ts | 14 ++- .../create-authoritative-workflow-seams.ts | 17 +++- .../engine/src/executor/execute-workflow-graph.ts | 19 +++- .../engine/src/executor/execute-workflow-step.ts | 13 ++- packages/engine/src/executor/execution-prompt.ts | 10 +- .../engine/src/executor/handoff-task-to-review.ts | 10 +- .../engine/src/executor/run-graph-custom-node.ts | 6 +- .../src/executor/task-executor-graph-facades.ts | 8 +- packages/engine/src/triage.ts | 35 ++----- .../src/workflows/workflow-completion-summary.ts | 101 ++++++++++++++++++--- .../engine/src/workflows/workflow-task-runtime.ts | 12 +++ packages/i18n/locales/en/app.json | 7 +- packages/i18n/locales/es/app.json | 7 +- packages/i18n/locales/fr/app.json | 7 +- packages/i18n/locales/ko/app.json | 7 +- packages/i18n/locales/pt-BR/app.json | 14 ++- packages/i18n/locales/zh-CN/app.json | 7 +- packages/i18n/locales/zh-TW/app.json | 7 +- packages/i18n/src/resources.d.ts | 13 ++- 51 files changed, 680 insertions(+), 151 deletions(-) Fusion-Task-Id: FN-037 Fusion-Task-Lineage: 968a707e-7ffe-43ba-b983-d679b031f7a5 Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
3f85c4cf84 |
FN-034: route workspace tasks through repository worktrees
Route multi-repository planning and graph execution through declared repository worktrees instead of workspace roots. - Acquire declared repository worktrees for planning and custom graph nodes. - Filter planning coordinator selection to configured repositories and preserve workspace routing metadata. - Add workspace worktree recovery, concurrency coverage, and release documentation. Files changed: .changeset/fn-034-workspace-worktree-routing.md | 7 ++ docs/architecture.md | 1 + ...workspace-worktrees-concurrent-merge.pg.test.ts | 36 +++++++ packages/core/src/store.ts | 10 ++ packages/core/src/task-store/task-mutation-ops.ts | 60 +++++++++++- .../executor-workspace-session-cwd.test.ts | 29 ++++-- packages/engine/src/__tests__/self-healing.test.ts | 17 ++-- .../workspace-root-worktree-routing.test.ts | 107 +++++++++++++++++++++ .../create-authoritative-workflow-seams.ts | 48 ++++++--- .../executor/ensure-graph-custom-node-worktree.ts | 45 +++++++- .../executor/ensure-task-worktree-for-planning.ts | 38 ++++++-- .../src/executor/reset-steps-if-work-lost.ts | 12 ++- .../engine/src/executor/run-graph-custom-node.ts | 83 ++++++++++++++-- packages/engine/src/executor/run-implementation.ts | 59 ++++++++++-- .../src/executor/workspace-config-resolver.ts | 30 +++++- .../src/executor/workspace-review-per-repo.ts | 29 +++++- .../executor/worktree-missing-session-recovery.ts | 26 ++++- packages/engine/src/self-healing.ts | 50 +++++++--- .../self-healing/auto-recover-worktree-session.ts | 31 +++++- .../engine/src/worktree/worktree-acquisition.ts | 65 +++++++++++- 20 files changed, 702 insertions(+), 81 deletions(-) Fusion-Task-Id: FN-034 Fusion-Task-Lineage: 59c5f273-d676-4b7f-b006-c12dc6c3abe6 Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
66bbeaa28d |
FN-9108: Restore routed workflow-principal session identity
Restore routed principal attribution throughout workflow prompt and review sessions. - Thread the graph-selected principal into workflow-step execution. - Resolve principal runtime configuration, skills, telemetry, and session attribution consistently. - Fail closed when the routed principal is unavailable and add regression coverage. - Add a patch changeset for the restored behavior. Files changed: .../fn-9108-workflow-principal-session-identity.md | 7 + .../executor-workflow-step-principal.test.ts | 154 +++++++++++++++++++++ .../engine/src/executor/execute-workflow-step.ts | 34 ++++- .../engine/src/executor/run-graph-custom-node.ts | 11 +- 4 files changed, 198 insertions(+), 8 deletions(-) Fusion-Task-Id: FN-9108 Fusion-Task-Lineage: ec668551-8ff4-4ced-8c7f-a4aa04eb044f Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
25b03d6e70 |
FN-9043: fix workspace completion commit detection
Resolve workspace configuration consistently so task completion observes commits across acquired repositories. - Add a host-scoped, memoized workspace configuration resolver and preserve live configuration through executor dependency bags. - Resolve workspace configuration before planning, worktree, graph, cleanup, and task-done paths. - Aggregate workspace commit observations and cover partial-repository completion cases. Files changed: .changeset/fn-9043-workspace-no-commits.md | 7 ++ .../executor-workspace-config-propagation.test.ts | 116 +++++++++++++++++++++ .../engine/src/executor/cleanup-task-worktree.ts | 6 +- .../create-authoritative-workflow-seams.ts | 6 +- packages/engine/src/executor/deps-bags.ts | 74 ++++++++++--- .../executor/ensure-graph-custom-node-worktree.ts | 14 ++- .../executor/ensure-task-worktree-for-planning.ts | 8 +- packages/engine/src/executor/get-worktree-path.ts | 3 + packages/engine/src/executor/mark-stuck-aborted.ts | 6 +- .../engine/src/executor/run-graph-custom-node.ts | 8 +- packages/engine/src/executor/run-implementation.ts | 6 +- .../src/executor/workspace-config-resolver.ts | 40 +++++++ .../src/executor/worktree-task-done-scope-leak.ts | 8 +- .../src/executor/worktree-verify-invariants.ts | 44 ++++---- 14 files changed, 287 insertions(+), 59 deletions(-) Fusion-Task-Id: FN-9043 Fusion-Task-Lineage: fc012b8e-c9cb-47e8-81a7-c9590a63a980 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
9f24a517cf |
FN-8956: track resolved review findings
Add durable, scoped resolution states for workflow review findings. - Persist reviewer-applied and superseded finding receipts without making them actionable. - Scope supersession claims to a named prior workflow result, preserving duplicate IDs in other review lanes. - Render informational resolution badges and reject resolved items from revision requests. Files changed: .changeset/fn-8956-review-finding-resolution.md | 7 + docs/dashboard-guide.md | 2 +- docs/workflow-steps.md | 8 +- .../src/__tests__/review-severity-gate.test.ts | 25 ++++ .../src/__tests__/workflow-step-results.test.ts | 45 +++++- packages/core/src/index.gate.ts | 6 + packages/core/src/index.ts | 6 + packages/core/src/types.ts | 2 + packages/core/src/types/task/task-review.ts | 4 + packages/core/src/types/workflow/workflow-steps.ts | 15 +- .../src/workflows/builtin-code-review-group.ts | 2 +- .../src/workflows/builtin-plan-review-group.ts | 2 +- .../core/src/workflows/review-severity-gate.ts | 37 ++++- .../core/src/workflows/workflow-step-results.ts | 54 ++++++- packages/dashboard/app/api/agents/run-audit.ts | 1 + .../dashboard/app/components/TaskReviewTab.css | 22 +++ .../dashboard/app/components/TaskReviewTab.tsx | 36 +++-- .../components/__tests__/TaskReviewTab.test.tsx | 46 ++++++ .../dashboard/src/__tests__/routes-tasks.test.ts | 48 ++++++ .../src/routes/register-task-workflow-routes.ts | 14 +- .../__tests__/review-finding-supersession.test.ts | 163 +++++++++++++++++++++ .../__tests__/review-findings-injection.test.ts | 22 +++ .../workflow-step-verdict-parsing.test.ts | 16 +- .../engine/src/executor/execute-workflow-graph.ts | 129 ++++++++-------- .../engine/src/executor/execute-workflow-step.ts | 25 +++- .../engine/src/executor/run-graph-custom-node.ts | 7 + .../executor/workflow-step-failure-injection.ts | 8 +- .../engine/src/executor/workflow-step-verdict.ts | 17 ++- .../src/workflows/workflow-graph-executor.ts | 15 ++ packages/i18n/locales/en/app.json | 4 +- packages/i18n/locales/es/app.json | 4 +- packages/i18n/locales/fr/app.json | 4 +- packages/i18n/locales/ko/app.json | 4 +- packages/i18n/locales/pt-BR/app.json | 4 +- packages/i18n/locales/zh-CN/app.json | 4 +- packages/i18n/locales/zh-TW/app.json | 4 +- 36 files changed, 703 insertions(+), 109 deletions(-) Fusion-Task-Id: FN-8956 Fusion-Task-Lineage: 80568280-85aa-4a49-a60a-99b75f88f486 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
1cf86baa1c |
refactor: package code organization wave 18 (executor pure peels) (#3317)
## Summary
Wave 18 continues the package code-organization program after wave 17
domain folders (U4 Slice A from
`docs/plans/2026-07-14-001-refactor-package-code-organization-plan.md`).
### What changed
Peel **pure, behavior-preserving** helpers out of
`packages/engine/src/executor.ts` into domain modules under
`packages/engine/src/executor/`, with **stable re-exports** from
`executor.ts` so deep imports and `vi.mock("../executor.js")` keep
working.
| New module | Symbols |
|------------|---------|
| `executor/task-done-refusal.ts` | `evaluateTaskDoneRefusal`,
`determineRevisionResetStart`, skip-bypass refusal helper |
| `executor/workflow-feedback-paths.ts` |
`extractReferencedPathsFromWorkflowFeedback`,
`isAlwaysAllowedScopeLeakPath`, `workflowPathMatchesDeclaredScope` |
| `executor/workflow-step-verdict.ts` |
`FUSION_WORKFLOW_STEP_CONVENTIONS_PREAMBLE`, `parseWorkflowStepVerdict`
/ `parseWorkflowStepOutput`, step outcome types |
| `executor/await-input-parse.ts` | `parseAwaitInputSentinel`,
`parseAwaitInputQuestionToolCall` |
| `executor/no-commit-eligibility.ts` | `getNoCommitEligibilityReason`
(+ prompt heuristics) |
`executor.ts` live LOC ~**22817 → ~22427** (first pure-peel batch; more
peels needed to approach the 2k cap).
### Shims
- `old path` `executor.ts` public exports → `new path` `executor/*.ts` →
delete-when consumer deep-imports are re-pointed (not this PR)
### Test plan
- [x] `@fusion/engine` typecheck
- [x] Oracle: task-done refusal, skip-bypass, workflow malformed
verdict, scope-leak allowlist, executor-step-session, executor-prompt
- [x] `vitest --project=engine-core` (merge-gate curated suite)
- [ ] CI merge gate
**Stack:** wave17 (merged) → **this PR**
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Improved recognition of workflow outcomes from structured and
conversational responses.
* Added support for extracting questions from await-input responses and
tool calls.
* Improved workflow feedback handling for referenced files and declared
scope patterns.
* Added clearer guidance for task execution, approvals, verification,
and available tools.
* **Bug Fixes**
* Prevented completion when required review approvals are missing or
revisions remain pending.
* Improved handling of workflows that legitimately require no code
changes.
* Added clearer refusal messages and more reliable revision restarts.
* Sanitized repository paths in Git remediation instructions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|