Skip to content

Decode Zstd-coded 7Z archives with a bounded official-source decoder - #342

Merged
skyswordw merged 4 commits into
mainfrom
codex/zstd-316-decoder-investigation
Nov 8, 2026
Merged

skyswordw merged 4 commits into
mainfrom
codex/zstd-316-decoder-investigation

Conversation

@skyswordw

Copy link
Copy Markdown
Member

Stow could list Zstd-coded 7Z archives but could not verify, preview or extract their payloads. This builds pinned official 7-Zip 26.04 source with a small decoder-only registration patch for method 04F71101, reusing the upstream Zstd decoder. It adds no second parser, external plugin or full codec fork.

Closes #316.

The registered 7Z decoder accepts established current/legacy properties, rejects unknown flags/lengths and caps each window at 512 MiB before allocation. This is not a total-process memory limit. Standalone .zst/.tar.zst retains upstream behavior; no Zstd 7Z encoder is added. Staged Save add/rename/delete works for the tested solid/non-solid Zstd inputs.

The executable identifies itself as 26.04-stow-zstd1. Source checksum and patch/build-recipe hashes are pinned. Both engine bundles contain complete modified corresponding source, licenses and a tested offline Universal 2 build script; package checks inspect archive contents. XPC contracts, password-on-stdin, inherited sandbox and destination containment/publication stay in place. Unified patch context whitespace is explicitly preserved by .gitattributes.

Validation:

  • Final integration with main/Report exFAT free space accurately when important-usage capacity is zero #341: 771 tests passed, zero failures/skips; all 1,291 zh-Hans strings translated, generated plists unchanged, diff checks passed. No new product strings.
  • Exact bytes through sandboxed verify/preview/selected/all extraction: ordinary, Delta, encrypted/split, current/legacy properties, solid/non-solid multi-file and frame-checksummed inputs. Positive split cases preserve every source part.
  • Unknown properties, excessive window, entry/frame CRC corruption and truncation fail without publication. Wrong passwords retain typed errors. A 2 GiB expansion is cancelled only after intermediate progress; no output is published.
  • Offline source rebuild succeeded. Native arm64 and Rosetta x86_64 exact-byte/negative probes passed; explicit Zstd 7Z encoding remains unsupported.
  • Ad-hoc Release structural/signature/DMG validation: 12 Universal 2 binaries, zero problems, both source/license copies verified.
  • Local launch-smoke limitation: candidate and unchanged baseline both exit without a fresh Welcome PNG in this local launch context. No UI or smoke gate was weakened. Clean CI package/smoke and snapshots must pass before merge. Developer ID/notarization acceptance remains with release validation.

Codex completed functional/security/test review; Claude Code retains visual/motion ownership. No new physical Finder or VoiceOver acceptance is claimed. #317 stays open for its separate FSKit exFAT publication failure; #341 only fixes its capacity misdiagnosis.

Evidence, provenance, commands and release limits: Handoff/zstd-7z-decoder-316.md. The small upstream patch is explicit maintenance debt to review on each 7-Zip update.

@skyswordw skyswordw left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocking functional findings remain. Parent review and an independent Terra read-only review checked the minimal official-source patch, decoder-only registration, state initialization, pre-allocation 512 MiB per-window cap, supported/unknown properties, cache invalidation and complete corresponding-source distribution. Review follow-ups strengthened active-cancellation evidence, split-source preservation, offline rebuilding and staged Save coverage.

Final local integration passed 771 tests with zero failures/skips, 1,291 complete zh-Hans translations and generated-plist/diff checks. Exact-byte verify/preview/extraction, encryption/Delta/splits, solid/non-solid multi-file input, corruption/unknown properties/over-window nonpublication, wrong passwords, intermediate-progress cancellation and Save mutations passed. Both native arm64 and Rosetta x86_64 decoder slices were exercised. Source was rebuilt offline; both bundled engine copies retain licenses/source and sandbox/signature checks.

All refreshed PR CI checks passed, including build-test, Universal 2, snapshots and Release package. The clean package log explicitly confirms zero ad-hoc verification problems and a freshly rendered Welcome window. This resolves the local-only baseline launch-smoke limitation as a merge blocker without weakening the gate. No Developer ID/notarization or physical Finder installation acceptance is claimed; normal release validation remains required.

#316 is resolved within the documented property/window limits. #317 stays open for its separate FSKit exFAT publication failure. Codex owns functional/security/test work; Claude Code retains visual/motion ownership and dedicated VoiceOver remains deferred in #93.

@skyswordw
skyswordw merged commit 7b31767 into main Nov 8, 2026
4 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.

P2: Add Zstd-coded 7Z decoding after confirmed compatibility gap

1 participant