Repository navigation
Description
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.
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_titlekeeps 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_titlereturns 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-jobspecification. - 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_titleuse for the limit and the cut?: Usesummary_lengthfor 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-jobrequirement 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
devops-cli-service commentedon Nov 2, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(roadmap)scope of the title gives the scope.The job opens a PR that the CI check then refuses, but only for titles with multi-byte characters such as emoji.It removes a real failure path for titles with multi-byte characters, but such titles are uncommon.The body states about 10 lines of code and tests, roughly half an hour of work.Both fix code-point vs code-unit counting in a title length check, but in different functions: delivery_title versus staging_title.dan-petty commentedon Nov 2, 2026
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
devops-cli-service commentedon Nov 3, 2026
Status set to Ready at fc16309 (see proposed design in issue body).
devops-cli-service commentedon Nov 3, 2026
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:
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:
otherat 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 runningsummary_lengthstays at or below the limit, so a character above U+FFFF is kept or dropped whole. Keep the...marker that the current cut adds"devops-cli-service commentedon Nov 3, 2026
Released in v0.53.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.53.0
devops-cli-service commentedon Nov 3, 2026
Live since 2026-11-03 20:33 UTC