Skip to content

fix(github): pr readiness exempts a chore/open release-process pull request only when it changes release-process files #1344

Closed

Description

@dan-petty

Ready: implementation plan (refined 2026-10-17 at 3dd7fa6)

This section supersedes any text below that conflicts with it.

Decisions

  • Which heads are release-process pull requests: chore/cut-vX.Y.Z and chore/open-vX.Y.Z, each optionally followed by -<slug>, from this repository into release/vX.Y.Z of the same version. The cut is now made as a pull request (chore(release): cut v0.2.36 — version 0.2.36, the changelog fragments collected and the roadmap rendered #1614, chore/cut-v0.2.36 into release/v0.2.36), because no-commit-to-branch refuses the cut's commit on release/*. Today readiness holds that head to grounding (tests/test_pr_cmd.py:2306 pins it), so the cut pull request fails "closes no issue".
  • What a cut pull request (chore/cut-…) may change: the cut's files with status modified (pyproject.toml, src/devops_cli/__init__.py, uv.lock, CHANGELOG.md, docs/ROADMAP.md) and changelog.d/<n>.md fragments with status removed. That is exactly what cut_release writes and what chore(release): cut v0.2.36 — version 0.2.36, the changelog fragments collected and the roadmap rendered #1614 changed (four files modified, 24 fragments removed). A cut never adds a fragment or edits changelog.d/README.md, so both fail.
  • Is the chore/open-vX.Y.Z-main merge of main still needed: yes, for conflicts, not for images. refactor(release): the release no longer pins, bumps or pre-publishes the service image tag; image updater rolls service:latest #1486 removed the image check that created it, but Renovate and hotfix pull requests still merge into main between releases (chore(deps): bump httpx2 from 2.13.0 to 2.13.1 #1211, chore(release): pin docker/setup-qemu-action SHA and align BaseCapability id types for ty 0.0.87 #1582), and a release pull request that conflicts with them needs main merged into its branch. A chore/open-… pull request may change the cut's files and any file that main changed since its merge base with the release branch, read with one GET repos/{repo}/compare/{base sha}...{default branch}. Nothing else.
  • If the file list can't be read, or the compare fails or lists 300 files (GitHub's cap, so the list may be cut short): grounding applies (fail closed), because nothing proves the pull request is release-process only. _changed_files_were_read (pr.py:1574) already names a file-list failure. A new blocker names a compare failure.
  • Renames: both filename and previous_filename must be in the allowed set, as _changes_a_release_file (pr.py:1605-1610) already reads them.
  • Where the lists live: CUT_FILES (src/devops_cli/roadmap/close.py:72) moves to src/devops_cli/config/constants.py as CONST_RELEASE_CUT_FILES, beside CONST_RELEASE_SHARED_FILES (:2934). close.py and commands/roadmap.py:446 use the constant. One list then says what the cut writes and what readiness accepts. CONST_RELEASE_PROCESS_BRANCH_RE (:2927-2929) gains a kind group (cut or open).
  • The blocker is one line naming every file outside the allowed set, cut to CONST_MAX_ERROR_DETAIL_LENGTH like the other grounding blockers. The usual grounding blockers follow it.
  • The issue title names only chore/open. The rule covers both heads, so a person may retitle it to "pr readiness exempts a release-process pull request only when it changes release-process files".

Delivery

  1. PR 1 (M): closes fix(github): pr readiness exempts a chore/open release-process pull request only when it changes release-process files #1344. _grounding_scope (pr.py:1511) takes the changed-file read that _evaluate_pr_blockers already makes (pr.py:1832), so a cut pull request costs no extra request. It exempts a release-process head only when the content rule holds. The PR also adds the compare read for chore/open, the constant move, the new blocker messages and the check-readiness docstring (pr.py:1934-1942), and fixes the convention text it makes stale. Tests first, in tests/test_pr_cmd.py, replacing :2280-2340:
    • test_a_cut_pull_request_that_changes_only_the_cut_files_is_exempt: chore(release): cut v0.2.36 — version 0.2.36, the changelog fragments collected and the roadmap rendered #1614's file list passes, with no /contents/ and no /compare/ request.
    • test_a_cut_pull_request_that_changes_another_file_is_held_to_grounding: a src/ file, an added fragment or an edit to changelog.d/README.md gives a blocker that names that file, and "closes no issue" follows it.
    • test_a_renamed_file_is_judged_by_both_paths.
    • test_an_unread_file_list_holds_a_release_process_head_to_grounding.
    • test_a_merge_of_main_that_changes_only_what_main_changed_is_exempt, with exactly one compare read, and test_a_merge_of_main_with_another_file_is_held_to_grounding, naming the file.
    • test_an_unread_or_full_compare_holds_a_merge_of_main_to_grounding.
    • The fork, other-version, slug-before-version, not-chore and into-the-default-branch cases of today's :2306-2340 stay held to grounding.
    • Files: src/devops_cli/commands/pr.py, src/devops_cli/config/constants.py, src/devops_cli/roadmap/close.py, src/devops_cli/commands/roadmap.py, src/devops_cli/lang/en/messages.py, tests/test_pr_cmd.py, RELEASE_CYCLE.md, docs/agent/tasks/README.md, .github/pull_request_template.md, the generated docs/commands/pr.md, docs/commands/gh.md and docs/CLI_REFERENCE.md (devops docs generate --sync-readme), changelog.d/1344.md, and docs/agent/tasks/task-1344-*.md.

Acceptance criteria

  • A chore/cut-vX.Y.Z[-slug] pull request from this repository into release/vX.Y.Z is exempt from grounding only when every changed path, both paths of a rename included, is a CONST_RELEASE_CUT_FILES entry with status modified or a changelog.d/<n>.md with status removed.
  • A chore/open-vX.Y.Z[-slug] pull request is exempt only when every changed path is a cut file or a file the default branch changed since its merge base with the base branch, read with one compare request.
  • Otherwise grounding applies, and one blocker names the files outside the allowed set.
  • An unread file list, or a compare that fails or returns 300 files, applies grounding, and a blocker names the failure.
  • A fork, another version, a slug before the version, a non-chore head or a head into the default branch is held to grounding, as today.
  • CUT_FILES is gone. roadmap/close.py, commands/roadmap.py and readiness read CONST_RELEASE_CUT_FILES.
  • RELEASE_CYCLE.md:56, docs/agent/tasks/README.md:13 and .github/pull_request_template.md:18 name the release pull request (release/vX.Y.Z into main), the cut pull request (chore/cut-vX.Y.Z into release/vX.Y.Z) and the merge of main (chore/open-vX.Y.Z-main), each with its file rule. rg -n 'chore/cut-vX.Y.Z. into .main' RELEASE_CYCLE.md docs/agent/tasks/README.md prints nothing.
  • devops docs check passes with the regenerated command docs.
  • changelog.d/1344.md records the change under ### Fixed. CHANGELOG.md and docs/ROADMAP.md are not edited.
  • uv run devops ci passes.
  • Pending a person: uv run devops pr check-readiness <the v0.2.37 cut pull request> shows no grounding blocker.

Current references

  • _is_release_pr: src/devops_cli/commands/pr.py:1462
  • _is_release_process_pr: src/devops_cli/commands/pr.py:1472-1483
  • _grounding_scope, exemption check: src/devops_cli/commands/pr.py:1511, :1519
  • _changed_files_were_read: src/devops_cli/commands/pr.py:1574
  • _changes_a_release_file: src/devops_cli/commands/pr.py:1605-1610
  • _leaves_release_files_to_the_cut: src/devops_cli/commands/pr.py:1622
  • _grounding_blockers: src/devops_cli/commands/pr.py:1761
  • _evaluate_pr_blockers, file read: src/devops_cli/commands/pr.py:1789, :1832
  • check-readiness docstring: src/devops_cli/commands/pr.py:1934-1942
  • Grounding constants comment and regexes: src/devops_cli/config/constants.py:2917-2929
  • CONST_RELEASE_SHARED_FILES: src/devops_cli/config/constants.py:2934
  • CONST_CHANGELOG_FRAGMENT_NAME_RE: src/devops_cli/config/constants.py:177
  • CONST_PR_FILE_MODIFIED_STATUS, changed statuses: src/devops_cli/config/constants.py:2947-2952
  • CUT_FILES: src/devops_cli/roadmap/close.py:72; used at src/devops_cli/commands/roadmap.py:446
  • Grounding messages: src/devops_cli/lang/en/messages.py:628-645
  • Test helpers: tests/test_pr_cmd.py:1821 (_file), :1837 (_ready_pr), :1853 (_blockers), :1920 (_grounding_gh)
  • Exemption tests to replace: tests/test_pr_cmd.py:2291, :2320, :2335
  • Stale text: RELEASE_CYCLE.md:56, docs/agent/tasks/README.md:13, .github/pull_request_template.md:18
  • Generated text: docs/commands/pr.md:247, docs/commands/gh.md:961, docs/CLI_REFERENCE.md:6593, :7697

Dependencies and order


Problem

devops pr check-readiness exempts a pull request whose head is chore/open-vX.Y.Z, optionally followed by -<slug>, from grounding: closing one issue and changing its task file. It does this whatever the pull request changes [code: src/devops_cli/commands/pr.py:1459-1470; src/devops_cli/config/constants.py:3098-3106].

During v0.2.28, the remediation pull requests #1284, #1285, #1287, #1288 and #1289 carried code fixes into release/v0.2.28 under that name. They had no issue, no task file and no changelog fragment, and they passed readiness.

Acceptance criteria

  • A chore/open-vX.Y.Z[-slug] pull request into release/vX.Y.Z is exempt from grounding only when every file it changes is a release-process file: CHANGELOG.md, changelog.d/, docs/ROADMAP.md, and the version files the cut bumps. The list lives in config/constants.py.
  • Otherwise, readiness applies grounding and names the files that are not release-process files.
  • Tests cover a changelog-only open pull request, which passes, and one that also changes src/, which fails with the file named.
  • changelog.d/<n>.md records the change; CHANGELOG.md and docs/ROADMAP.md are not edited.
  • uv run devops ci passes.

Strategic alignment

Activity

  1. added
    type/bug
    scope/github
    priority/p1-high
    scope/release
    on Oct 7, 2026
  2. dan-petty-bot commented on Oct 8, 2026

    @dan-petty-bot
    Collaborator

    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.

    • Priority: P2-Medium. Five code-fix PRs slipped through readiness during v0.2.28, showing the gap is exploitable in practice, but it is a process-integrity bug rather than a user-facing outage or security vulnerability.
    • Value: Medium. It restores the guarantee that every code change entering a release branch is grounded in an issue, task file, and changelog fragment, protecting release auditability for all contributors.
    • Effort: Medium. Requires modifying the exemption predicate in pr.py, adding a release-process file list to constants.py, writing pass/fail tests, and a changelog fragment, all within a well-scoped area.
  3. dan-petty commented on Oct 8, 2026

    @dan-petty
    OwnerAuthor

    Linked: #1103, which removes the need for this exemption after the cut, and #998, whose verdict makes _is_release_process_pr a predicate; whichever lands second rebases. Found by the 2026-10-08 backlog review.

  4. added this to the v0.2.37 milestone on Oct 11, 2026
  5. dan-petty commented on Oct 17, 2026

    @dan-petty
    OwnerAuthor

    Readiness check for v0.2.37, against release/v0.2.36 at 22d8748. Line numbers are at that commit.

    Status: ready once the references are refreshed. One pull request (S).

    Today

    • _is_release_process_pr (src/devops_cli/commands/pr.py:1472-1483) decides by branch name alone.
    • Its exemption applies at :1519, before any file check.
    • The changed-file list is already read for _grounding_blockers (:1761), so the file check needs no extra request.

    References that moved

    • pr.py:1459-1470 is now :1472-1483.
    • constants.py:3098-3106 is now :2917-2929.
    • The file lists to build on are CONST_RELEASE_SHARED_FILES (src/devops_cli/config/constants.py:2934) and CUT_FILES (src/devops_cli/roadmap/close.py:72).
    • Generated docs to refresh with devops docs generate --sync-readme: docs/commands/pr.md:247, docs/commands/gh.md:961, and docs/CLI_REFERENCE.md:6593 and :7697.
    • Test helpers are at tests/test_pr_cmd.py:1821, :1837, :1853 and :1920. The current exemption tests are at :2291 and :2335.

    Dependencies: #1294 is closed. #1103 is related.

    Questions for the owner

    Plan, tests first

    • A new CONST_RELEASE_PROCESS_FILES, including the changelog.d/ prefix.
    • A renamed file is also checked under its previous_filename.
    • The blocker message names the files that fall outside the list.
    • Tests:
      • A changelog-only pull request passes.
      • Adding a src/ file fails, and the message names that file.
      • An unreadable file list applies grounding.
  6. added
    status/in-progress
    on Oct 17, 2026
  7. added a commit that references this issue on Oct 18, 2026
    8ab1804
  8. dan-petty commented on Oct 18, 2026

    @dan-petty
    OwnerAuthor

    What changed

    #1621, merged into release/v0.2.37 as 8ab1804.

    What changed and why

    devops pr check-readiness exempted any chore/open-vX.Y.Z[-slug] pull request into release/vX.Y.Z from grounding whatever it changed, so code fixes reached release/v0.2.28 (and release/v0.2.33 through chore/open-v0.2.33-trivyignore and its siblings) with no issue, task file or changelog fragment. At the same time it held the cut pull request (chore/cut-vX.Y.Z into release/vX.Y.Z) to grounding, so the v0.2.36 cut (#1614) failed with "closes no issue". The exemption now depends on the files the pull request changes rather than on its branch name alone.

    A cut pull request is exempt when every changed path is one of the cut's files (CONST_RELEASE_CUT_FILES: pyproject.toml, src/devops_cli/__init__.py, uv.lock, CHANGELOG.md, docs/ROADMAP.md) with status modified, or a changelog.d/<n>.md with status removed, which is exactly what cut_release writes. It is judged from the file list readiness already reads, so a cut costs no extra request. A merge of main (chore/open-vX.Y.Z[-slug]) is exempt when every changed path is a cut file or a file main changed since its merge base with the release branch, read with one compare/<base sha>...<default branch>?per_page=1 request, and that compare is read only when the pull request changes a path that is not a cut file. Both paths of a rename must be allowed. Anything else applies grounding, led by one blocker (bounded to 256 characters) naming the files outside the allowed set. A…

    15 file(s) changed.

    How it was verified

    Check runs at e5267cc:

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

    Acceptance Criteria of docs/agent/tasks/task-1344-release-process-pr-by-content.md:

    • A chore/cut-vX.Y.Z[-slug] pull request from this repository into release/vX.Y.Z is exempt only when every changed path, both paths of a rename included, is a CONST_RELEASE_CUT_FILES entry with status modified or a changelog.d/<n>.md with status removed: test_a_cut_pull_request_that_changes_only_the_cut_files_is_exempt (chore(release): cut v0.2.36 — version 0.2.36, the changelog fragments collected and the roadmap rendered #1614's file list, no /contents/ and no /compare/ request), test_a_cut_pull_request_that_changes_another_file_is_held_to_grounding (a src/ file, an added fragment, an edited or removed changelog.d/README.md, an added cut file) and test_a_renamed_file_is_judged_by_both_paths, in tests/test_pr_cmd.py.
    • A chore/open-vX.Y.Z[-slug] pull request is exempt only when every changed path is a cut file or a file the default branch changed since its merge base with the base branch, read with one compare request: test_a_merge_of_main_that_changes_only_what_main_changed_is_exempt (exactly one compare read, compare/<base sha>...main?per_page=1), test_a_merge_of_main_that_changes_only_the_cut_files_reads_no_compare and test_a_merge_of_main_with_another_file_is_held_to_grounding.
    • Otherwise grounding applies, and one blocker names the files outside the allowed set, with the usual grounding blockers after it: test_the_cut_blocker_reads_in_full, test_a_merge_of_main_with_another_file_is_held_to_grounding and test_the_files_the_blocker_names_are_bounded (256 characters of the file list).
    • An unread file list, a compare that fails or returns 300 files, or a payload that names no default branch applies grounding, and a blocker names the failure: test_an_unread_file_list_holds_a_release_process_head_to_grounding, test_an_unread_or_full_compare_holds_a_merge_of_main_to_grounding (failed, malformed, no file list, 300 files) and test_a_merge_of_main_whose_default_branch_is_unnamed_is_held_without_a_compare (no compare request).
    • A fork, another version, a slug before the version, a non-chore head or a head into the default branch is held to grounding, as before, and reads no compare: test_other_branches_are_held_to_grounding and test_a_release_process_branch_from_a_fork_is_not_exempt, for both kinds.
    • CUT_FILES is gone. roadmap/close.py, commands/roadmap.py and readiness read CONST_RELEASE_CUT_FILES; tests/test_roadmap_close.py, tests/test_roadmap_dry_runs.py and tests/test_roadmap_run.py pass unchanged.
    • RELEASE_CYCLE.md, docs/agent/tasks/README.md and .github/pull_request_template.md name the three pull requests, each with its file rule. rg -n 'chore/cut-vX.Y.Z. into .main' RELEASE_CYCLE.md docs/agent/tasks/README.md prints nothing.
    • devops docs check passes with the regenerated command docs.
    • changelog.d/1344.md records the change under ### Fixed. CHANGELOG.md and docs/ROADMAP.md are not edited.
    • Pending a person: uv run devops pr check-readiness <the v0.2.37 cut pull request> shows no grounding blocker.
  9. added a commit that references this issue on Oct 20, 2026
    954914e
  10. removed
    status/in-progress
    on Oct 30, 2026
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

    priority/p1-highscope/githubscope/releasetype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions