Skip to content

fix(roadmap): retitle keeps a person's unlisted-type title #4620

Description

@dan-petty

Problem Description

The retitle job (PR #4532, issue #4508) can overwrite a title that a person set with an unlisted title type. This is against the rule "A person's edit stays" in the design of #4508. The skip comment of the job also tells the person "The job did not change the title."

Cause: _decide in src/devops_cli/roadmap/retitle.py calls TitleSkip(item, retitle_reason_person_edit, comment=unlisted). The skip comment starts with CONST_ROADMAP_RETITLE_COMMENT_MARKER, which is in _JOB_MARKERS, so it becomes "the last comment of a job". After a later body edit, the skip mark no longer holds. person_changed_title then returns False, because the rename is older than that comment, and _typed writes the correction. The long-title skip of a person edit has comment=False, so it does not have this problem.

Found in the adversarial check of #4532 after its merge. Two smaller gaps in the same capability:

  • openspec/specs/roadmap-retitle/spec.md: the requirements "A run is bounded" (about line 69) and "Skip mark" (about line 122) still describe only long titles. The code also counts and marks items with an unlisted type.
  • tests/roadmap/stage/test_roadmap_stage_command.py: the case "The board is slow" checks only a substring that ends at "type.", so it does not prove the scenario "does not name the retitle job".

Reproduction Steps

On main after e083598, in a test with the fakes of tests/roadmap/test_roadmap_retitle_type.py:

  1. Seed an item with the title fix(ssh): verify node host keys and add one job comment.
  2. Rename the title by hand to a title with an unlisted type, and run one retitle round. The title stays, and the job posts its skip comment.
  3. Edit the body by hand, and run one more retitle round.

Expected vs Actual Behavior

Expected: the title that the person set stays, as the skip comment says, until a person changes it.
Actual: the second round writes the correction (fix(security): verify node host keys). The adversarial check got an AssertionError on this case.

Proposed fix

When the job decides whether a person changed the title, compare the rename time with the newest job comment that is not the retitle skip comment for this cause. Add the case above as a test. In the same change, add "or an unlisted title type" to the two spec requirements, and make the stage report test assert the whole line.

Source: 4508

Owner decision 2026-11-13

The approved pipeline split (tracker #5482, Phase 5) moves the retitle rules to a sweep step (#5507) after this item. Its scope does not change.

  • Live proof: after the merge and the release, the retitle row runs as the App on the issues opened in the last 7 days. A comment gives the result lines and each title of a person that it kept.

Proposed design

Problem statement

The retitle job can overwrite a title that a person set with an unlisted type. The job writes a skip comment with the retitle marker, and the marker makes the comment the last job comment. After a body edit, the skip mark no longer holds, and the job selects the item again. The job then sees the skip comment as newer than the person's rename and writes the correction. The fix compares the rename with the newest job comment that does not report the person-edit reason, updates the two spec requirements that still name only a long title, and makes the stage report test assert the whole line.

Acceptance criteria

Requirement: A person's unlisted title survives a body edit

The retitle job SHALL keep a title that a person set with an unlisted type after a later body edit selects the item again.

Scenario: Body edit after a person's rename

  • WHEN an item titled fix(ssh): verify node host keys holds a job comment, a person renames it to security(ssh): verify node host keys, the job writes its skip comment, then the body changes and the job runs again
  • THEN the title stays security(ssh): verify node host keys, the job writes no fix(security): verify node host keys, and the item holds one retitle skip comment

Requirement: The person-edit skip comment does not bound the rename

The retitle job SHALL compare a person's rename time with the newest job comment that does not report the person-edit reason.

Scenario: The skip comment is newer than the rename

  • WHEN the last job comment is the retitle skip comment for a person's unlisted title, and the title's rename is older than that comment
  • THEN person_changed_title returns True, so the job takes the person-edit path and leaves the title

Requirement: The spec bound and skip mark name an unlisted type

The requirements A run is bounded and Skip mark of openspec/specs/roadmap-retitle/spec.md SHALL name an item with an unlisted title type.

Scenario: The spec text

  • WHEN a check reads A run is bounded and Skip mark in openspec/specs/roadmap-retitle/spec.md
  • THEN both hold the words or an unlisted title type

Requirement: The stage report test checks the whole line

The stage report test SHALL compare each left-out report line with the whole expected line.

Scenario: The board is slow

  • WHEN the stage plan leaves out an item titled The board is slow
  • THEN the output's lines hold exactly - #1 The board is slow: The title has no Conventional Commit type, so the branch has no type. and no line adds devops roadmap retitle

Existing Tool Considered

gidgethub 6.0.0, the open GitHub client that the project already uses through its GitHub session (ADR 0006), covers the reads that the guard needs: RoadmapStore.comments_on and last_renamed_at go through the session (src/devops_cli/roadmap/stores/github_store.py:969, src/devops_cli/roadmap/stores/github_store.py:1046), so the change builds no client code. gidgethub lacks the retitle rule: no open, maintained library decides that a job's own person-edit skip comment must not bound a person's rename, because that rule belongs to this job. The change edits person_changed_title and adds tests; it builds no new code, so there is no token or elapsed-time cost to compare with a tool.

Key questions

  • Why does the second round write the correction?: apply_retitle writes the skip comment for the _decide skip with CONST_ROADMAP_RETITLE_COMMENT_MARKER, which is in CONST_ROADMAP_JOB_COMMENT_MARKERS. The comment becomes the last job comment. After the body edit, the skip hash no longer holds, so retitle_items selects the item again. person_changed_title compares the rename with the newer skip comment and returns False. _typed then writes the correction. [sources: src/devops_cli/roadmap/retitle.py:251, src/devops_cli/roadmap/retitle.py:355, src/devops_cli/roadmap/retitle.py:460, src/devops_cli/config/constants.py:3846, src/devops_cli/config/constants.py:3854]
  • How does the job tell a person's rename from its own skip comment?: Ignore the retitle skip comment that reports the person-edit reason when the job finds the newest job comment. The comment body holds retitle_reason_person_edit inside retitle_comment_type_skipped, so the filter in person_changed_title reads the same text that _skip_comment_of writes. Keep the signature. (best practice) [sources: src/devops_cli/roadmap/retitle.py:251, src/devops_cli/roadmap/retitle.py:408, src/devops_cli/lang/en/messages.py:2966, src/devops_cli/lang/en/messages.py:2984]
    • Chosen: Filter the person-edit skip comment in person_changed_title. The body holds the retitle marker and the person-edit reason, so the function ignores only the comment that hides the rename. The signature stays.
    • Rejected: Remove the retitle marker from CONST_ROADMAP_JOB_COMMENT_MARKERS. The job's own title change would no longer bound a later rename, so a corrected long title would be skipped.
    • Rejected: Record the rename time in the job record. It adds a record key and a write for a small fix, and the skip mark already holds the state.
  • Which spec requirements describe only a long title?: The requirements are A run is bounded and Skip mark in openspec/specs/roadmap-retitle/spec.md. Both must also name an item with an unlisted title type. [sources: openspec/specs/roadmap-retitle/spec.md:68, openspec/specs/roadmap-retitle/spec.md:121]
  • Which test does not prove the 'no retitle job' scenario?: test_a_left_out_item_is_reported_with_its_reason in tests/roadmap/stage/test_roadmap_stage_command.py uses in result.output, so a longer line that names the retitle job still passes. The report line is one line (stage_left_line), so the test can assert the whole line. [sources: tests/roadmap/stage/test_roadmap_stage_command.py:161, tests/roadmap/stage/test_roadmap_stage_command.py:170, src/devops_cli/lang/en/messages.py:4197]
  • Does this item wait for the pipeline split that moves the retitle rules to a sweep step (feat(roadmap): retitle rules run as a sweep step with no model #5507)?: No. The owner decision of 2026-11-13 in the issue body puts the pipeline split (tracker feat(roadmap): track the roadmap pipeline split into jobs #5482, Phase 5, feat(roadmap): retitle rules run as a sweep step with no model #5507) after this item and keeps its scope, so the fix goes to the current retitle.py. (best practice) [sources: docs/ROADMAP_WORKFLOW.md:471]
  • What happens to the live proof?: Defer it to a new issue. The proof runs the retitle row as the App on the issues opened in the last 7 days after the merge and the release. The agentic-jobs guideline requires a live proof against the cluster and real branches and pull requests, so it cannot be part of the offline pull request; the new issue waits on the release. (best practice) [sources: docs/guidelines/agentic-jobs.md:116, docs/guidelines/agentic-jobs.md:225]
    • Chosen: Defer the live proof to a new issue. It waits on the merge and the release, and it runs against real issues, which are outside the pull request.
    • Rejected: Keep the live proof in this item. The item could not be Ready, because the proof waits on the release.
    • Rejected: Drop the live proof. The owner decision asks for it.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    on Nov 11, 2026
  2. added
    type/bug
    scope/roadmap
    status/new
    value/medium
    effort/low
    on Nov 11, 2026
  3. 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: P2-Medium. A person's edit is overwritten, breaking a stated design rule, but only in a specific unlisted-type scenario.
    • Value: Medium. It protects a person's intentional title choice from being silently replaced by the job.
    • Effort: Low. The fix is a bounded comparison change plus one test and two spec line edits.
    • Related: fix(roadmap): retitle records a skip mark for an item it leaves #4038, which asks for a different change. Both concern the retitle skip-mark mechanism, but #4038 adds the skip mark and this candidate fixes a defect where that mark breaks person-edit protection.
  4. added
    priority/p2-medium
    on Nov 11, 2026
  5. added
    status/ready
    and removed
    status/new
    on Nov 14, 2026
  6. devops-cli-service commented on Nov 14, 2026

    @devops-cli-service
    Contributor

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

    Moved to new items: #5627.

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

    @devops-cli-service
    Contributor

    Live since 2026-11-14 15:02 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/roadmapsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions