Skip to content

refactor(roadmap): the planner creates date-titled milestones and closes a milestone when every issue in it is closed #1934

Closed as not planned

Description

@dan-petty

Friction

The planner still treats a milestone as a release. It names the next patch version with _patch_bump (reprioritize.py:1589). It runs a state machine of five states: PLANNED, STARTED, CUT, MERGED and SHIPPED. The next milestone starts only on the SHIPPED event. To find that event, the Service reads release pull requests and GitHub Releases. At each start, the planner also creates a release/vX.Y.Z branch.

ADR 0012 retires these rules. A milestone is a planning bucket. Its number identifies it and its due date orders it. Nothing releases when it empties. release-please derives each version from the Conventional Commit titles on main. No release/* branch exists.

Evidence

Counts come from the tip of release/v0.2.39 (commit f3b17488). A path without a directory is in src/devops_cli/roadmap/. Every other path starts at the repository root.

Existing tool considered

GitHub milestones keep the number, the title, the due date, the state and the counts of open and closed issues. The store already reads all of them (Release, store.py:232-249). The planner builds nothing for them. No open tool plans scope. release-please, towncrier, git-cliff and python-semantic-release derive versions and notes only (ADR 0012, What Stays Custom). So the admission engine stays: the cap (default 12), the slots (default 4) and the P0 and P1 placement.

Cost of the build. ADR 0012 gives about 150 net lines for the whole planner change. Three planner items share that figure: this item and two items named under Order and dependencies. The ADR gives no figure for tokens or for elapsed time. This item states its estimate of tokens to implement, maintain and fix, and of elapsed time, before work starts. Until it does, the build is a proposal.

Change

State and table (reprioritize.py):

  • ReleaseState keeps PLANNED and STARTED. DELIVERED takes the place of SHIPPED. CUT and MERGED go.
  • TRANSITIONS loses the CUT and MERGED rows. INHERITS and the inheritance step of decide go.
  • The START_NEXT row fires on DELIVERED. One DELIVERED row sends a critical fix to the next milestone. It replaces the MERGED row, which intake reads today (intake.py:607-612).
  • Event.SHIPPED, Reason.CUT, Reason.MERGED and Reason.SHIPPED go, with their rows in REASON_GROWTH_GROUPS and _SILENT_REASONS, and their texts in MESSAGES.roadmap.reasons. The item names the new members.
  • release_state reads Release.open_issues and Release.closed_issues (store.py:242-243). It reads no pull request, tag or GitHub Release.
  • A milestone is delivered when it has no open issue and at least one closed issue. A milestone with no issue is not delivered. The count includes pull requests, as the label at src/devops_cli/commands/gh.py:346 says.
  • calculate_milestone_progress (src/devops_cli/github/milestones.py:23-44) already gives this rule for an open milestone through is_complete. The planner reuses it and adds no second rule.

The next bucket comes from the number item. That item adds _next_bucket, bucket_days and DEFAULT_ROADMAP_BUCKET_DAYS, and it calls _next_bucket from _next_release, _planned_titles and _ensure_planned_release_with_room. This item adds none of them. The number item is:

  • "refactor(roadmap): a milestone is identified by its number and ordered by its due date, and its title is never parsed as a version"

When a milestone is delivered, the run starts the next one with the ISO date title and the due date that _next_bucket gives. A milestone without a due date does not stop the planner, because _next_bucket then counts from the run date.

Close and start (reprioritize.py):

  • The run closes each delivered milestone as its last write. _close_release keeps last=True and closes by milestone number, the identity that the same item sets.
  • The start logic stays. It clears New and Blocked items and fills or trims to the cap and the limit. It records the admitted set and writes the Size mark last. Only its trigger changes. Priorities, caps, slots and critical-fix placement do not change.
  • _plan_unshipped and _plan_behind keep their present rules with delivered wording. A milestone closed by hand with open issues starts nothing. ADR 0012 does not cover these two cases.
  • The plan fields shipped and unshipped, and their messages (reprioritize.py:3042-3053), get delivered wording.
  • is_due (reprioritize.py:3257) loses the ship, cut and un-cut triggers. The close of the last open issue of the current milestone is already a trigger (ChangeKind.CLOSED).

Branches, pull requests and GitHub Releases:

  • Delete _branch_writes, _is_cut and its use in _fill_or_trim, and _select_tracked_branch. ensure_checkout loses its current_rel parameter. The clone tracks the default branch of origin.
  • Delete CONST_RELEASE_BRANCH_PREFIX (config/constants.py:3764). Its readers are _branch_writes, _select_tracked_branch and the readiness rules that feat(release): release-please opens the release pull request, topic pull requests target main, and its merge publishes #1861 removes. The constant CONST_RELEASE_BRANCH_RE is built from it. If the Copilot item has not merged, leave the prefix to that item, which deletes CONST_RELEASE_BRANCH_RE.
  • Delete release_pull_requests, release_published, branch and create_branch from the store protocol and from both adapters. Delete publish_release and seed_branch from the memory store.
  • Delete is_release_pull_request, cuts_its_release, the ChangeKind members RELEASE_CUT, RELEASE_UNCUT and RELEASE_SHIPPED, and RELEASE_CHANGE_KINDS.
  • In the GitHub adapter, delete _ListedReleasePayload, _UpdatedPullRequestPayload, _GitHubReleasePayload and _ships_since. changes_since reads the issue events only.
  • Intake (intake.py:607-612, intake_requests.py:155-171) and the dry-run request list (request_plan.py:538-553) stop reading pull requests and GitHub Releases.

Texts:

  • Rewrite the module docstring of reprioritize.py and the ChangeKind docstring. Rewrite each docstring that names a release pull request, a branch or a ship.
  • Rewrite the help text of devops roadmap reprioritize (src/devops_cli/lang/en/help.py:1128-1134 and src/devops_cli/commands/roadmap.py:258). It says "branch the next one" today.
  • In src/devops_cli/lang/en/messages.py, delete reprioritize_create_branch and the request texts release_published and create_branch (:1812, :1829, :2170, :2204). Delete each other text that nothing reads.
  • Regenerate README.md, docs/CLI_REFERENCE.md and docs/MCP_TOOLS.md with devops docs generate --sync-readme.

What it deletes

Counts are function and class spans from the Python AST at the tip.

  • Whole functions and classes: 288 lines in six files. store.py has 32, github_store.py 148, memory_store.py 32, request_plan.py 12, run.py 48 and reprioritize.py 16.
  • Enum members, one set and table rows: about 20 lines. They are three ChangeKind members and RELEASE_CHANGE_KINDS (store.py:127-138), the CUT and MERGED rows (reprioritize.py:423-429) and INHERITS.
  • Reworked, not deleted: release_state (16 lines), _next_release (7), _planned_titles (15), _ensure_planned_release_with_room (21), _plan_start (66), _plan_first_run (34) and _plan_close (30).
  • Poll requests: changes_since reads one listing instead of three. The reprioritize dry run lists four fewer requests, and the intake dry run lists two fewer.
  • Tests: the 32 functions and helpers named in Evidence. Some stay with a new body. Seven checkout tests in tests/test_roadmap_run.py (:713-1064) pass current_rel. Two of them (:829-889) test only the release branch and go. Five drop the argument.

Tests

Line numbers in this section are in tests/test_roadmap_lifecycle_properties.py.

  • Rewrite the lifecycle machine. One rule closes the last open issue of the current milestone. It replaces the five rules cut, uncut, ship_pull_request, published and ship.
  • Delete the invariant a_cut_start_pulls_nothing_in_and_no_fix_joins_once_merged (:962-989). Reword a_shipped_release_gives_way_to_the_next (:992-1007). Update the count of 19 invariants.
  • Start each invariant message with a term that CONTEXT.md defines: Current milestone, Milestone growth or Delivered. Delete the terms Current release, Release growth, Cut and Ship from CONTEXT.md in the same pull request.
  • Delete test_the_machine_fails_without_the_merged_release_lock_row (:1323-1366), test_a_merged_release_pull_request_locks_the_release_until_it_is_published (:1638-1651) and test_a_fix_filed_while_the_release_pull_request_is_open_joins_and_ships_where_it_is (:1654-1678).
  • Add tests for each item under Acceptance criteria that names a test.
  • The tests use the in-memory store as the one shared fake (ADR 0007). They make no GitHub request.

Order and dependencies

  • This item starts after the old pipeline publishes v0.2.39. Nothing of the new plan merges before that, except ADR 0012. The pull request targets main, and its body says Closes #<this issue>.
  • This item is part of step 12 of the Cutover and Sequence in ADR 0012. It follows feat(release): release-please opens the release pull request, topic pull requests target main, and its merge publishes #1861 (the swap) and refactor(release)!: delete the bespoke release machinery, the roadmap close command and the changelog fragment code #1863 (the deletion of the release machinery, which removes roadmap/close.py).
  • It needs the number item. _next_bucket and _close_release use its order and its identity.
  • That item removes Release.version and replaces _patch_bump with _next_bucket. This item calls _next_bucket and adds no naming rule.
  • Glossary: test_each_invariant_message_starts_with_a_term_context_md_defines (:1300-1303) needs each invariant message to start with a term that CONTEXT.md defines.
    • The workflow documentation item keeps four old terms: Current release, Release growth, Cut and Ship. It adds the terms Current milestone, Milestone growth and Delivered.
    • This item deletes the invariants that start with Cut: and Ship:. It moves the other invariants to the new terms. It deletes the four old terms from CONTEXT.md.
    • The workflow documentation item is step 9, so it merges before this item. Its title is:
      • "docs(workflow): the instructions describe trunk, derived versions and the release pull request"
  • Three items edit the same files and rebase on each other. The second to land rebases. They are:
    • "refactor(github): closing pull requests come from GitHub's closingIssuesReferences and the keyword parser goes" (_delivered_issues).
    • "refactor(roadmap): delete the one-time ADR 0001 roadmap migration" (_require_migrated).
    • "refactor(pr): delete the Copilot pass budget and the review-thread filing command" (release_copilot_passes in RoadmapConfig).
  • "refactor(roadmap): Release becomes Milestone in the planner, its settings and the board" merges after this item.
  • Until this item merges, a mutating run of the planner still creates release/vX.Y.Z branches. Only a person runs it, and the Service is suspended (chore(service): the roadmap service stays at 0 replicas, and its development is blocked, while its machine account is suspended #1562).

Acceptance criteria

  • This command prints nothing: git grep -nE "ReleaseState\.(CUT|MERGED|SHIPPED)|Event\.SHIPPED|Reason\.(CUT|MERGED|SHIPPED)|ChangeKind\.RELEASE_(CUT|UNCUT|SHIPPED)|RELEASE_CHANGE_KINDS|release_published|publish_release|is_release_pull_request|cuts_its_release|create_branch|seed_branch|_select_tracked_branch|_branch_writes|reprioritize_create_branch|INHERITS|release_pull_requests" -- src/devops_cli/roadmap src/devops_cli/commands/roadmap.py src/devops_cli/lang tests/test_roadmap_*.py tests/roadmap_*.py.
  • This command prints nothing: git grep -niE "release pull request|release branch|GitHub Release|release/v" -- src/devops_cli/roadmap.
  • git grep -n "CONST_RELEASE_BRANCH_PREFIX" -- src tests prints nothing. If the Copilot item has not merged, it prints only the two lines of config/constants.py that define the prefix and CONST_RELEASE_BRANCH_RE.
  • A test shows that a milestone with no open issue and one closed issue is delivered. The run closes it as its last write and starts the next one.
  • A test shows that a milestone with no issue is not delivered.
  • A test shows that the run which closes a delivered milestone starts the next one. The new milestone has an ISO 8601 date as title and the due date that _next_bucket gives.
  • A test shows that ReleaseState has the members PLANNED, STARTED and DELIVERED only.
  • A test shows that the keys of MESSAGES.roadmap.reasons equal the members of Reason.
  • A test shows that is_due is true when the last open issue of the current milestone closes.
  • CONTEXT.md defines none of Cut, Ship, Current release and Release growth, and test_each_invariant_message_starts_with_a_term_context_md_defines passes.
  • A test shows that changes_since of the GitHub adapter reads one listing, the issue events.
  • A test shows that the dry-run request list holds no pull-request, GitHub Release or branch request.
  • A test shows that ensure_checkout has no current_rel parameter and tracks the default branch of origin.
  • Until feat(sdlc): an OpenSpec change folder is the record of every item, and readiness checks its archive #1847 merges, the pull request changes the task file of this issue. After it, the pull request archives its change folder as its last commit, and the change has a spec delta for the planner.
  • devops docs check passes, and uv run devops ci passes with at least 90 percent coverage.

Pending a person

Activity

  1. added
    type/refactor
    on Oct 22, 2026
  2. dan-petty commented on Oct 22, 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/refactor. The candidate changes internal logic without adding new features or fixing bugs.
    • Priority: P2-Medium. The change updates how milestones are handled in the roadmap but does not block other work or fix a critical issue.
    • Value: Medium. The change improves internal process and aligns with new ADR, affecting roadmap planning and release handling.
    • Effort: High. The refactor touches multiple files and changes core logic for milestone state management.
  3. dan-petty commented on Oct 23, 2026

    @dan-petty
    OwnerAuthor

    Not planned: the planner is deleted by #1952. A person closes a planning milestone with devops gh milestones close.

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

    type/refactor

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions