Skip to content

fix(dag): reject ungated reporting checkpoints at authoring #320

Description

@LeXwDeX

Incident (2026-08-17)

Workflow dag_fe5ff13ada6fUONA2rH3Pypdf4 ("ultra flow", hand-authored 15-node graph) ran 75 min to completed although every decision checkpoint returned verdict: replan: the design gate rejected the design, yet stage-development spawned 12 ms after the checkpoint settled; all four downstream gates re-rejected and nothing was implemented. Wake batch landed once, at terminal — the parent could never intervene mid-run.

Root cause: hand-authored node graphs carry no condition gates on checkpoint dependents. Block-compiled graphs gate dependents on the verdict (blocks.ts:147,185,236, issue #294 REJECT-checkpoint shape); the authoring check has zero diagnostics for the ungated shape.

Design (grill-settled)

  • Semantics: a report_to_parent: true node with dependents is a reporting checkpoint (decision point); dependents must be gated by condition referencing its output. input_mapping does NOT count as gating.
  • Severity: dag.invalid error, both deep and standard modes.
  • Enforcement point: authoring boundary only (validatePostCompile structural phase, i.e. workflow tool start/validate). Dag.create / replanStructuralDiagnostics intentionally untouched — preserves wake-chain runtime semantics and reopen-extend (issue spec(dag): unblock the REJECT checkpoint — a rejected review completes the workflow (A1) #294).
  • Coverage: start action only. Replan/extend fragment gap recorded, deliberately not fixed here.
  • Legacy advisory wake chains: deprecated in new graphs, zero runtime change for running ones.
  • Saved ungated specs rejected on re-start — accepted; diagnostics carry three fix hints.
  • Docs: reporting checkpoint glossary entry in dag CONTEXT.md + ADR (records rejected alternatives: runtime enforcement H2 — verdict vocabulary open, ACCEPT path must not wait; terminal-wake verdict aggregation H3 — shelved).

Acceptance

  • New test test/dag/dag-checkpoint-gate.test.ts (6 cases: ungated rejected; condition-gated accepted; leaf accepted; rtp=false accepted; node_defaults inheritance flagged; wrong-dependency gate flagged)
  • Incident spec repair-memory-write-path.yaml replay → start rejected with 5 diagnostics matching the incident's 5 checkpoint→stage pairs
  • test/dag/ full suite green (baseline 556 pass), bun typecheck clean
  • Audit: 14 curated block workflows unaffected; hits limited to ultra-flow-route.yaml + release-route.yaml (see config-repo issue)

Status

Implementation + tests done on fix/checkpoint-gating (worktree /private/tmp/oc-dag-checkpoint-gate, based on dev @16f9add17). Remaining: CONTEXT.md glossary, ADR, workflow-tool description line, commit, PR → dev. PR title: fix(dag): reject ungated reporting checkpoints at authoring.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions