Repository navigation
feat(ci): continuous main alpha releases with reusable publishing - #533
Conversation
Review: REQUEST CHANGESSummary: The design is solid (atomic tag allocation, native-first publishing, artifact-level validation). A few operational points need a decision before merge. Strengths
Major
Minor
Reusability
Decision: REQUEST CHANGES. The two Major items above need a decision or setup confirmation before merge. |
|
Update on the two Major items
|
VakninAriel
left a comment
There was a problem hiding this comment.
PR #533 review
- PR: #533
- Title: feat(ci): continuous main alpha releases with reusable publishing
- Reviewed: 2026-11-17
- Base:
96a604c6be5cd0c12cf69997f2ceebeb23b6dda8 - Head:
64517b3835b3472fc1a92e3985990e04b7deffc1 - Recommendation: Request changes — one P2 correctness issue in the continuous-release guarantee.
Finding
[P2] Account for GitHub's workflow permission check when tagging older builds
Location: .github/workflows/ci.yml:340–348
prepare-alpha grants contents: write and uses checkout's default GITHUB_TOKEN to tag the exact tested github.sha. If another main push changes a workflow while this run is validating, creating a tag at the older tested SHA can be rejected by GitHub as creating/updating that workflow without workflows permission. This can happen even when the older commit remains an ancestor of main. The allocator treats this rejection as fatal (scripts/create_next_alpha_tag.py:145–167), so release-alpha is skipped despite successful validation. That breaks the stated guarantee that every successfully validated main push can independently release, including older runs that finish later.
The tagging design needs an authorization path that supports this case while retaining the exact tested SHA, or the release guarantee must explicitly be narrowed. workflows: write is not an available GITHUB_TOKEN workflow permission; adding actions: write does not solve this restriction. Ordinary tag-creation ruleset allowances do not grant the missing workflow permission. Introducing another credential would also need to preserve the intended event-trigger behavior and tag protections.
Evidence: The failure is observable in this external Actions run, attempt 1. The run tested 7be59c2; main advanced to 8f39bb4 while the run was active, changing .github/workflows/test.yml. The publishing checkout retained the old run SHA. Its token permissions show Contents: write, followed by:
! [remote rejected] v0.1.0 -> v0.1.0
(refusing to allow a GitHub App to create or update workflow
`.github/workflows/test.yml` without `workflows` permission)
Retrieve the evidence with:
gh run view 42348175974 --repo base-rs/base-web-media-type --attempt 1 --logThis is an externally observed platform constraint, not a reproduction against ChunkHound's production repository. It is conditional, not a claim that all older commits fail: an identical workflow at the same path on another branch can permit the operation. Existing tags or administrative intervention can also allow recovery. The unattended first-allocation path remains vulnerable.
Strengths
- Shared release implementation preserves native-first publication and separates alpha approval environments from stable/RC environments.
- Explicit requested-tag versioning avoids ambiguity when several tags point to one commit.
- Atomic release/identity refs provide strong allocation and same-run rerun guarantees.
- Alpha sdist configuration retains the native version pin through actual isolated source rebuilds.
No additional actionable defects were established in tag allocation, release parsing, packaging, or artifact validation. Independent reviewers examined workflow/platform contracts and allocator concurrency; a further adversarial review checked the retained permission finding.
|
Thanks for the thorough review. I'm declining the P2 finding. The failure needs a narrow timing overlap: a run for an older commit has to finish after a newer push to I'll leave the design as is. If it shows up in practice, we can revisit it then. |
Brings in chunkhound#526, chunkhound#502 and chunkhound#533. CHANGELOG.md conflicted only because this PR and chunkhound#526 each add a line at the top of [Unreleased] ### Fixed; both entries are kept, this PR's first. No other conflicts. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
Implement continuous alpha releases to production PyPI after successful upstream
mainpush builds.GITHUB_TOKEN; no GitHub App or TestPyPI.release-packages.yml; stable/RC entry workflows become thin callers while preserving stable behavior.skip-existing; no automatic publication-retry or custom storage system.Validation
uv run --no-sync pytest tests/test_smoke.py -v -n auto). Earlier runs showed intermittent 5-second CLI subprocess timeouts.git diff --check, anduv lock --checkpassed.Full suite is NOT green
Ran
uv run --no-sync pytest tests/ -vto completion (30m37s): 5663 passed, 11 failed, 72 errors, 104 skipped, 2 xfailed.@resvg/resvg-js.--no-syncpreserves the locally built native extension as required by the development workflow.Required deployment setup before merge/rollout
release-packages.yml(job_workflow_ref) with the correct project/environment combinations:chunkhound:pypi,pypi-alphachunkhound-native:pypi-native,pypi-alpha-nativev*release tags andalpha-build/**identity tags against updates/deletion; permit Actions creation only in the required alpha namespaces without blanket stable-tag bypass..github/release-channel.toml(6.2.0).The build-identity tags point to metadata blobs, not commits, and are tested not to affect Git version discovery. No release has been published during implementation.