Repository navigation
feat(streaming): walk a whole R2007 file with every checksum checked before its bytes are handed out (#205) - #340
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a8939a7683
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: feef7176e8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 09aa59cd03
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
# Conflicts: # ARCHITECTURE.md
…64-bit page ids through the wasm kernel, probe a stored header (#205)
… to what landed (#205, #206, #207) (#400) The ledger stopped at the header and the R13-R2000 walk, and the README's checkpoint contract described the header checkpoint alone and said full object and decompression checkpoints remain open. Both now cover the ten checkpoint kinds on main and the walkers of #240, #246, #260, #276, #299, #312, #333, #340 and #363, the perf series #360 to #366, and cite the evidence files of Streaming E2E run 40532346151. What was not measured is marked NOT MEASURED.
Summary
Walks a whole R2007 (AC1021) file through one fixed-size, resumable,
no_stdwalker,streaming::R2007Walker: the file header, the page map, the section map and every data page of every section, with every codeword, CRC-64 and checksum checked before any byte of a page is handed out (#205, goal: R2007 in the streaming grammar).Spec reference
ODA v5.4.1 §5.1–§5.4 (container), §5.10 (LZ), §5.11 (CRC seed bits), §5.12 (CRC-64), §5.13 (Reed-Solomon), §5.4.1 (page checksum). Design in
docs/streaming/README.md("The whole R2007 file"); measured rules and a new finding in ARCHITECTURE.md §7aa (data pages are not bounded by the section's 0xF800 maximum: 70,912 bytes and 273 codewords insample_AC1021.dwg; every CRC/seed/byte-order reading was measured on the pinned drawings, 0 matches for the nearest wrong readings).Gatherdemand names the 255 strided bytes of one codeword; the §5.10 decoder (own file, bounded 64 KiB window, permuted 32-byte literal blocks) pauses between any two bytes.DWGRcheckpoint (<= 2 * 64 KiB + 8 KiB), self-contained, geometry derived on restore, restored in wasm32.mod.rs(modules, exports, sixStreamErrorvariants),byte_source.rs(poll_gather,poll_r2007_walk, a gather window inFileSource),wasm_resume.rs/.mjs(run_r2007,resume_r2007; the checkpoint region grew to 160 KiB),no_std.rs,streaming.yml,.gitignore,spec-coveragerow for §5.Test plan
cargo fmt --all -- --check,cargo clippy --all-targets --all-features -- -D warnings,RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features,cargo +1.85 check --all-features,python3 tools/ci/spec_coverage.py --check,python3 tools/maintainer/train/arch.py checkverify_r2007.py(11 files: the 8 pinned R2007 drawings, 7 nextgis andsample_AC1021.dwg, and 3 filestools/streaming/r2007_ref.pybuilds from the spec; 113 sections, 152 pages, 4,966 data codewords, 3,067,696 bytes; every output line and byte equal to an independent Python parse and tor2007::Container; fixed and 128 proptest chunk schedules; 729 fresh-process resume stops covering all six stages, both passes of each reader and nine decoder modes; 495 bit flips, 495 truncations, a wrong identity and 123 resealed forgeries rejected, 180 resealed mutations without a panic; 41 real-file corruptions and 44 built-file rule breaks each end in their named error with exactly the walk before them printed) andverify_wasm_r2007.py(247 native checkpoints finished in a wasm32 kernel, 247 kernel checkpoints byte-identical to the native ones and finished natively, 83 refusals).python3 tools/streaming/probe_r2007_checks.py <the eight pinned R2007 drawings>.cargo run --release --example stream_r2007_timing -- <file> 15, in memory, best of 15): 70.7 MB/s of section bytes (53.6 MB/s of file) onsample_AC1021.dwgagainst 327 and 247 MB/s for the legacy reader, which verifies nothing and decodes each page once; 179 against 1,160 MB/s onarc_2007.dwg.Source-provenance declaration
By submitting this PR I certify that my contribution does not incorporate executable code from any source whose license is incompatible with Apache-2.0. Specifically:
CLEANROOM.md).My contribution is based on the ODA's Open Design Specification for .dwg files (v5.4.1), read from the PDF (§5.2, §5.3, §5.4, §5.4.1, §5.10 to §5.13, including its printed CRC tables and pseudo-code), on this crate's existing
r2007,r21_lzandreed_solomonmodules, and on measurements of the pinned corpus. No algorithm-description comments from any other project were read.