Skip to content

multi-engine C2: rootReads in the graph IR #4452

Closed

Description

@lex00

The structured read report (observation.ts:176) reaches chant graph output. Accepted when behold can tell which read answered without reading note text.

Part of #4450.

Acceptance: read verdict lines and recorded artifacts, never exit codes alone. Anything that needs an emulator corpus, an estate run or a real cloud is run by the maintainer by hand. Red-first only for new guards.

Activity

  1. added
    multi-engine
    on Oct 25, 2026
  2. lex00 commented on Oct 25, 2026

    @lex00
    ContributorAuthor

    Landed on integration/choudoufu-engine in merge commit 1b8082c (unit branch unit/c2-rootreads-ir, commit 375d1a0).

    What landed:

    • GraphIR.rootReads?: Record<string, RootRead> (packages/core/src/graph-ir.ts:531). It is the observation's RootRead report (observation.ts:176, :205) passed through unchanged, keyed by the lexicon's root key (terraform.roots.<root>). The read that answered a root is fellBackTo ?? depth, and reason is the machine-stable cause.
    • chant graph --live puts it on the IR (packages/core/src/cli/handlers/graph.ts:298, :328, :494). It is attached last, after the overlay, lens and detail passes, because each of those builds a fresh IR. So it is present with --overlay --detail 3, which is how behold asks for a plan read.
    • Additive, following the IR's existing rule (graph-ir.ts GRAPH_IR_VERSION). version stays 1. The field is absent when no lexicon reported a root read, on a source graph, and on an --at replay, because snapshots do not record it.
    • chant workspace graph keeps each member's rootReads on its member entry, unprefixed, because the keys name roots and not nodes (packages/core/src/workspace/compose-graph.ts:128, :400). graph.schema.json gains the rootReads member property and a rootRead def.
    • Docs: a new "rootReads: which read answered each root" section in docs/src/content/docs/cli/graph.mdx, and one sentence in the live-read section of cli/workspace-graph.mdx.

    Compiled with npx tsc --noEmit -p packages/core (this includes the test files). Clean.

    Still missing:

    • Tests written and not run: two in packages/core/src/cli/handlers/graph.test.ts (a plan read's IR carries rootReads, including a fallback with its reason; an IR whose read reported none has no rootReads) and one in packages/core/src/workspace/compose-graph.test.ts (a member's rootReads stay on its entry). The maintainer needs to run them.
    • Per-entity sources still do not reach the IR. behold sets each card's answer from its root, so rootReads covers what the stderr parsing does today. If B2 needs the per-node read, that is a separate field.
    • The shape is RootRead as it exists, with fellBackTo. The design note's fellBackFrom belongs to the C1 DriftRecord, which is a different direction: fellBackFrom there is this depth.
    • behold still parses note text until B2 switches to ir.rootReads (src/terraform-plan.ts:26-31, src/choudoufu-chant-read.ts:139-148).
  3. lex00 commented on Oct 25, 2026

    @lex00
    ContributorAuthor

    Path 1 of the multi-engine engine tier is on main: choudoufu e5023addda, chant 1cf7328, behold e765bf66 (each a merge commit of integration/choudoufu-engine, tree identical to the tested tip). Acceptance met at epic-ready: graph.test.ts / compose-graph.test.ts pass, and behold reads rootReads off the graph to tell which read answered (behold terraform-plan and choudoufu-chant-read tests pass against a local build of this chant).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    multi-engine

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions