Skip to content

fix(github): a pull request that delivers part of an item says Part of #N and passes readiness #1617

Closed

Description

@dan-petty

Friction

Readiness lets a pull request into a release branch through only if its body closes exactly one issue. An item planned as several pull requests can therefore deliver only its last one. The earlier pull requests close no issue, and devops pr check-readiness blocks them.

Evidence

Remedy

A body may declare one part reference instead of a closing keyword: Part of #N, or Part of owner/repo#N for this repository. owner/repo here is a placeholder for the actual repository path.

Parsing:

  • issue_closure reads the reference with the same rules as closing keywords:
    • code blocks, inline code and quoted lines are ignored;
    • a reference to another repository is skipped;
    • the phrase is matched case-insensitively and lives in config/constants.py.
  • devops roadmap close never acts on a part reference. The pull request that closes #N, the item's last, closes it.

Readiness:

  • A pull request is grounded on #N when its body has exactly one part reference and no closing keyword. The other grounding checks then apply to #N as they do to a closed issue:
    • #N is open, and an item of the base's release;
    • the pull request changes #N's task file;
    • it leaves the cut's files alone.
  • A part pull request's task file may read **Status**: In Progress. The pull request that closes #N sets Done.
  • These bodies still fail, each with its own message:
    • a part reference together with a closing keyword;
    • two or more part references;
    • a part reference to a closed issue.

Docs and tests:

  • AGENTS.md and the pull request template describe the multi-PR delivery.
  • Tests first, with no network:
    • parser cases: fences, quotes, another repository, mixed case;
    • readiness cases: part only passes, part plus close fails, two parts fail, a part reference to a closed issue fails, a part reference to an item of another release fails;
    • roadmap close doesn't close an issue that only a part reference names.

Priority under the owner's blocker rule (2026-10-17): P0. It blocks two or more P1 items (#983, #1107, #1151, #771, #1144, #1103, #1343, #1345, #1154), so it is a critical fix for the current release.

Activity

  1. added
    source/agent
    type/bug
    on Oct 17, 2026
  2. dan-petty commented on Oct 17, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.

    • Type: type/bug. The candidate fixes a problem with pull request readiness checks.
    • Priority: P1-High. It blocks multiple P1 items and is marked as P0 by the owner.
    • Value: High. It enables multi-PR delivery of items, improving workflow efficiency.
    • Effort: Medium. The fix involves parsing logic changes and updating readiness checks.
  3. added this to the v0.2.37 milestone on Oct 17, 2026
  4. added a commit that references this issue on Oct 18, 2026
    a46deed
  5. dan-petty commented on Oct 18, 2026

    @dan-petty
    OwnerAuthor

    What changed

    #1620, merged into release/v0.2.37 as a46deed.

    Summary

    Readiness let a pull request into a release branch through only if its body closed exactly one issue, so an item planned as several pull requests could deliver only its last one: every earlier pull request closed no issue and devops pr check-readiness blocked it with grounding_closes_no_issue. Refinement on 2026-10-17 planned nine items that way, and the owner chose a Part of #<issue> line over a child issue per pull request.

    extract_part_references in src/devops_cli/github/issue_closure.py reads the issues a body delivers part of with the same rules as closing keywords: one _references scan, shared with extract_linked_issues, reads only prose and skips a reference to another repository. The phrase is CONST_ISSUE_PART_PHRASE in src/devops_cli/config/constants.py, matched case-insensitively with any whitespace between its words and an optional colon; Part 1 of #<issue> is not the phrase. strip_non_prose now reads the body with markdown-it-py's CommonMark parser (already a dependency) and keeps only the text of paragraphs, headings and list items outside block quotes. The regular expressions it replaces skipped only backtick fences, inline code and > lines, so a closing keyword inside a tilde fence, an unclosed fence, indented code or an HTML comment (such as the pull request template's own comments) closed an issue through devops roadmap close.

    Readiness grounds a pull request on the one issue it closes or, closing none, the one it deliv…

    22 file(s) changed.

    How it was verified

    Check runs at 4274ba5:

    • Prune PR DevContainer Images: pass
    • Audit Defect PR Hardening: skipping
    • zizmor: pass
    • devops-cli: pass
    • bandit: pass
    • CodeQL: pass
    • Service Image: skipping
    • Tests & Coverage: pass
    • Rule Pack Tests: pass
    • Changed-Test Independence: pass
    • Fail-to-Pass Self-Check: pass
    • Analyze (python): pass
    • Fail-to-Pass Check: pass
    • Analyze (actions): pass
    • Static Analysis: pass
    • DevContainer Image: skipping
    • Dependency Freshness: skipping

    Acceptance Criteria of docs/agent/tasks/task-1617-part-of-readiness.md:

    • tests/test_gh_issue_closure.py reads Part of #317 in mixed case, with extra spacing and a colon, skips Part of other/project#317, honours this repository's qualified form, returns several references once and in order, ignores Part 1 of #317, and keeps part references and closing keywords apart. test_code_raw_html_and_quotes_are_not_scanned_for_closing_keywords and test_code_raw_html_and_quotes_are_not_scanned_for_part_references skip a backtick, tilde and unclosed fence, indented code, inline code, a block and an inline HTML comment and a quote; test_non_prose_right_below_a_closing_line_is_not_scanned and test_non_prose_right_below_a_closing_line_names_no_part do so for a fence, comment or quote on the line below Closes #N; test_prose_in_a_list_or_a_heading_is_still_read keeps declarations under a heading and in a list.
    • tests/test_pr_cmd.py: test_a_part_pr_is_grounded_on_the_item_it_delivers_part_of passes a part pull request into release/v0.2.26 for an open item of v0.2.26 with its task file. test_grounding_blocks_once_and_names_the_cause gives one blocker for a part reference with a closing keyword, two part references, a part reference and a closing keyword to the same issue, a part reference to another repository and a part pull request without its task file. test_a_part_pr_is_blocked_by_an_item_that_is_closed_or_of_another_release blocks a closed item, an item of v0.2.27 and a backlog item. test_the_blockers_for_a_body_naming_no_one_issue_read_in_full pins the three body messages.
    • test_a_part_pr_into_the_default_branch_reads_its_item_only_for_its_state reads the item once and blocks only a closed one; test_prs_into_the_default_branch_are_not_judged_by_release still reads no issue for a closing pull request into main.
    • tests/test_roadmap_close.py: test_these_bodies_close_nothing closes nothing for Part of #N and Part of example/roadmap#N, and test_an_item_delivered_in_parts_is_closed_by_its_last_pull_request closes the item once, from the pull request that closes it.
    • test_pr_template_asks_for_the_issue_and_task_file_and_nothing_a_check_decides requires Part of # in the template and finds no part reference in it.
    • tests/test_roadmap_reprioritize.py: test_a_commit_on_a_linked_pull_request_keeps_an_item_from_stalling[part-of] keeps an In Progress item idle past the stall window from stalling while its Part of #N pull request has a recent commit, and test_an_item_with_a_pull_request_is_not_descoped_when_a_critical_fix_takes_release_over_its_limit[part-of] keeps an item with a part pull request from the trim.
    • test_a_part_prs_release_file_blocker_leaves_the_fragment_to_the_closing_pr pins the part pull request's release-file blocker, which names the pull request that closes the item as the one that adds its fragment.
  6. added a commit that references this issue on Oct 20, 2026
    954914e
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

    source/agenttype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions