Skip to content

fix(roadmap): sync delivery PR title and type with staged plan proposal #4127

Closed

Description

@dan-petty

Problem Description

When devops roadmap implement generates the delivery pull request for an issue, _delivery_title() in src/devops_cli/roadmap/implement/implement_run.py unconditionally uses the title of the original GitHub issue (self.target.item.title).

When the service planning (stage / refine) modifies or refines the scope of an issue, the delivery PR title becomes misleading or violates Conventional Commits. For example, in issue #4057, the issue was titled perf(roadmap): cache registry_table in stage eval replay. The staged proposal explicitly decided not to cache registry_table (to prevent stale data across process iterations) and planned only two regression tests. However, the delivery pull request (#4117) was created with title perf(roadmap): cache registry_table in stage eval replay and label type/infra. If squash-merged, release-please generates a false changelog entry under "Performance Improvements" for a non-existent cache feature.

Reproduction Steps

  1. Create an issue titled perf(roadmap): <feature description> with label type/infra.
  2. Stage a change where the proposal refines the work to regression tests only (test(roadmap)).
  3. Run devops roadmap implement to complete the change.
  4. Observe the created delivery pull request title and labels.

Expected vs Actual Behavior

Expected: _delivery_title() derives the PR title and Conventional Commit type from the staged plan proposal (e.g. proposal.summary or inspecting whether only tests/ or docs were touched), setting test(roadmap): pin single registry read... and type/test.
Actual: _delivery_title() blindly takes self.target.item.title from the raw GitHub issue, producing an inaccurate PR title and improper taxonomy labels.

Environment Diagnostics

  • DevOps CLI Version: 0.86.0
  • Python Version: 3.14.10
  • Execution Environment: Roadmap Service

Logs, Traces, or Terminal Output

# In src/devops_cli/roadmap/implement/implement_run.py:
def _delivery_title(self) -> str:
    declared = declared_labels(self.store, ref=None)
    title = delivery_title(self.target.item.title, declared)
    ...

Pre-Submission Checklist

  • I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
  • I have checked existing issues and pull requests to ensure this is not a duplicate.

Proposed design

Problem statement

The implement job copies the issue title to the delivery pull request. When staging refines the work, the title and the Conventional Commit type can misstate the change. The fix derives the title and type from the staged plan and its changed paths.

Acceptance criteria

Requirement: Test-only plan type

The delivery title SHALL use the Conventional Commit type that the changed paths select, and a plan that changes only paths under tests/ SHALL use test.

Scenario: A test-only plan

  • WHEN the staged plan changes only paths under tests/ and the issue title starts with perf(roadmap):
  • THEN _delivery_title() returns a title that starts with test(roadmap):.

Requirement: Proposal summary

The delivery title SHALL take its summary from the first non-empty line of the proposal's ## Summary section when that section exists.

Scenario: A proposal with a summary

  • WHEN the archived proposal has a ## Summary section whose first line is pin a single registry read and the changed paths are test-only
  • THEN _delivery_title() returns test(roadmap): pin a single registry read.

Requirement: What Changes fallback

The delivery title SHALL use the first bullet of the proposal's ## What Changes section when the proposal has no ## Summary section.

Scenario: A proposal without a summary

  • WHEN the proposal has no ## Summary section and its first ## What Changes bullet is - Add two regression tests
  • THEN _delivery_title() returns a title whose summary is Add two regression tests.

Requirement: Issue summary fallback

The delivery title SHALL keep the issue title's summary when the proposal has no usable summary or the derived title breaks title_problems.

Scenario: No usable proposal summary

  • WHEN the proposal has no ## Summary and no ## What Changes section
  • THEN _delivery_title() returns the title that delivery_title(self.target.item.title, declared) returns.

Requirement: Type label follows title

The implement job SHALL set the pull request's type/* label from the delivery title and remove the stale type/* label.

Scenario: A test-only plan on a type/infra issue

  • WHEN the implement job updates a pull request whose current title is perf(roadmap): cache registry_table in stage eval replay and the delivery title is test(roadmap): pin a single registry read
  • THEN the pull request has type/test and does not have type/infra.

Existing Tool Considered

No alternatives check has run. No open, maintained tool or library covers this repository-specific title derivation. The change extends the repository's own delivery_title, section_text and title_problems helpers. The written cost is about 2,000 tokens to build and test the helper, and about 15 minutes. The helper is pure, so its ongoing cost is its tests.

Key questions

  • Which evidence selects the Conventional Commit type for the delivery title?: The changed paths select the type. A plan that changes only tests/ uses test; only docs/, openspec/ or Markdown files uses docs; only .github/workflows/ or .github/actions/ uses ci; any other set keeps the type of the issue title. (best practice) [sources: src/devops_cli/roadmap/implement/implement_run.py, src/devops_cli/roadmap/stage/stage_change.py, CONTEXT.md]
    • Chosen: Changed paths. The paths show what the plan actually changes. A test-only plan must not publish a performance entry.
    • Rejected: Issue title. The issue title is the stale text that this issue corrects.
    • Rejected: Proposal text only. The proposal text can describe a rejected option. The paths are deterministic.
  • Which text supplies the summary of the delivery title?: The first non-empty line of the proposal's ## Summary section supplies the summary. If that section is absent, the first bullet of ## What Changes supplies it. If neither exists, the issue title's summary supplies it. (best practice) [sources: src/devops_cli/roadmap/implement/implement_run.py, src/devops_cli/roadmap/step_files.py, src/devops_cli/roadmap/stage/stage_change.py]
    • Chosen: Proposal summary then What Changes then issue summary. It follows the staged plan and keeps existing plans working.
    • Rejected: Issue title always. It keeps the misleading summary that this issue corrects.
    • Rejected: Model-generated summary. It adds a model call and non-deterministic output to a title that a test can check.
  • How does the implement job find the proposal after it archives the change?: It reads the archived change folder when _archived_name() returns one. It reads the active change folder otherwise. This is the same lookup that _body uses. (best practice) [sources: src/devops_cli/roadmap/implement/implement_run.py]
    • Chosen: Archived then active. The job archives the change before it publishes or updates the pull request.
    • Rejected: Active only. The active folder is gone after the archive step.
    • Rejected: Archived only. A project that declares no archive step keeps the active folder.
  • What happens when the derived title is invalid or too long?: The helper falls back to the title that delivery_title(issue_title, declared) returns. If that title also breaks title_problems, the existing stop path reports the problem. (best practice) [sources: src/devops_cli/roadmap/pull_form.py, src/devops_cli/roadmap/implement/implement_run.py]
    • Chosen: Fallback to issue title. It keeps the job running and keeps the existing validation.
    • Rejected: Cut the summary. A cut summary can read as a mistake and can still break the limit.
    • Rejected: Stop on the first invalid title. A valid issue title is available.
  • Should staging write a new required summary field?: No. The implement job reads ## Summary when a plan has it and falls back to ## What Changes. Existing staged plans need no migration. (best practice) [sources: src/devops_cli/roadmap/stage/stage_change.py, src/devops_cli/roadmap/implement/implement_run.py]
    • Chosen: Read existing sections. It fixes existing plans and needs no stage change.
    • Rejected: Require a new stage field. It breaks existing plans and expands the change.
    • Rejected: Read only the issue title. It does not fix the reported defect.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Alternatives check of 2026-11-10: none.
Tool: none found.

Activity

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/medium
    effort/medium
    on Nov 8, 2026
  2. dan-petty commented on Nov 8, 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. The wrong title and label produce misleading changelog entries but do not break the build or block work.
    • Value: Medium. Users see incorrect PR titles and changelog entries that describe work that was not delivered.
    • Effort: Medium. The fix requires reading the staged proposal summary and type in _delivery_title and updating the label logic accordingly.
    • Related: fix(roadmap): stop a delivery title that the check refuses #3368, which asks for a different change. Both work on the delivery title in the implement job, but #3368 adds a validation check before writing the title while the candidate changes the source of the title from the issue to the staged proposal.
  3. added
    priority/p2-medium
    on Nov 8, 2026
  4. added
    status/ready
    and removed
    status/new
    on Nov 9, 2026
  5. devops-cli-service commented on Nov 9, 2026

    @devops-cli-service
    Contributor

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

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

    @devops-cli-service
    Contributor

    Alternatives check: none

    Reason: The searches returned only commit-message helpers such as commitizen, which prompt for or validate Conventional Commit messages and build changelogs from existing commits; they do not derive the type from a plan's changed paths or read an OpenSpec proposal's ## Summary / ## What Changes sections. The need is a repository-specific extension of the existing delivery_title, section_text and title_problems helpers, which no open, maintained tool covers.

    Tool: none found

    Lacks:

    • Deriving the Conventional Commit type from the staged plan's changed paths (tests-only, docs-only, CI-only)
    • Taking the delivery summary from the proposal's ## Summary line, with the ## What Changes bullet and issue-title fallbacks
    • Falling back to delivery_title(issue_title, declared) when the derived title breaks title_problems
    • Setting the PR's type/* label from the derived title and removing the stale type/* label
    • Reading the archived-then-active change folder inside devops roadmap implement

    Tools considered:

    Searches run:

    • python conventional commit message title builder library, results: 5
    • python library derive conventional commit type from changed file paths, results: 5
    • commitizen python conventional commit, results: 5
    • conventional commits scope type inference tool, results: 5
    • semantic-release commit analyzer conventional commits python, results: 5
    • "commitizen" pypi conventional commit tool, results: 5
    • commitizen, results: 5
    • conventional commit lint python package, results: 5
    • tool generates pull request title from diff changed files, results: 5

    Sources:

    Checked on 2026-11-10. A person decides what this means for the item. The check changes no label and closes no issue.

  7. added
    owner/agent
    status/in-progress
    and removed
    status/ready
    on Nov 18, 2026
  8. added 2 commits that reference this issue on Nov 18, 2026
    7de20a4
    1c42dc4
  9. added
    status/in-review
    and removed
    status/in-progress
    on Nov 18, 2026
  10. removed
    status/in-review
    owner/agent
    on Nov 18, 2026
  11. devops-cli-service commented on Nov 18, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-18 16:28 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/mediumpriority/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