Repository navigation
test(release): cover first-time release creation and retries - #7152
Conversation
|
Verdict: Approve This PR adds tests for the case where the release script has to create a release that doesn't exist yet: the lookup, the draft creation, and the retries when GitHub rate-limits. Before, every test started from a release that already existed. The tests fake only the Real-world evidenceN/A: this PR only changes tests (no evidence bundle was produced), so the verdict rests on reading the code. I ran the changed test file locally and all 26 tests passed (with 🔍 Technical detailsIssues found: none blocking. 🟢 Fragile clock stub ( Checked against
Strengths
|
Summary
Exercise first-time release creation and its retry paths so regressions that duplicate or prevent publication are caught by tests.
Why
Existing publication tests start with a release that already exists. The missing-release lookup, draft creation loop and recovery after an accepted but rate-limited creation therefore lacked coverage.
Linked issue
Closes #6998
Changes
ghboundary and clock while exercising the helper's real orchestration.Test plan
git diff --check origin/main...HEADpassed.python util/lint.py --allexited 1 with 16 checks passed, one failed check and one advisory MyPy warning category. Pylint reports E1120 atawake_clock.py:47andterminal.py:109. Both files match main. Running Pylint on those files in a separate clean checkout of main0a2afdc3reproduced both findings.Evidence
The added tests use synthetic assets, scripted
ghresponses and a simulated clock. No live GitHub release creation or publication was exercised.Checklist
python util/lint.py --all,pytest tests/unit/). Focused tests and changed-file lint passed, aggregate lint and full-suite limits are detailed above.