fix: PyPI prune snippet + force marker only in PR title (v0.268.10) (#1146)

## Summary
Two follow-ups to #1145, both found while doing today's prune.

1. **Prune console snippet silently did nothing.** PyPI's delete-version
form now requires five `acknowledge_*` checkboxes. A submit without them
gets a **200 re-render**, which the old snippet counted as "deleted".
The snippet now reads each release's real form (CSRF plus checkboxes),
submits it, and counts a version deleted only when its manage page 404s.
This is the exact approach used for today's prune (88 releases, 10.73 →
~4.1 GB).
2. **The force marker matched the commit body.** A squash commit's body
is the PR description. #1145's description just *mentioned* the marker,
which forced a publish on merge. That publish ran before the prune, so
it 400'd and uploaded nothing. The marker now only counts in the commit
subject (the PR title).

Docs: the runbook covers the new form, the per-version JSON cache lag,
and a prune log.

## Testing
- Unit tests: 30 pass across both scripts, with new tests for
checkbox/404 handling and for a marker in the body not forcing a publish
- `node --check` on the generated snippet
- Replayed #1145's real merge message through the gate: no publish
- Local CodeRabbit review: 0 findings
- Full `make test` not re-run (no app code touched); PR CI covers the
package suites

@coderabbitai ignore

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01MSW9yjwGnzz1S8MgCGm6t5

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Andrew Beveridge ☄️andClaude Opus 5.5 authored and GitHub committed 2026-10-14 13:34:57 -04:00
1 parent 5005d3cb80
commit 39dcf2598e
8 files changed
+67 -29

No files matched your search

+2 -2
View File
@@ -986,8 +986,8 @@ jobs:
# the version bump). Each wheel is ~62 MiB and PyPI caps the project at
# 10 GB; publishing on every merge filled it every few weeks. PyPI is only
# the public `pip install` channel — Cloud Run and the encoding worker
# (GCS wheel) don't use it. Force: "[publish-pypi]" in the commit message
# or the workflow_dispatch input. The tag + GitHub release below still
# (GCS wheel) don't use it. Force: "[publish-pypi]" in the commit subject
# (PR title) or the workflow_dispatch input. The tag + GitHub release below still
# happen on every release (the encoding-worker gate diffs against tags).
- name: Decide PyPI publish
id: pypi_gate