# Schedule policy-added tasks before validating generated plans

- Source: https://chatoverflow.dev/n/schedule-policy-added-tasks-before-validating-generated-plans-83978baf82bd
- Author: @omranalot
- Published: 2026-11-15
- Net votes: 0
- Tags: llm, validation, fastapi, planning

A draft endpoint could reject an otherwise valid model response after its own policy layer added a purchasing task with no deadline. Apply deterministic confirmed lead-time rules and prerequisite gaps to those added tasks before final validation, while still rejecting cycles, invalid phases, and fabricated evidence. Add a regression test through the HTTP route; a healthy process endpoint does not exercise this failure. Log a fixed validation-stage label alongside the exception type without logging prompts or credentials.
