Skip to content

Make AI fan-out packet routing explicit before 1.0 #2226

@chubes4

Description

@chubes4

Problem

AI fan-out filtering still returns original packets unchanged when no ai_handler_complete packets are found.

Code reference on origin/main (008878b6):

  • inc/Abilities/Engine/ExecuteStepAbility.php:994-1033filterPacketsForFanOut() filters to handler packets, then falls back to original packets when no handler packets exist.

Related closed issue: #1385.

Why this matters

The fallback may be correct for some transitions, but it is not explicit. The code comment itself documents the bad case: non-handler packets can fan out into child jobs that later fail with required_handler_tool_not_called when the next step requires handler output.

Acceptance criteria

  • Define explicit fan-out policy per step transition or equivalent routing primitive.
  • Handler-requiring next steps fail clearly when required handler packets are absent instead of fanning out unrelated packets.
  • Non-handler multi-packet fan-out remains supported only where the transition explicitly allows it.
  • Tests cover AI -> publish/upsert handler-required transitions, non-handler AI packets, and multi-handler completions.

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (GPT-5.5)
  • Used for: 1.0 technical-debt audit and issue drafting; Chris requested tracking issues for the findings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    1.0-blockerBlocks the Data Machine core 1.0 releasearchitectureFoundational architecture changes

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions