Skip to content

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

Closed
peters wants to merge 1 commit into
mainfrom
fix/push-preserve-pack-encoding
Closed

fix(cli): preserve pack full encoding on push#97
peters wants to merge 1 commit into
mainfrom
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
@peters
Copy link
Copy Markdown
Contributor Author

peters commented May 10, 2026

Closing as superseded by #102. Current main preserves full-package encoding through the pack-generated metadata sidecar, which push validates and records on the first upload path. The remaining change here only preserves encoding when re-pushing an already-indexed identical full artifact without that sidecar, so it is not needed for the original promotion metadata issue.

@peters peters closed this May 10, 2026
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