Skip to content

docs: Document propose-time slice DAG validation [doc-updater] - #3223

Merged
jwbron merged 1 commit into
mainfrom
egg/doc-update-slice-dag-propose-validation
Jun 15, 2026
Merged

jwbron merged 1 commit into
mainfrom
egg/doc-update-slice-dag-propose-validation

Conversation

@james-in-a-box

Copy link
Copy Markdown
Contributor

Update docs/architecture/slice-dag.md to reflect propose-time DAG validation added in #3211 (#3215).

Previously, validate_forest and validate_slice_file_overlap were documented as running only at populate-time (_populate_contract_from_plan), ~24 minutes after consensus. PR #3211 added both validators to _validate_plan_extensions so they now also run at propose-time while the architect is still alive in BRC — violations are NACKed immediately rather than surfacing post-consensus.

Changes:

Triggered by: 440284e "Validate slice DAG is a forest at plan propose time (#3211) (#3215)"

Authored-by: egg

@egg-reviewer egg-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No agent-mode design concerns. This is a documentation-only change to docs/architecture/slice-dag.md describing propose-time vs. populate-time DAG validation — no agent prompts, output formats, pre-fetching, model identifiers, or LLM call paths are touched.

— Authored by egg

@james-in-a-box

This comment has been minimized.

@egg-reviewer egg-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve. Documentation-only change; every factual claim verified against the live code.

Verification

I traced each assertion in docs/architecture/slice-dag.md to the source:

  • Propose-time validation exists and matches the prose. _validate_plan_extensions (orchestrator/routes/signals.py:1159-1211) imports and runs both validate_forest and validate_slice_file_overlap, with validate_forest checked first ("checked right after validate_forest passes" — accurate, lines 1172-1173). Violations raise ValueError (lines 1186, 1200).
  • "The BRC propose handler returns a structured NACK" is correct. The propose handler calls _validate_producer_artifacts → _validate_plan_extensions before handle_propose (so the tracker isn't mutated on a rejected proposal, signals.py:2050-2064), and the enclosing except (ValueError, Exception) returns a 400 error response on ValueError (signals.py:2185-2192). The proposal is rejected and the producer re-emits before consensus — exactly as documented.
  • Populate-time behavior is described accurately and unchanged. _populate_contract_from_plan (orchestrator/routes/pipelines.py:21015-21103) stashes structured errors on Contract.plan_review_feedback, leaves contract.slices empty, and raises ForestValidationError — with reason="slice_overlap_violation" for the overlap case (line 21099-21103).
  • Safe-wrapper mapping to PopulateOutcome.SLICE_OVERLAP_VIOLATION is real (pipelines.py:19971), distinct from FOREST_VIOLATION.
  • Triggering commit 440284e "Validate slice DAG is a forest at plan propose time (#3211) (#3215)" exists in history.

Notes

  • The "two points … cannot diverge" framing is consistent with the in-code rationale comment at signals.py:1166-1167 ("Reusing the populator's exact validators means the propose-time check and the populate check cannot diverge").
  • The routes/signals.py path reference is correct as of HEAD. Note orchestrator/CLAUDE.md flags signals.py for decomposition under #2261 slice-4 — when that lands, _validate_plan_extensions may move to a package-private submodule and this doc reference will need a follow-up. Non-blocking; the barrel path is stated as the stable public reference and slice-4 has not landed.

No blocking issues. The doc correctly reflects the post-#3211 dual-validation behavior.

— Authored by egg

@james-in-a-box

Copy link
Copy Markdown
Contributor Author

egg review completed. View run logs

1 previous review(s) hidden.

@jwbron
jwbron merged commit 7a43a8a into main Jun 15, 2026
31 checks passed
Sign up for free to 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