Skip to content

refactor(workflow): extract node runner boundaries#1842

Merged
gsxdsm merged 3 commits into
mainfrom
feature/workflow-nodes
Jul 1, 2026
Merged

refactor(workflow): extract node runner boundaries#1842
gsxdsm merged 3 commits into
mainfrom
feature/workflow-nodes

Conversation

@gsxdsm

@gsxdsm gsxdsm commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Workflow node behavior now has explicit engine-owned runner and service boundaries instead of being concentrated in the default handler factory and private executor seams. Workflow IR remains declarative: the graph executor still walks and routes the graph, while node runners and runtime services own node-kind behavior, primitive construction, custom-node execution, review invocation, and planning dispatch.

Design Notes

  • Added a WorkflowNodeRunner registry that adapts runners to the existing handler contract while preserving explicit handler override precedence.
  • Moved gate, notify, code, parse-steps, and merge behavior behind runner modules while keeping compatibility exports from workflow-node-handlers.ts.
  • Added service boundaries for runtime primitive creation, custom-node execution, single-cwd review invocation, and graph planning.
  • Preserved fast-mode raw runner compatibility for stepwise built-ins by skipping executable custom nodes and parsing PROMPT.md in memory when no executor primitive deps are wired.
  • Updated concepts and workflow runtime docs so future workflow behavior has a clear home: IR, runner, primitive provider, runtime service, or substrate.

Validation

  • pnpm --filter @fusion/engine exec vitest run ... --silent=passed-only --reporter=dot across 20 focused workflow/runtime test files: 166 tests passed.
  • Targeted ESLint on touched workflow files and tests passed.
  • pnpm --filter @fusion/engine exec tsc --noEmit --pretty false passed.
  • git diff --check passed.
  • Browser pipeline: skipped by scope; no changed files map to browser-testable routes.

Post-Deploy Monitoring & Validation

No additional operational monitoring required. This is an internal engine refactor with focused tests covering runner dispatch, primitive-provider compatibility, custom-node service delegation, review/planning service boundaries, merge behavior, fast-mode raw runner compatibility, and docs alignment.

Healthy signals: workflow graph runs continue through planning, parse-steps, optional groups, custom nodes, review, and merge with existing outcome values. Failure signals: new parse-steps-unwired, custom-node, review, or merge-attempt regressions in engine logs for previously working built-in workflows. Rollback trigger: repeated workflow graph task failures attributable to runner/service dispatch rather than task content or provider errors.


Compound Engineering
Codex

Summary by CodeRabbit

  • New Features
    • Added engine-owned workflow node runners and dedicated services for custom-node execution, workflow planning, and step review.
    • Exposed a runtime primitive provider abstraction and a node-runner registry in the public API, including built-in runners for gate, code, merge, parse-steps, and notify.
  • Bug Fixes
    • Improved fast-mode behavior when runtime capabilities are unavailable (including optional-group skipping, merge/review handling, and a safe parse-steps fallback).
  • Tests
    • Expanded coverage for the runner registry integration, custom-node execution, runtime primitive provider, planning/review, and fast-mode semantics.
  • Documentation
    • Clarified workflow responsibility boundaries and added glossary definitions plus a refactor plan.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • ✅ Review completed - (🔄 Check again to review again)
📝 Walkthrough

Walkthrough

This PR splits workflow execution into runner modules and runtime services, adds a runner registry, rewires executor dispatch and handler assembly, updates fast-mode behavior, and refreshes related docs and tests.

Changes

Workflow Node Runner Architecture

Layer / File(s) Summary
Plan and concept documentation
CONCEPTS.md, docs/plans/2026-06-30-001-refactor-workflow-node-runner-classes-plan.md, docs/workflow-steps.md
Adds glossary entries, a refactor plan, and workflow-runtime documentation describing the new responsibility boundaries.
Node runner contract and executor dispatch
packages/engine/src/workflow-node-runner.ts, packages/engine/src/workflow-graph-executor.ts, packages/engine/src/index.ts, packages/engine/src/__tests__/workflow-node-runner.test.ts
Introduces node runner types and registry behavior, wires registry-backed handlers into graph execution precedence, re-exports the new APIs, and adds registry integration tests.
Built-in node runner modules and handler wiring
packages/engine/src/workflow-node-runners/*, packages/engine/src/workflow-node-handlers.ts
Adds gate, code, notify, parse-steps, and merge runner modules, and rewires node-handler assembly to source those handlers from the runner modules.
Runtime primitive provider and execution services
packages/engine/src/workflow-runtime-primitive-provider.ts, packages/engine/src/workflow-custom-node-execution.ts, packages/engine/src/workflow-planning-service.ts, packages/engine/src/workflow-review-service.ts, packages/engine/src/executor.ts, packages/engine/src/__tests__/{runtime-primitives,workflow-custom-node-execution,workflow-planning-service,workflow-review-service}.test.ts
Adds the runtime primitive provider, custom-node execution service, planning service, and review service, wires them into executor.ts, and adds unit tests for the new service boundaries.
Fast-mode task runner compatibility
packages/engine/src/workflow-graph-task-runner.ts, packages/engine/src/__tests__/executor-fast-mode-workflows.test.ts
Skips executable custom nodes and provides a fallback parse-steps implementation in fast mode without primitives, and updates fast-mode tests to reflect the review seam change.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

  • Runfusion/Fusion#1363: Directly overlaps with the workflow execution refactor and the new custom-node execution, planning, and review service seams.
  • Runfusion/Fusion#1461: Both PRs change workflow graph node-handler wiring in the engine.
  • Runfusion/Fusion#1536: Both PRs route workflow behavior through the runtime primitives boundary and related executor wiring.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: extracting workflow node runner boundaries.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/workflow-nodes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR extracts explicit engine-owned runner and service boundaries from monolithic executor.ts/reviewer.ts/triage.ts paths, introducing WorkflowNodeRunnerRegistry, per-kind runner modules (gate, notify, code, parse-steps, merge), and thin services for custom-node execution, review invocation, runtime primitive creation, and planning. Workflow IR remains declarative; the graph executor continues to own traversal and routing, while runners own node-kind behavior.

  • New runner modules (gate-runner, notify-runner, code-runner, parse-steps-runner, merge-runner) lift handler logic out of workflow-node-handlers.ts with compatibility re-exports preserved; the registry adapts them back to the existing WorkflowNodeHandler contract so existing explicit handler overrides still win via spread order.
  • New service boundaries (WorkflowCustomNodeExecutionService, WorkflowReviewService, WorkflowRuntimePrimitiveProvider, WorkflowPlanningService) wrap existing executor internals with typed, injected dependencies; TaskExecutor delegates to them during migration without behavior change.
  • Fast-mode fallbacks added to WorkflowGraphTaskRunner: executable custom nodes (prompt/script/skillName) are skipped when primitives are unwired, and parse-steps reads task.prompt from memory instead of requiring a store-backed artifact read.

Confidence Score: 5/5

Safe to merge; all behavioral extraction is adapter-first with compatibility re-exports preserved and focused tests covering runner dispatch, fast-mode fallbacks, and new service boundaries.

Every changed code path either delegates to the existing executor internals without changing outcomes, or moves handler logic into runner modules with byte-equivalent behavior guarded by 166 passing focused tests. No safety invariants (worktree, semaphore, pause/abort, merge-proof) are relocated. The two findings are both design-quality observations with no current failure condition.

No files require special attention. workflow-review-service.ts has a minor fragile type reference, but it does not affect runtime behavior.

Important Files Changed

Filename Overview
packages/engine/src/workflow-node-runner.ts New runner contract and registry; adapts runners to WorkflowNodeHandler shape with correct explicit-handler-wins precedence.
packages/engine/src/workflow-review-service.ts New single-cwd review service boundary; options typed as Parameters[7] — positional index that will silently change if reviewStep's signature is ever reordered.
packages/engine/src/workflow-graph-task-runner.ts Adds fast-mode executable-node skip and in-memory parse-steps fallback for raw compatibility runs; write target correctly follows ParseStepsNodeRunner context.
packages/engine/src/workflow-custom-node-execution.ts Thin service boundary delegating to executor during migration; preserves column-binding resolution and graph context forwarding.
packages/engine/src/workflow-planning-service.ts Intentional stub returning pre-specified result; matches prior executor behavior and is documented for later triage extraction.
packages/engine/src/workflow-runtime-primitive-provider.ts Thin factory wrapper; TaskExecutor.createAuthoritativeWorkflowPrimitives now delegates through it without behavior change.
packages/engine/src/workflow-node-runners/merge-runner.ts Extracts merge-gate and merge-attempt handlers; no-primitives path delegates to legacy seam (covered by new test per previous thread).
packages/engine/src/workflow-node-runners/parse-steps-runner.ts Moved from workflow-node-handlers.ts with behavior preserved; pin-protection and fail-closed semantics unchanged.
packages/engine/src/executor.ts Minimal wiring changes: new services instantiated at call sites, runPlanningSession delegates to WorkflowPlanningService, runCustomNode delegates through WorkflowCustomNodeExecutionService; no behavior change.
packages/engine/src/workflow-node-handlers.ts Handler implementations replaced with imports from runner modules; compatibility re-exports preserved; merge handlers now call runner factories.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
  participant Graph as WorkflowGraphExecutor
  participant Registry as WorkflowNodeRunnerRegistry
  participant Handler as WorkflowNodeHandler
  participant Runner as WorkflowNodeRunner (gate/notify/code/…)
  participant Service as Runtime Service (Custom/Review/Planning)
  participant Exec as TaskExecutor (substrate)

  Graph->>Registry: toHandlers() at construction
  Registry-->>Graph: merged handler map

  Graph->>Handler: handler(node, context)
  Handler->>Runner: runner.run(node, context)

  alt primitive-backed node (merge-attempt, step-review…)
    Runner->>Exec: createAuthoritativeWorkflowPrimitivesFromExecutor
    Exec-->>Runner: WorkflowRuntimePrimitives
    Runner->>Runner: runWorkflowMergeAttemptNode / runReview
  end

  alt custom-node (prompt/script/gate with executable config)
    Runner->>Service: WorkflowCustomNodeExecutionService.runner(settings)
    Service->>Exec: this.runGraphCustomNode(…)
    Exec-->>Service: WorkflowNodeResult
    Service-->>Runner: result
  end

  alt review (step-review seam)
    Runner->>Service: WorkflowReviewService.reviewStep(input)
    Service->>Exec: reviewStep(cwd, taskId, …)
    Exec-->>Service: ReviewResult
    Service-->>Runner: result
  end

  Runner-->>Handler: WorkflowNodeResult
  Handler-->>Graph: outcome / value / contextPatch
  Graph->>Graph: choose next edge
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
  participant Graph as WorkflowGraphExecutor
  participant Registry as WorkflowNodeRunnerRegistry
  participant Handler as WorkflowNodeHandler
  participant Runner as WorkflowNodeRunner (gate/notify/code/…)
  participant Service as Runtime Service (Custom/Review/Planning)
  participant Exec as TaskExecutor (substrate)

  Graph->>Registry: toHandlers() at construction
  Registry-->>Graph: merged handler map

  Graph->>Handler: handler(node, context)
  Handler->>Runner: runner.run(node, context)

  alt primitive-backed node (merge-attempt, step-review…)
    Runner->>Exec: createAuthoritativeWorkflowPrimitivesFromExecutor
    Exec-->>Runner: WorkflowRuntimePrimitives
    Runner->>Runner: runWorkflowMergeAttemptNode / runReview
  end

  alt custom-node (prompt/script/gate with executable config)
    Runner->>Service: WorkflowCustomNodeExecutionService.runner(settings)
    Service->>Exec: this.runGraphCustomNode(…)
    Exec-->>Service: WorkflowNodeResult
    Service-->>Runner: result
  end

  alt review (step-review seam)
    Runner->>Service: WorkflowReviewService.reviewStep(input)
    Service->>Exec: reviewStep(cwd, taskId, …)
    Exec-->>Service: ReviewResult
    Service-->>Runner: result
  end

  Runner-->>Handler: WorkflowNodeResult
  Handler-->>Graph: outcome / value / contextPatch
  Graph->>Graph: choose next edge
Loading

Reviews (6): Last reviewed commit: "Merge branch 'main' into feature/workflo..." | Re-trigger Greptile

Comment thread packages/engine/src/workflow-graph-task-runner.ts
Comment thread packages/engine/src/workflow-node-runners/merge-runner.ts
Comment thread packages/engine/src/__tests__/executor-fast-mode-workflows.test.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/engine/src/workflow-graph-task-runner.ts (1)

251-268: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Use skillName here, not skill. executor: "skill" nodes throughout the workflow IR use config.skillName, so this guard misses skill executors and lets them fall through to runCustomNode(...) instead of taking the fast-mode skip.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/engine/src/workflow-graph-task-runner.ts` around lines 251 - 268,
The fast-mode skip guard in wrappedRunCustomNode is checking the wrong skill
field, so executor: "skill" nodes are not being skipped. Update the
hasExecutableConfig check to use node.config.skillName (alongside prompt and
scriptName) instead of node.config.skill so skill executors are recognized and
return the fast-mode-skipped result before calling this.deps.runCustomNode.
🧹 Nitpick comments (2)
packages/engine/src/executor.ts (1)

5579-5583: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Provider boundary is created and immediately discarded — pointless indirection.

createAuthoritativeWorkflowPrimitives constructs a WorkflowRuntimePrimitiveProvider via createWorkflowRuntimePrimitiveProvider(...) only to call .create(settings) on it in the very next line and return the result. This is equivalent to return this.createAuthoritativeWorkflowPrimitivesFromExecutor(settings); — the provider object serves no purpose here since nothing holds onto it or reuses it across multiple settings values. As the reference implementation of the new "provider boundary" pattern introduced by this PR, this shape may get copy-pasted at future call sites, propagating the same needless allocation/indirection.

♻️ Simplify by calling the factory directly
 public createAuthoritativeWorkflowPrimitives(settings: Settings): WorkflowRuntimePrimitives {
-    return createWorkflowRuntimePrimitiveProvider((providerSettings) =>
-      this.createAuthoritativeWorkflowPrimitivesFromExecutor(providerSettings),
-    ).create(settings);
+    return this.createAuthoritativeWorkflowPrimitivesFromExecutor(settings);
 }

If the intent is for callers to eventually hold a reusable provider (rather than one-shot primitives), consider exposing createWorkflowRuntimePrimitiveProvider((s) => this.createAuthoritativeWorkflowPrimitivesFromExecutor(s)) itself as the public surface instead of pre-resolving it with .create(settings).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/engine/src/executor.ts` around lines 5579 - 5583, The
createAuthoritativeWorkflowPrimitives method is creating a
WorkflowRuntimePrimitiveProvider and immediately discarding it by calling
create(settings) right away. Simplify this by removing the unnecessary provider
indirection and returning the result of
createAuthoritativeWorkflowPrimitivesFromExecutor(settings) directly, or, if the
provider boundary is meant to be reusable, expose
createWorkflowRuntimePrimitiveProvider(...) itself instead of resolving it here.
Use createAuthoritativeWorkflowPrimitives and
createWorkflowRuntimePrimitiveProvider to locate the change.
packages/engine/src/workflow-graph-task-runner.ts (1)

284-300: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Fallback writeSteps mutates the caller's task object in place.

task.steps = steps directly mutates the TaskDetail passed into run(). This is scoped to the documented no-store raw-compatibility fallback (no persistence layer to write through), so it's likely intentional, but it's worth flagging since mutating an input parameter is easy to overlook if this runner is ever reused with a caller that expects task to remain untouched across the call.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/engine/src/workflow-graph-task-runner.ts` around lines 284 - 300,
The fast-mode fallback in workflow-graph-task-runner mutates the incoming task
via writeSteps, which can surprise callers that expect run() not to alter its
input. Update the fastModeFallbackParseSteps branch in
WorkflowGraphTaskRunner.run so it stores parsed steps without modifying the
original TaskDetail object in place, or clearly route the projection through an
internal runner-owned copy/state instead of assigning directly to task.steps.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@packages/engine/src/workflow-graph-task-runner.ts`:
- Around line 251-268: The fast-mode skip guard in wrappedRunCustomNode is
checking the wrong skill field, so executor: "skill" nodes are not being
skipped. Update the hasExecutableConfig check to use node.config.skillName
(alongside prompt and scriptName) instead of node.config.skill so skill
executors are recognized and return the fast-mode-skipped result before calling
this.deps.runCustomNode.

---

Nitpick comments:
In `@packages/engine/src/executor.ts`:
- Around line 5579-5583: The createAuthoritativeWorkflowPrimitives method is
creating a WorkflowRuntimePrimitiveProvider and immediately discarding it by
calling create(settings) right away. Simplify this by removing the unnecessary
provider indirection and returning the result of
createAuthoritativeWorkflowPrimitivesFromExecutor(settings) directly, or, if the
provider boundary is meant to be reusable, expose
createWorkflowRuntimePrimitiveProvider(...) itself instead of resolving it here.
Use createAuthoritativeWorkflowPrimitives and
createWorkflowRuntimePrimitiveProvider to locate the change.

In `@packages/engine/src/workflow-graph-task-runner.ts`:
- Around line 284-300: The fast-mode fallback in workflow-graph-task-runner
mutates the incoming task via writeSteps, which can surprise callers that expect
run() not to alter its input. Update the fastModeFallbackParseSteps branch in
WorkflowGraphTaskRunner.run so it stores parsed steps without modifying the
original TaskDetail object in place, or clearly route the projection through an
internal runner-owned copy/state instead of assigning directly to task.steps.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: cbd0d977-b7ad-46ca-afc2-c76c0d4e7714

📥 Commits

Reviewing files that changed from the base of the PR and between 7427fa3 and 6e4b159.

📒 Files selected for processing (24)
  • CONCEPTS.md
  • docs/plans/2026-06-30-001-refactor-workflow-node-runner-classes-plan.md
  • docs/workflow-steps.md
  • packages/engine/src/__tests__/executor-fast-mode-workflows.test.ts
  • packages/engine/src/__tests__/runtime-primitives.test.ts
  • packages/engine/src/__tests__/workflow-custom-node-execution.test.ts
  • packages/engine/src/__tests__/workflow-node-runner.test.ts
  • packages/engine/src/__tests__/workflow-planning-service.test.ts
  • packages/engine/src/__tests__/workflow-review-service.test.ts
  • packages/engine/src/executor.ts
  • packages/engine/src/index.ts
  • packages/engine/src/workflow-custom-node-execution.ts
  • packages/engine/src/workflow-graph-executor.ts
  • packages/engine/src/workflow-graph-task-runner.ts
  • packages/engine/src/workflow-node-handlers.ts
  • packages/engine/src/workflow-node-runner.ts
  • packages/engine/src/workflow-node-runners/code-runner.ts
  • packages/engine/src/workflow-node-runners/gate-runner.ts
  • packages/engine/src/workflow-node-runners/merge-runner.ts
  • packages/engine/src/workflow-node-runners/notify-runner.ts
  • packages/engine/src/workflow-node-runners/parse-steps-runner.ts
  • packages/engine/src/workflow-planning-service.ts
  • packages/engine/src/workflow-review-service.ts
  • packages/engine/src/workflow-runtime-primitive-provider.ts

@gsxdsm
gsxdsm force-pushed the feature/workflow-nodes branch from 6e4b159 to 5d8587f Compare July 1, 2026 01:44

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
docs/plans/2026-06-30-001-refactor-workflow-node-runner-classes-plan.md (1)

19-20: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Generalize the Authority field for repo durability.

The Authority field currently reads "User request in this session: assess and plan whether workflow logic can be moved..." This retains ephemeral session context. For an implementation-ready plan committed to the repo, replace with a durable authority reference (e.g., "Architecture decision: decouple workflow node behavior from monolithic executor" or link to the adjacent lifecycle-authority plan).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/plans/2026-06-30-001-refactor-workflow-node-runner-classes-plan.md`
around lines 19 - 20, The Authority field in this plan still references a
transient user session, so update the document’s authority text to a durable
repo-owned source instead. Replace the session-specific wording in the plan
header with a stable architecture decision or a cross-reference to the adjacent
lifecycle-authority plan, keeping the rest of the refactor scope intact. Use the
existing plan header fields (especially Authority and Execution profile) to keep
the document implementation-ready and durable.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@docs/plans/2026-06-30-001-refactor-workflow-node-runner-classes-plan.md`:
- Around line 19-20: The Authority field in this plan still references a
transient user session, so update the document’s authority text to a durable
repo-owned source instead. Replace the session-specific wording in the plan
header with a stable architecture decision or a cross-reference to the adjacent
lifecycle-authority plan, keeping the rest of the refactor scope intact. Use the
existing plan header fields (especially Authority and Execution profile) to keep
the document implementation-ready and durable.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 39d4c91c-7b3f-4a6f-820b-7a6f684ea420

📥 Commits

Reviewing files that changed from the base of the PR and between 6e4b159 and 5d8587f.

📒 Files selected for processing (8)
  • CONCEPTS.md
  • docs/plans/2026-06-30-001-refactor-workflow-node-runner-classes-plan.md
  • docs/workflow-steps.md
  • packages/engine/src/__tests__/executor-fast-mode-workflows.test.ts
  • packages/engine/src/__tests__/runtime-primitives.test.ts
  • packages/engine/src/__tests__/workflow-custom-node-execution.test.ts
  • packages/engine/src/__tests__/workflow-node-runner.test.ts
  • packages/engine/src/__tests__/workflow-planning-service.test.ts
💤 Files with no reviewable changes (5)
  • packages/engine/src/tests/workflow-planning-service.test.ts
  • packages/engine/src/tests/workflow-custom-node-execution.test.ts
  • packages/engine/src/tests/runtime-primitives.test.ts
  • packages/engine/src/tests/workflow-node-runner.test.ts
  • packages/engine/src/tests/executor-fast-mode-workflows.test.ts
✅ Files skipped from review due to trivial changes (2)
  • docs/workflow-steps.md
  • CONCEPTS.md

@gsxdsm
gsxdsm force-pushed the feature/workflow-nodes branch 2 times, most recently from ba60625 to dcb759e Compare July 1, 2026 03:52
@gsxdsm

gsxdsm commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator Author

Addressing CodeRabbit review body PRR_kwDOSA-8Y88AAAABEnrexw:

Use skillName here, not skill.

Addressed: the raw fast-mode executable-node guard now checks config.skillName, and there is regression coverage that skill executor nodes are skipped before runCustomNode when primitives are unavailable.

Fallback writeSteps mutates the caller's task object in place.

Addressed differently: the raw no-store fallback still intentionally projects parsed steps onto the runner task so parse→foreach compatibility works without persistence, but it now writes through the task object passed by ParseStepsNodeRunner instead of closing over the outer run() argument.

Provider boundary is created and immediately discarded — pointless indirection.

Declined: createAuthoritativeWorkflowPrimitives() is intentionally the executor-facing adapter over the new provider boundary. Removing it would collapse the service-boundary shape this PR is adding; the reusable provider itself remains exported and tested in workflow-runtime-primitive-provider.ts.

@gsxdsm

gsxdsm commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator Author

Addressing CodeRabbit review body PRR_kwDOSA-8Y88AAAABEn1Djw:

Generalize the Authority field for repo durability.

Addressed: replaced the session-specific authority wording with a durable architecture-decision authority for decoupling workflow node behavior from monolithic triage/executor/reviewer files into node runner and runtime primitive/service boundaries.

@gsxdsm
gsxdsm force-pushed the feature/workflow-nodes branch from dcb759e to b07105d Compare July 1, 2026 07:51
@gsxdsm
gsxdsm merged commit 47fa2ae into main Jul 1, 2026
6 checks passed
@gsxdsm
gsxdsm deleted the feature/workflow-nodes branch July 1, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant