Skip to content

Connect burn flow across turns or narrow the contract #456

Description

@willwashburn

Problem

burn flow --session <id> is documented as an inference-flow DAG for a session, but the graph currently resets main-rail sequencing at each turn. The builder starts each turn with prev_main_id = None, so default edges only connect nodes within the same turn. The checked-in 3-turn flow snapshot has no edges from turn 0 to turn 1 or turn 1 to turn 2.

That makes the rendered Mermaid and SVG look like separate per-turn skeletons rather than a session flow.

Relevant files

  • crates/relayburn-sdk/src/analyze/flow_graph.rs
  • crates/relayburn-cli/src/commands/flow.rs
  • tests/fixtures/cli-golden/snapshots/flow-json.stdout.txt
  • tests/fixtures/cli-golden/snapshots/flow-mermaid.stdout.txt
  • crates/relayburn-cli/tests/flow_svg.rs

Suggested scope

Prefer the simpler behavior: connect the previous main-rail terminal node to the next turn main-rail entry with a default edge, then keep dispatch and return edges as the cross-rail layer.

If the intended contract is intentionally per-turn only, rename or document it that way and remove the DAG/session-flow language.

Definition of done

  • Multi-turn sessions have deterministic main-rail continuity in JSON, Mermaid, and SVG output, or the command contract is narrowed clearly.
  • Add an SDK unit test for two plain turns with a cross-turn default edge.
  • Refresh golden JSON/Mermaid/SVG fixtures if the connected graph is the chosen behavior.
  • Verify cargo test --workspace and the flow SVG snapshot test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions