Skip to content

fix(#151): narrow checksum-page strip gate (exclude Formats/Latest) - #161

Merged
DrunkOnJava merged 2 commits into
mainfrom
cursor/wave2-paged-decompress-67f9
Aug 29, 2026
Merged

DrunkOnJava merged 2 commits into
mainfrom
cursor/wave2-paged-decompress-67f9

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Aug 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

Wave 2 Worker A under the Wave 1 judge verdict narrow (#151 comment / Discussion #112).

Credit: @STE1200 — reporter. Distinguishes reported vs independently reproduced.

PR #160 wired production strip too broadly (including Formats/Latest). This PR narrows the gate per judge + evidence:

Contract

  1. Strip full-page 353-byte tails (65,249 = 64,896 + 353) only on gated named-stream wrappers — never inside raw inflate_at.
  2. Order: CFB stored → page-strip when gated → truncated-gzip / DEFLATE.
  3. Writer verify stays bare inflate_at (strip-clean encoder; no paged encoder yet).
  4. No Formats ~48% claim; Formats stays ungated (class_names 9579→8575 regression).
  5. Synthetic regressions fail under bare inflate and pass under gated strip.

Gated call sites

Path Strip?
Partitions/* via inflate_all_chunks_for_stream Yes
listed Global/* via inflate_stream_* Yes
Formats/Latest via inflate_stream_* No (no-op gate)
raw inflate_at / inflate_all_chunks Never
writer::decompress_stream bare inflate

Tests

  • cargo test --release --lib compression::tests (21 ok)
  • cargo test --release --test checksum_page_framing (11 ok)
  • cargo test --release --lib (848 ok)
  • writer large-patch verify without false strip

Refs #151 · Discussion #112 · supersedes broad Formats strip from #160.


Note

Medium Risk
Changes core decompression behavior for large partition/Global streams and Formats decode policy; incorrect gating could cause silent drift or schema/class-name regressions, though coverage is heavy on synthetics and writer verify paths.

Overview
Wave 2 narrows issue #151 checksum-page stripping after a broad #160 gate: production strip now applies only to Partitions/* and listed Global/* DB streams via is_checksum_paged_stream, while Formats/Latest is excluded because naive strip regresses class_names on redistributable corpora without reproducing the reported ~48% schema loss.

is_revit_paged_loader_candidate keeps reviter-aligned paths (including Formats) for probes; raw inflate_at / inflate_all_chunks still never strip. Writer patch verification switches decompress_stream back to bare inflate_at so strip-clean truncated-gzip output ≥65 249 bytes is not false-stripped (WRT-13).

Adds tests/checksum_page_framing, retargets compression unit tests from Formats to Partitions, writer regressions (empty-patch byte identity, large Formats patch), a probe_checksum_page_evidence example, and Wave 2 contract / evidence / writer-audit docs plus updated security reproduction notes and capability matrix wording.

Reviewed by Cursor Bugbot for commit b9e6b6a. Configure here.

cursoragent and others added 2 commits August 29, 2026 19:52
Wave 2 Worker A under judge verdict *narrow*. Strip 353-byte page trailers
only on Partitions/* and listed Global/* via inflate_stream_* wrappers; keep
raw inflate_at path-agnostic. Formats/Latest stays ungated (class_names
regression). Writer verify uses bare inflate (strip-clean encoder output).
Synthetic multipage fixtures + Wave 1 contract/probe docs. Credit @STE1200.

Co-authored-by: DrunkOnJava <[email protected]>
Keep Wave 2 Worker A incremental work (checksum_page_framing suite,
writer bare-inflate verify, contract docs) on top of the #162 Formats
exclusion already on main.

Co-authored-by: DrunkOnJava <[email protected]>
@DrunkOnJava
DrunkOnJava merged commit 11069a5 into main Aug 29, 2026
17 of 23 checks passed
@DrunkOnJava
DrunkOnJava deleted the cursor/wave2-paged-decompress-67f9 branch August 29, 2026 19:59
@cursor
cursor Bot restored the cursor/wave2-paged-decompress-67f9 branch August 29, 2026 19:59
cursor Bot pushed a commit that referenced this pull request Aug 29, 2026
Unblock CI fmt gate inherited from #161 framing tests.

Co-authored-by: DrunkOnJava <[email protected]>
@cursor
cursor Bot deleted the cursor/wave2-paged-decompress-67f9 branch August 29, 2026 21:37
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.

2 participants