Decouple GitHub release publication from deployment approvals - #3149
Decouple GitHub release publication from deployment approvals#3149UnArbosFive wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🛡️ AI Review — Skeptic (security review)VERDICT: SAFE LOW contributor risk: repository admin with substantive merged history; young account noted, no listed Gittensor association. automatic-release-publication → main. Reviewed all six changed files and the artifact-verification and publication paths. No AI review trust files changed; no prior Skeptic findings exist. Checks passed: FindingsNo findings. ConclusionNo malicious behavior or concrete security vulnerability found. Metadata automation requires explicit activation on main, validates release identity and artifact provenance, and preserves the package and website approval environments. 🔍 AI Review — Auditor (domain review)VERDICT: 👎 Repository admin with substantial merged history; young account noted. Gittensor: UNKNOWN, with no trusted-list match. The independent metadata reconciler preserves the documented authorization boundaries, but downstream publication has two regressions. Compared the locally available implementation of #3059: This PR is the better candidate. Recommend closing #3059 after addressing the approval-blocking issue below. This PR provides broader reconciliation and receipt-based retry handling; #3059's supersession handling remains useful for downstream publishers. Checks passed: Findings
ConclusionFix the Python attestation path and check completion receipts before requesting environment approval. Both issues prevent the intended publication behavior. |
| with: | ||
| pattern: core-dist-* | ||
| path: dist | ||
| path: release-src/dist |
There was a problem hiding this comment.
[HIGH] Point the attestation action at the relocated distributions
At .github/workflows/watch-mainnet-release.yml:503, core distributions move to release-src/dist, and the SDK build now writes there too. However, the astral-sh/attest-action step at line 545 still uses its default dist/* input relative to the workspace root. The preceding steps' working-directory settings do not carry over to a uses step. Consequently, the release artifacts are not attested, breaking stable publication or its mandatory provenance verification. Configure the attestation action's artifact input to select release-src/dist/* and verify that attestations are created alongside the files consumed by uv publish.
| needs: check | ||
| if: >- | ||
| github.ref == 'refs/heads/main' && | ||
| needs.check.result == 'success' && | ||
| needs.check.outputs.eligible == 'true' |
There was a problem hiding this comment.
[HIGH] Check completion receipts before entering approval-gated jobs
At .github/workflows/watch-mainnet-release.yml:584-588, crates publication runs for every eligible finalized release, even when its receipt already exists; website publication has the same condition at lines 780-784. Receipt checks occur inside the mainnet environment jobs, so GitHub requires approval before discovering that both jobs should skip. After a successful publication, the next ten-minute poll therefore requests redundant approvals and holds the workflow-wide watch-mainnet-release concurrency lock. Leaving these no-op approvals pending blocks subsequent watcher runs, including Docker retries and publication for newer runtimes. Check receipts in an ungated detection job and use per-channel needed outputs in the job conditions, retaining the in-job recheck for races.
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👎 |
Summary
Behavior
reconcile-mainnet-release.ymlpolls on the existing ten-minute cadence and is disabled unless both conditions hold:refs/heads/main; andRELEASE_METADATA_AUTOMATION_ENABLED == 'true'.The detector validates finalized runtime bytes, the exact lightweight
v<spec>tag and main ancestry, and trusted release-train artifact provenance. Finalization is ordered as:mainnetref through the dedicated App token;Already-final matching releases are verified without rewriting. Stale finalized identities stop before mutation.
The existing watcher retains its schedule, concurrency group,
publish-sdkenvironment, crates and websitemainnetenvironments, PyPI trusted publishing, crates.io publication, Vercel deployment, and automatic Docker dispatch behavior. Python state is isolated from non-Python channels. Docker, crates, and website receipts are immutable release assets namedpublication-<channel>.json; failed or partial channels remain retryable.Verification
Offline checks run successfully:
Additional checks:
py_compile.git diff --checkpasses.verify -> mirror update/read-back -> asset upload -> final promotion; the already-final retry performed zero writes.Preserved authorization boundaries
This PR does not remove or change PyPI, crates.io, production-site, or Docker authorization behavior. It only removes the redundant generic
mainnetapproval from GitHub metadata finalization and mirror synchronization.Activation contract — do not merge until ready
Provisioning and activation are intentionally not part of this PR. Before merging, a separately authorized cutover must:
subtensor-release-metadataon this repository only, with Contents read/write, mandatory Metadata read, and no webhooks.RELEASE_METADATA_APP_IDandRELEASE_METADATA_APP_PRIVATE_KEYto a newrelease-metadataenvironment restricted tomain, with no reviewers or wait timer and no signing, registry, or Vercel credentials.mainnetfromnetwork-branch-mirrors (CI only).RELEASE_METADATA_AUTOMATION_ENABLED=trueonly after the above controls are in place.There is deliberately no fallback to the shared mirror key, a PAT, or an unprotected environment. Keep the variable unset and do not merge/activate this PR until the provisioning and cutover are ready.