Skip to content

Fail pack on corrupt delta base#80

Merged
peters merged 1 commit intomainfrom
fix/verify-delta-base-integrity
Apr 10, 2026
Merged

Fail pack on corrupt delta base#80
peters merged 1 commit intomainfrom
fix/verify-delta-base-integrity

Conversation

@peters
Copy link
Copy Markdown
Contributor

@peters peters commented Apr 10, 2026

Summary

  • classify restored artifact SHA-256 mismatches as integrity failures instead of generic storage errors
  • fail surge pack when delta base restoration detects stored full-archive corruption and clear staged artifacts before returning
  • add regression coverage for both the direct corrupt-base case and the reconstructable older-chain case

Why

A stored full archive whose bytes no longer match its recorded SHA-256 is a data-integrity problem in release storage. Packaging should stop and force remediation instead of silently routing around the corrupt blob and publishing a new delta on top of an unhealthy base path.

Impact

surge pack now fails closed for base-artifact integrity mismatches while preserving the existing non-fatal behavior for ordinary delta-build failures.

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 changed the title [codex] Fail pack on corrupt delta base Fail pack on corrupt delta base Apr 10, 2026
@peters peters marked this pull request as ready for review April 10, 2026 21:29
@peters peters force-pushed the fix/verify-delta-base-integrity branch from 6435a8e to 71f2046 Compare April 10, 2026 21:36
@peters peters merged commit af22552 into main Apr 10, 2026
12 checks passed
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