Skip to content

fix(release): the Service's cut commit collects the changelog fragments into the version's CHANGELOG.md section #1450

Closed

Description

@dan-petty

Problem

The roadmap Service's close job cuts a release with cut_release(is_prepare=True) (roadmap/run.py, and devops roadmap close in commands/roadmap.py; devops release prepare --create-pr takes the same path). On the cut branch, _apply_cut_modifications bumps pyproject.toml, src/devops_cli/__init__.py, uv.lock and the service image pin in k8s/devops/kustomization.yaml. It never collects the changelog.d/ fragments into a CHANGELOG.md section. Only a local devops release prepare X.Y.Z without --create-pr, and devops release changelog, call _write_version_changelog.

release.yml runs devops release check --allow-dirty --skip-ci on the merge to main before it tags, publishes the GitHub Release and builds the Service image. That check requires the newest CHANGELOG.md section to match pyproject.toml's version. So the automatic cut's release pull request can never publish. Reproduced on a scratch copy of release/v0.2.29 at 010f020: after _apply_cut_modifications(root, "0.2.29", sync_docs=False), the check prints "Version mismatch: CHANGELOG.md (0.2.28) does not match pyproject.toml (0.2.29)" and exits 1.

v0.2.27 hit this: its release run failed in 27 s, and #1260 collected the changelog afterwards. Meanwhile main pins service:vX.Y.Z, which was never published, so Argo CD rolls the roadmap Service onto a missing image (see the companion image item).

Proposed remedy

cut_release, when it prepares the cut (is_prepare=True), collects the fragments into the version's CHANGELOG.md section with the same _plan_fragment_collection / _write_version_changelog the local prepare uses, and deletes them in the cut commit. A fragment that lands after the cut (a critical fix admitted under #1294) is collected by a person as RELEASE_CYCLE.md §7 says, until #1103 moves collection to the release merge.

Acceptance criteria

  • On a real git repository in tmp_path whose release branch holds fragments, the automatic cut's commit holds the version's CHANGELOG.md section and deletes those fragments; devops release check --allow-dirty --skip-ci then passes on the cut branch.
  • A cut with no fragments writes the section the local prepare writes for that case, and the check passes.
  • The dry run of the cut lists the collection, and still makes no request.
  • RELEASE_CYCLE.md, changelog.d/README.md and AGENTS.md describe where the cut collects fragments.
  • Tests are offline, with fakes only at the process edge, each call phase under 1 s, and uv run devops ci passes.

Related: #1103, #1294, #1260, #1293, #1425.

Opened as a borrow (#1153, budget/borrowed): a bug that stops every automatic release from publishing, placed in v0.2.29 by the owner on 2026-10-08.

Update 2026-10-08: owner decision, re-scoped

The remedy above (the cut commit collects the fragments) contradicts the owner's decision on #1103 (2026-10-03, restated on #1280 on 2026-10-08): fragments are collected when the release merges or publishes, never in a release-cut commit, and there is no release-process pull request after the cut. The cut-commit implementation was built and reviewed but not shipped.

Re-scoped: this item delivers #1103's collection part. When the release merges into main or publishes, release.yml produces the version's changelog section from changelog.d/, so devops release check and the release notes pass without a person's pull request. The cut keeps writing only the version bump, the image pin and docs/ROADMAP.md.

#1103's open key question is decided in this item's first step, by the owner: (a) release.yml collects into CHANGELOG.md at the merge and a bot commits it, which needs a rule exception on main; or (b) CHANGELOG.md stops being committed, and the GitHub Release body comes from the fragments added since the previous tag.

v0.2.29: a person collects the fragments on release/v0.2.29 before the release pull request merges, the interim RELEASE_CYCLE.md §7 documents until #1103, because the v0.2.29 cut runs v0.2.28 code. This item no longer holds v0.2.29.

Acceptance criteria, replacing the cut-based ones above:

  • A release merge whose CHANGELOG.md has no section for its version publishes: release.yml's check, tag, GitHub Release and Service image succeed, and the release notes hold every fragment of the release, a fragment merged after the cut included.
  • No pull request, and no cut commit, collects fragments.
  • RELEASE_CYCLE.md §7 drops the interim person step, and changelog.d/README.md and AGENTS.md say where collection happens.
  • Tests run offline (workflow logic in Python, or tested scripts), and uv run devops ci and actionlint pass.

Note from the unshipped attempt: devops release changelog --update -v X.Y.Z, re-run when no fragment is left, rebuilds the section from commits instead of keeping it. Keep that in mind for the interim step: run it once, after the last fragment has merged.

Update 2026-10-09: owner decision — the cut collects, one step

The defect (owner, 2026-10-09): the Service did not do its part. fddc217, its v0.2.30 cut commit, changed only docs/ROADMAP.md, k8s/devops/kustomization.yaml, pyproject.toml and uv.lock. It left all 12 fragments in changelog.d/ and CHANGELOG.md untouched, although changelog.d/README.md says the cut merges every fragment into the version's section and deletes them. A cut commit must deliver a properly formatted changelog section. Release PR #1473 then merged and Release Orchestration failed on main; #1474 recovers by hand.

Owner, 2026-10-09 (after v0.2.30's release run failed on main for the missing changelog section): changelog collection moves into the cut. This replaces the 2026-10-08 re-scope to merge-time collection and reverses #1103's rule that fragments are never collected in a cut commit.

  • The cut commit does it all: the roadmap Service's close job (cut_release(is_prepare=True)) bumps the version, collects changelog.d/ into the version's CHANGELOG.md section (devops release changelog --update -v X.Y.Z), deletes the fragments and renders docs/ROADMAP.md, in one commit, before it opens the release PR. changelog.d/README.md already describes the cut this way.
  • A critical fix after the cut edits CHANGELOG.md's version section directly in its own PR; no fragment and no chore/open-vX.Y.Z-collate-<issue> PR. Nothing else touches CHANGELOG.md once the release is cut.
  • Removed: the merge-time collection, the person-run collate PR, and the collate-branch convention for critical fixes.
  • Docs to keep in sync: changelog.d/README.md (critical-fix path), RELEASE_CYCLE.md ("A Critical Fix While the Release PR Is Open"), AGENTS.md's changelog-fragment rule, and refactor(docs): no documentation-only pull requests: release artifacts are made as the release merges, and every kept doc changes with its code or is deleted #1103's decision text.

Acceptance criteria:

  • A Service cut of a release with fragments leaves CHANGELOG.md with the version's section, no fragment left, and devops release check passing on the cut commit.
  • devops roadmap close --plan lists CHANGELOG.md, the deleted fragments and k8s/devops/kustomization.yaml among the cut's files.
  • A cut with no fragment fails before it pushes, naming the missing entries.

Activity

  1. added this to the v0.2.29 milestone on Oct 8, 2026
  2. dan-petty commented on Oct 8, 2026

    @dan-petty
    OwnerAuthor

    Placed in v0.2.29 by the owner on 2026-10-08: without this fix the roadmap Service is not updated by the v0.2.29 release, and goes down instead. Please keep it in v0.2.29.

  3. added
    type/bug
    scope/release
    source/agent
    on Oct 8, 2026
  4. removed this from the v0.2.29 milestone on Oct 8, 2026
  5. dan-petty-bot commented on Oct 8, 2026

    @dan-petty-bot
    Collaborator

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

    • Priority: P1-High. The bug blocks every automatic release from publishing, as demonstrated by the v0.2.27 failure, and leaves main pinning an unpublished image.
    • Value: High. Without this fix no automatic release can be published, halting the project's delivery pipeline entirely.
    • Effort: Medium. Requires wiring the existing _plan_fragment_collection/_write_version_changelog into the cut path, updating three docs, and adding offline tests, but the logic already exists for the local prepare path.
  6. dan-petty commented on Oct 8, 2026

    @dan-petty
    OwnerAuthor

    Owner decision, 2026-10-08: v0.2.29 waits for this item. The roadmap Service (still on v0.2.28, which lacks #1349) moved it to the backlog at intake. It is placed back in v0.2.29 when its pull request is ready to merge, and the v0.2.29 release pull request merges only after it and the changelog collection have landed on release/v0.2.29.

  7. changed the title [-]fix(release): the automatic cut collects the changelog fragments, so its release pull request passes release.yml's check[/-] [+]fix(release): the release merge collects the changelog fragments, so a release publishes without a person's pull request[/+] on Oct 8, 2026
  8. changed the title [-]fix(release): the release merge collects the changelog fragments, so a release publishes without a person's pull request[/-] [+]fix(release): the Service's cut commit collects the changelog fragments into the version's CHANGELOG.md section[/+] on Oct 9, 2026
  9. added this to the v0.2.33 milestone on Oct 9, 2026
  10. added
    priority/p0-critical
    on Oct 9, 2026
  11. removed this from the v0.2.33 milestone on Oct 9, 2026
  12. dan-petty-bot commented on Oct 9, 2026

    @dan-petty-bot
    Collaborator

    Moved to the backlog: it was New, not Ready, when v0.2.33 started. (devops roadmap reprioritize)

  13. added this to the v0.2.33 milestone on Oct 9, 2026
  14. dan-petty-bot commented on Oct 9, 2026

    @dan-petty-bot
    Collaborator

    Admitted to v0.2.33: after v0.2.33 started, only a critical fix can join it. A person can place it in a planned release, and that placement stands. (devops roadmap reprioritize)

  15. dan-petty-bot commented on Oct 9, 2026

    @dan-petty-bot
    Collaborator

    What changed

    #1522, merged into release/v0.2.33 as 05399bf.

    Closes #1450

    32 file(s) changed.

    How it was verified

    Check runs at cf80a23:

    • Prune PR DevContainer Images: pass
    • devops-cli: pass
    • bandit: pass
    • CodeQL: pass
    • Static Analysis: pass
    • Analyze (actions): pass
    • Analyze (python): pass
    • Tests & Coverage: pass
    • Changed-Test Independence: pass
    • DevContainer Image: skipping
    • Service Image: skipping
    • Dependency Freshness: skipping

    Acceptance Criteria of docs/agent/tasks/task-1450-service-cut-collects-changelog-fragments.md:

    • A Service cut of a release with fragments leaves CHANGELOG.md with the version's section, no fragment left, and devops release check --allow-dirty --skip-ci passing on the cut commit: test_the_cut_pushes_the_cut_branch_from_the_release_tip_and_opens_a_ready_pr (tests/test_roadmap_close.py) runs devops roadmap close --confirm over a real git clone and bare remote. The cut commit modifies CHANGELOG.md, deletes changelog.d/1.md, holds ## [0.2.26] - <today> with - one, and release check exits 0. A fragment merged after a cut whose pull request closed unmerged joins the same section: test_a_cut_after_an_unmerged_release_pr_rebuilds_from_the_new_tip. Through devops release prepare --create-pr, the cut commit changes CHANGELOG.md and deletes changelog.d/1.md: test_release_cut_pushes_from_remote_release_tip_and_leaves_main_untouched (tests/test_release.py).
    • devops roadmap close --plan lists CHANGELOG.md and the fragments it deletes among the cut's files: test_the_cut_names_the_branch_base_title_and_missing_fragments and test_the_dry_run_command_makes_no_request_and_names_the_cut_files. The criterion's k8s/devops/kustomization.yaml is obsolete: since refactor(release): the release no longer pins, bumps or pre-publishes the service image tag; image updater rolls service:latest #1486 that file pins no image and the cut never touches it.
    • A cut with no fragment fails before it pushes, naming the missing entries: test_a_cut_with_no_fragment_and_no_entries_for_its_version_fails_before_it_pushes exits 1 naming v0.2.26, release/v0.2.26, ## [0.2.26] and the delivered item's number, with origin's refs unchanged and no gh pr create. On the Service's path, the close job of DEFAULT_DUE_TABLE raises an error naming both delivered items, with nothing pushed (test_the_services_close_job_names_the_items_with_no_fragment_when_the_cut_stops). Through cut_release with no plan, a branch with no fragment or with no ## [ heading stops with the one error naming both causes and pointing to devops roadmap close --plan, with origin's refs unchanged and gh not called (test_a_cut_with_no_entries_for_its_version_names_both_causes_before_it_pushes, tests/test_release.py). A bad fragment stops the cut with the clone on the release tip and clean, nothing pushed and gh not called: test_a_bad_fragment_stops_the_automatic_cut_before_it_writes_or_pushes.
    • A re-cut whose tip already holds the version's section, with no new fragment, passes and leaves CHANGELOG.md byte-identical to the tip: test_a_re_cut_whose_tip_holds_the_version_section_keeps_it.
    • A critical fix after the cut edits the version's section: into release/v0.2.25, a pull request modifying CHANGELOG.md has no blocker when the branch's raw CHANGELOG.md holds a non-empty ## [0.2.25], read with the raw media type at ref=release%2Fv0.2.25 (test_after_the_cut_a_pr_may_edit_the_versions_changelog_section, tests/test_pr_cmd.py). It is blocked as before when the section is missing or empty (test_before_the_cut_a_pr_that_edits_the_changelog_is_blocked), a failed read is one blocker naming the error (test_an_unread_base_changelog_is_one_blocker_naming_the_error), docs/ROADMAP.md stays blocked, with no fragment advice (test_after_the_cut_docs_roadmap_md_is_still_left_to_the_cut), and a pull request that does not edit CHANGELOG.md in place makes no read (test_a_pr_that_does_not_edit_the_changelog_reads_none).
    • RELEASE_CYCLE.md, changelog.d/README.md, AGENTS.md, CONTEXT.md, docs/agent/tasks/README.md, docs/ROUTINE_TASKS.md and the pull request template say the cut collects, and give the critical-fix path.
    • Tests run offline, with fakes only at the run_gh seam and real git in tmp_path; each call phase in tests/test_roadmap_close.py, tests/test_release.py and tests/test_pr_cmd.py is under 1 s apart from two tests this item does not change: test_every_section_of_this_repositorys_changelog_fits_both_limits, which reads the real CHANGELOG.md, and TestPrCommands::test_check_readiness_clean, whose perimeter warning makes the run's first import of devops_cli.ai.review (1 to 3 s).
    • Pending a person: v0.2.33's own cut is made by the v0.2.32 Service, which does not collect. After that cut and before the v0.2.33 release pull request merges, open chore/open-v0.2.33-collate into release/v0.2.33 that runs uv run devops release changelog --update -v 0.2.33 once, as chore(release): collect the v0.2.32 changelog fragments #1517 did; check that uv run devops release check --allow-dirty --skip-ci passes on it, and merge it before the release pull request.
    • Pending a person: edit refactor(docs): no documentation-only pull requests: release artifacts are made as the release merges, and every kept doc changes with its code or is deleted #1103's body. Its acceptance criterion "The cut-time collection fix(release): the Service's cut commit collects the changelog fragments into the version's CHANGELOG.md section #1450 adds is deleted" and its 2026-10-03 decision are reversed by the owner's 2026-10-09 decision here (the reversal comment on refactor(docs): no documentation-only pull requests: release artifacts are made as the release merges, and every kept doc changes with its code or is deleted #1103 already exists).
    • Pending a person: after a Service running v0.2.33 cuts v0.2.34, git fetch origin && git show --stat origin/release/v0.2.34 lists CHANGELOG.md and the deleted changelog.d/*.md in the cut commit, and the release.yml run on the merge to main passes its devops release check step.
  16. added a commit that references this issue on Oct 10, 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/p0-criticalscope/releasesource/agenttype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions