Repository navigation
Closed
Labels
Milestone
Description
Friction
- On 2026-10-18 a person ran
devops roadmap intake --title ... --body-file ... --confirmover a queue of 23 drafts. Two drafts whose titles startperf(were dropped: "skipped, nothing written: the model's proposal is not valid: type 'type/perf' is not one of type/feature, type/bug, type/security, type/refactor, type/docs, type/infra, type/test, type/chore". Neither was filed, borrowed or folded, and nothing names an item to add it to. - Both runs exited 0, so the loop's
exit=0read as success. The candidate is lost unless a person reads every run's text. - In the same run, another
perf(ci)draft was filed astype/infra(perf(ci): the structural-invariants hook runs the stdlib metric once per commit, with no uv sync #1667). So the model maps the Conventional Commit prefix to a type only some of the time, and one bad answer drops a valid candidate. - An earlier queue run the same day left 12 of 48 drafts unfiled with no trace on GitHub. A skip that exits 0 is one way that can happen unseen.
Evidence
Checked at release/v0.2.37 66ff3d6.
ModelProposal.typeis plain text by design (src/devops_cli/roadmap/intake_model.py:44-60; the module docstring says "code, not the schema, decides which values stand").validate_proposal(src/devops_cli/roadmap/intake.py:844-862) raises_InvalidProposalfor any value off its list._decide(intake.py:1159-1180) catches it and returns_skipped(:1182-1185): nothing is written. The model is never asked again, though one more call with the problem named would usually fix a single off-list value..github/labels.ymldeclares notype/perf, and Conventional Commits'perftype has no label it maps to.- fix(roadmap): refine sends the model the proposal schema and never caches a reply that fails it, and one failed item skips only that item #1363 made
refinesend the model the proposal schema and refuse to cache a reply that fails it; intake has no equivalent retry for a value off its list.
Remedy
- When the proposal names a value off its list, ask the model once more in the same request. Name each invalid field and its allowed values, using the existing
intake_invalid_valuetext. Code stays the judge: the second answer goes throughvalidate_proposalagain, and a second failure skips as today. Use pydantic-ai's output-validator retry (ModelRetry) if the LLM client exposes it; otherwise one extra call throughProposalClient. Do not hand-roll a retry loop around the client. - A run whose
--titlecandidate ends skipped exits non-zero, naming the reason, so a script that files a queue notices. A run over existing candidates keeps exit 0 and lists its skips, as today. - The prompt's type list says which label a Conventional Commit prefix such as
perf,buildorcitakes, from one table inconfig/constants.py. Whether to add atype/perflabel to.github/labels.ymlinstead is the owner's call.
Acceptance criteria
- Tests first, offline, with a fake
ProposalClient:- a first reply with
type/perfand a second withtype/infrafiles the candidate astype/infraafter exactly two calls; - two off-list replies skip the candidate, with both problems in the report;
- an off-list
valueoreffortis retried the same way.
- a first reply with
-
devops roadmap intake --title ... --body-file ... --confirmwhose candidate is skipped exits non-zero; the same skip in a run over existing issues exits 0 and lists it. -
--planand--dry-runkeep their contracts: the retry is one more model call, counted in--plan's spend line, and--dry-runmakes no request.
Proposed design
Problem statement
The intake process fails to handle model proposals that name values not on the allowed list by skipping the candidate entirely without retrying. This causes valid candidates to be lost, especially when the model's first answer contains an invalid type like 'type/perf' which maps to no label in .github/labels.yml, and also exits 0 even when a candidate is skipped, making it hard for automation scripts to detect failures.
Acceptance criteria
- Criterion 1: A proposal with an invalid type field should be retried once with corrective feedback before skipping the candidate.
Verification: Test with a fake ProposalClient that returns 'type/perf' on first call and 'type/infra' on second call; verify that the second call is made and the candidate is filed as 'type/infra'. - Criterion 2: Multiple invalid fields in a proposal should be retried once with all problems listed for correction.
Verification: Test with a fake ProposalClient that returns both 'type/perf' and 'effort/invalid' on first call; verify that both invalid fields are reported and corrected on second call. - Criterion 3: A run whose --title candidate is skipped should exit non-zero to indicate failure.
Verification: Run devops roadmap intake --title ... --body-file ... --confirm with a candidate that will be skipped, and verify the process exits with non-zero code. - Criterion 4: A run over existing candidates that skips items should exit 0 and list the skips.
Verification: Run devops roadmap intake --title ... --body-file ... --confirm over existing issues; verify it exits 0 and lists skipped candidates in output. - Criterion 5: The --plan and --dry-run flags maintain their contracts with retry logic included in the plan spend line.
Verification: Run devops roadmap intake --plan --title ... --body-file ... and verify that a retry is counted in the spend line; run --dry-run and ensure no actual model calls are made.
Key questions
- Does pydantic-ai's output-validator retry (ModelRetry) support retrying proposals with invalid values?: The context indicates that pydantic-ai's output-validator retry is available as
ModelRetryand has been used in other parts of the codebase, but it's not explicitly stated whether it supports retries for invalid field values specifically. [sources: src/devops_cli/roadmap/intake_model.py:109, docs/agent/tasks/task-601-one-verdict-writer-cited-refutations-and-no-unverified-fix-c.md:17] - What is the current behavior when a proposal contains an invalid type value?: When a proposal contains an invalid type,
_decidecatches_InvalidProposaland returns_skipped, meaning nothing is written and the model is never asked again. [sources: src/devops_cli/roadmap/intake.py:1159-1180, src/devops_cli/roadmap/intake.py:1177-1185] - Should the fix implement a retry mechanism using pydantic-ai's ModelRetry or a custom approach?: The remedy section explicitly states to use pydantic-ai's output-validator retry if available, otherwise use one extra call through
ProposalClientand not hand-roll a retry loop. (proposed) - Should the exit code change for skipped candidates?: Yes, a run whose --title candidate ends skipped should exit non-zero, while runs over existing candidates that skip items should keep exiting 0. (proposed)
Fit
Needs splitting into 3 items:
- Implement retry mechanism for invalid proposal values using pydantic-ai's ModelRetry or custom approach
- Update exit codes to distinguish between skipped candidates and skipped existing issues
- Modify intake logic to re-ask model when proposal contains invalid values
Suspected block
None.
Dependencies
None.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Oct 18, 2026
Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.
The candidate describes a problem where the model's proposal is not valid and causes candidates to be dropped, which is a bug in the intake process.The issue causes valid candidates to be lost and exits with 0, making it hard to detect and fix without manual inspection.Fixing this ensures all valid candidates are processed correctly, preventing loss of valuable work.Requires changes to the intake logic to retry model calls and update exit codes, but doesn't involve major architectural changes.dan-petty commentedon Oct 18, 2026
Proposal needs splitting into 3 items at 25e2cda (see proposed design in issue body).
fix(roadmap): intake asks the model again when proposal names value o…
fix(roadmap): intake asks the model again when proposal names value o…
fix(roadmap): intake asks the model again when proposal names value o…
dan-petty commentedon Oct 20, 2026
What changed
#1709, merged into
release/v0.2.37as 9bae4fc.8 file(s) changed.
How it was verified
Check runs at c7b7382:
Acceptance Criteria of
docs/agent/tasks/task-1677-intake-retry-invalid-proposal.md:devops roadmap intake --title ... --confirmexits with code 1 when the candidate is skipped, while existing issue batch runs maintain exit code 0.fix(roadmap): intake's reply schema limits each fixed field to its va…