Repository navigation
feat(objects): decode SORTENTSTABLE from §20.4.93 (#149) - #307
Merged
Merged
Conversation
The draw-order table is a BL entry count and that many code-0 sort handles in the data stream. The dispatcher had no class-name arm for it, so all 27 records of the corpus were skipped; all 27 close on their data-stream boundary from R14 to R2018. Against AutoCAD's DXF export (R2000 to R2018) the entry count and every sort handle of the 24 records with a twin equal it: 66 values, none differing.
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. |
…in the list sits apart from its siblings' (rustfmt sorts the list)
…ares, so the copies merge in any order
# Conflicts: # ARCHITECTURE.md # docs/spec-coverage.md # tools/corpus/baseline.tsv
DrunkOnJava
enabled auto-merge (squash)
October 26, 2026 21:11
3 tasks done
DrunkOnJava
added a commit
that referenced
this pull request
Oct 26, 2026
The SORTENTSTABLE decoder (#307) reads §20.4.93's BL entry count and that many sort handles, handle code 0 in the data stream. The DXF writes each entry as 331 (the entity, a handle of the handle stream the decoder does not read) then 5 (the sort handle), after the record's own 5. The oracle compares the entry count with the number of those 5 groups and each sort handle with the next one, all entries under one field, and files the class under §20.4.93. On the 49 drawing pairs: 18 records, R2000 to R2018 (three per release), all 66 values equal the export, the 66 the decoder's probe reports. tools/oracle/baseline.tsv gains the 12 new rows, and the §20.4.93 row of docs/spec-coverage.md says what the oracle measured. Refs #99, #102, #149
DrunkOnJava
added a commit
that referenced
this pull request
Oct 26, 2026
The SORTENTSTABLE decoder (#307) reads §20.4.93's BL entry count and that many sort handles, handle code 0 in the data stream. The DXF writes each entry as 331 (the entity, a handle of the handle stream the decoder does not read) then 5 (the sort handle), after the record's own 5. The oracle compares the entry count with the number of those 5 groups and each sort handle with the next one, all entries under one field, and files the class under §20.4.93. On the 49 drawing pairs: 18 records, R2000 to R2018 (three per release), all 66 values equal the export, the 66 the decoder's probe reports. tools/oracle/baseline.tsv gains the 12 new rows, and the §20.4.93 row of docs/spec-coverage.md says what the oracle measured. That row's probe sentence said the export equals "the 24 R2000 to R2018 records"; the probe compares 18, and the other 6 R2018 records are export_sample.dwg's, which has no DXF twin. Refs #99, #102, #149
DrunkOnJava
added a commit
that referenced
this pull request
Oct 27, 2026
The SORTENTSTABLE decoder (#307) reads §20.4.93's BL entry count and that many sort handles, handle code 0 in the data stream. The DXF writes each entry as 331 (the entity, a handle of the handle stream the decoder does not read) then 5 (the sort handle), after the record's own 5. The oracle compares the entry count with the number of those 5 groups and each sort handle with the next one, all entries under one field, and files the class under §20.4.93. On the 49 drawing pairs: 18 records, R2000 to R2018 (three per release), all 66 values equal the export, the 66 the decoder's probe reports. tools/oracle/baseline.tsv gains the 12 new rows, and the §20.4.93 row of docs/spec-coverage.md says what the oracle measured. That row's probe sentence said the export equals "the 24 R2000 to R2018 records"; the probe compares 18, and the other 6 R2018 records are export_sample.dwg's, which has no DXF twin. Refs #99, #102, #149
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.
Summary
Decode SORTENTSTABLE (§20.4.93):
BLnumentries and that many sort handles, typedHbut written with handle code 0 in the main bit stream, the one handle a non-entity object keeps in its data stream. The dispatcher had no class-name arm for it, so all 27 corpus records were skipped on every release.Spec reference
§20.4.93 SORTENTSTABLE (tracking #149). The spec's field list closes as printed. A sort handle whose code is not 0 would be an offset from the record's own handle and is refused rather than read as a handle; the entity each sort handle orders is in the handle stream and is not read.
Test plan
cargo fmt --all -- --checkandcargo clippy --all-targets --all-features -- -D warningspass on this branch.cargo test,cargo docand the 1.85 MSRV check run once on a merge of this lane's open branches instead of per branch (the machine is at memory pressure red); the result goes in a comment.Shown on real files, no new unit tests:
cargo run --release --example probe_sortentstable -- <corpus>over the 52 pinned drawings. It closes on the boundary and compares the entry count and every sort handle with AutoCAD's DXF export by handle (the DXF writes each entry as group 331, the entity, then a further group 5, the sort handle).Corpus baseline regenerated: decoded +27, skipped -27, errored unchanged (8 rows).
Tests touched: none.
examples/probe_sortentstable.rsand the shared harnessexamples/support/twin.rsare new examples, not tests.The DXF oracle does not score SORTENTSTABLE yet.
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:
973628f3…f504b) is explicitly allowed (seeCLEANROOM.md).My contribution is based on:
Developer Certificate of Origin
By submitting this PR, I certify that the contribution complies with the Developer Certificate of Origin 1.1.