Repository navigation
feat(streaming): bounded file-header state machine, sources and checkpoints - #213
Merged
Merged
Conversation
Begin #205 with a pure state machine for ODA 5.4.1 section 3.2. Validate CRC, sentinel, locator identities and source ranges; reject unsupported container layouts explicitly. Exercise the built entry point with short reads, truncations and corrupt input in remote CI.
…esume Version and validate compact state against the source identity. Save every mid-field checkpoint, restore in a new process, and trace source reads. Add proptest-generated child-process schedules and compile the identical grammar without std or an allocator on native and wasm32. Refs #207, #210.
This was referenced Oct 25, 2026
DrunkOnJava
marked this pull request as ready for review
October 25, 2026 21:23
DrunkOnJava
enabled auto-merge (squash)
October 25, 2026 21:23
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. |
This was referenced Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The legacy reader loads entire files and sections. This adds the first bounded streaming core: the complete R13–R2000 file header (ODA v5.4.1 §3.2) is read by a hand-written byte-demand state machine with fixed storage, strict CRC/sentinel checks and explicit unsupported-layout errors. Grammar has no transport, allocator or I/O; pausable file/slice sources supply bytes. Portable checkpoints retain partial fields and failures and validate against a caller-supplied immutable source identity.
The identical grammar source compiles independently without std or an allocator on native and wasm32. The built entry point is exercised by a subprocess E2E driver and proptest schedule generator.
Streaming E2Eis now required in the live main ruleset. The committed ruleset exactly matches live policy and preserves all restrictions, with no admin bypass; the related drift issue #117 is verified and closed.Scope: initial implementation for #205, #206, #207 and #210 under #204. These full-parser issues remain open. Existing DwgFile/browser APIs still load full files. R2004+ streaming containers, objects, decompression checkpoints, compiler replacement, browser runtime, a licensed multi-gigabyte corpus and independent reader comparisons remain unresolved. The compiler follows a measured handwritten baseline, per the requested sequencing. The canonical R2000 fixture's invalid header is tracked as #214; validation is not weakened to admit it.
Verification: all 23 PR checks passed on exact candidate
e7c3df45bbb7c9af56de3297b342e080e32baf9f. Streaming E2E run 40235108179 passed 12 synthetic version/count combinations, 1,002 truncations, two hash-pinned real header oracles, 128 proptest schedules per real file, 98 fresh-process resume positions with zero earlier source reads, malformed/semantic/source mismatch rejection and failed-state restore. It also compiled the same no-allocator grammar on native and wasm32. The existing web/bundler/nodejs WASM wrapper builds passed. No new unit tests. Commands and artifact contract are indocs/streaming/README.md; the JSON/JSONL artifact records the executable SHA-256 and exact generated schedules.Delivery/custody: squash-merged as
ab1d42b029a34e9b030b68fa2c334c6728df2935, GitHub-verified signature. The merged tree exactly equals the tested candidate tree (f1ae400d1f64c35c03c3a2edd0099db561df9c27). Owner: this Codex chat; branchcodex/streaming-corewas automatically deleted on merge. The isolated worktree is retained clean for custody; no peer or release handoff. Main checkout and peer worktrees were preserved. Candidate verification and the separate post-merge main pipeline are distinct claims; no complete model, browser runtime, performance superiority or release-readiness claim is made.Clean-room declaration. All new code was written from scratch using only this repository and ODA's public v5.4.1 specification. No Autodesk SDK, ODA SDK, LibreDWG, decompilation or other forbidden implementation source was consulted. Spec citations are in the grammar and audit. Real DWGs are fetched temporarily from pinned public URLs and are not committed. No external DWG reader implementation source was used.