Skip to content

fix(cli): preserve pack full encoding on push#97

Open
peters wants to merge 1 commit intomainfrom
fix/push-preserve-pack-encoding
Open

fix(cli): preserve pack full encoding on push#97
peters wants to merge 1 commit intomainfrom
fix/push-preserve-pack-encoding

Conversation

@peters
Copy link
Copy Markdown
Contributor

@peters peters commented Apr 27, 2026

Summary

  • Preserve full_compression_level and full_zstd_workers when surge push replaces a release index entry already written by surge pack.
  • Only reuse the recorded encoding when the existing entry's full filename, size, and SHA-256 match the package being pushed.
  • Add a regression test for the full-only/checkpoint release path where push previously erased pack metadata.
  • Include mechanical lint cleanup required by the current clippy toolchain.

Root Cause

PR #90 made pack record full-archive encoding and made promote refuse to guess when encoding is unknown. The missed path was surge push: after pack wrote the correct metadata, push rebuilt the same release entry and reset the encoding fields to the unrecorded sentinels. Full-only releases then had neither recorded fields nor a primary delta to infer from, so later channel promotion could not build a byte-identical channel delta.

Validation

  • ./scripts/sync-surge-core-vendor.sh --check
  • ./scripts/check-version-sync.sh
  • cargo fmt --all -- --check
  • RUSTFLAGS="-D warnings" cargo test --workspace
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo clippy --workspace --lib --bins --examples -- -D warnings -D clippy::unwrap_used -D clippy::expect_used
  • cargo clippy --workspace --all-targets --all-features -- -D warnings -W clippy::pedantic
  • dotnet format dotnet/Surge.slnx --verify-no-changes
  • dotnet test dotnet/Surge.slnx --configuration Release

@peters peters marked this pull request as ready for review April 27, 2026 12:54
@peters peters force-pushed the fix/push-preserve-pack-encoding branch from 2c62a54 to ac456eb Compare April 27, 2026 12:58
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.

1 participant