Skip to content

fix(roadmap): refine readies a title with an invalid type #4508

Closed
1 of 1 issue completed
Closed

Description

@dan-petty

Problem Description

A Ready item whose title has a type outside CONST_BRANCH_TYPES waits for ever. No job takes it, and no job corrects or refuses the title. Three P1 or P2 items in the managed repositories wait this way: dotfiles #1, homelab #1 and homelab #2. Each has a title of the form security(<scope>): ... and the label type/security.

The cause (origin/main 0ac2f76):

  • CONST_BRANCH_TYPES (src/devops_cli/config/constants.py:718) has no security type. The types are those of release-please-config.json.
  • _Judge._title (src/devops_cli/roadmap/stage/stage.py:549) leaves the item out: commit_type(item.title) is None, so the reason is "The title has no Conventional Commit type". The implement job then says "neither Staged nor Planned".
  • The retitle job reads only titles that have a valid type (long_title_items, src/devops_cli/roadmap/retitle.py:210), so it does not touch these titles. The summary of dotfiles Release v0.1.8 #1 is also longer than 60 characters, and retitle does not shorten it.
  • Intake returns early from refuse_long_summary when the title has no valid type (src/devops_cli/roadmap/intake/intake.py:226).
  • Refine sets Status Ready with no check of the title type.

So refine marks the item Ready, but stage can never take it. The reason shows only in devops roadmap explain. The Service logs no left-out reason, and the stage metric counts the item as skipped with no reason.

Reproduction Steps

  1. Clone dan-petty/dotfiles and run uv run devops roadmap explain 1 for it.
  2. See "Stage job: no. The title has no Conventional Commit type, so the branch has no type."
  3. Run commit_type("security(ssh): verify node host keys") from devops_cli. It returns None.

Expected vs Actual Behavior

Expected: a title with a type outside CONST_BRANCH_TYPES does not reach Ready. Refine or retitle corrects it, for example security(zsh): ... to fix(security): ... (the urgent-fix rule reads scope/security, #2768), and shortens a long summary. Or refine refuses Ready and states the reason in a comment that a person can act on.

Actual: the items stay Ready and no job takes them.

48-hour data (2026-11-08T23:45Z to 2026-11-10T23:45Z):

  • devops_cli_roadmap_stage_total{repo!="dan-petty/devops-cli"} has 72 samples for each of dotfiles and homelab, all result="skipped", about one round every 40 minutes.
  • increase(devops_cli_service_implement_jobs_total[48h]) is 0 for these repositories.
  • 0 bot comments and 0 bot pull requests in these repositories in the window.
  • Still occurring: the last skipped sample is at about 03:16Z on 2026-11-11.

Items: dotfiles #1 (P1-High, filed 2026-10-09), homelab #1 (P1-High), homelab #2 (P2-Medium).

Environment Diagnostics

  • DevOps CLI Version: 0.110.0 (the live roadmap-service pod)
  • Python Version: 3.14
  • OS & Architecture: Linux x86_64
  • Execution Environment: Roadmap Service (refine and stage rows for the managed repositories)

Logs, Traces, or Terminal Output

# Prometheus
count_over_time(devops_cli_roadmap_stage_total{repo!="dan-petty/devops-cli"}[48h])

# uv run devops roadmap explain 1   (dan-petty/dotfiles)
Refine job: no. The item is Ready. ...
Stage job: no. The title has no Conventional Commit type, so the branch has no type.
Implement job: no. It is neither Staged nor Planned: its record holds no staged branch or pull request, and main holds no change folder for it.

Related: #2768 (scope/security, not type/security), #3387 (other idle items in these repositories).

Pre-Submission Checklist

  • I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
  • I have checked existing issues and pull requests to ensure this is not a duplicate.

Proposed design

Problem statement

A Ready item with a title type outside CONST_BRANCH_TYPES waits for ever. Stage leaves it out, retitle ignores it, and refine sets it Ready. The fix makes refine refuse Ready, makes retitle correct the title, and records the stage reason.

Acceptance criteria

Requirement: Refine refuses an invalid title type

The refine job SHALL NOT set Status Ready on an item whose title type is not in CONST_BRANCH_TYPES.

Scenario: Refine sees a security title

  • WHEN The refine job evaluates an item with title security(ssh): verify node host keys.
  • THEN The job leaves the Status New and records the reason invalid-title-type.

Requirement: Refine comments the refusal

The refine job MUST post one comment that names the invalid type and the expected form when it refuses Ready.

Scenario: The refusal comment names the fix

  • WHEN The refine job refuses an item because its title type is security.
  • THEN The comment says the type must be one of CONST_BRANCH_TYPES and shows fix(security): <summary>.

Requirement: Retitle selects an invalid title type

The retitle job SHALL select an open item whose title type is not in CONST_BRANCH_TYPES.

Scenario: Retitle selects a security title

  • WHEN The retitle job plans a round over an open item with title security(ssh): verify node host keys.
  • THEN The plan includes the item even when its summary is 60 characters or fewer.

Requirement: Retitle corrects a security title

The retitle job MUST rewrite a title of the form security(<scope>): <summary> to fix(security): <summary>.

Scenario: Retitle corrects a security scope

  • WHEN The retitle job applies a plan to security(ssh): verify node host keys.
  • THEN The item title becomes fix(security): verify node host keys.

Requirement: Retitle shortens a long invalid title

The retitle job SHALL shorten a summary over SUMMARY_MAX_CHARS when it corrects an invalid title type.

Scenario: Retitle shortens a long security title

  • WHEN The retitle job corrects security(ssh): verify the node host keys on every managed host and the summary is over 60 characters.
  • THEN The new title is fix(security): <summary> and its summary has at most 60 characters.

Requirement: Retitle leaves no invalid title type

The retitle job MUST apply a title whose type is in CONST_BRANCH_TYPES to every item it selects.

Scenario: Retitle corrects an unknown type

  • WHEN The retitle job selects an item with title foo(bar): do work and foo is not in CONST_BRANCH_TYPES.
  • THEN The applied title has a type in CONST_BRANCH_TYPES.

Requirement: Stage records the left-out reason

The stage job MUST record the reason it leaves out an item in its log.

Scenario: Stage leaves out an invalid title

  • WHEN The stage job leaves out a Ready item because its title type is not in CONST_BRANCH_TYPES.
  • THEN The log line carries the reason invalid-title-type.

Requirement: One branch type list

The refine and retitle jobs SHALL use CONST_BRANCH_TYPES as the single list of valid title types.

Scenario: The branch type list changes

  • WHEN A type is added to CONST_BRANCH_TYPES.
  • THEN Both refine and retitle accept a title with that type and no code change is needed.

Existing Tool Considered

No alternatives check has run. No external tool covers the need. The valid types must equal the sections of release-please-config.json. commit_type in src/devops_cli/roadmap/commit_title.py and CONST_BRANCH_TYPES in src/devops_cli/config/constants.py already parse the title. The change adds a guard and a correction map of about 50 lines and 8 tests. It costs about 10,000 tokens to build, 1,000 tokens a month to keep, and 1 day.

Key questions

  • Should refine refuse Ready or rewrite the title when the title type is not in CONST_BRANCH_TYPES?: Refuse Ready and post one comment with the reason and the expected form. Do not rewrite the title in refine. (best practice) [sources: CONTEXT.md, src/devops_cli/roadmap/stage/stage.py:549, src/devops_cli/roadmap/retitle.py:210]
    • Chosen: Refuse Ready and comment. Refine answers questions. A title rewrite is a separate deterministic job. The comment gives a person the exact fix.
    • Rejected: Rewrite the title in refine. Refine is model-driven and may invent a type. Retitle owns title changes.
    • Rejected: Leave the item Ready. Stage skips the item for ever and no job acts.
  • Should the retitle job select and correct a title whose type is not in CONST_BRANCH_TYPES?: Yes. Extend long_title_items to select invalid-type titles, and add a deterministic correction for the security type. (best practice) [sources: src/devops_cli/roadmap/retitle.py:210, CONTEXT.md]
    • Chosen: Extend retitle. Retitle owns title changes and runs before stage, so it can fix existing Ready items.
    • Rejected: Add a new job. A new row adds schedule and code. Retitle already has the selection and the apply path.
    • Rejected: Fix only in refine. Existing Ready items never run refine again.
  • What is the correction for a title whose type is security?: Rewrite security(<scope>): <summary> to fix(security): <summary>. (best practice) [sources: release-please-config.json, src/devops_cli/config/constants.py:718]
    • Chosen: fix(security). fix is in CONST_BRANCH_TYPES. Release-please shows it in the changelog. The urgent-fix rule reads scope/security.
    • Rejected: Add security to CONST_BRANCH_TYPES. CONST_BRANCH_TYPES must equal release-please-config.json, which has no security section.
    • Rejected: chore(security). It hides the changelog line and does not match the urgent-fix rule.
  • Should the stage job record the reason it leaves out an item with an invalid title type?: Yes. Add the reason to the stage log so the next incident is diagnosable. (best practice) [sources: src/devops_cli/roadmap/stage/stage.py:549, src/devops_cli/server/counter_series.py]
    • Chosen: Record the reason. The Service logs no left-out reason. A reason makes the next incident diagnosable.
    • Rejected: Leave it to devops roadmap explain. The Service operator does not run the CLI for every skipped item.
  • Should intake refuse a long summary when the title type is invalid?: No. Retitle corrects the invalid type and shortens the summary. Intake keeps its early return. (best practice) [sources: src/devops_cli/roadmap/intake/intake.py:226, src/devops_cli/roadmap/retitle.py:210]
    • Chosen: Keep the early return. Retitle handles the invalid type and the long summary. Intake would block a candidate that retitle can fix.
    • Rejected: Refuse the long summary. It blocks the candidate before retitle can correct the type.
  • Should the stage metric carry the left-out reason?: No. The stage log carries the reason. The metric keeps its result label to avoid a schema change. (best practice) [sources: src/devops_cli/server/counter_series.py, src/devops_cli/roadmap/stage/stage.py:549]
    • Chosen: Log only. A log line answers the diagnosis. A new metric label changes the schema and the dashboards.
    • Rejected: Add a reason label to the metric. It changes the metric schema and the dashboards for one diagnostic.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Sub-issues

Sub-issues

1 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/high
    effort/medium
    on Nov 11, 2026
  2. dan-petty commented on Nov 11, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The fix prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P1-High. Three P1 or P2 items are stuck in Ready with no job to act on them.
    • Value: High. Blocks delivery of P1 items in managed repositories indefinitely.
    • Effort: Medium. Requires changes to refine or retitle logic and possibly CONST_BRANCH_TYPES, plus a user-facing reason message.
    • Related: fix(roadmap): stop a delivery title that the check refuses #3368, which asks for a different change. Both concern the stage job refusing items by title type, but #3368 fixes the implement job to check before pushing, while this candidate fixes refine or retitle to correct or refuse an invalid type before Ready.
  3. added
    priority/p1-high
    on Nov 11, 2026
  4. added
    status/ready
    and removed
    status/new
    on Nov 11, 2026
  5. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at 453aed0 (see proposed design in issue body).

  6. added
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/ready
    status/in-progress
    on Nov 11, 2026
  7. dan-petty commented on Nov 11, 2026

    @dan-petty
    OwnerAuthor

    PR #4532 delivers this item. Three acceptance criteria are not built as written. The evidence is also in the ## Feasibility section of the proposal (openspec/changes/archive/2026-11-11-4508-refine-readies-a-title-with-an/proposal.md).

    Built as written: "Refine refuses an invalid title type" (refine does not refine the item, also with --item, makes no model call, keeps the Status, and gives the reason invalid-title-type in its report and in devops roadmap explain), "Retitle selects an invalid title type", "Retitle corrects a security title", "Retitle shortens a long invalid title", and "One branch type list". The key question on intake is built as chosen: intake keeps the early return.

    Not built as written:

    1. "Retitle leaves no invalid title type" (foo(bar): do work gets a listed type). This cannot be built as written. The requirement "A person's edit is kept" of roadmap-retitle says that the job MUST NOT change a title that a person changed after the last job comment. The job knows that only after it selects the item. Also, no rule gives a listed type for an unknown type: the label type/infra comes from perf, build and ci (CONST_ROADMAP_COMMIT_TYPE_LABELS), and this item rejects a type that a model chooses ("Refine is model-driven and may invent a type"). So the retitle job comments once with the type and the types, a person edits the title, and refine does not set the item Ready until then.
    2. "Refine comments the refusal". The retitle job writes this comment. In each Service round the retitle row runs after the refine row (MODEL_LANE_ROWS in src/devops_cli/roadmap/run.py) and selects each open item with an unlisted type. Its one comment names the type, the types and fix(security): <summary>. A refine comment would be a second comment on the same cause in the same round.
    3. "Stage records the left-out reason". fix(roadmap): stage metric and log give no left-out reason #4521 (PR fix(roadmap): count and log the reason of a left-out stage item #4541, merged) added the reason of each left-out rule to the log line and the metric of the stage job, with the kind title_type for this rule, not invalid-title-type. PR fix(roadmap): retitle corrects a title type that is not listed #4532 does not build it a second time. The text of that reason now names the unlisted type.
  8. removed
    status/in-review
    owner/agent
    on Nov 11, 2026
  9. dan-petty commented on Nov 11, 2026

    @dan-petty
    OwnerAuthor

    Correction to the feasibility comment above (issuecomment-6794573340): the retitle row does not run in the same Service round as refine. It is due every 61 minutes (DEFAULT_ROADMAP_RETITLE_INTERVAL_MINUTES in src/devops_cli/config/defaults.py), and refine is due every 17 minutes. The conclusion stays the same: one retitle comment arrives within 61 minutes, so a refine comment would repeat it. Found in the adversarial check of #4532.

  10. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-11 14:13 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p1-highscope/roadmapsource/agenttype/bugvalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions