Render a harness graph as an ASCII DAG via an aura graph subcommand
#13
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Concern
The engine cannot display the topology of a wired graph. A harness is assembled
today as raw index lists —
Harness::bootstrap(nodes, sources, edges)withEdge { from: 0, to: 2, slot: 0, from_field: 0 }(seefieldtests/cycle-0006-substrate/c0006_2_fanout_dag.rs:62) — whose correctnesscannot be eyeballed. A mis-wired but type-valid graph (e.g. fast/slow SMA inputs
swapped) compiles, bootstraps, and runs; nothing surfaces the mistake. C9 (design
ledger
docs/design/INDEX.md) promises "the built graph is introspectableruntime data"; no code realizes it yet.
Direction
Render a graph as an ASCII DAG to stdout, exposed as an
aura graphCLIsubcommand (
crates/aura-cli/src/main.rsis currently a scaffold with nosubcommands, sibling to the
aura runsubcommand of #8). This is the CLI-facehalf of "structure before a run" (C14/C22).
Crate choice (verified by local test)
Two candidates were tested against the walking-skeleton wiring (price -> 2xSMA ->
Sub -> Exposure -> SimBroker -> sink):
ratatui-graphv0.1.0 — disqualified: the entire crate source isfn hello_world() {}; a parked name with no implementation, on the staleratatui ^0.28.ascii-dagv0.9.1 (MIT OR Apache-2.0) — works. Maintained (last push2026-03-26, 0 open issues), zero-dependency /
no_std, Sugiyama layeredlayout, renders to a
String, has subgraph/cluster support. Thewalking-skeleton DAG rendered correctly, diamond and all.
Constraints found while testing
ascii-dag:RenderMode::Horizontalcollapses a DAG onto one path (drops fan-outbranches);
RenderMode::Verticalis required for any graph with fan-out.String, not a ratatui widget — an interactive TUI shell would bea separate effort on top.
Two cut depths
render(labels, sources, edges) -> Stringover the pre-bootstrap wiring data (Edge/SourceSpec/Targetare already
pub), labels passed as a parallel&[&str], plus anaura graphsubcommand rendering one built-in sample harness. Proves theintegration but renders only a hardcoded example — names are bolted on, not
intrinsic.
builder/blueprint layer, C9/C19). This is what makes "build signal X, show
its graph" real, and it depends on the composite/builder work in #12.
Composites should render as
ascii-dagsubgraph (cluster) boxes once #12 lands.Acceptance
ascii-dagadded as a dependency of the rendering crate.ascii_dag::Graphadapter (Vertical mode, single-line labels).aura graphprints an ASCII DAG to stdout.Delivered by cycle 0013 (spec/plan 0013-aura-graph-ascii-dag, feat
0a855c3, auditd97fada).aura graphrenders a wired graph as an ASCII DAG in two views — clustered blueprint (composites as named boxes) and--compiledflat compilat (boundaries dissolved, C23) — with param-carrying node labels so a mis-wiring is visible. Acceptance met (ascii-dag dep in aura-cli, Vertical adapter, stdout render, frozen snapshot tests) plus the concern-defining swap test. Milestone fieldtest green (no bugs). Closing manually; the feat commit also carriescloses #13for when the branch is pushed.