Skip to content

fix(core): Reduce planner workflow bias and fix data-table task routing (no-changelog)#28299

Merged
OlegIvaniv merged 1 commit intomasterfrom
instance-ai-tables-tasks
Apr 10, 2026
Merged

fix(core): Reduce planner workflow bias and fix data-table task routing (no-changelog)#28299
OlegIvaniv merged 1 commit intomasterfrom
instance-ai-tables-tasks

Conversation

@OlegIvaniv
Copy link
Copy Markdown
Contributor

@OlegIvaniv OlegIvaniv commented Apr 10, 2026

Summary

  • Planner now uses data-table kind for all table operations (create, delete, modify) instead of falling back to delegate with incomplete tools
  • Made blueprint data-table columns optional to support non-creation operations
  • Updated accumulator to derive task title/spec from purpose when columns absent
  • Added scope boundary to data-table agent to prevent cross-task side effects
  • Orchestrator now handles single remaining tasks directly on replan instead of always creating a new plan via create-tasks
  • Added standalone data-table operations section to best-practices guide

Related Linear tickets, Github issues, and Community forum posts

Review / Merge checklist

  • I have seen this code, I have run this code, and I take responsibility for this code.
  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with Backport to Beta, Backport to Stable, or Backport to v1 (if the PR is an urgent fix that needs to be backported)

…k routing

- Planner now uses data-table kind for all table operations (create, delete, modify)
  instead of falling back to delegate with incomplete tools
- Made blueprint data-table columns optional to support non-creation operations
- Updated accumulator to derive task title/spec from purpose when columns absent
- Added scope boundary to data-table agent to prevent cross-task side effects
- Orchestrator now handles single remaining tasks directly on replan instead
  of always creating a new plan via create-tasks
- Added standalone data-table operations section to best-practices guide
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 7 files

Architecture diagram
sequenceDiagram
    participant User
    participant Orch as Orchestrator (System Prompt)
    participant Planner as Plan Agent
    participant Accum as Blueprint Accumulator
    participant DTAgent as Data Table Agent
    participant Tool as Specialized Tools (Workflow/DT/Delegate)

    Note over User,Tool: Planning Phase (Initial Request)

    User->>Orch: Request table/workflow operations
    Orch->>Planner: Identify tasks & design blueprint
    
    loop For each task
        Planner->>Planner: CHANGED: Use 'data-table' kind for ALL table ops<br/>(Create, Delete, Modify, Seed)
        Planner->>Accum: NEW: add-plan-item (Columns optional)
        Accum->>Accum: NEW: Derive task spec from 'purpose'<br/>if columns are absent
    end

    Planner-->>Orch: Submit Plan
    Orch->>Orch: Schedule tasks

    Note over Orch,DTAgent: Execution Phase

    Orch->>DTAgent: Execute Data Table task
    DTAgent->>DTAgent: NEW: Enforce scope boundary<br/>(Ignore context from other tasks)
    opt Task includes seed data
        DTAgent->>DTAgent: NEW: Create table THEN insert rows
    end
    DTAgent-->>Orch: Task Result (Success/Failure)

    Note over Orch,Tool: Recovery Phase (on Failure)

    alt Task Failed: Replan needed
        Orch->>Orch: Inspect failure & remaining work
        
        alt NEW: Only 1 simple task remains
            Orch->>Tool: Call specific agent tool directly<br/>(e.g., manage-data-tables-with-agent)
            Tool-->>User: Final Result
        else Multiple tasks or complex dependencies
            Orch->>Planner: Call 'create-tasks' for full replan
            Planner-->>User: New Plan Visibility
        end
    end
Loading

Copy link
Copy Markdown
Contributor

@Cadiac Cadiac left a comment

Choose a reason for hiding this comment

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

🤞

@Cadiac Cadiac changed the title fix(instance-ai): reduce planner workflow bias and fix data-table task routing (no-changelog) fix(instance-ai): Reduce planner workflow bias and fix data-table task routing (no-changelog) Apr 10, 2026
@n8n-assistant n8n-assistant bot added the n8n team Authored by the n8n team label Apr 10, 2026
@Cadiac Cadiac changed the title fix(instance-ai): Reduce planner workflow bias and fix data-table task routing (no-changelog) fix(core): Reduce planner workflow bias and fix data-table task routing (no-changelog) Apr 10, 2026
@OlegIvaniv OlegIvaniv added this pull request to the merge queue Apr 10, 2026
Merged via the queue into master with commit ab8e9a6 Apr 10, 2026
70 of 75 checks passed
@OlegIvaniv OlegIvaniv deleted the instance-ai-tables-tasks branch April 10, 2026 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

n8n team Authored by the n8n team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants