Skip to content

refactor(release)!: delete the bespoke release machinery, the roadmap close command and the changelog fragment code #1863

Closed

Description

@dan-petty

Friction

After the switch to trunk, nothing calls the old release machinery. No workflow, no Service job and no document uses it. In whole files it is 3,502 lines of source and 4,846 lines of tests. About 650 more lines of source sit in modules that stay. If this code stays, it is zombie code under the project rule. Agents read it, extend it and fix it.

The code costs much to keep. ADR 0012 counts 97 merged pull requests with the scope release. 49 of them are fix, chore, refactor or docs pull requests that tend the release path. 29 commits changed the nine source files below since the first tag on 2026-08-17. The project is pre-1.0 and keeps no compatibility shim.

This item has ! in its title and a BREAKING CHANGE: paragraph in its body. devops release and devops roadmap close disappear. The owner holds the first release pull request until this item merges (ADR 0012 step 14). The first release is a minor release in any case, because the titles of #1861 and #1862 are feat. The hold adds the breaking-change note of this item to the release notes.

Evidence

The counts come from wc -l, grep and git grep at commit f3b17488, the tip of release/v0.2.39.

Whole files of source, 3,502 lines:

  • src/devops_cli/release/cut.py 1,126.
  • src/devops_cli/release/changelog_fragments.py 286.
  • src/devops_cli/release/notes_compaction.py 109.
  • src/devops_cli/release/__init__.py 1.
  • src/devops_cli/commands/release.py 888. A module-class proxy at lines 873-888 forwards setattr to release/cut.py.
  • src/devops_cli/github/release_notes.py 111.
  • src/devops_cli/models/release.py 51.
  • src/devops_cli/roadmap/close.py 618.
  • src/devops_cli/k8s/argocd_live_report.py 312.

Whole files of tests and documents, 5,034 lines:

  • tests/test_release.py 2,975.
  • tests/test_roadmap_close.py 876.
  • tests/test_release_changelog_fragments.py 283.
  • tests/test_release_notes_sync.py 192.
  • tests/test_release_notes_compaction.py 120.
  • tests/test_k8s_argocd_live_report.py 356.
  • tests/support/release_notes_examples.py 44. Only the two deleted release tests import it.
  • docs/commands/release.md 188. devops docs generate makes this page from the command group.

Pieces in files that stay. wc -l and the line ranges give each count:

  • roadmap/request_plan.py: close_requests at lines 615-691 (77). Its two helpers StoreRequests.merged_pull_requests (243-253, 11) and StoreRequests.pr_checks (255-259, 5) have no other caller.
  • roadmap/run.py: _run_close_adapter at lines 480-540 (61), _reprioritize_cross_job at 400-418 (19), the close row of RELEASE_LANE_ROWS at 655-661 (7) and the closed_items field at line 121.
  • commands/roadmap.py: close_cmd and _close at lines 432-503 (72), and the import of roadmap.close at lines 50-56.
  • exceptions/git.py: six Release*Error classes at lines 258-394 (137). Only cut.py and test_release.py use them. exceptions/__init__.py re-exports them in 12 lines. docs/ERRORS.md lists them at lines 91-96.
  • commands/devcontainer.py: the --oci-labels validator at lines 274-325 (52), the --oci-labels and --expected-source options at lines 381-388, and the label branch at lines 414-431. It compares emitted labels with CONST_CANONICAL_OCI_SOURCE, so it fails on any copy of the repository. Its tests are tests/test_devcontainer.py:2259-2423 (165).
  • lang/en: the classes ReleaseCommandHelp (help.py:1059-1083, 25), ReleaseMessages (messages.py:533-592, 60) and ReleaseErrorMessages (errors.py:211-246, 36). Also the close* fields of RoadmapCommandHelp (help.py:1147-1175, 29) and RoadmapMessages (messages.py:1919-1982, 64). Only the deleted code reads them. ADR 0012 estimates about 100 lines for these strings. The measured total is 214.

References outside the files above:

  • Command group: main.py:61, commands/__init__.py:24 and ai/mcp/dispatcher.py:57 name the release group.
  • MCP resource and domain: the resource resource://release/status (ai/mcp/server.py:206-211) runs devops release status. The domain list at server.py:528 and CONST_MCP_LAZY_DOMAINS (constants.py:227) name release.
  • MCP tools: CONST_MCP_EXPOSURE_TABLE has the rows ("release", "status") (line 350) and ("roadmap", "close") (line 359). CONST_MCP_COMMAND_EXCLUSIONS has seven ("release", ...) rows (lines 642-648). ai/tools/registry.py:140 and :151 give mcp_module.release_status to the auditor and pm personas. docs/MCP_TOOLS.md documents release_status and roadmap_close.
  • Constants for fragments and cut files: CONST_CHANGELOG_FRAGMENTS_DIR, CONST_CHANGELOG_FRAGMENT_NAME_RE and CONST_KEEP_A_CHANGELOG_CATEGORIES (constants.py:179-194). Also CONST_RELEASE_PROCESS_CUT_KIND, CONST_RELEASE_PROCESS_OPEN_KIND, CONST_RELEASE_PROCESS_BRANCH_RE, CONST_RELEASE_CUT_FILES and CONST_RELEASE_SHARED_FILES (constants.py:3768-3792).
  • Other constants: CONST_GITHUB_RELEASE_BODY_MAX_CHARS and CONST_GITHUB_PULL_REQUEST_BODY_MAX_CHARS. CONST_ROADMAP_CLOSURE_BATCH_KEYS (line 3127, used at line 3141). CONST_REQUIRED_OCI_IMAGE_LABELS (lines 1003-1012). In defaults.py: DEFAULT_ROADMAP_CLOSURE_INTERVAL_MINUTES and DEFAULT_ROADMAP_CLOSE_SUMMARY_CHARS. In CONST_DOCS_INVENTORY: the changelog.d entry at line 772. feat(release): release-please opens the release pull request, topic pull requests target main, and its merge publishes #1861 deletes the entry at line 797 with changelog.d/README.md.
  • An import hazard at constants.py:4214: CONST_REVIEW_ROUTED_PATH_PATTERNS holds the f-string f"{CONST_CHANGELOG_FRAGMENTS_DIR}/**". The module raises NameError at import when the constant goes alone.
  • Constants that stay: CONST_CANONICAL_OCI_SOURCE (k8s/argocd_gate.py reads it), CONST_CHANGELOG_FILENAME (line 4213 reads it) and DEFAULT_RELEASE_LABEL. CONST_RELEASE_BRANCH_PREFIX and CONST_RELEASE_BRANCH_RE also stay, because roadmap/run.py:295, roadmap/reprioritize.py:2034 and github/pr_branches.py:52 read them. The planner item deletes the prefix, and the Copilot item deletes the regular expression.
  • Config: pyproject.toml:249 lists changelog.d in also_copy of [tool.mutmut].
  • Text that names a deleted convention: openspec/config.yaml:37 names changelog.d/<issue>.md. A comment at src/devops_cli/ai/review/runner.py:674 names the branch release/v0.2.20.
  • Imports: models/__init__.py:124-128 and :272-275 re-export the four release models. commands/pr.py:81 and :1969 read find_changelog_section. The readiness rewrite in feat(release): release-please opens the release pull request, topic pull requests target main, and its merge publishes #1861 removes those two lines.
  • Store reads that only the closer used: MergedPullRequest (roadmap/store.py:514) and RoadmapStore.merged_pull_requests (store.py:965). Its two versions are in memory_store.py:798 and github_store.py:1931. Also merged_pull_requests_endpoint (github_store.py:1233), pull_request_files_endpoint (github_store.py:1239) and the payload method merged (github_store.py:509). Also release_cut_branch (store.py:222, with its __all__ entry at line 1088).
  • Argo helper: resolve_argocd_server_address (argo/credentials.py:12, re-exported at argo/__init__.py:6 and :29). Only the live report calls it.
  • Tests that read the real source tree: tests/test_docs_source_argv_collector.py:242 expects an argv from commands/release.py. tests/test_fastmcp_contracts.py:67 and :179 name release_status and the resource. tests/test_docs_inventory.py reads CONST_CHANGELOG_FRAGMENTS_DIR.
  • Tests of the release models and strings: tests/test_resource_schemas.py:80-84, :427-448 and :626-627 use the release models. tests/test_language_catalogs.py reads MESSAGES.release, ERRORS.release and HELP.release.
  • Tests of the fragment builder: tests/support/builders.py:22 and :78-82 build ChangelogFragment. tests/test_support_builders.py, tests/conftest.py:131 and tests/support/__init__.py:7 name the same code.
  • Tests of the Service and the store: tests/test_roadmap_run.py and tests/test_roadmap_dry_runs.py hold the cases for the close row and for close_requests. tests/test_roadmap_store_contract.py and tests/test_roadmap_github_store.py hold the cases for merged_pull_requests.

The Service due table needs a decision. ADR 0012 does not name the close row. The row calls roadmap/close.py, so it goes with that file.

CONST_ROADMAP_CLOSURE_BATCH_KEYS is the only source of the pull_request event in CONST_ROADMAP_WEBHOOK_EVENTS (server/routes/webhooks.py:153). That event leaves the Service consumer. The Service has 0 replicas in git (#1562), so no live consumer changes. The planner items decide if they need pull_request events again.

git grep with the pattern of ADR 0012 (changelog\.d|release/v|release/\*\*|devops release|roadmap close|chore/cut|chore/open) finds 53 files outside tests and history, and 44 test files. ADR 0012 counted 53 and 43 at commit 3ef69850. Other items own most of these files. #1861 owns the workflows, the template, AGENTS.md, CONTRIBUTING.md, RELEASE_CYCLE.md and the readiness rules in commands/pr.py. The docs(workflow) item owns the other documents, the knowledge base, the instruction generator and the small strings. The planner items own roadmap/store.py, roadmap/reprioritize.py, github/pr_branches.py and github/issue_closure.py.

Existing tool considered

This item builds nothing. An open tool or a GitHub feature now covers each deleted job.

  • release-please (googleapis/release-please-action v5.0.0, commit 45996ed1f6d02564a971a2fa1b5860e934307cf7) derives the version, writes CHANGELOG.md and opens the release pull request. It replaces release/cut.py, release/changelog_fragments.py and the prepare, pr, tag, changelog, check and status commands.
  • softprops/action-gh-release v3 (commit efb35369e0ad2afab669f228072c1b0d510eae64) uploads the assets and publishes the draft release. GitHub Releases and CHANGELOG.md hold the notes. This replaces release/notes_compaction.py, github/release_notes.py and the notes and sync-notes commands.
  • GitHub closes an issue natively when a pull request with Closes #N merges into the default branch. So roadmap/close.py has no input.
  • The Argo CD tag constraint (feat(k8s): Argo CD follows release tags #1862) replaces the live diff report. The ArgoCdApplicationOutOfSync alert (k8s/monitoring/prometheus-values.yaml:506) covers drift of the sync status. The report also printed host overrides. ADR 0012 deletes it and builds no replacement.
  • docker/metadata-action emits the OCI labels. So the --oci-labels validator has no job left.
  • devops docs generate --sync-readme regenerates the documents. ruff reports unused imports. vulture found 720 findings on src in the trial of test(hygiene): tombstone tests for deleted code are deleted and a dead-code tool is trialled #1871, so the project did not adopt it. This item finds orphans with git grep on the names listed above.
  • Cost: this item writes no new module and no new helper. ADR 0012 gives no token or time figure for it. The item states the tokens to implement, maintain and fix the change, and the elapsed time, before work starts.

Proposed remedy

Delete the whole files and the pieces above. Follow every reference until the git grep gate below prints nothing.

  • Delete the nine source files, the seven test files and docs/commands/release.md.
  • Remove the release group from main.py and commands/__init__.py. Remove the MCP resource, the domain, the exposure rows, the exclusion rows and the persona tool entries.
  • Remove close_requests, the close row of the Service due table, _run_close_adapter, _reprioritize_cross_job and the closed_items field. Remove close_cmd and _close.
  • Remove the six exception classes, the four release models, the strings and the constants listed above. Remove the --oci-labels validator with its options and tests.
  • Remove the store reads, release_cut_branch and resolve_argocd_server_address that no remaining code calls. Look for more with git grep -w on each name that the deleted files defined.
  • Remove the changelog.d directory if any file is left in it, and remove its entry in pyproject.toml. The release-please item (feat(release): release-please opens the release pull request, topic pull requests target main, and its merge publishes #1861) plans to delete changelog.d/README.md.
  • Edit the tests that name the removed code. Do not add a test for the absence of a removed name. Git history records deletions (test(hygiene): tombstone tests for deleted code are deleted and a dead-code tool is trialled #1871).
  • Delete the sentence "Only the closing group adds changelog.d/.md." from openspec/config.yaml:37. Change the comment at runner.py:674 to name a branch that exists.
  • Add no changelog fragment and no CHANGELOG.md edit. The pull request title is the changelog entry.
  • Run uv run devops docs generate --sync-readme. The pages CLI_REFERENCE.md, MCP_TOOLS.md, ERRORS.md, commands/roadmap.md and commands/devcontainer.md, and the README matrix, change with the code.

This item does not cover these parts:

What it deletes

The measured lines are 3,502 of source in whole files and 656 of source in pieces. They also include 4,846 of tests in whole files, 165 of tests for the --oci-labels validator and 188 of generated documents. The total is 9,357 lines. It excludes the constants, the store reads, the test cases in other files and the other regenerated pages. It adds no module, no helper and no test. It adds only the few lines that replace a deleted reference, for example one expected argv in tests/test_docs_source_argv_collector.py.

The 656 lines of pieces come from six places. They are 93 in request_plan.py, 88 in run.py and 72 in commands/roadmap.py. The other three are 137 in exceptions/git.py, 52 in the --oci-labels validator and 214 in lang/en.

Order and dependencies

ADR 0012 sets the order. The old pipeline publishes v0.2.39 and ends. Nothing in the new plan merges before that, except the ADR. Every pull request after that targets main.

Tests

  • The deleted tests go with their modules.
  • The edited tests are test_docs_source_argv_collector.py, test_fastmcp_contracts.py, test_resource_schemas.py, test_language_catalogs.py, test_docs_inventory.py, test_support_builders.py, test_devcontainer.py, test_roadmap_run.py, test_roadmap_dry_runs.py, test_roadmap_store_contract.py, test_roadmap_github_store.py, test_review_path_routing.py, test_review_pr_post.py and test_docs_knowledge_base_argv.py. The file conftest.py and the modules support/builders.py and support/__init__.py change too. The two review tests use changelog.d/1.md as a sample routed path. Use another routed path. test_docs_knowledge_base_argv.py uses the sample command devops release pr. Use a command that remains.
  • No test asserts that a removed name stays removed. The check for the removed group and tools is devops docs check and the git grep gate.
  • The deleted files hold no suppression comment, so no ceiling in DEFAULT_SUPPRESSION_CEILINGS moves. None goes up.
  • Coverage stays at or above 90 percent. Nobody writes a test to cover what is left.

Acceptance criteria

  • The git grep gate prints nothing. Run the command below.
  • uv run devops docs check passes. docs/commands/release.md is gone, docs/commands/roadmap.md has no close section, and docs/commands/devcontainer.md has no --oci-labels or --expected-source row.
  • release_status, roadmap_close and resource://release/status are absent from ai/mcp/server.py, CONST_MCP_EXPOSURE_TABLE, docs/MCP_TOOLS.md and tests/test_fastmcp_contracts.py. The auditor and pm personas hold no release_status.
  • The changelog.d directory is not in the tree, pyproject.toml does not name it, and devops_cli.config.constants imports.
  • DEFAULT_DUE_TABLE has no close row, and JobOutcome has no closed_items field. CONST_ROADMAP_WEBHOOK_EVENTS equals the events that the remaining batch keys name.
  • git grep -w finds none of MergedPullRequest, merged_pull_requests, merged_pull_requests_endpoint, pull_request_files_endpoint, release_cut_branch and resolve_argocd_server_address.
  • uv run devops ci passes with at least 90 percent coverage and no unhandled deprecation warning.
  • The pull request title starts refactor(release)!: and passes Semantic PR title. The body says Closes #1863. It has a paragraph that starts BREAKING CHANGE: and names devops release, devops roadmap close, --oci-labels, --expected-source, release_status, roadmap_close and resource://release/status.
  • The pull request description lists the lines deleted per file. The total is at least 9,000.
  • Pending a person: set the squash settings PR_TITLE and PR_BODY (ADR 0012 step 3) before this item merges. The BREAKING CHANGE: paragraph reaches the release notes only with those settings.
  • Pending a person: hold the first release pull request until this item merges (ADR 0012 step 14).
  • Pending a person: after this item merges, steps D1 and D2 of chore(settings): the release App, the release environment, the squash settings and the required checks are in place #1864 delete the release ruleset and the remote branches. They also confirm that no workflow trigger names release/**.
  • Pending a person: edit the 127 open issues whose criteria name a changelog.d fragment. Or accept that those criteria are void. ADR 0012 also counts 161 open issues that name changelog.d in the body.

The gate command:

git grep -nE 'devops release|roadmap close|devops_cli\.release|devops_cli\.commands\.release|devops_cli\.models\.release|devops_cli\.github\.release_notes|devops_cli\.roadmap\.close|argocd_live_report|Release(WorkingTreeDirty|RemoteFetch|BranchMissing|PushRefused|Push|PRCreation)Error|Release(Prepare|Status)(Request|Result)|CONST_RELEASE_(CUT_FILES|SHARED_FILES|PROCESS_)|CONST_CHANGELOG_FRAGMENT|CONST_KEEP_A_CHANGELOG|CONST_ROADMAP_CLOSURE_BATCH_KEYS|DEFAULT_ROADMAP_CLOSURE_INTERVAL|DEFAULT_ROADMAP_CLOSE_SUMMARY|CONST_REQUIRED_OCI_IMAGE_LABELS|CONST_GITHUB_(RELEASE|PULL_REQUEST)_BODY_MAX_CHARS|oci-labels|oci_labels|validate_oci_image_labels|release_status|resource://release|changelog\.d' -- . ':(exclude)docs/adr' ':(exclude)docs/agent' ':(exclude)CHANGELOG.md' ':(exclude)docs/RELEASE_NOTES.md' ':(exclude)tests/fixtures' ':(exclude)src/devops_cli/tools_lock/tools.lock'

Activity

  1. added
    source/agent
    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 proposes to delete bespoke release machinery, which is a refactor.
    • Priority: P2-Medium. It addresses outdated code that impacts maintainability but does not introduce immediate risks or user-facing changes.
    • Value: Low. The change removes legacy code rather than adding new functionality or fixing critical issues.
    • Effort: High. Deleting the release machinery involves removing and updating many files, references, tests, and documentation across the project.
  3. changed the title [-]refactor(release): delete the bespoke release machinery[/-] [+]refactor(release)!: delete the bespoke release machinery, the roadmap close command and the changelog fragment code[/+] on Oct 22, 2026
  4. dan-petty commented on Oct 23, 2026

    @dan-petty
    OwnerAuthor

    Delivered by #1952: it deletes devops release and the release package (cut, changelog fragments, notes compaction), devops roadmap close, and the changelog fragment code.

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/refactor

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions