Verify milestone completeness before cutting a release (#3)#16
Conversation
|
These two PRs merge cleanly textually, but #14 changes the milestone model in a way that makes this guard semantically wrong if #14 lands first. Flagging so the guard isn't merged in a state where it silently does nothing.
Rework path if #14 is the intended direction (it's your call — it's your PR):
The pure set-diff in |
|
Follow-up to the semantic-conflict note above: applied the fix rather than leaving it as a flag.
No dependency on #14's code and no new top-level symbol, so it stays merge-order-independent — verified Empirically validated: merged all open koan PRs (#15–#23) plus #14 into a throwaway integration branch and ran the full suite — 97 passed, confirming the whole stack is semantically compatible, not just textually mergeable. Remaining limitation (documented in the docstring, not fixed here): if the per-cycle model also removes merged PRs from the milestone at first beta, the completeness check only sees PRs still attached at cut time. Restoring full coverage needs the set of PRs ever milestoned this cycle — a follow-up that genuinely depends on #14's final shape. |
PR Review — Verify milestone completeness before cutting a release (#3)Solid, well-scoped feature with one milestone-resolution ordering risk to settle before merge. What's done well:
What needs attention:
🟢 Suggestions
1. Missing-PR check is softer than the open-PR check beside it
|
Add a check that every merged PR on the release milestone is actually present in the bump-<version> branch, catching commits left behind by a skipped cherry-pick or stranded in a beta (closes esphome#3). - milestone.find_missing_milestone_prs: pure set diff (milestone PRs minus PRs reachable in git log base..head), kept config/GitHub-free so it is unit-testable without a configured working copy. - Project.get_milestone_pr_numbers: merged PR numbers attached to a milestone. - cutting.verify_milestone: gathers per-project data, reports missing PRs and prompts for confirmation. Wired into cut_beta_release and cut_release before the final confirmation, and exposed as the 'verify-milestone' CLI command. - Tests for the detection logic; NOTES.md documents the step.
verify_milestone() looked up the milestone strictly by str(version). Under a per-cycle milestone model (one milestone per release cycle, titled with the beta/dev components stripped), that lookup returns None for every beta, so the completeness guard silently no-ops. Add milestone.milestone_title_candidates(version) — an import-clean, unit-tested helper returning [cycle_title, per_version] (deduped) — and resolve the milestone against both, so the guard works under either model regardless of merge order.
Rebase with requested adjustmentsBranch Changes applied
StatsActions performed
CI statusCI will be checked asynchronously. Automated by Kōan |
6ea58c0 to
1d58fb3
Compare
What: Verify that every merged PR on a release's milestone actually lands in the release before the cut is confirmed.
Why: Closes #3. Milestoning a PR did not guarantee it shipped — a skipped cherry-pick or commits stranded in a beta could leave merged work out of a release (the reported case: 2 commits in 1.15.0b5 that never made it into v1.15). Nothing in the flow caught it.
How:
milestone.find_missing_milestone_prs— pure set diff (milestone PRs minus PRs reachable ingit log base..head). Deliberately free ofconfig/GitHub imports so it stays importable and unit-testable without a configured working copy.Project.get_milestone_pr_numbers— merged PR numbers attached to a milestone (state="all", merged-only).cutting.verify_milestone— gathers per-project data, warns about any missing PRs with links, and prompts before continuing. Wired intocut_beta_releaseandcut_releaseright before the final confirmation (compares against thebump-<version>branch), and exposed as a standaloneverify-milestoneCLI command for after-the-fact checks against a tag.Testing:
pytest tests/test_milestone.py(7 cases covering the detection logic — all present, missing/sorted, extras ignored, empty inputs, dedup, arbitrary iterables). Full package import smoke-checked with a config present.Note: the GitHub-coupled glue follows the existing untested release tooling on
main; only the pure detection logic is unit-tested, by design, to keep the suite runnable without live GitHub access.Quality Report
Changes: 20 files changed, 356 insertions(+), 937 deletions(-)
Code scan: clean
Tests: failed (FAILED)
Branch hygiene: clean
Generated by Kōan