Skip to content

fix(dag): crash recovery completes schemaless running nodes with undefined — replan verdict vanishes after restart #345

Description

@LeXwDeX

Source: docs/audit-dag-deepdive-2026-08-19.md (DAG-06, Medium)

Mechanism

recovery.ts:92-106: when a recovered running node's child session is completed but NodeCompleted was never published (crash window: final reply persisted, event not), the recovery path completes schemaless nodes with nodeCompleted(dagID, node.id, undefined) and never reads the child session's messages. Live path (spawn.ts:483-521) takes the last text part.

Consequences:

  • a schemaless checkpoint that replied with raw string {"verdict":"replan"} loses its veto after recovery (loop.ts:699-704 reads node.output === undefined) — no pause, no warning
  • gated dependents' .output.<field> resolves undefined → condition_false skip
  • downstream input_mapping degrades to placeholder

Reachable: the runtime replan seam explicitly exempts the schema obligation (requireOutputSchema:false) and DAG-05's httpapi start bypasses authoring entirely, so schemaless reporting nodes remain legal. Degenerate branch: unparseable wf.config makes schema-carrying nodes fall into the same else (undefined) branch, bypassing settleCapturedOutput.

Acceptance

  • recovery reads the child session's last assistant text part (symmetric with live path)
  • unparseable config treated as schema-present (fail, not undefined-complete)
  • regression test: crash after child produced a string verdict → recovery preserves the veto

Activity

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions