docs: expand task_planner propose-time validation [doc-updater] - #3030
Conversation
There was a problem hiding this comment.
Approve. Doc-only update that accurately tracks the behavior consolidated in #3028.
Verified each factual claim against orchestrator/routes/signals.py::_validate_plan_proposal (lines 953-1176):
- "all in a single
git show" — Confirmed: onesubprocess.run(["git", …, "show", …])at signals.py:1066-1072, thenparse_planruns on the captured stdout andvalidate_task_role_alignmenton the parsed slices. No second read. - Canonical path
.egg-state/drafts/{id}-plan.md— Confirmed:_get_draft_path("plan", …)inroutes/pipelines.py:5166returnsf".egg-state/drafts/{prefix}-{filename}"with_draft_filename("plan") == "plan.md". The{id}placeholder correctly stands in for the issue-number-or-pipeline-id prefix from_pipeline_identifier. - Presence (#3016), Parseability (#3026), Role↔files (#2527) — All three issue references match the implementation's own docstring (signals.py:962, 968, 972, 989). Order matches the runtime check order.
- "rejects with HTTP 400 before the proposal reaches reviewers" — Confirmed:
_validate_plan_proposalraisesValueError, and the caller inhandle_consensus_propose_signalmaps that to a 400 beforehandle_proposerecords the proposal (signals.py:994-996). - Parseability rationale (
populate_contract~40 min later) — Matches #3028's PR description and the implementation docstring. validate_task_role_alignment(slices)— Confirmed atshared/egg_contracts/plan_parser.py:1694. The actual signature has an optionalrepoarg, but the manual-use form in the doc is correct as written.- Graceful-skip cases — All three named (no commit SHA,
branch_verified is None, plan path unresolved) match signals.py:1022-1057.
Non-blocking observations
- Graceful-skip enumeration is partial. The doc lists 3 skip scenarios; the implementation silently returns from more cases —
StateStoreErroron pipeline load (1036-1037), missingpipeline_state.branch(1039),ImportErrorfor_get_draft_path/parse_plan(1046-1050, 1101-1102),git showraising (1073-1080),parse_planraising (1106-1113),to_contract_slicesraising (1140-1147), andvalidate_task_role_alignmentraising (1158-1164). The phrase "infra transients don't produce false rejections" captures the design intent, but a parser orto_contract_slicesraise is arguably not infra — it's a code bug being swallowed. Optional: tighten the wording to either "various infra and library-call failures" or list a representative-but-not-exhaustive set explicitly. Not blocking for a doc PR. - "~40 minutes later" is a soft estimate. Lifted from #3028's analysis; depends on phase durations. Fine as a colorful indication of cost; consider "much later in the pipeline" if you ever want to be tense-proof.
- Parseability framing. "the draft parses via the same
parse_plan… — i.e., it contains a machine-readable# yaml-tasksappendix."parse_plandoes more than appendix-presence (YAML parse, schema validation, role enum), but the missing-fence case is the dominant failure mode #3026 targets, so the framing is reasonable.
CI is green (lint, unit, integration, security). No code changed; no test plan needed beyond the doc-only assertion.
— Authored by egg
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
- Broaden parseability framing to mention parse_plan also catches YAML syntax errors and schema violations (missing fence remains dominant). - Replace soft '~40 minutes later' estimate with 'much later in the pipeline' so the doc isn't tense-coupled to current phase durations. - Generalize the graceful-skip enumeration: clarify the list is representative not exhaustive, and include the git-show / parse_plan / to_contract_slices / validate_task_role_alignment raise cases the implementation also swallows. Reframes intent as 'fail open on any non-determinable result' rather than 'three specific infra transients'. Doc-only; addresses non-blocking observations on PR #3030.
|
Thanks for the careful review — all three observations were fair, so I folded them into the wording in 4b51b40. Per-item disposition
Doc-only; CI should reproduce the prior green. — Authored by egg |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Approve. All three non-blocking observations from the prior review (at ef8ce11) were addressed cleanly in 4b51b40. Re-verified each change against orchestrator/routes/signals.py::_validate_plan_proposal (lines 953-1175).
Per-item verification of the delta
-
Parseability framing rewrite (
docs/reference/agent-roles.md:488) — Leads with the dominant failure mode (missing# yaml-tasksfence) and parenthetically acknowledgesparse_planalso catches YAML syntax errors and schema violations on the appendix. The propose-time gate isif not parsed.success(signals.py:1122), which fires for all three sub-cases; the implementation docstring (signals.py:972-988) supports the framing. Accurate. -
"much later in the pipeline" (line 488) — Drops the soft
~40 minestimate without weakening the substantive claim about cost landing onpopulate_contract. Tense-proof and still captures why catching at propose-time is the cheap option. -
Graceful-skip enumeration broadened (line 491) — Verified each newly named case against the implementation:
git showraises → signals.py:1073-1080parse_planraises → 1106-1113to_contract_slicesraises → 1140-1147validate_task_role_alignmentraises → 1157-1164- Plus the original three (no commit SHA → 1023;
branch_verified is None→ 1030-1031; plan path unresolved → 1056-1057).
The "list is not exhaustive" qualifier is honest — the implementation also silently skips on
StateStoreError(1036-1037), missingpipeline_state.branch(1039), andImportErroron the lazy_get_draft_path/parse_planimports (1046-1050, 1101-1102), and the new framing ("any non-determinable result yields a skip") captures the design intent more accurately than the prior "three specific infra transients" did. Absorbs the "parser raise is arguably a code bug, not infra" objection without re-litigating each case.
Scope check
Delta is exactly one file (docs/reference/agent-roles.md, +2/-2 lines per gh api compare). No code paths touched; CI is the standard doc-PR gate (lint). The three numbered checks, the canonical path .egg-state/drafts/{id}-plan.md, the git show consolidation, the HTTP 400 mapping, and the validate_task_role_alignment(slices) manual-use form remain accurate from the prior review.
No further suggestions.
— Authored by egg
|
egg review completed. View run logs 3 previous review(s) hidden. |
Update
docs/reference/agent-roles.mdto reflect all three checks now running atCONSENSUS_PROPOSEtime fortask_plannerproposals.Triggered by: fix(orchestrator): consolidate plan propose-time validation, catch missing yaml-tasks (#3026) (#3028)
Previously the Validation section only documented the role↔file alignment check (#2527). The commit consolidated
_validate_producer_draft_present("plan", ...)and_validate_planner_role_alignmentinto a single_validate_plan_proposalfunction and added a new parseability check (#3026): a plan draft that omits the# yaml-tasksappendix now causes a 400 at propose-time instead of failingpopulate_contract~40 minutes later. The doc now lists all three checks (presence, parseability, role alignment) with their issue references and explains the graceful-degradation behavior.Issue: none
Test Plan
Authored-by: egg