Skip to content

fix(roadmap): count the implement title like the CI check #3292

Closed

Description

@dan-petty

Problem or Motivation

The Semantic PR title check runs ^.{1,60}$ in JavaScript, so it counts UTF-16 code units. An emoji counts as two. PR #3286 (round 3 of #3249) made the stage title count units with summary_length in src/devops_cli/roadmap/pull_form.py. delivery_title (implement job) still cuts the issue title by code points. An issue title with 40 emoji is 80 units. The real check refuses the title that the job opens. The review of #3286 reproduced the gap (finding 3).

Proposed Solution & Architectural Design

Use summary_length in delivery_title for the length test and the cut. Cut at a code point, never inside a pair. Add a test with emoji and one with a title at the exact bound. This also fits the item #3215 (plan form), which should name units, not characters.

Target Subsystem

SDLC, Git & PR Governance

Existing Tool Considered

summary_length already exists after #3286. The cost is about 10 lines of code and tests: roughly 10000 tokens and half an hour.

Related: #3249, #3215.

Proposed design

Problem statement

The implement job builds a delivery title with delivery_title. That function measures the issue title in Unicode code points. The Semantic PR title check measures UTF-16 code units. An emoji counts as two units. A title with 40 emoji passes the job and fails CI. The change makes the job use summary_length, cuts only at a code point, updates the specification text and adds tests.

Acceptance criteria

Requirement: Measure delivery title in UTF-16 code units

delivery_title SHALL measure the summary with summary_length, which counts UTF-16 code units.

Scenario: Emoji title at the limit

  • WHEN The issue title gives a summary of 30 emoji that each use one code point, which is 60 UTF-16 code units.
  • THEN delivery_title keeps the summary unchanged and returns a title whose summary has 60 UTF-16 code units.

Requirement: Cut long delivery title at a code point boundary

delivery_title SHALL cut a summary longer than 60 UTF-16 code units at a code point boundary and MUST NOT return a lone surrogate.

Scenario: Overlong emoji title

  • WHEN The issue title gives a summary of 40 emoji that each use one code point, which is 80 UTF-16 code units.
  • THEN delivery_title returns a summary of at most 60 UTF-16 code units, and the result contains no lone surrogate.

Requirement: State the implement title limit in code units

The roadmap-implement-job specification SHALL state the title limit as 60 UTF-16 code units, not characters.

Scenario: Specification names code units

  • WHEN A reader opens the roadmap-implement-job specification.
  • THEN The title limit text says 60 UTF-16 code units.

Requirement: Test emoji and exact bound

The test suite SHALL include a delivery title test with emoji and a test at the exact 60-unit bound.

Scenario: Delivery title tests run

  • WHEN The roadmap stage title tests run offline.
  • THEN Both the emoji case and the exact-bound case pass.

Existing Tool Considered

No alternatives check has run. No external tool or library covers the need. The existing summary_length helper in src/devops_cli/roadmap/pull_form.py covers the UTF-16 code-unit count. It lacks a caller in delivery_title. The written cost to add that caller, update the specification and add tests is about 10000 tokens and half an hour.

Key questions

  • Which length measure should delivery_title use for the limit and the cut?: Use summary_length for the limit and the cut. Slice only at code point boundaries. (best practice) [sources: src/devops_cli/roadmap/pull_form.py:42, src/devops_cli/roadmap/stage_change.py, tests/roadmap/test_roadmap_stage_title.py]
    • Chosen: summary_length. It matches the JavaScript check and already exists.
    • Rejected: Python len. It counts an emoji as one code point, so CI disagrees.
    • Rejected: UTF-8 byte length. It counts an emoji as four bytes, so CI disagrees.
  • Should the roadmap-implement-job requirement text change in the same pull request?: Yes. Change the text from 'at most 60 characters' to 'at most 60 UTF-16 code units' in the same pull request. (best practice) [sources: openspec/specs/roadmap-implement-job/spec.md]
    • Chosen: Change in the same pull request. The code and the specification stay consistent, as the reply requests.
    • Rejected: Change in a separate issue. The specification would contradict the code until the separate issue lands.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/bug
    scope/roadmap
    status/new
    value/medium
    effort/low
    on Nov 2, 2026
  2. devops-cli-service commented on Nov 2, 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.

    • 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: P2-Medium. The job opens a PR that the CI check then refuses, but only for titles with multi-byte characters such as emoji.
    • Value: Medium. It removes a real failure path for titles with multi-byte characters, but such titles are uncommon.
    • Effort: Low. The body states about 10 lines of code and tests, roughly half an hour of work.
    • Related: fix(roadmap): staging_title cuts the plan title with ... and title_problems refuses it #3249, which asks for a different change. Both fix code-point vs code-unit counting in a title length check, but in different functions: delivery_title versus staging_title.
  3. dan-petty commented on Nov 2, 2026

    @dan-petty
    OwnerAuthor

    Found in round 4 of #3249: the requirement text in roadmap-implement-job (about line 334, "at most 60 characters") also counts code points. Change it to units in the same pull request.


    Generated by Claude Code

  4. added
    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 fc16309 (see proposed design in issue body).

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

    @devops-cli-service
    Contributor

    Staged: branch fix/3292-count-the-implement-title-like-the, draft pull request #3319. 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. Measure and cut the delivery title in UTF-16 units: 22168 tokens
    2. State the implement title limit in code units: 13707 tokens

    The plan run made 2 model request(s), and used 133993 input tokens and 7605 output tokens. The model made no tool call.

    A model review of the plan found these points. They stop no draft, and a person judges them:

    • other at group 1, implementation: The cut walks characters up to the full limit of 60 units and then keeps the ... marker. The marker adds 3 units, so the summary can reach 63 units. This breaks the spec scenario that allows at most 60 units and the CI check. Evidence: "keep them while the running summary_length stays at or below the limit, so a character above U+FFFF is kept or dropped whole. Keep the ... marker that the current cut adds"
  7. added
    status/in-review
    and removed
    status/ready
    on Nov 3, 2026
  8. removed
    status/in-review
    on Nov 3, 2026
  9. devops-cli-service commented on Nov 3, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-03 20:33 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