Repository navigation
fix(npm): preserve ZIP wire identity during package admission - #1842
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (3)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review. Summary by CodeRabbit
WalkthroughThe wheel and qualification ZIP readers now reject entries when the original member name differs from the parsed name. Tests cover backslash and NUL-suffixed aliases under both POSIX and Windows separator settings. The specification adds the same rejection requirement. ChangesZIP member name validation
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix
|
There was a problem hiding this comment.
Code Review
This pull request introduces validation to ensure that ZIP member names in wheels and qualification artifacts retain their literal wire identity, rejecting noncanonical filenames (such as those with backslashes or NUL suffixes normalized by zipfile). It includes corresponding updates to the test suite to verify this behavior, as well as updates to the specification documentation. There are no review comments, and I have no feedback to provide.
EffortlessSteven
left a comment
There was a problem hiding this comment.
reviewed_head_sha: b01e02f
integration_basis: main/parent ab61435; tree 8852e119bd94e49c3b0e1b0c21ccfde0b7f2c3c7
claim_boundary: source-owned wheel/qualification ZIP wire-name refusal; no product/platform/release claim
changed_surfaces_and_semantic_owners_inspected: complete three-file diff, inspect_wheel/read_qualification_zip and native-input/release callers, literal zip_bytes fixture serialization, both new controls, existing healthy admission, RIPR-SPEC-0180 and read-only qualifier/publisher separation. Raw versus normalized names, NUL aliases, Windows separator behavior, executable modes, refusal before byte reads, and healthy canonical inventories were challenged.
blocking_findings: no actionable source/oracle finding.
non_blocking_suggestions: none.
refuted_or_stale_findings: malformed names survive serialization; executable fixture modes stay valid so unrelated mode rejection cannot substitute for wire refusal. Both guards execute before payload reads.
proof_and_ci_observed: root observed full native Windows Python 3.14.6 suite 30 selected / 25 executed / 5 existing Unix/transport skips / 0 failures, with connector-fetched committed files matched to local content. An independent gpt-6.1-sol reader independently confirmed exact production/test Git blob identities, ran four focused native Windows tests (new controls, healthy wheel and existing archive controls), parsed raw local and central ZIP headers, and removed the guards in memory: seven refusing subcases failed while healthy admission remained passing. Independent review at 2026-10-09 19:52:55 UTC reports SOURCE_CLEAR. Current exact-head cargo-deny and dependency-review checks passed; npm run 37983142136 is in progress and Routed Rust Small has started. rust/MSRV/vscode and Windows Advisory are skipped, not executable proof.
proof_or_review_missing: complete hosted exact-head required proof; real package/installed artifact execution from this head; full Cargo policy gates, omitted locally because heavy builds remain paused and only selective connector source exists. Independent focused review does not claim it ran the full suite.
affected_currentness_dimensions: admission implementation, test fixture wire encoding/oracle, narrow spec assertion, exact head; no changes to dependencies/toolchains/workflows or carrier basis.
residual_assumptions_and_non_claims: synthetic healthy wheel does not prove real installs or publication; five platform installs, final frozen RC identity and old-to-final upgrade remain missing. No manual CI labels or duplicate triggers.
disposition: SOURCE_CLEAR / REVIEW_INCOMPLETE; keep Draft until genuine required proof permits finish-pr merge convergence.
EffortlessSteven
left a comment
There was a problem hiding this comment.
reviewed_head_sha: b01e02f
integration_basis: main ab61435
reviewed_tree: 8852e119bd94e49c3b0e1b0c21ccfde0b7f2c3c7
tested_merge_subject: ec5fd47; same reviewed tree, parents equal reviewed base/head
claim_boundary: literal ZIP wire-name admission in wheel and qualification readers; no final RC/platform/publication claim
changed_surfaces_and_semantic_owners_inspected: complete three-file diff, production inspect_wheel/read_qualification_zip and native-input/release callers, raw ZIP fixture local/central headers and executable modes, healthy admission, separator/NUL counterexamples and RIPR-SPEC-0180. Existing source/oracle review remains current because head/base/diff are unchanged.
blocking_findings: none.
non_blocking_suggestions: CodeRabbit 14.29% docstring-coverage warning; documentation suggestion without a behavioral defect or inline finding. Existing functions' documentation percentage is not this admission contract.
refuted_or_stale_findings: guards reject before payload reads; malformed fixture names survive serialization and executable modes remain valid, so incidental rejection cannot satisfy the new controls.
proof_and_ci_observed:
- Root Windows Python3.14.6: 30 selected /25 executed /5 existing skips /0 failures, exact committed files matched local. Independent reviewer verified raw headers, four focused tests and seven failing subcases after guard removal while healthy admission passed.
- Automatic npm run37983142136 attempt1: all seven build/pip/uv/package/two pinned-client/publisher jobs executed success. Package suite29 executed/1 staging skip; mock-only publisher suite30 executed/0 skipped. Both npm clients4 selected/4 executed/0 failed routes with nonempty useful findings and teardown controls.
- Routed37983141356 child113998510952: all22 planned commands actually invoked (12 Rust/policy/fixture +10 PR evidence), required steps and child receipt/upload success. Nextest8024 executed/8024 passed/0 skipped.
- Result114013200336 downloaded selected child evidence and emitted verdict=passed, binding source/base/head/tree, three changed paths, pinned1.95 toolchain, Cargo.lock and runner/artifact identities. Root and independent reader read actual completed logs, not aggregate status alone.
- Exact-head security/source-of-truth/CodeQL and mergeability checks successful. Review threads empty. Legacy rust/MSRV/vscode label-gated jobs did not execute; no skipped execution credited.
- Fresh independent gpt-6.1-sol final inspection at2026-10-09 20:38:36 UTC returns REVIEW_READY; root verified and integrates that result.
proof_or_review_missing: none for this bounded source change. Full final-candidate packaging/Windows/macOS/upgrade/first-use proof remains separate under #1606/#1578; existing Linux alpha rehearsal is not frozen RC qualification.
affected_currentness_dimensions: implementation, fixture stimulus/oracle, narrow spec contract, published head and identical combined tree; no toolchain/dependency/workflow/security changes.
residual_assumptions_and_non_claims: logs/API evidence read; artifact bytes not independently downloaded/rehashed here. No live registry staging/publication, version/tag choice or additional platform claim. #1818/#1627/#1827 remain their existing owners.
disposition: REVIEW_READY for normal protected merge of this exact head. Supersedes the earlier pending-proof disposition.
Merged through normal protection as
9d3d2750d2e6181f629a360a51cdf027fb8eeb1dat 2026-10-09 20:39:37 UTC. Merge/main tree8852e119bd94e49c3b0e1b0c21ccfde0b7f2c3c7equals the reviewed and routed-tested tree. Final exact-head review: REVIEW_READY; all 22 routed commands and 8,024/8,024 tests passed. This source fix does not complete final-candidate qualification.ZIP admission validated Python's normalized member name, allowing backslashes on Windows and NUL suffixes on both hosts to alias canonical artifact/wheel members. Require each original wire name to equal the accepted name before reading payload bytes, and preserve literal malformed names and executable modes in the fixtures.
Work item: bounded source-owned package qualification under #1606/#1578, with the existing #1781/#1784 contract. Acceptance: both actual ZIP validators refuse normalized wire aliases while the canonical byte-admission suite still passes. RIPR-SPEC-0180 records the invariant. Only three files change; no package names, pinned toolchains, workflow/permission/security-runner settings, version or publication action changes.
Exact candidate:
b01e02fab229fbf5d7c816207cb1d85828bea5ef, tree8852e119bd94e49c3b0e1b0c21ccfde0b7f2c3c7, parent source mainab614355d59d6c558b6756c88727bf507538ac41. Carrier #1818, producer/raw #1627, and archive-route #1827 remain their existing owners. Carrier's current version-banner test is disjoint from this patch; its current ZIP validator remains identical to main.Observed native Windows/Python 3.14.6:
python -m unittest discover -s .github/scripts -p test_npm_package.py— 28 selected, 23 executed, 5 existing Unix/transport skips, one backslash-control failure.Observed automatic hosted proof at the same published head:
14efdf940c0c0ddcb68bef63f55795a9273297998013c209fa31ba56e332ce41; wheel SHA-2568f5666e5d1d235b2ce3a9e260fc494b97e1ae7a294103fd10c4fc7860920aaed;effortlessmetrics-ripr-0.11.0-alpha.2.tgzSHA-2563d2e05bc8cc8359b7b1a27a4dd5d1dfa1d3066e4096b0e91bc701a5ca06d318b. Logs bind source/tree to this PR and lock SHA-256eb28194272c01382aaccc2af51cc15131b299396d70c49ef73c71340e1648cd7.0.11.0-alpha.2/0.11.0a2, not an eventual frozen RC. Logs/API metadata were read; artifact bytes were not independently downloaded or rehashed here. Final target-family, real upgrade and full first-use rows remain open.Resource boundary: source-only connector reads plus sub-second standard-library tests; no local Cargo build. Git clone failed during network resolution, so this is a selective source inspection workspace. worktree-doctor/check-fast/precommit/full required Rust/package gates are unexecuted, not passed. Independent exact-head source/oracle review is SOURCE_CLEAR. A fresh independent execution review at 2026-10-09 20:05:31 UTC directly read all seven completed npm qualification jobs and confirmed the artifact identities, route counts and all executed controls above. The final published-head review and ordinary routed execution now passed. Legacy rust/MSRV/vscode remained intentionally label-gated and unexecuted; none is credited as executable proof. No manual labels, duplicate CI, dispatch workaround or publication was requested.
Rollback: revert this wire-identity validation and its tests/spec paragraph. Next: normal source qualification/merge if exact-head review and required checks permit; eventual frozen-SHA packaging replay remains #1467/#1578. This PR establishes no Windows install, macOS support, final RC, upgrade or public delivery claim.