Skip to content

fix(dag): crash recovery preserves a schemaless node's string verdict - #362

Merged
LeXwDeX merged 2 commits into
devfrom
feat/345-issue345
Aug 19, 2026
Merged

fix(dag): crash recovery preserves a schemaless node's string verdict#362
LeXwDeX merged 2 commits into
devfrom
feat/345-issue345

Conversation

@LeXwDeX

Copy link
Copy Markdown
Owner

Closes#345

What

  • The recovery path for a completed child session now mirrors the live path for schemaless nodes: reconcileWorkflow takes an injected lastAssistantText reader (makeLastAssistantTextReader(sessions), provided by DagLoop) and settles with the child's last assistant text ("" floor, exactly like spawn.ts). A crash between the child's final reply and the NodeCompleted publish no longer erases a string verdict — a bare {"verdict":"replan"} checkpoint keeps its veto, gated dependents resolve fields, input_mapping stops degrading to placeholders.
  • The degenerate branch: an explicitly unparseable workflow row (DagLoop now passes parseWorkflowConfig(wf.config) ?? null) fails the node loudly (exec_failed, counted as ownershipLost so P2-2 recovery-pause applies) instead of undefined-completing a schema-carrying node past settleCapturedOutput.
  • Legacy callers that inject no reader/config keep the previous settlement semantics.

Tests

  • string verdict preserved through recovery (nodeCompleted carries the exact text)
  • missing text part floors to "" (live-path parity)
  • unparseable (null) config → loud nodeFailed + ownershipLost=1, never nodeCompleted
  • legacy no-reader call → undefined settlement unchanged
  • dag-loop-recovery-integration unchanged (38/38 across both files); typecheck green; lint delta zero (budget is exactly at cap)

The recovery path completed a schemaless running node with undefined and
never read the child session's messages, while the live path settles with the
last assistant text — a crash between the child's final reply and the
NodeCompleted publish erased the outcome: a bare {"verdict":"replan"}
checkpoint reply lost its veto (no pause, no warning) and gated dependents
resolved no fields. Recovery now mirrors the live path via an injected
last-assistant-text reader; an explicitly unparseable workflow row (null) fails
the node loudly instead of undefined-completing past settleCapturedOutput.
Closes#345
@LeXwDeX
LeXwDeX merged commit 4fdddf7 into devAug 19, 2026
6 checks passed
@LeXwDeX
LeXwDeX deleted the feat/345-issue345 branch August 19, 2026 05:03
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@LeXwDeX