Skip to content

fix(pr): devops pr edit checks the title form #4782

Description

@dan-petty

Problem or Motivation

devops pr create checks the title with title_problems (src/devops_cli/commands/pr.py). Agent title failures fell from 41 to 2 after that check came (#3213). devops pr edit --title (edit_pr in the same file) has no check, so an edit can still set a title that the PR Title check refuses.

A commit-msg hook is not an option. CONTRIBUTING.md decides that no hook checks branch commits. In a test, a commit-msg hook refused the wip: commits of the Job, merge commits and fixup! commits.

Proposed Solution & Architectural Design

In edit_pr, when --title is given, run title_problems with the declared labels. Refuse with the same message as create.

Target Subsystem

SDLC, Git & PR Governance (src/devops_cli/commands/pr.py).

Existing Tool Considered

The repository's own title_problems covers the length, scope and ! rules in 0.41 s. conventional-pre-commit 4.5.0 and commitizen 4.19.3 both accepted a title with ! and a 68-character summary, so they do not cover the rules. Cost (estimate): about 10 lines and 1 test, about 20,000 tokens and half an hour.

Acceptance Criteria

  • Tests: devops pr edit --title refuses a title with ! and a title with a 61-character summary, and it accepts a valid title.
  • In the 14 days after the merge, at most 2 agent pull request title failures.

Dependencies

None.

Source: #4771

Activity

  1. added
    source/agent
    on Nov 11, 2026
  2. added
    type/bug
    scope/pr
    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/pr. The (pr) scope of the title gives the scope.
    • Priority: P2-Medium. An unvalidated edit title causes CI failures and wasted agent tokens, but it does not block delivery or expose data.
    • Value: Medium. It closes a validation gap that lets 'pr edit' set a title the CI check will refuse.
    • Effort: Low. The body estimates about 10 lines, 1 test, and half an hour of work.
    • Related: feat(pr): build and check the title and body of a pull request #3198, which asks for a different change. Both use 'title_problems' in 'src/devops_cli/commands/pr.py', but #3198 checks on create and this candidate checks on edit.
  4. added
    status/in-review
    and removed
    status/new
    on Nov 14, 2026
  5. removed
    status/in-review
    on Nov 14, 2026
  6. added a commit that references this issue on Nov 14, 2026
  7. 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/prsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions