Skip to content

feat(pr): call body_problems from check-readiness #3259

Description

@devops-cli-service

Split from #3215.

The follow-up of PR #3213 makes devops pr check-readiness call body_problems and report each problem. This part waits on #2585, which adds the command to this repository. The rest of #3215 changes the stage and implement jobs and the plan form. Acceptance criteria: devops pr check-readiness calls body_problems on the pull request body. It reports each problem that body_problems returns. It exits non-zero when it reports at least one problem. A test with a body that has no Closes # line asserts the missing-Closes report and the non-zero exit.

Proposed design

Problem statement

devops pr check-readiness fetches a pull request body but does not run the body form rules. It does not report a missing Closes # line or other body problems. This change makes the command call body_problems, print each problem and exit non-zero when it finds one.

Acceptance criteria

Requirement: Readiness body check

devops pr check-readiness SHALL call body_problems on the pull request body.

Scenario: Body with a missing closing reference

  • WHEN the pull request body has no Closes # line
  • THEN the command reports the missing-Closes problem from body_problems.

Requirement: Every body problem

The command SHALL report every problem that body_problems returns.

Scenario: Body with two problems

  • WHEN the pull request body has no Closes # line and no Change: line
  • THEN the command output contains both the missing-Closes message and the missing-Change message.

Requirement: Non-zero exit on a body problem

The command SHALL exit with a non-zero status when body_problems returns at least one problem.

Scenario: Non-zero exit for a missing closing reference

  • WHEN the pull request body has no Closes # line
  • THEN the command exits with a non-zero status.

Existing Tool Considered

No alternatives check has run. No open, maintained tool or library covers this internal CLI readiness check. The change reuses the existing body_problems function in src/devops_cli/roadmap/pull_form.py. The written cost is small: about 2,000 tokens and under one hour to add the call, print each message and add one test.

Key questions

  • Does body_problems exist, and does check-readiness already fetch the pull request body?: Yes. body_problems is in src/devops_cli/roadmap/pull_form.py. src/devops_cli/commands/pr.py calls it, and check-readiness already fetches the body. [sources: src/devops_cli/roadmap/pull_form.py, src/devops_cli/commands/pr.py]
  • Should the change reuse body_problems or build a new body parser?: Reuse body_problems. The module already returns one message for each problem, and the command already has the body. (best practice) [sources: src/devops_cli/roadmap/pull_form.py, openspec/changes/archive/2026-11-02-3198-pull-request-form-check/design.md]
    • Chosen: Reuse body_problems. The function exists, reads no file and makes no request.
    • Rejected: Build a new body parser. It duplicates tested rules and adds code to keep.
    • Rejected: Use an external body linter. No external tool covers this repository's pull request form rules.
  • Should the command report all body problems and fail on any problem?: Yes. Report every message that body_problems returns and exit non-zero when the list is not empty. (best practice) [sources: src/devops_cli/roadmap/pull_form.py, openspec/changes/archive/2026-11-02-3198-pull-request-form-check/design.md]
    • Chosen: Report all problems and fail on any. It shows every rule that the body breaks in one run.
    • Rejected: Warn only. It lets a pull request pass readiness with a broken body form.
    • Rejected: Report the first problem only. It hides later problems and needs more runs to find them.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#2585

Activity

  1. added
    source/agent
    type/feature
    scope/pr
    status/new
    value/medium
    effort/low
    on Nov 2, 2026
  2. devops-cli-service commented on Nov 2, 2026

    @devops-cli-service
    ContributorAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/pr. The (pr) scope of the title gives the scope.
    • Priority: P2-Medium. Useful readiness check but not blocking; it depends on #2585 and is one part of a larger split.
    • Value: Medium. Catches missing Closes # lines before merge, improving traceability on main.
    • Effort: Low. Calls an existing command, reports its output, exits non-zero, and adds one test.
    • Related: feat(pr): check-readiness warns when a pull request body passes 1,000 characters #2585, which asks for a different change. Both add body validation to check-readiness, but #2585 creates the body_problems command and a length warning, while the candidate calls it for the missing-Closes check and asserts non-zero exit.
  3. devops-cli-service commented on Nov 5, 2026

    @devops-cli-service
    ContributorAuthor

    Refine cannot set this item to Ready at f481be8. A bot opened the item, so a review of the issue and of the proposal must approve it first. The review found the defects below. A person edits the body to answer them. The next refine round looks at the item again only after a body edit.

    • false_premise at key_questions, first answer: The plan says check-readiness already exists and pr.py already calls body_problems. The issue says feat(pr): check-readiness warns when a pull request body passes 1,000 characters #2585 adds the command, and the plan's own problem statement says the command does not run the body rules. The input does not support the claim. Evidence: "src/devops_cli/commands/pr.py calls it, and check-readiness already fetches the body."
  4. added
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 6, 2026
  5. removed
    status/in-review
    owner/agent
    on Nov 6, 2026
  6. added a commit that references this issue on Nov 6, 2026
  7. devops-cli-service commented on Nov 6, 2026

    @devops-cli-service
    ContributorAuthor
  8. devops-cli-service commented on Nov 6, 2026

    @devops-cli-service
    ContributorAuthor

    Live since 2026-11-06 22:09 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/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions