Skip to content

fix(roadmap): the stage job refuses a summary over the title limit #3369

Closed

Description

@dan-petty

Problem or Motivation

The stage job decides whether an item may be planned. _Judge._title (src/devops_cli/roadmap/stage.py:396) checks the Conventional Commit type and the slug of the issue title. It does not check the length of the summary.

The implement job copies that summary into the delivery title and cuts it to 60 UTF-16 code units, then adds ... (delivery_title at src/devops_cli/roadmap/stage_change.py:743). #3292 fixed the CI failure with that cut. The item still passes the planning gate with a title that the delivery cannot keep whole, so the pull request title differs from the issue title and ends with ....

devops pr create refuses a summary that ends with ... (_summary_problems in src/devops_cli/roadmap/pull_form.py). The Semantic PR title check accepts it. A person sees a cut title that the project's own form would refuse.

Proposed Solution & Architectural Design

  • In _Judge._title, refuse an item whose issue title summary is longer than SUMMARY_MAX_CHARS UTF-16 units, as summary_length counts them. Name the limit and the current length in the reason, as staging_title already does.
  • Add a test with a valid type and a summary of 61 units, and one at the exact bound.
  • Keep the cut in delivery_title as the fallback for an item that was staged before this check or whose title a person edits later.

Issue #3215 plans to refuse a long title instead of cutting it. This check is the planning half of that change and stops the cost before the implement job starts.

Target Subsystem

src/devops_cli/roadmap/stage.py, src/devops_cli/roadmap/stage_change.py, src/devops_cli/lang/en/messages.py, tests/roadmap/test_roadmap_stage.py.

Existing Tool Considered

summary_length in src/devops_cli/roadmap/pull_form.py:42 already counts UTF-16 units. staging_title already raises RoadmapStageError when the plan title is over the limit. The cost is about 10 lines and two tests.

Found while evaluating #3319. Related: #3292, #3215.

Proposed design

Problem statement

The stage job accepts an issue title whose summary is longer than the delivery title can keep. The implement job cuts that summary to 60 UTF-16 code units and adds .... The pull request title then differs from the issue title. devops pr create refuses a summary that ends with .... The change adds the length check to the planning gate and keeps the cut as a fallback.

Acceptance criteria

Requirement: Long summary refused at planning gate

The stage job SHALL refuse an item whose issue title has a valid Conventional Commit type and a summary longer than SUMMARY_MAX_CHARS UTF-16 code units, as summary_length counts them.

Scenario: Summary of 61 UTF-16 units is refused

  • WHEN a Ready item has a valid Conventional Commit type and a title summary of 61 UTF-16 code units
  • THEN the stage job leaves the item out and its reason names the current length and the limit of 60

Requirement: Summary at the exact limit is accepted

The stage job SHALL accept an item whose issue title has a valid Conventional Commit type and a summary of exactly SUMMARY_MAX_CHARS UTF-16 code units.

Scenario: Summary of 60 UTF-16 units passes the title check

  • WHEN a Ready item has a valid Conventional Commit type and a title summary of 60 UTF-16 code units
  • THEN the stage job does not refuse the item for the summary length

Requirement: Delivery title keeps the cut fallback

The implement job SHALL keep the cut in delivery_title for an item whose issue title summary is longer than SUMMARY_MAX_CHARS, so an old staged item still gets a delivery title.

Scenario: Overlong title is cut to 60 units with an ellipsis

  • WHEN delivery_title receives an issue title with a summary longer than 60 UTF-16 code units
  • THEN the delivery title holds the first 60 UTF-16 code units and ends with ...

Existing Tool Considered

No alternatives check has run. No open, maintained tool or library covers this internal roadmap-stage validation, so the project builds the check itself. The body gives a written cost of about 10 lines and two tests. Estimate: about 2,000 tokens and 30 minutes to build, keep and fix the check.

Key questions

  • Which length measure and limit does the stage job use for the issue title summary?: Use SUMMARY_MAX_CHARS and summary_length from src/devops_cli/roadmap/pull_form.py. They count UTF-16 code units as the Semantic PR title check does. stage_change.py already imports them. (best practice) [sources: src/devops_cli/roadmap/pull_form.py, src/devops_cli/roadmap/stage_change.py]
    • Chosen: Use SUMMARY_MAX_CHARS and summary_length. It gives the same limit and count as the pull-request form and the required title check.
    • Rejected: Use len and a new constant. len counts code points, so a summary with an emoji can pass at 61 UTF-16 units.
    • Rejected: Add a second constant in stage.py. Two limits can drift, and pull_form.py is the module that holds the form rules.
  • Where in _Judge._title does the stage job check the summary length?: After the type check and before the slug check. A title with no type keeps its existing reason, and a valid short title still gets the slug check. (best practice) [sources: src/devops_cli/roadmap/stage.py, src/devops_cli/roadmap/stage_change.py]
    • Chosen: After the type check and before the slug check. The type is a prerequisite for the summary, and the slug check remains for a valid short summary.
    • Rejected: Before the type check. A title with no type would report length instead of the missing type.
    • Rejected: Only in staging_title. That checks the plan title after the model runs, so the implement job still starts on an overlong issue title.
  • Which message does the stage job use for a long issue title summary?: Add a stage_left_title_long message in src/devops_cli/lang/en/messages.py. It names the current length and SUMMARY_MAX_CHARS, as stage_title_long does for the plan title. (best practice) [sources: src/devops_cli/lang/en/messages.py, src/devops_cli/roadmap/stage.py]
    • Chosen: Add stage_left_title_long. It matches the other stage_left_title_* reasons and names the issue title limit.
    • Rejected: Reuse stage_title_long. Its text says the summary of the plan does not fit, which is the wrong subject.
  • Should delivery_title keep the cut as a fallback?: Yes. Keep the cut in delivery_title for an item staged before this check or whose title a person edits later. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, src/devops_cli/roadmap/implement_run.py]
    • Chosen: Keep the cut. It protects the implement job from an overlong title that the planning gate did not see.
    • Rejected: Remove the cut. An old staged item or a later title edit would fail at delivery.
  • Which test module holds the new cases for _Judge._title?: Add the two cases to tests/roadmap/test_roadmap_stage_title.py. That module holds the title rules and the staging_title tests. (best practice) [sources: tests/roadmap/test_roadmap_stage_title.py]
    • Chosen: Add to tests/roadmap/test_roadmap_stage_title.py. It holds the title rules and the staging_title tests.
    • Rejected: Add to tests/roadmap/test_roadmap_stage.py. The issue names it, but the listed title tests are in test_roadmap_stage_title.py.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/bug
    scope/roadmap
    on Nov 3, 2026
  2. added
    status/new
    value/medium
    effort/low
    on Nov 3, 2026
  3. devops-cli-service commented on Nov 3, 2026

    @devops-cli-service
    Contributor

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

    • Priority: P2-Medium. It prevents a confusing state where the PR title differs from the issue title, but it does not block delivery.
    • Value: Medium. It stops items with over-long titles from entering the implement phase, reducing rework and user confusion.
    • Effort: Low. The candidate states the cost is about 10 lines and two tests.
    • Related: feat(roadmap): the jobs build pull request text with pull_form #3215, which asks for a different change. Both make the roadmap jobs enforce the title length rule; #3215 is the umbrella that switches jobs to pull_form, while the candidate adds the specific planning-gate check in _Judge._title.
  4. added
    priority/p2-medium
    status/ready
    and removed
    status/new
    on Nov 3, 2026
  5. devops-cli-service commented on Nov 3, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at 7ced0c7 (see proposed design in issue body).

  6. devops-cli-service commented on Nov 3, 2026

    @devops-cli-service
    Contributor

    Staged: branch fix/3369-the-stage-job-refuses-a-summary, draft pull request #3371. The pull request plans the item and closes no issue.

    The task groups, with the tokens of the inputs of each step, for a budget of 40000 tokens:

    1. Refuse an overlong title summary in the stage title check: 30534 tokens
    2. Keep the cut of an overlong delivery title: 22956 tokens

    The plan run made 3 model request(s), and used 228006 input tokens and 10063 output tokens. The model made no tool call.

  7. added a commit that references this issue on Nov 3, 2026
  8. added
    status/planned
    and removed
    status/ready
    on Nov 3, 2026
  9. added
    status/in-progress
    status/in-review
    and removed
    status/planned
    status/in-progress
    on Nov 3, 2026
  10. removed
    status/in-review
    on Nov 3, 2026
  11. devops-cli-service commented on Nov 3, 2026

    @devops-cli-service
    Contributor
  12. devops-cli-service commented on Nov 3, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-03 22:12 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/lowpriority/p2-mediumscope/roadmaptype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions