Repository navigation
Description
Problem
In the 24 hours to 2026-11-18, 5 of 20 graded stage runs failed with class parser (StructuredOutputValidationError). Three of them come from the schema of the plan reply, not from a bad plan:
- feat(research): ask mode reads the index before the web #3915, feat(research): resolve a pinned action commit to its release #4012:
pull_request_body (string_too_long): String should have at most 800 characters(BODY_MAX_CHARSinsrc/devops_cli/roadmap/stage/stage_change.py). After 4 returns to the model, feat(research): resolve a pinned action commit to its release #4012 still failed. The owner rule of 2026-11-17 forbids "hard character caps that will cause jobs to fail or miss context". - feat(roadmap): post quality gate evidence on delivery PR #4129:
security (string_type): Input should be a valid string. The model gave a value that is not a string for a field whose default is the empty string.
The other two (#4075, #4113) come from the kind rule of #6207 and are tracked on #6214.
Expected behavior
- No length limit in the reply schema fails a stage item. The pull request body still meets the form of
devops pr create(1000 characters before the trailers), but the stage builds it so that a long answer does not stop the job, for example by keeping the full text in the proposal and giving the body a summary that the stage writes or shortens with a later model turn. No text is dropped from the plan. - A missing or null optional text field reads as its default; a value of the wrong type is returned to the model once with the problem, not a job failure on the first read.
- A test shows a reply whose body is over the limit and a reply with
security: null; both stage the item.
Related
- fix(roadmap): Tell the stage planner what counts as source code #6214, fix(roadmap): Give read_issue, fix-plan and fix-checks every comment #6189.
Alternatives check of 2026-11-18: in-use.
The repository already uses this tool.
Tool: pydantic/pydantic (https://github.com/pydantic/pydantic), MIT, last activity 2026-11-18, maintained.
Reason: Searches found no tool for the pull request body summary, but Pydantic, already the project's schema dependency, covers the validation part: dropping max_length and a mode="before" validator map a null optional text to its default.
Covers:
- Schema field without a hard max_length cap
- mode="before" validator maps null to default string
- ValidationError on a wrong-typed value, returned to the model
Lacks:
- No pull request body summary or shortening
- No check of the 1000-character pull form limit
- No store of the full plan text in the change folder
Proposed design
Problem statement
The stage job fails with class parser (StructuredOutputValidationError) when a plan reply breaks a schema limit that is not a plan defect. A pull request body over 800 characters fails #3915 and #4012, and a null security field fails #4129. The stage job must stage both replies and keep the full plan text. It writes a pull request body under the devops pr create limit. It reads a null optional text as its default, and it gives a wrong-typed value back to the model once.
Acceptance criteria
Requirement: No maximum length on the pull request body
The stage reply schema SHALL hold no maximum length on the pull_request_body field.
Scenario: A 1200-character body passes validation
- WHEN a test builds a
StageProposalwhosepull_request_bodyholds 1200 characters - THEN constructing the proposal raises no
ValidationError.
Requirement: The body meets the pull form and keeps the plan text
The stage MUST write a pull request body of at most 1000 characters before the trailers.
Scenario: A 1200-character body gives a short body
- WHEN a test renders the pull request body of a change whose
pull_request_bodyholds 1200 characters - THEN the body holds at most 1000 characters before the trailers, and the proposal still holds the full 1200-character text.
Requirement: A null optional text reads as its default
The stage reply schema SHALL read a null optional text field as its default empty string.
Scenario: A null security passes validation
- WHEN a test builds a
StageProposalfrom a reply that holdssecurity: null - THEN the proposal holds
security == ""and raises noValidationError.
Requirement: A wrong-typed value returns to the model once
The stage job MUST give a reply with a wrong-typed optional text back to the model once with the problem.
Scenario: A wrong-typed security is retried
- WHEN a test gives a reply with
security: 123to the stage reply reader - THEN the reply read gives a
parserfailure whose message namessecurityand that the job retries once.
Requirement: A test covers a long body and a null security
The change MUST add a test that stages a reply with a long pull request body and a reply with security: null.
Scenario: Both replies stage in the test
- WHEN
uv run pytest tests/roadmap/stage/test_roadmap_stage_constants.pyruns - THEN the test parses the reply with a 1200-character body and the reply with
security: null, builds their pull request body, and passes.
Existing Tool Considered
Pydantic (https://github.com/pydantic/pydantic, MIT, maintained, last activity 2026-11-18). The alternates check in the issue body gives the verdict in-use: the repository already uses the tool. That block lists what the tool covers and lacks. The stage uses Pydantic for the schema change and for the ValidationError that it gives back to the model. The tool lacks the pull request body summary, the check of the 1000-character pull form limit and the store of the full plan text. The stage builds those parts. Cost to build, keep and fix that code: about 1k tokens and about 1 hour.
Key questions
- Should the reply schema keep the 800-character cap on
pull_request_body?: No. The stage drops the cap from the schema and keeps the full text in the proposal. It writes a body of at most 1000 characters before the trailers. (best practice) [sources: src/devops_cli/roadmap/stage/stage_change.py:130, src/devops_cli/roadmap/pull_form.py:57]- Rejected: Keep the 800-character cap. It fails a stage item on a plan that is not bad, and the owner rule of 2026-11-17 forbids a hard character cap.
- Chosen: Drop the cap and limit the body. The body stays under the pull form limit, and no plan text is lost.
- How does the stage keep the pull request body under the pull form limit without dropping plan text?: The stage keeps the full text in the proposal. The body render writes a body of at most 1000 characters before the trailers. (best practice) [sources: src/devops_cli/roadmap/pull_form.py, src/devops_cli/roadmap/stage/stage_change.py]
- Rejected: Truncate the body. It drops text from the plan, which the issue forbids.
- Rejected: Raise the
devops pr createlimit. The limit is the form of the command, not a stage setting. - Chosen: Keep the full text and limit the body. The body meets the pull form, and the proposal keeps every word.
- How does the schema read a null optional text and a wrong-typed value?: A
field_validator(mode="before")maps a null optional text to the empty string. A wrong type still fails validation, and the stage gives the problem to the model once. (best practice) [sources: src/devops_cli/roadmap/stage/stage_change.py]- Chosen:
field_validator(mode="before")maps null. It runs before type coercion, and the tool documents the mode. - Rejected:
Optional[str] = None. The render code expects a string, so a null reaches the change files. - Rejected: Catch the error and stop the item. The issue asks for one return to the model, not a stop.
- Chosen:
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 18, 2026
Five of twenty graded stage runs failed with StructuredOutputValidationError, which is a service job failure.Both address a text-length limit in the roadmap stage that blocks a job, but #3486 covers item titles over 60 chars while the candidate covers the reply body over 800 chars and a type-validation failure.devops-cli-service commentedon Nov 18, 2026
Waiting for the alternatives check to run. The next refine round looks at the item again after the check records a verdict.
devops-cli-service commentedon Nov 18, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (8)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Nov 18, 2026
Status set to Ready at f771237 (see proposed design in issue body).
fix(roadmap): Tell the stage planner what counts as source code (#6335)
docs(openspec): plan #6319 stage reply schema limits
devops-cli-service commentedon Nov 19, 2026
Released in v0.179.5: https://github.com/dan-petty/devops-cli/releases/tag/v0.179.5
devops-cli-service commentedon Nov 19, 2026
Live since 2026-11-19 11:42 UTC