Publish tested localnet images and restore clippy#2928
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🛡️ AI Review — Skeptic (security review)VERDICT: SAFE VERY HIGH scrutiny due to the 14-day-old account and zero public repos, mitigated by repository admin permission, substantive merged contributions, matching author/committer, and no Gittensor association; codex/fix-localnet-publish-clippy -> staging. Static analysis found no malicious behavior or security vulnerability. Publication uses run-scoped tags and validated immutable digests, while final publication tooling is pinned to the workflow revision. Rust changes are test-only, and trusted AI-review and Copilot instruction files are unchanged. FindingsNo findings. ConclusionThe changes match the stated purpose and introduce no security-relevant regression. 🔍 AI Review — Auditor (domain review)VERDICT: 👍 Gittensor association UNKNOWN; repository admin with substantial recent contributions, reviewed as an established contributor. The publication job now pins its tooling checkout to FindingsNo findings. Prior-comment reconciliation
ConclusionThe prior revision-consistency issue is resolved. The workflow and test changes are coherent with the PR description and ready to merge. 📜 Previous run (superseded)
|
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
| needs: [setup, validate-image] | ||
| runs-on: [self-hosted, fireactions-turbo-8] | ||
| steps: | ||
| - uses: actions/checkout@v4 |
There was a problem hiding this comment.
[HIGH] Publish with the selected source revision
This checkout defaults to the workflow event ref, while setup may select another immutable commit for workflow_dispatch, including pr-number and branch-or-tag. The job can consequently run a missing or divergent publication script against descriptors produced from needs.setup.outputs.sha. Check out the selected SHA here, as the other source-dependent jobs do.
| - uses: actions/checkout@v4 | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ needs.setup.outputs.sha }} |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👎 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
…). Port the merged staging fix so published localnet manifests use smoke-tested platform digests, plus the supporting resolve/cleanup/smoke scripts from #2919 that this branch lacked. Also take the leasing weight tests' direct assert_ok! form that restores clippy. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
assert_ok!assertionsRoot cause
The localnet workflow validated locally loaded images, then discarded them and performed a second independent multi-platform build for publication. Runtime package installation in
Dockerfile-localnetmeans that rebuild was not guaranteed to produce the artifact that passed the smoke tests.The initial fix used SHA-and-architecture intermediate tags. Because mirror branches can publish the same SHA concurrently, one run could overwrite another run's intermediate tag before manifest assembly. The workflow now records each run-scoped platform image's registry digest and publishes only from immutable digest references.
The leasing weight tests also added panic wrappers that violated the workspace's denied clippy policy. Direct assertions preserve the failure semantics without suppressing or laundering the lint.
Impact
Published localnet manifests now reference the exact amd64 and arm64 registry digests that passed their native smoke tests. Concurrent mirror-branch runs cannot substitute platform images during final manifest assembly.
The final publication job no longer downloads binary artifacts, sets up QEMU, or rebuilds the image. A lightweight pull-request workflow exercises the manifest publication contract without pushing images or requiring registry credentials.
Both workspace clippy configurations are restored without weakening lint policy.
Validation
cargo fmt --all -- --checkSKIP_WASM_BUILD=1 cargo clippy --workspace --all-targets -- -D warningsSKIP_WASM_BUILD=1 cargo clippy --workspace --all-targets --all-features -- -D warningsSKIP_WASM_BUILD=1 cargo test -p pallet-subtensor --lib tests::leasing— 20 passed./.github/scripts/test-resolve-localnet-image.sh./.github/scripts/test-publish-localnet-manifest.shbash -ngit diff --check