Skip to content

Non-forest slice DAG passes BRC plan consensus, only rejected at post-consensus contract population (forest_violation) — validate at propose time #3211

Closed

Description

@jwbron

Summary

On pipeline issue-3200 the plan phase reached full BRC consensus (all 4 agents CONFIRMED, phase.completed fired), and then contract population failed:

Plan ingestion REJECTED: the slice DAG is not a forest. Slice 'slice-5' has 2 DAG parents (['slice-2','slice-4']); the implement-phase slice DAG must be a forest (≤1 parent per slice). Serialise the upstream cluster into a chain and record the chosen order on this slice's serialized_chain_order field — see issue #2137 plan TASK-2-3 for the auto-serialization rule.

contract.slices ended up empty → pipeline failed → operator HITL (decision-3).

Root cause / the gap

The plan producer emitted a legitimately diamond-shaped DAG:

slice 1 (restart fix)        depends_on: -
slice 2 (session resume)     depends_on: 1
slice 3 (deterministic seed) depends_on: 1
slice 4 (enrichment)         depends_on: 3
slice 5 (integration)        depends_on: 2,4   ← two parents = not a forest

slice-5 (integration: resume vs seed mutual exclusion) naturally needs both the resume path and the seed/enrichment path. The implement phase ships each slice as a stacked PR off exactly one base, so the slice DAG must be a forest. There is already an auto-serialization mechanism for this (serialized_chain_order, per #2137 plan TASK-2-3) — but:

  1. The planner didn't apply it — it emitted the raw multi-parent DAG. (Is the forest constraint + serialized_chain_order rule actually in the planner's prompt/instructions?)
  2. There is no forest validation at propose/plan time — so the invalid DAG sailed through the entire BRC plan phase, all reviewer confirmations, and only blew up at post-consensus contract population. ~24 min of plan work + 4 agents' confirmations wasted before the failure surfaced.

This is the same 'validate too late' anti-pattern #3016 fixed for canonical draft paths (moved the check to propose time, producer still alive to fix it).

Asks

  • Validate the slice DAG is a forest at propose time (in the plan-phase propose validator, alongside the existing checks), rejecting a non-forest proposal with the serialized_chain_order guidance so the producer re-emits while still in BRC — not a phase later.
  • Ensure the planner is actually prompted with the forest constraint and the serialized_chain_order auto-serialization rule (Independent implement phases #2137) so it produces a forest by construction.

Evidence

Pipeline issue-3200, plan phase, 2026-06-15. contract.plan_review_feedback quoted above.

Refs

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

    agent:orchestratorbugp1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions