Skip to content

fix(roadmap): retitle corrects a title type that is not listed - #4532

Merged
dan-petty merged 3 commits into
mainfrom
fix/4508-invalid-title-type
Nov 11, 2026
Merged

dan-petty merged 3 commits into
mainfrom
fix/4508-invalid-title-type

Conversation

@dan-petty

@dan-petty dan-petty commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

A Ready item with a title type that CONST_BRANCH_TYPES does not list, such as security(ssh): ..., waited for ever: stage left it out, retitle did not select it, and no job commented.

  • Retitle selects an unlisted type, writes fix(security) for security with no model call, and shortens a long summary. It comments once on another unlisted type and logs each skip with a reason key.
  • Refine does not refine an item with an unlisted type, also with --item, so it does not become Ready.
  • The stage and implement reason names the unlisted type and the retitle step.
  • Intake keeps such a candidate, as fix(roadmap): refine readies a title with an invalid type #4508 chose.

The proposal ## Feasibility gives the evidence for three criteria of #4508 that are not built as written. #4521 added the stage log reason.

Closes #4508

Change: openspec/changes/archive/2026-11-11-4508-refine-readies-a-title-with-an/

@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them labels Nov 11, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Verification

uv run devops ci fail-to-pass --base origin/main (head 9cf9d9a, before the archive commit):

errored on base: tests.roadmap.test_roadmap_commit_title (collection failure)
errored on base: tests.roadmap.test_roadmap_retitle_skip (collection failure)
errored on base: tests.roadmap.test_roadmap_retitle_type (collection failure)
failed on base: tests.roadmap.test_roadmap_retitle::test_a_new_candidate_with_a_summary_at_the_limit_is_kept (AttributeError: 'NewCandidate' object has no attribute 'refuse_title')
failed on base: tests.roadmap.test_roadmap_retitle::test_a_new_candidate_with_a_summary_over_the_limit_is_refused (AttributeError: 'NewCandidate' object has no attribute 'refuse_title')
failed on base: tests.roadmap.stage.test_roadmap_stage_command::test_a_left_out_item_is_reported_with_its_reason (AssertionError: '`devops roadmap retitle` corrects the type `security`' not in the report)
3 failed on base (3 failed and 38 passed ...; 3 errored).

On the head, after the rebase onto origin/main: 269 passed in tests/roadmap/test_roadmap_retitle_type.py, test_roadmap_retitle.py, test_roadmap_retitle_skip.py, test_roadmap_commit_title.py, stage/test_roadmap_stage_command.py and tests/roadmap/intake. tests/git/test_branch_form.py: 10 passed. mypy on the changed modules: no issues. uv run devops openspec check: passed.

Premise: commit_type('security(ssh): verify node host keys') gives None on origin/main (devops-cli 0.111.0), and the changelog-sections of release-please-config.json have no security type.

The stage selection is the same: only the text of the title-type reason changed, so devops roadmap eval stage --replay does not apply.

Live steps

None. No setting, ConfigMap or Secret changes. After the release rolls out, the first retitle round of the Service writes fix(security): ... on dotfiles #1, homelab #1 and homelab #2, with one comment each. The long summary of dotfiles #1 gets one model request in the same round.

@dan-petty
dan-petty force-pushed the fix/4508-invalid-title-type branch 2 times, most recently from b093cff to 7493b95 Compare November 11, 2026 07:14
@dan-petty
dan-petty marked this pull request as ready for review November 11, 2026 07:43
@dan-petty
dan-petty force-pushed the fix/4508-invalid-title-type branch from 7493b95 to c2dcca6 Compare November 11, 2026 08:05
@dan-petty

Copy link
Copy Markdown
Owner Author

Review findings

1. Major: the intake page and the run docstrings named only the long summary. Confirmed. On the old head, docs/roadmap/intake.md said that retitle "keeps the type and the scope and writes only the summary", and line 14 named only the long-summary refusal of --title. _typed in retitle.py writes fix(security) for security, and NewCandidate.refuse_title refuses an unlisted type.

Fix in commit docs(roadmap): name the type correction on the intake and retitle pages (before the archive commit, which stays last):

  • docs/roadmap/intake.md, intake: a new paragraph. Intake refuses an unlisted type with --title before the length check. The message names the type, the types and, for security, the title to write.
  • docs/roadmap/intake.md, retitle job: the selection takes an unlisted type also with a short summary. A listed type keeps its type and scope. security(ssh): x becomes fix(security): x with no model call, and a long summary is shortened in the same run or by a later run. A type with no correction gets one comment. A person's edit with an unlisted type gets one comment. Each skip writes one warning log line with the reason key invalid-title-type or long-title.
  • src/devops_cli/roadmap/run.py: the module docstring and _run_retitle_adapter name the type correction.
  • docs/roadmap/implement.md:58: the retitle sentence names the type correction too. This line was not in the finding, but it had the same fault.
  • tasks.md of the change: task 2.2 records this work.

Proof: uv run devops ci docs passes ("All documentation files are up to date"). The commit hooks and the pre-push static checks pass.

Not changed: k8s/README.md:703 (step 15, the retitle row) also says only "It shortens the title summary of at most 25 open items". Open PR #4541 changes the same line, so this PR does not touch it, to prevent a conflict. After both merge, that line needs the words "or corrects the unlisted title type".

No live step: this change has no setting and no ConfigMap change.

@dan-petty
dan-petty marked this pull request as draft November 11, 2026 10:47
@dan-petty
dan-petty force-pushed the fix/4508-invalid-title-type branch from c2dcca6 to 8eba38d Compare November 11, 2026 11:26
@dan-petty
dan-petty marked this pull request as ready for review November 11, 2026 12:08
@dan-petty
dan-petty force-pushed the fix/4508-invalid-title-type branch from 8eba38d to 4c75146 Compare November 11, 2026 12:31
@dan-petty
dan-petty enabled auto-merge (squash) November 11, 2026 12:51
@dan-petty
dan-petty disabled auto-merge November 11, 2026 12:56
@dan-petty
dan-petty enabled auto-merge (squash) November 11, 2026 12:56
A Ready item with a title type outside CONST_BRANCH_TYPES, such as
security(ssh): ..., waited for ever. The stage job left it out, the
retitle job did not select it, and no job commented.

The retitle job now selects such an item and writes fix(security) in
place of the type security, with no model call. It shortens a long
summary in the same round. It comments once on another unlisted type,
and logs each skip once with a reason key. Intake refuses a new
candidate with an unlisted type. The stage reason names the retitle
job.
The retitle job now corrects a title type that the branch types do not
list, and intake refuses such a type. The intake page, the implement
page and the run docstrings named only the long summary.
@dan-petty
dan-petty force-pushed the fix/4508-invalid-title-type branch from 4c75146 to 3e54ab1 Compare November 11, 2026 13:04
@dan-petty
dan-petty merged commit e083598 into main Nov 11, 2026
32 checks passed
@dan-petty
dan-petty deleted the fix/4508-invalid-title-type branch November 11, 2026 13:35
@dan-petty

Copy link
Copy Markdown
Owner Author

Review findings, second round

1. Major: the intake page and the run docstrings named only the long summary. Still fixed. docs/roadmap/intake.md (the retitle job section) names the selection of an unlisted type, the correction, the comment on a type with no correction and the log line with its reason key. The docstrings of src/devops_cli/roadmap/run.py name the type correction. This round changed the intake paragraph again (see finding 5) and replaced the name CONST_ROADMAP_TITLE_TYPE_CORRECTIONS (see finding 4).

2. Minor: the archived spec held two requirements that contradict each other. CONFIRMED. openspec/specs/roadmap-retitle/spec.md:22 "Confirmed repair keeps type and scope" said that the pass SHALL replace only the summary and keep the type. The added requirement "Retitle corrects an unlisted title type" writes fix(security) for security(ssh).
Fix: the delta now has a MODIFIED "Confirmed repair keeps type and scope", which holds for a title whose type is in CONST_BRANCH_TYPES and sends an unlisted type to the correction requirement. The change was archived again in the last commit.

3. Minor: the stage reason was hard-coded to the correction table and named titles that retitle never selects. CONFIRMED. stage_left_title_type said "devops roadmap retitle corrects the type security" for each title where commit_type is None. retitle_items selects only unlisted_type(title) is not None or a long listed title, and unlisted_type returns None for The board is slow, Security: ... and security-fix: ... (the _HEAD pattern of commit_title.py).
Fix: unlisted_type_reason in commit_title.py builds the reason of an unlisted type from the table: the type, and the title that the retitle job writes (corrected_title), or its comment for a type with no correction. The stage job and the implement job use it. A title with no type keeps the old text, "The title has no Conventional Commit type, so the branch has no type.", which does not name the retitle job. Tests: test_a_left_out_item_is_reported_with_its_reason (3 cases), test_a_title_that_gives_no_branch_name_is_left_out, test_a_planned_item_whose_title_has_no_type_is_left_out (2 cases). The 3 stage report cases failed on the old head and pass now.

4. Minor: CONST_ROADMAP_TITLE_TYPE_CORRECTIONS was in config/constants.py, but one module read it. CONFIRMED. git grep found one import, in commit_title.py. CONTRIBUTING.md (Closed Lists, and the Constant row of Naming) puts such a table beside its one reader as _<NAME>.
Fix: the table is now _TITLE_TYPE_CORRECTIONS in src/devops_cli/roadmap/commit_title.py, with its comment that cites #2768. config/constants.py is equal to origin/main. The docstrings, docs/roadmap/intake.md, the spec and the proposal name the new place.

5. Minor: the PR closed #4508 but replaced 4 of its 8 criteria and reversed one chosen answer. CONFIRMED. On the old head, refine set Ready an item with any title type, so wip(cli): ... reached Ready and stayed there. Intake refused an unlisted type, but #4508 chose "Keep the early return".
Fix:

  • Refine now delivers "Refine refuses an invalid title type". _title_type_wait in refine.py leaves an item with an unlisted type in the selection and with --item, with no model call, so the item does not become Ready. The detail names the type, the next step and invalid-title-type, in the report and in devops roadmap explain. A type with a correction waits on nothing that refine does (the retitle row of the same round corrects it). Another type waits on a person. Refine records no step, so the first round after a title with a listed type refines the item. Tests: tests/roadmap/refine/test_roadmap_refine_title_type.py (6 tests; all 6 failed before the change). Spec: ADDED "Refine leaves an item with an unlisted title type" and MODIFIED "A round leaves an item from an account without write access to a person" (--item holds when the title type is listed) in roadmap-refine. Documents: docs/roadmap/refine.md (new section) and the --item help.
  • Intake keeps the early return, as fix(roadmap): refine readies a title with an invalid type #4508 chose. NewCandidate.refuse_title is removed, and refuse_long_summary is back as on origin/main. intake.py, commands/roadmap.py and tests/roadmap/test_roadmap_retitle.py are equal to origin/main. Test: test_intake_keeps_a_new_candidate_with_an_unlisted_title_type. The spec requirement "Intake refuses an unlisted title type" became "Intake keeps a candidate with an unlisted title type".
  • Three criteria are not built as written. The evidence is in the proposal ## Feasibility section and in a comment on fix(roadmap): refine readies a title with an invalid type #4508:

Rebase on the new main. PR #4541 merged and split _Judge._title of stage.py. The rebase keeps its _title_type rule and gives it the reason of unlisted_type_reason. k8s/README.md step 15 (the retitle row) now names the type correction too, as the first round of this review asked. PR #4561 changed the same line and merged first; the head 3e54ab13 keeps both changes. The PR body is shorter now: the monitor said that it had 1539 characters before its trailers, and the limit is 1000.

State. I pushed 4c751466. Another push rebased it on the new main as 3e54ab13 and kept these changes (I compared the diffs of the changed files). All required checks passed on 3e54ab13 (27 passed, 3 skipped), and the PR merged. So no follow-up issue is necessary for these findings.

Checks run locally.

  • uv run devops ci test on 17 test files of refine, stage, implement, retitle, explain and commit_title, and the MCP tool listing: 335 passed after the rebase on fix(roadmap): count and log the reason of a left-out stage item #4541.
  • uv run devops ci fail-to-pass --base origin/main: 10 tests failed on base and 3 test modules did not collect on base (they import the new names). All pass on the head.
  • uv run devops openspec archive validated every spec and change; uv run devops openspec check passed.
  • uv run devops ci docs --fix regenerated the --item help in docs/CLI_REFERENCE.md, docs/commands/roadmap.md and docs/MCP_TOOLS.md; the MCP tool listing snapshot has the same text.
  • The commit hooks and the pre-push static checks passed.
  • devops roadmap eval stage --replay did not run: no gate of the stage plan changed. The stage selection takes the same items, and only the text of one reason changed.

No live step: this change has no setting, no ConfigMap change and no manifest change.

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

Labels

scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant