Skip to content

fix(pypi): validate wheel format before staging - #1866

Draft
EffortlessSteven wants to merge 3 commits into
mainfrom
fix/pypi-wheel-metadata
Draft

EffortlessSteven wants to merge 3 commits into
mainfrom
fix/pypi-wheel-metadata

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Summary

Closes #1865. Refs #1781 and #1782.

stage_wheel now requires one well-formed supported Wheel-Version header before creating the staging directory. Invalid, ambiguous, or unsupported headers fail; valid 1.0 and compatible newer 1.x formats remain admissible.

Current published head: 31a5e449f0f3ab8e00dfc75925e42b6a30b945b0; integration base: 94633f071542496d44e2745b536c72f4ca5b3a98; tree: 3d06022484e140d2011cae9247d150c51402994c.

Retained qualification head: d419b58a60c721fe934fc81498697acbb71c13e8, base ec2fcfe0758e52650993da25c6b2da0984f0bd37, tree 6bb572360d78a9b2da983c8906555e2818cb848d. All execution receipts below retain that prior subject unless stated otherwise.

The normal protected expected-head merge of the prior qualified head was refused with 405: “5 of 5 required status checks are expected.” The existing branch now incorporates accepted main through an ordinary merge with parents [prior candidate, 94633f…]. The published tree exactly matches the independently calculated composition, preserving the four-file candidate plus both installation-doc edits. This update follows an actual protected-integration refusal; no protection change, override, forced ref update or unchanged-head rerun was used.

SOURCE_CLEAR / REVIEW_INCOMPLETE; Draft. The protected merge was not accepted. The current-base head now needs its normal hosted qualification and final review. Earlier successful local Python, package-consumer, native and normalized-result proof is retained for its exact prior subject.

Swarm / Source Boundary

This existing PR targets EffortlessMetrics/ripr, the source-owned PyPI admission authority. The inherited swarm-only choices are n/a:

  • ordinary feature, analyzer, editor, docs, spec, fixture, badge,
    dependency, or repo-ops development for ripr-swarm
  • repair or follow-up for a same-repo swarm PR
  • swarm-only CI, runner, routing, source-of-truth, or agent-operating
    surface
  • other swarm-scoped work:

The repair belongs to the existing public package-admission controller under #1865. Source/run/artifact currentness remains owned by separate #1849. No registry publication, credential, runner, or protection change is included.

Source-of-truth Links

Proposal: n/a — bounded admission repair.
Spec: #1865, PyPA wheel format, and docs/PYPI_BOOTSTRAP.md.
ADR: n/a — existing source-owned controller.
Plan item: #1865; no successor selected.
Active goal: this issue/PR continuation; no repository-global scheduler.
Issue: #1865; related #1781/#1782; preserve #1849 currentness ownership.

Scope

Four paths: the existing .github/scripts/pypi_admission.py controller, its existing allowlisted test file, docs/PYPI_BOOTSTRAP.md, and CHANGELOG.md.

An expected-head non-force merge incorporates the recorded main basis's landed ZIP/Tokio, consumer-diagnostic, and workflow-policy prerequisites. The original four-file admission delta is preserved.

Scope Classification

  • One production behavior
  • One public contract
  • One architectural seam
  • Docs/spec/test-only evidence package
  • Other:

Production delta:

  • Validate exactly one supported WHEEL format header before any staging-directory creation. Duplicate headers fail as ambiguous.

Evidence/support delta:

  • Invalid-header rejection and compatible-minor tests; existing fixtures carry valid format metadata so their original assertions remain reachable; bootstrap/changelog explanation.

Single acceptance criterion:

  • Reject invalid/ambiguous/unsupported WHEEL format metadata before staging while retaining valid 1.0/newer compatible 1.x headers, exact-byte copying, and independent platform checks.

Non-goals:

  • Package names/versions, source/run/artifact currentness, runtime analyzer behavior, workflows, registry state, immutable public-package changes, or publication.

Support-tier Impact

  • none
  • updates docs/status/SUPPORT_TIERS.md
  • changes a README, release, docs, CLI, JSON, editor, CI, or package claim

Claim/proof notes:

  • Admission enforces the documented wheel format boundary. No analyzer/support tier or installed-platform support is promoted; the existing public wheel is not shown broken.

Policy Impact

  • none
  • doc artifacts
  • CI lane
  • package boundary
  • lint / Clippy
  • no-panic
  • file policy
  • generated artifact
  • dependency
  • process/network

Ledger or exception notes:

  • Validation changes at the existing source-owned package admission boundary. No new dependency, programming-file, process/network, credential, permission, or policy exception is introduced. Duplicate-header refusal deliberately exceeds pip's first-header behavior.

Proof

The protected refusal and current-base publication supersede the prior REVIEW_READY integration disposition. Current-head CI is owned by the natural synchronize event; wait for its terminal exact-subject evidence. No prior run is presented as execution of 31a5e449….

Current-base qualification — October 30, 22:38 UTC observation

Fresh GitHub preview 501e79bbe6b58d274b7a5304d339b02af97fa786 has ordered parents [current main 94633f071542496d44e2745b536c72f4ca5b3a98, current head 31a5e449f0f3ab8e00dfc75925e42b6a30b945b0] and expected combined tree 3d06022484e140d2011cae9247d150c51402994c.

  • Wheel run 41138629149 completed all three jobs. Actual build/pip/uv logs were inspected: 16 admission tests and 16 diagnostic-evidence tests passed. The receipt binds this new head/tree, Linux x64/glibc, native 0.11.0-alpha.2 / Python 0.11.0a2, with publication false.
  • Current wheel SHA256 is d36b6d69e136638a3844765d968b55c6d2adc4b35ba28e34c6a0570583fd2b47; payload SHA256 is be86543ecce27127d6980df863743d9f7689fa47424c20e0608a3b8a405e3994. Both consumers verified qualified artifact 13018650815, SHA256 cf6292217cadc5b9b985eace71ff960cd482257b1f5f776732fefed13dffd84d, and passed nonzero preview, fresh-shell explanation, disablement, planted-executable, reinstall and uninstall assertions.
  • Rust run 41138628774, native 124347297220, was running Required Rust gates; PR evidence, receipt/upload and normalized result remained pending. No current-head native count or final verdict is claimed.
  • npm run 41138628933 had completed its native build/pip/uv jobs; package job 124349917071 was running setup-node. npm package/publisher/consumer qualification remained pending at that observation. The successful prior npm run below is not this subject.

Retained scoped execution and prior-head hosted packages

The current source-review record reports Python 3.12.14 executing 16/16 admission tests against blob-verified current-composition source/workflow. Production from the recorded main basis fails all seven invalid-header controls; compatible-minor and exact-copy positives pass. No local Rust/package-gate execution is claimed.

Actual logs from wheel run 41133229823 and npm run 41133229883, both attempt 1, were inspected across 3/3 and 7/7 successful jobs respectively. Both build receipts bind the retained prior qualification head/tree named above:

python3 -m unittest discover -s .github/scripts -p 'test_pypi_admission.py'
python3 -m unittest discover -s .github/scripts -p 'test_python_consumer_evidence.py'
python3 -m unittest discover -s .github/scripts -p test_npm_package.py
python3 evidence/npm_consumer.py evidence consumer-proof
  • Each native build passed 16 admission tests and 16 consumer-evidence tests. These are two suites, not an optimized rerun. Missing-script and changed-payload/RECORD negative controls rejected the invalid wheels.
  • Pip/uv in both runs verified matching artifact/native hashes, installed without inherited Cargo/rustc/ripr, analyzed one changed Python file with nonzero findings, followed the finding through fresh-shell explain, rejected planted executables, retained disabled-language incomplete status, and reinstalled/uninstalled.
  • Node 24.19.0/npm 11.9.0 and Node 20.20.1/npm 10.8.2 each printed 4 selected / 4 executed / 0 failed routes. Each local/global/npm-exec/npx route and fresh reinstall reported 1 probe /1 finding. Framed LSP, invalid-command, planted executable, disabled-preview, OS/CPU/libc, and removal controls passed.
  • Package job 124332095958 and publisher-control job 124332347164 each passed 31 tests. Product/packaging source identities match that retained prior qualification head/tree; npm consumed its own run's qualified wheel; native_build_repeated=false, publication_attempted=false.
  • Native payload SHA256: be86543ecce27127d6980df863743d9f7689fa47424c20e0608a3b8a405e3994.
  • Wheel-run archive SHA256: d1dc6e6e683e9032580f380fcee7ddfe48043ec1d955450c6f305622146377bf; npm run's separate wheel SHA256: ff6625c7ac84f4a3cb80acb342d1f0dcc34cdb92efe859486e08c208ae981b62.
  • npm tarball SHA256: 24250ca1c90a753e795909428e595d1739ad5a565fc309be8930dfa84528b718. Both npm consumers and publisher controls downloaded artifact 13015945249 with matching digest f82f9673ee1d5a9f879c032ac5b60a130c765197331d5f20c864130e119bf555.

Scope: native0.11.0-alpha.2 / Python 0.11.0a2, Linux x64/glibc, and lang-python/lang-rust/lang-typescript. Full uploaded ZIP bytes and unprinted Python diagnostic JSON were not personally downloaded; use observed nonzero Python findings rather than an invented exact count.

Historical discriminator and native evidence

Original head 99f4ef9f414642e65e39610ee5faea986d9ddb28, base e7b89e2f9dad2e64d4b2ced3d13d862eef25b316, candidate tree fe057a4bc9d9f92313be1d9767ff5ef22ecf807c:

  • Historical normal and optimized admission runs each passed 16 tests. Exact-parent production failed the seven intended invalid-header subcases. Wrong implementations were rejected for omitting validation, choosing only the first header, rejecting compatible minors, creating staging early, or omitting platform checks.
  • Earlier check-fast/precommit/policy proof and independent pinned-pip/real-stage-CLI review remain historical. Rust run 38866564265 recorded 8,032 passed / 0 skipped; prior wheel/npm runs 38866564293/38866564073 succeeded on their original subject.
  • The earlier yanked-ZIP gate hold is resolved by landed main prerequisites. It is not a current failure attributed to this PR.
  • Earlier public 0.11.0a1 wheel inspection found valid 1.0 metadata and matched SHA256 de881aa3512d10b79b48ef55233afdd133ff37b845a054b037185522d0e0c0bd. Pinned-pip metadata/error-path controls did not execute its native binary or qualify installation/publication.

Result, failures, or skipped proof:

  • Prior-head native closeout: job 124329311930 executed all 22 gate/evidence commands and reports 8,042 passed / zero skipped across 23 binaries. Tested merge 04de9e9c0d2895c56414ed7d8f08a35fb69c6c00 has recorded base/head parents and tested tree 6bb572360d78a9b2da983c8906555e2818cb848d. Result job 124344562889 downloaded artifact 13017173824, ripr-routed-rust-evidence-41133229832-1, with matching SHA256 92a206b42a414af526f59f2311a1eb2ebede6be03c45d3d1d1fc7d2253c5a0b5; expected repository/base/head/subject/tree agree, download and child succeeded, and verdict=passed. Both jobs are terminal success.
  • Historical commands are not execution on the new integration; no local aggregate Rust pass, registry publication, or full archive-byte inspection is claimed.

Claim Boundary

The stage controller rejects invalid/ambiguous/unsupported wheel format metadata before creating staging output, with compatible 1.x formats and byte identity preserved. Historical pinned-pip controls and current Linux package-consumer runs retain their distinct subjects.

This does not qualify other platforms, source/build/registry-install equivalence, immutable public packages, external publication, source/run/artifact currentness, or final release readiness. Normal protected integration remains binding.

Rollback

Revert this coherent four-file admission/docs/test change before shipping to restore prior admission. No immutable public package is changed. The prior native proof remains successful, but the current-base head requires fresh normal qualification and final review before protected integration and #1865 closeout.

Spec-Test-Code Traceability

Static Language Check

  • Static output avoids killed, survived, untested, proven, and adequate.
  • Unknowns include stop reasons where applicable.

n/a to analyzer output: this package-admission repair adds no static verdict or unknown-state behavior.

CI Economics

  • LEM impact: two added admission-test cases within existing commands; no new workflow/job.
  • Workflows touched: none.
  • Branch protection impact: none; ordinary enforcement retained.
  • Failure mode caught: unusable or ambiguous WHEEL format admitted before staging.
  • Cheaper signal considered: focused Python positive/negative controls before existing native package qualification.
  • Required lanes affected: no topology change; existing applicable checks still qualify the candidate.
  • Advisory lanes affected: none.
  • On-demand/release lanes affected: existing source admission semantics only; no publication requested.
  • Labels that alter behavior: none added.
  • Artifact families affected: unchanged.
  • Rollback path: revert the four-file slice; no workflow/protection change.

Engineering Check

  • No new panic, unwrap, expect, todo, or unimplemented in production code.
  • No new panic, unwrap, expect, todo, or unimplemented in tests.
  • New non-Rust programming files are allowlisted with owner, surface, and reason.
  • New generated, dependency, process-spawn, or network surfaces are allowlisted with owner and reason.
  • Errors are reported with actionable context.
  • Public JSON/schema changes are documented.

Source-review conclusions: changes stay in existing allowlisted Python controller/tests; invalid metadata produces actionable rejection before output creation. No new Rust panic path, programming file, generated/dependency/process/network exception, or public JSON/schema is introduced.

Gates

All gate boxes below are unchecked for the newly published head. The corresponding prior-head commands were observed successful in the retained native job. The actual test command was cargo nextest run --workspace (8,042 passed/zero skipped), so the distinct cargo test --workspace box remains unchecked. Precommit, goldens and fixtures also passed. Other unchecked commands are not individually asserted here; this checklist requests no extra run. Python/package proof remains separate. Extension entries are n/a.

  • cargo fmt --check
  • cargo check --workspace --all-targets
  • cargo test --workspace
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo doc --workspace --no-deps
  • cargo package -p ripr --list
  • cargo publish -p ripr --dry-run
  • cargo xtask check-static-language
  • cargo xtask check-doc-artifacts
  • cargo xtask check-support-tiers
  • cargo xtask check-no-panic-family
  • cargo xtask check-allow-attributes
  • cargo xtask check-local-context
  • cargo xtask check-file-policy
  • cargo xtask check-covered-by
  • cargo xtask check-executable-files
  • cargo xtask check-workflows
  • cargo xtask check-spec-format
  • cargo xtask check-spec-numbering
  • cargo xtask check-fixture-contracts
  • cargo xtask check-generated
  • cargo xtask check-badge-diff-policy
  • cargo xtask check-generated-clean
  • cargo xtask check-dependencies
  • cargo xtask check-process-policy
  • cargo xtask check-network-policy

Extension changes:

  • cd editors/vscode && npm ci
  • cd editors/vscode && npm run compile
  • cd editors/vscode && npm run package

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: da44a9a3-44c6-4e17-9923-b57303ccd436
Commits

Reviewing files that changed from the base of the PR and between ec2fcfe and d419b58.

Files selected for processing: 4
  • .github/scripts/pypi_admission.py
  • .github/scripts/test_pypi_admission.py
  • CHANGELOG.md
  • docs/PYPI_BOOTSTRAP.md

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Summary by CodeRabbit

  • Bug Fixes
    • Wheel admission now rejects packages with missing, malformed, duplicate, or unsupported major-version format metadata before staging. Compatible versions in the 1.x series remain accepted, including newer minor versions.
  • Documentation
    • Updated the PyPI qualification guidance to describe which wheel format versions are accepted and when packages are rejected.

Walkthrough

Wheel staging now requires exactly one Wheel-Version value matching 1.<digits> before it reads wheel tags. Tests cover accepted minor versions and rejected metadata. The changelog and qualification documentation describe the validation rule.

Changes

Wheel admission

Layer / File(s) Summary
Validate WHEEL format versions
.github/scripts/pypi_admission.py, .github/scripts/test_pypi_admission.py, CHANGELOG.md, docs/PYPI_BOOTSTRAP.md
stage_wheel validates Wheel-Version before reading tags. Tests cover accepted and rejected versions. The changelog and qualification documentation describe the rule.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: Minimal · up to d419b

The wheel-format validation change is ready from the reviewed evidence, with no merge-blocking risk identified.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check Warning The description includes all required template sections and provides detailed scope, proof, claim boundaries, rollback, traceability, policy, and engineering information. However, the Source Boundary … Correct the Source Boundary section to match the repository target, or explain and obtain approval for why this PR belongs in EffortlessMetrics/ripr instead of EffortlessMetrics/ripr-swarm. Keep the stated scope and repository ownership…
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: validating wheel format metadata before staging.
Linked Issues check Passed [#1865] Objective: reject missing, malformed, duplicate, or unsupported WHEEL Wheel-Version before creating the destination, while keeping valid 1.x staging, exact-byte copying, and the separate platf…
Out of Scope Changes check Passed Changed paths at head versus merge base: .github/scripts/pypi_admission.py (format-header check in stage_wheel), .github/scripts/test_pypi_admission.py (new tests, fixture header updates, and a …
Full details: Linked Issues check

Explanation

[#1865] Objective: reject missing, malformed, duplicate, or unsupported WHEEL Wheel-Version before creating the destination, while keeping valid 1.x staging, exact-byte copying, and the separate platform-tag check.

Implementation at head: .github/scripts/pypi_admission.py::stage_wheel reads the WHEEL member and calls get_all("Wheel-Version", []). It requires exactly one value that matches 1\.[0-9]+ after strip(). This rejects missing (0 values), duplicate (>1 values), malformed (for example invalid, 1.0.0), and unsupported major (for example 2.0, 0.0) headers. Compatible minor values (for example 1.1) pass. The check runs before destination.mkdir(...), so rejection precedes staging. The tags == [PLATFORM_TAG] check remains a separate step. re is already imported at module top. Receipt, digest, identity, and symlink checks are unchanged.

Tests at head: .github/scripts/test_pypi_admission.py adds test_rejects_unusable_wheel_format_before_staging with seven invalid-header subcases. It asserts ValueError matching Wheel-Version and asserts that destination does not exist. It also adds test_accepts_compatible_wheel_format_minor_version (1.1 accepted, bytes identical). Fixtures are updated to include valid Wheel-Version headers so existing assertions reach the intended checks. The tests call the production stage_wheel and use standard library only. Pre-repair production has no format check, so the invalid-header subtests would not raise and would fail. Per the PR, Python 3.12.14 executed 16/16 tests. I did not re-execute the tests in this review.

No unmet coding requirement found. Non-coding items (exact-head review, hosted proof, keep-open issue state) were not assessed.

Full details: Out of Scope Changes check

Explanation

Changed paths at head versus merge base: .github/scripts/pypi_admission.py (format-header check in stage_wheel), .github/scripts/test_pypi_admission.py (new tests, fixture header updates, and a replace_wheel_member helper used by the new and existing metadata tests), CHANGELOG.md (Unreleased note citing #1865), and docs/PYPI_BOOTSTRAP.md (describes the new rejection rule). The helper refactor supports the new tests. The fixture header updates are required because the new check would otherwise reject existing valid fixtures. The changelog and bootstrap documentation describe the same behavior. The diff does not change authorize currentness logic, the api/validate_run/validate_source_ref paths, package version or name mapping, workflows, credentials, runners, or protections. No unrelated change was found in the reviewed diff. The raw-summary claims for the changelog and docs were not separately diffed in this review, so their exact text is not verified here.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 4 functions across 2 files. (2 skipped: 2 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Full details: Description check

Explanation

The description includes all required template sections and provides detailed scope, proof, claim boundaries, rollback, traceability, policy, and engineering information. However, the Source Boundary section states that the PR targets EffortlessMetrics/ripr, while the repository template requires work to target EffortlessMetrics/ripr-swarm.

Resolution

Correct the Source Boundary section to match the repository target, or explain and obtain approval for why this PR belongs in EffortlessMetrics/ripr instead of EffortlessMetrics/ripr-swarm. Keep the stated scope and repository ownership consistent throughout the description.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the wheel’s small tag,
And keeps malformed versions from the bag.
One-point-one may pass the gate,
While missing headers have to wait.
The changelog tells what checks now stand,
Then hops away across the land.

Comment @coderabbitai help to get the list of available commands.

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed_head_sha: 99f4ef9
integration_basis: e7b89e2; tree fe057a4bc9d9f92313be1d9767ff5ef22ecf807c
claim_boundary: #1865 WHEEL format admission before staging; no native install/provenance equivalence

No actionable source findings emitted.

Inspected the complete four-file change, stage_wheel's receipt/digest/metadata/tag checks and destination/copy order, CLI stage routing, publishing and qualification consumers, Python allowlist, bootstrap/changelog parity, and the PyPA major/minor compatibility rule. The single-header guard is short-circuit safe, rejects unsupported/ambiguous formats before destination creation and retains newer 1.x minors. Existing tag negatives now include a valid format header so they still reach their own gate.

Observed: 16 retained tests pass normally and under -O on this committed object; exact-parent production fails seven new subcases. Five wrong implementations are rejected by distinct format/minor/duplicate/destination/platform oracles. The exact-source policy precommit, actual committed-head check-fast (four paths), agent-skill and evidence-honesty gates pass. An independent read-only reviewer bound this exact head, reran 16 committed-source tests, challenged parent/strict-minor mutations and exercised the real stage CLI and pinned pip. Root inspected the independent evidence against source.

Published-head readback confirms the same head/tree and Draft state. No current review threads/submissions were present at inspection; this is remote triage, not the source-review oracle. Current hosted source-wheel qualification 38866564293, npm-native qualification 38866564073 and Routed Rust 38866564265 are in progress. The initial full CI run 38866564187 is skipped under its label policy and is not counted as executed proof.

blocking_findings: none observed in scoped source
proof_or_review_missing: terminal published-head required/selected CI, wheel-consumer artifacts and final remote review synthesis; applicable full/release proof must be explicitly qualified rather than inferred from skipped CI
affected_currentness_dimensions: source/tests/docs/oracle/base unchanged; published-head identity and remote receipts newly observed
residual_assumptions_and_non_claims: metadata fixtures are not complete package installation; duplicate rejection is stronger than pip's first-header handling; public wheel already has valid 1.0 metadata; no package build/publication/native execution was performed locally
disposition: REVIEW_INCOMPLETE / WAITING_REQUIRED_CHECKS. Keep Draft; do not enable auto-merge.

Resume finish-pr after these exact-head runs are terminal, inspect actual job/artifact denominators and findings, complete applicable missing proof, then refresh published-head review. A head change requires affected proof/review refresh.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces validation for the Wheel-Version metadata during PyPI admission staging. Specifically, it ensures that the wheel metadata contains exactly one Wheel-Version entry belonging to the 1.x format family (matching 1.[0-9]+), rejecting missing, malformed, duplicate, or unsupported major versions before staging. The changes include updates to the staging script, corresponding unit tests to verify both acceptance of compatible minor versions and rejection of invalid formats, as well as updates to the changelog and documentation. No review comments were provided, and I have no additional feedback to offer.

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed_head_sha: 99f4ef9
integration_basis: e7b89e2; candidate tree fe057a4bc9d9f92313be1d9767ff5ef22ecf807c
claim_boundary: #1865 WHEEL format admission only
disposition: SOURCE_CLEAR / REVIEW_INCOMPLETE / BLOCKED_REQUIRED_CHECK

Blocking integration evidence:

  1. Required cargo-deny is FAILURE: Security run 38866564109, job 116860650785, actual exit 1. Its log reports error[yanked] for zip 2.4.2; bans/licenses/sources pass. Public branch metadata lists cargo-deny among required contexts. Cargo.lock and dependency/policy inputs are byte-unchanged from the accepted base. Existing Draft #1867 (head b73c00c) owns this dependency repair under #1766; no duplicate implementation or pin change belongs in this PR.
  2. Retained artifact ZIP inspection remains unavailable in this executor. GitHub's download tool returned file references for source wheel artifact 12032175165, npm package 12032195285, consumer artifacts 12031777645/12031777635, routed evidence 12032591501 and result 12033261417. Each bounded download into the checkout returned HTTP 403 with no successful bytes. A separately permitted escalated read of result 12033261417 also returned HTTP 403. Artifact metadata/digests and job logs are observed; retained bytes and receipt contents are NOT observed. No retries, publication or auth/config changes follow from this boundary.

Completed continuation:

  • Actual checkout is clean at the exact head/tree; complete four-file diff and semantic owner/consumer order remain as reviewed. All 16 tests rerun successfully. Prior independent exact-head source/oracle/CLI review and mutation evidence remain current because source is unchanged.
  • API run records independently bind Rust 38866564265, wheel 38866564293 and npm 38866564073 to this head/tree, attempt 1, terminal success.
  • Actual Rust log binds the tested integration commit 56e2004 to candidate tree fe057a4bc9d9f92313be1d9767ff5ef22ecf807c, records 8032 tests passed / 0 skipped, required policy gates and PR evidence success. This is an integration-tree observation, distinct from head identity.
  • Actual wheel build log checks out the head and runs the 16 admission tests, then metadata/RECORD/negative controls. pip and uv consumer job logs show installed 0.11.0a2, an actual probe-specific follow-up, reinstall/uninstall, and successful expected-subject assertions. These are job/log observations, not independently inspected package bytes.
  • Late Gemini review 5544325916 reports no finding; CodeRabbit quota notice is unavailable review. Current thread list is empty, independently of the substantive source review.
  • Current main remains the accepted base. Active main ruleset 15825336 has no bypass actors; protection-detail endpoint returned integration-permission 403. No protections changed.

No actionable defect found in this PR's scoped source. Keep Draft, no auto-merge. Resume after #1867's accepted repair makes the required dependency check satisfiable, affected integration/proof is refreshed as necessary, and a permitted executor supplies actual retained artifact/receipt inspection. Then refresh exact-head published review before normal finish-pr convergence. No source/build/install equivalence or package publication is claimed.

Include the landed ZIP/Tokio dependency repairs and current installed-consumer evidence workflow before renewed qualification. Preserve the reviewed four-file format-admission change using GitHub's verified merge-preview tree.

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed_head_sha: d419b58
integration_basis: public main ec2fcfe; tree 6bb572360d78a9b2da983c8906555e2818cb848d
claim_boundary: #1865 WHEEL format admission before staging
disposition: SOURCE_CLEAR / REVIEW_INCOMPLETE — current hosted qualification pending

The old required ZIP failure is a resolved prerequisite, not today's source blocker. This existing branch now includes accepted main repairs #1867/#1878, current Python-consumer evidence #1875 and current workflow policy #1877. The update preserves both parents [99f4ef9, ec2fcfe], uses GitHub's inspected current merge-preview tree and was non-forced with an expected-head lease. Readback verifies the new head, four-file scope and Draft state.

Substantive review:

  • Read the full stage/authorize owner, existing tests, four-file diff, bootstrap contract, all Conversation/reviews and the empty inline-thread inventory. All-state Wheel-Version search found this existing claim, not a competing accepted fix.
  • Short-circuit validation requires one supported 1.x header before destination creation, retains compatible minor versions and leaves platform/receipt/digest/source-authority checks intact. The official PyPA wheel specification retains its major-refusal/minor-warning distinction: https://packaging.python.org/en/latest/specifications/binary-distribution-format/ .
  • Verified the current GitHub composition contains exactly the original four-file delta. Candidate owner/test blob IDs remain 4b362622496d3bb2edae5cd29bfcbfc9795d838f and 1ccb8c8a0f2aaaf5c7b5f1d39622c6fdea22ef9d. The current workflow is 84c45969b72c4076ed07df546f0cc54d978fd4a4.

Executed this pass on Python 3.12.14, using Git-blob-verified selective source materialization:

  • The actual 16-test admission suite against the current-composition source/workflow passed, zero failed/skipped.
  • Replacing only the production module with current-main pre-fix bytes yielded all seven intended invalid-header failures (ValueError not raised), zero errors; compatible-minor and exact-copy positive controls still passed. This independently discriminates the actual repaired behavior.
  • No Rust toolchain or complete checkout is available here; no local check-fast/precommit/Rust/package execution is claimed.

Historical hosted evidence was read directly, not inferred from green metadata: run38866564265 native job116860746783 executed 8,032 tests/zero skipped and the required 22-command receipt on its original subject56e20046/treefe057a4b. Result job116871472129 downloaded the matching child digest97a988286e615b4d084b981d0f7b8974da6f805bbb2e6c87184a37d9ad178aa2, validated exact old base/head/tree/four-path identity and emitted verdict=passed. This remains old-subject proof.

Current residual: inspect the new synchronize-triggered required/selected native runs, actual package-consumer evidence and any new findings before final published-head readiness/normal protected merge. No retained historical ZIP bytes were retrieved or rehashed here; earlier artifact-transfer limits remain explicit. This scoped source/test proof is not an installed/public 0.11 or publication claim. No settings, bypass, manual dispatch, release label, tag or publication action was used.

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current-head integration review — October 30, 2026

REVIEW_READY for #1865's bounded wheel-format admission repair. Normal protected expected-head integration only; actual resulting-tree readback remains required.

reviewed_head_sha: d419b58
recorded_proof_basis: ec2fcfe
tested_subject: 04de9e9
tested_tree: 6bb572360d78a9b2da983c8906555e2818cb848d
current_main_observed: 94633f0
source_only_expected_combined_tree: 3d06022484e140d2011cae9247d150c51402994c

The four-file source/test/document delta remains 57 additions/13 deletions. It validates exactly one supported WHEEL format header before staging, preserves compatible 1.x formats, exact copying and independent platform admission. Root executed the blob-verified 16-test admission suite locally with Python 3.12.14; all passed. Substituting only pre-fix current-main production failed the seven intended invalid-header subcases while valid-minor and exact-copy controls remained positive. This is actual scoped Python execution, not local Rust proof.

Independent read-only review inspected all 10 package jobs in wheel41133229823 and npm41133229883. Receipts bind this head/tree. Each native build passed 16 admission tests and a distinct 16 consumer-evidence tests. Pip/uv actual steps verify artifact/native hashes, clean installation, nonzero preview, fresh-shell explain, disabled/incomplete controls, planted executable nonexecution and reinstall/uninstall. Both Node matrices report four selected/four executed/zero failed routes; package and publisher controls each pass 31 tests. Native/archive/tarball identities remain separately recorded in the PR body; no external publication occurred.

Independent native-log inspection of job124329311930 verifies all 22 actual catalogued commands and 8,042 passed/zero skipped across 23 binaries. Root inspected actual result job124344562889: artifact 13017173824, ripr-routed-rust-evidence-41133229832-1, size 204,395 bytes, matches producer/download SHA256 92a206b42a414af526f59f2311a1eb2ebede6be03c45d3d1d1fc7d2253c5a0b5. Expected repository/base/head/subject/tree agree; child/download succeeded; verdict=passed. Both jobs are terminal success.

Main advanced only through #1864's README/QUICKSTART installation edits. Those paths are disjoint from this candidate. Independent fetched-tree hash recomputation verifies the planned composition and exact preservation of all four candidate paths plus both main document edits. GitHub's last inspected merge ref still names the old tested subject; the new tree above is a source-only deterministic calculation, not a published preview or execution on that combined tree. Native production, workflow and test bytes are unchanged by the intervening documentation merge. This is a reasoned proof-currentness bridge, not a new run or atomic expected-base lease.

Fresh full Conversation/review/thread inspection found no unresolved actionable source finding and zero inline threads. CodeRabbit now covers this exact head and passes the canonical-description check; its generic docstring warning identifies no inline source defect. Current 43-check inventory has no failing conclusion; security checks and routed result are successful. Legacy conditional skips and queued Droid admission receive no execution/review credit; ordinary server enforcement remains binding.

blocking_findings: none
non_blocking_suggestions: generic docstring-coverage advisory, no scoped source defect
refuted_or_stale_findings: old inherited ZIP hold and current-native-pending statement
proof_or_review_missing: no missing scoped source/product proof; actual protected merge and resulting-tree readback remain next
affected_currentness_dimensions: current head, exact native/package subjects, current main's disjoint docs delta and current description
residual_assumptions_and_non_claims: Linux x64/glibc package scope; no local Rust/ZIP download, other-platform, registry publication, source/artifact-currentness controller completion or final release claim
disposition: REVIEW_READY

Attempt only the normal expected-head squash operation. A server refusal remains binding. Verify the accepted commit/tree before closing #1865; #1849 retains its separate source/run/artifact-currentness scope.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 30, 2026 22:28
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@EffortlessSteven
EffortlessSteven marked this pull request as draft October 30, 2026 22:30
The normal expected-head #1866 merge returned 405: 5 of 5 required status checks are expected. Retain the reviewed four-file wheel admission delta and the accepted #1864 installation docs in the independently computed combined tree. Qualify this actual current-base subject through normal CI.

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Protected-refusal continuation — October 30, 2026

SOURCE_CLEAR / REVIEW_INCOMPLETE; Draft. Normal expected-head squash of prior qualified head d419b58a60c721fe934fc81498697acbb71c13e8 returned GitHub 405: “5 of 5 required status checks are expected.” The server refusal remains binding; no merge or issue close occurred.

The existing branch now has head 31a5e449f0f3ab8e00dfc75925e42b6a30b945b0, parents [prior candidate, accepted main 94633f071542496d44e2745b536c72f4ca5b3a98], tree 3d06022484e140d2011cae9247d150c51402994c. GitHub create-tree returned exactly the independently calculated combined-tree hash. Expected-head non-force publication and PR/ref readback succeeded; the PR now reports that actual current base.

Fresh comparison against accepted main confirms the unchanged four-file authored delta, 57 additions/13 deletions, and the exact previously reviewed owner/test/document blobs. Both accepted installation-doc edits are retained. This refresh follows a concrete protected-integration refusal, not the mere behind flag.

The prior native/result run41133229832 remains successful for subject 04de9e9c0d2895c56414ed7d8f08a35fb69c6c00 / tree 6bb572360d78a9b2da983c8906555e2818cb848d: 8,042 passed/zero skipped, all 22 commands, matching artifact/digest and normalized verdict=passed. Prior package-consumer and root's 16-test Python discrimination remain bound to their recorded subjects/bytes. They are not represented as new-head native execution.

Natural synchronize qualification now owns the next transition:

Current Security and PR Plan metadata is successful; current native/package runs were active at readback. Inspect actual terminal evidence, refresh exact-head review, then attempt only the ordinary protected merge. No duplicate dispatch/rerun, force update, label substitute, settings change or bypass is requested.

reviewed_head_sha: 31a5e44
integration_basis: 94633f0
blocking_findings: no new source defect; protected integration not accepted
proof_or_review_missing: terminal qualification of this newly published current-base head and final protected disposition
affected_currentness_dimensions: actual integration base/head/tree and associated required-check binding
residual_assumptions_and_non_claims: no atomic expected-base mechanism inferred; old receipts are not new execution; no merge/publication/release claim
disposition: SOURCE_CLEAR / REVIEW_INCOMPLETE

#1865 remains open. The earlier REVIEW_READY record retains its old subject and scoped proof; it does not override this current integration disposition.

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current-head inspection — no new findings in wheel-format admission

reviewed_head_sha: 31a5e449f0f3ab8e00dfc75925e42b6a30b945b0
integration_basis: 94633f071542496d44e2745b536c72f4ca5b3a98
Inspected: 2026-11-05 UTC.

Claim boundary and inspected owners: .github/scripts/pypi_admission.py, its regression tests, changed bootstrap documentation/changelog, and the wheel-qualification workflow consumer. Traced metadata admission through receipt/digest checks and staging.

Findings: No new blocking defect or nonblocking suggestion established in this slice. Missing, malformed, duplicated, and unsupported-major Wheel-Version values reject before destination creation/copying; the compatible 1.1 case preserves the original wheel bytes. The mutated fixtures refresh the wheel digest and receipt, so their rejection reaches the new check.

Proof observed: All 16 exact-head Python admission tests passed locally. Removing only the format gate made all seven negative-format subcases fail because expected rejection disappeared. The exact-head qualification run completed build/inspection, clean uv installation, and clean pip installation; the build log contains admission-test execution.

Missing proof / residual limits: No downloaded-wheel replay or native consumer rerun locally; actual PyPI publication and wider publisher provenance were outside this review. Hosted evidence applies to this head, not future candidates. Head and empty existing inline-thread set were rechecked.

Disposition: REVIEW_INCOMPLETE beyond the stated boundary; no new findings in the changed admission behavior. This is an inspection record, not merge or publication clearance.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(pypi): reject installer-incompatible WHEEL format metadata during staging

1 participant