Skip to content

research(#151): Wave 1 checksum-page evidence + Wave 2 framing contract - #159

Closed
DrunkOnJava wants to merge 3 commits into
mainfrom
cursor/wave1-decompress-investigate-67f9
Closed

DrunkOnJava wants to merge 3 commits into
mainfrom
cursor/wave1-decompress-investigate-67f9

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Aug 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

Wave 1 Worker C investigation for Discussion #112 / issue #151 (credit @STE1200).

Probe/docs/tests only — does not wire page stripping into production inflate callers.

  • Independently reproduced checksum-page strip benefit on large redistributable Partitions/* streams.
  • Did not reproduce Formats/Latest ~48% schema loss on redistributable corpus.
  • Drafts a Wave 2 framing contract for production wiring.

Contents

  • examples/probe_checksum_page_evidence.rs — control vs strip evidence probe
  • tests/checksum_page_framing.rs — synthetic multi-page inject/strip/round-trip
  • docs/re/wave1-checksum-paged-framing-contract-2026-08-29.md
  • reports/security/DISC-112-wave1-worker-c-2026-08-29.md

Test plan

  • cargo test --release --test checksum_page_framing
  • Probe on 2024_Core_Interior.rvt Partitions/46 + Formats/Latest
  • Reviewer: confirm no src/ production inflate behavior changes in this PR

Note

Low Risk
No production decode or writer behavior changes; only documentation, an example probe, and contract/regression tests.

Overview
Wave 1 investigation for Discussion #112 / issue #151: probe, docs, and tests only — production still uses bare inflate; nothing wires strip_revit_page_checksums into src/ call sites.

Adds probe_checksum_page_evidence to compare control (stored CFB + inflate) vs strip-then-inflate on real streams, with optional JSON and --all-paged mode. checksum_page_framing tests inject synthetic 353-byte page trailers and pin round-trip behavior, path gating via prepare_stream_for_inflate, and multi-member chunk recovery after strip.

Documentation records independent reproduction that large Partitions/* streams gain successful gzip members after strip (e.g. Core Interior Partitions/46), while Formats/Latest ~48% schema loss is not reproduced on the redistributable corpus (structured schema counts stay flat). A Wave 2 framing contract draft maps current bare-inflate entry points and specifies strip-before-inflate rules, acceptance oracles, and writer/decode boundaries. Security reports get a 2026-08-29 addendum linking the new evidence.

Reviewed by Cursor Bugbot for commit 838482d. Configure here.

… contract

Probe-only investigation for Discussion #112 / @STE1200 Finding 1.
Adds control-vs-strip evidence probe, synthetic multi-page fixture tests,
and a Wave 2 framing contract draft. No production inflate wiring.

Co-authored-by: DrunkOnJava <[email protected]>
@cursor
cursor Bot marked this pull request as ready for review August 29, 2026 19:47
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Merge decision (judge: narrow / accept scoped contract)

Reviewed against current main (incl. harness #158):

Squash-merging now without waiting on remaining CI.

Resolve DISC-112 probe report conflict: keep Worker C chunk-oracle
addendum and the #160 path-gated production note. Refresh framing
contract + Worker C report for judge narrow scope (no universal strip).

Co-authored-by: DrunkOnJava <[email protected]>
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Merge decision (judge: narrow / accept scoped contract)

Re-reviewed after #158 and #160 landed on main:

Squash-merging without waiting on CI.

DrunkOnJava added a commit that referenced this pull request Aug 29, 2026
Wave 2 Worker A: complete narrowed Finding 1 contract on top of #162.

- Synthetic checksum_page_framing suite (bare fails / gated strip passes)
- Writer verify uses bare inflate (no false strip on strip-clean encoder)
- Contract/probe docs from Wave 1 #159 + Wave 2 evidence
- Formats/Latest remains ungated; Partitions/Global stay gated

Credit @STE1200. Refs #151 / Discussion #112.
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Closing — superseded (judge: narrow / accept scoped contract)

Review outcome for Finding 1 / #151:

  1. research(#151): Wave 1 checksum-page evidence + Wave 2 framing contract #159 itself was probe/docs/contract-tests only (no universal production strip) and aligned with the narrow judge verdict.
  2. While syncing for merge, parallel landings on main already absorbed the same artifacts and the scoped production gate:
  3. Re-merge now is add/add conflict-only with no remaining unique production value; merging would not advance the narrow contract.

Close reason: superseded by content already on main under the judge narrow scope. Do not merge a wide/universal strip from this or related branches.

main tip at close: 11069a5427b395aa4fc4e3525ddad5fd3c8a0a3c

@cursor
cursor Bot deleted the cursor/wave1-decompress-investigate-67f9 branch August 29, 2026 23:17
DrunkOnJava added a commit that referenced this pull request Aug 31, 2026
…-06)

Splits the mixed strict/lossy `summarize()` into two intentional
variants and deprecates the original.

- summarize_strict() -> Result<Summary> (API-04): returns Err on
  ANY parse failure — BasicFileInfo, PartAtom (when present but
  malformed), class-name enumeration. Absence of an optional
  PartAtom is treated as success-with-None rather than error.
- summarize_lossy() -> Result<Decoded<Summary>> (API-05): returns
  a Decoded wrapper that accumulates partial-parse issues into
  `diagnostics.failed_streams` instead of short-circuiting. Only
  propagates the error when BasicFileInfo itself is unreadable
  (without it there's no versioned identity to report).
- summarize() (API-06): #[deprecated] — the old mixed behaviour
  (strict on BFI, lossy on PartAtom + class-names) becomes a
  compatibility shim that calls through to summarize_lossy() and
  drops the diagnostics.

Callers migrated in the same commit:
- src/bin/rvt_info.rs → summarize_lossy (CLI tolerates partial)
- tests/samples.rs → summarize_strict (corpus samples must parse
  cleanly; partial data would mask regressions)

302 lib tests pass. No deprecation warnings remain in-tree.

Also closes #159 — the external Diagnostics accumulator (API-02)
now has a direct caller that populates it, not just the
scaffolded path.
DrunkOnJava added a commit that referenced this pull request Aug 31, 2026
Wave 2 Worker A: complete narrowed Finding 1 contract on top of #162.

- Synthetic checksum_page_framing suite (bare fails / gated strip passes)
- Writer verify uses bare inflate (no false strip on strip-clean encoder)
- Contract/probe docs from Wave 1 #159 + Wave 2 evidence
- Formats/Latest remains ungated; Partitions/Global stay gated

Credit @STE1200. Refs #151 / Discussion #112.
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