You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new manual encoder has no exact-output coverage: the existing bounding tests only check length and distinctness. Add a known-vector assertion for an overlong value's marker so lowercase output, two-digit zero padding, and the existing marker format are independently preserved.
This assertion now obtains its expected digest through the same new helper used by production, so it cannot detect a case or zero-padding regression in the compatibility behavior this PR is meant to preserve. Add an independent known-vector assertion such as the standard SHA-256 of b"abc".
This PR resolves#844 by using SHA-2 0.11 across the Rust dependency
graph and centralizing lowercase digest encoding without per-byte String
allocations. It preserves existing SHA-256 output across the consumers.
Details
* Use the workspace SHA-2 dependency for the WSLc build and update
rust-embed-utils to 8.12.
* Add shared SHA-256 and lowercase hexadecimal helpers in wxc_common
and migrate runtime digest consumers.
* Encode the WSLc package checksum in one preallocated buffer.
Tests
* Rust formatting and locked all-target/all-feature workspace check:
passed.
* Workspace Clippy with -D warnings: passed.
* Workspace tests excluding the baseline-failing loopback case and
elevation-only host-prep binary: passed.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 30b48038-4f23-4754-9b24-b0031e344abf
Generated-with: gpt-6-sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR converges the Rust workspace on
sha2 0.11and preserves SHA-256 output while avoiding per-byteStringallocations.Resolves #844
Details
rust-embed-utilsto 8.12, eliminatingsha2 0.10and its old hash stack fromCargo.lock.wxc_common::hashing::{sha256, sha256_hex}andencoding::lowercase_hexfor policy identity, telemetry, learning-mode values, LXC chain names, and Hyperlight OCI digests.sha2dependencies.Tests
cargo fmt --all -- --check— passed.cargo check --workspace --all-targets --all-features --locked --offline— passed.cargo clippy --workspace --all-targets --all-features --offline -- -D warnings— passed.cargo test --workspace --exclude wxc_host_prep --offline -- --skip base_container_helpers::tests::runtime_proxy_preserves_allowed_host_to_container_loopback— passed.cargo tree --workspace --target all --all-features -d --offline— passed; no duplicatesha2versions.