Skip to content

Commit ddcadc5

Browse files
committed
test(release-hygiene): permit and require skip-existing on pypi publish
The previous assertion "assert 'skip-existing' not in payload" was a strict 'never silently skip a publish' guardrail. It pre-dated the case where the root colsearch package and the native crates (latence-shard-engine, latence-solver) are versioned independently — colsearch 0.1.7 is a metadata-only release for the natives (repo URL update only), so attempting to upload native wheels at the unchanged 0.1.6 version returns 400 from PyPI and (because publish-root needs publish-native) the colsearch root publish gets skipped too. With skip-existing: true the asymmetric versioning case is idempotent. Flip the assertion: skip-existing: true MUST be present, with a comment in the workflow explaining the policy. Also documents the second use case — gh run rerun --failed after a partial publish needs skip-existing or every already-uploaded wheel breaks the rerun. All 14 oss-release-hygiene tests pass locally.
1 parent 0b7a89b commit ddcadc5

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

tests/test_oss_release_hygiene.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,17 @@ def test_release_workflow_only_builds_supported_native_wheels() -> None:
8686
assert "publish-root" in payload
8787
assert "packages-dir: dist-native/" in payload
8888
assert "packages-dir: dist-root/" in payload
89-
assert "skip-existing" not in payload
89+
# `skip-existing: true` is intentionally enabled on both pypi-publish
90+
# steps. The native crates (latence-shard-engine, latence-solver) are
91+
# versioned independently of the root colsearch package and only need a
92+
# republish when their Rust source changes; a colsearch release that
93+
# ships without a native bump (e.g. metadata-only changes like updated
94+
# repository URLs) would otherwise hit "400 File already exists" on every
95+
# native wheel and skip the colsearch root publish that follows. The flag
96+
# is also load-bearing for `gh run rerun --failed` after a partial publish
97+
# — without it, the rerun fails on every wheel that already landed in the
98+
# first attempt. See ci(release) commit message for the full rationale.
99+
assert "skip-existing: true" in payload
90100
assert "crate: hnsw_indexer" not in payload
91101
assert "crate: gem_router" not in payload
92102
assert "crate: gem_index" not in payload

0 commit comments

Comments
 (0)