Skip to content

ci: exercise the full public API in the release smoke test#67

Merged
dfa1 merged 2 commits into
mainfrom
ci/expand-smoke-coverage
Jul 12, 2026
Merged

ci: exercise the full public API in the release smoke test#67
dfa1 merged 2 commits into
mainfrom
ci/expand-smoke-coverage

Conversation

@dfa1

@dfa1 dfa1 commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Expands .github/smoke/Smoke.java to exercise essentially every public entry point in the zstd module, since each smoke leg already pays for a fresh runner/container spin-up — better to get more coverage per spin-up than add more legs.
  • Covers: version/sizing info, core + bounded decompress, zero-copy decompressedSize(MemorySegment), deterministic error paths (DST_SIZE_TOO_SMALL, CHECKSUM_WRONG), frame introspection (byte[]/MemorySegment overloads + skippable frames), ZstdCompressContext/ZstdDecompressContext advanced parameters/resets/prefix compression, all 6 dictionary-training variants, digested compress/decompress dictionaries, zero-copy and java.io streaming (including withPledgedSize), ZstdBounds for every parameter, and ZstdErrorCode descriptions.
  • Deliberately excludes multithreaded compression (NB_WORKERS > 0) since the bundled native library is single-threaded.

Test plan

  • Compiled and ran locally against a fresh build (zstd-0.7.jar + zstd-native-osx-aarch64-0.7.jar) — all checks pass.
  • Trigger the release-smoke workflow on this branch and confirm all matrix legs pass.

🤖 Generated with Claude Code

Since each smoke leg pays for a fresh runner/container spin-up, expand
what one run verifies instead of adding more legs. Smoke.java now
touches essentially every public entry point in the zstd module:

- version/sizing info, core + bounded decompress, zero-copy
  decompressedSize(MemorySegment)
- deterministic error paths (undersized buffer -> DST_SIZE_TOO_SMALL,
  corrupted checksum trailer -> CHECKSUM_WRONG)
- ZstdFrame introspection (byte[] and MemorySegment overloads) and
  skippable frames
- ZstdCompressContext/ZstdDecompressContext: parameters, all reset
  directives, sizeOf(), prefix (delta) compression
- all 6 dictionary training variants, digested compress/decompress
  dictionaries (every constructor), refDictionary
- zero-copy streaming (ZstdCompressStream/ZstdDecompressStream,
  progress()) and java.io streaming (ZstdOutputStream/ZstdInputStream,
  withPledgedSize)
- ZstdBounds for every compress/decompress parameter, ZstdErrorCode
  descriptions

Deliberately excludes multithreaded compression (NB_WORKERS > 0): the
bundled native library is single-threaded, so exercising it would only
prove the parameter is a no-op.

Compiled and run locally against a fresh build (zstd-0.7.jar +
zstd-native-osx-aarch64-0.7.jar) before pushing.
@dfa1

dfa1 commented Jul 11, 2026

Copy link
Copy Markdown
Owner Author

Triggered the expanded smoke test on this branch against the v0.7 release: run 29167269278 — all 13 legs green, including the experimental musl/jammy/UBI/AL2023 container probes. No bugs found.

Two follow-ups from review on #67:

- Extract shared helpers for the compress/decompress round-trip
  patterns that were copy-pasted across zeroCopyContextCompression,
  streamingZeroCopy, and streamingIo (plain vs. dictionary variants),
  and collapse the repeated check(Arrays.equals(...), msg) pattern
  into a checkArrayEquals helper used throughout.

- Narrow scope: this file's job is proving the released native
  artifact loads and links on this specific OS/arch/libc, and that
  off-heap MemorySegment interop and native struct layouts (streaming
  buffers, frame progression) work there — not re-deriving full API
  correctness, which the module's JUnit suite already covers more
  thoroughly with precise single-platform failures. Dropped the
  parameterBounds()/errorCodeDescriptions() enum sweeps, the 6-way
  dictionary-training-variant sweep, dictionaryIdApi()'s pure-Java
  record assertions, and the redundant dictionary-attachment/overload
  permutations (per-call vs. sticky vs. MemorySegment vs. digested vs.
  refDictionary), keeping one representative path per category. Cuts
  the file from ~610 to ~390 lines.

Compiled and ran locally against zstd-0.7.jar + zstd-native-osx-aarch64-0.7.jar.
@dfa1 dfa1 merged commit 4db5de2 into main Jul 12, 2026
15 checks passed
@dfa1 dfa1 deleted the ci/expand-smoke-coverage branch July 12, 2026 06:50
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