Repository navigation
feat(objects): probe XRECORD on every release band and MATERIAL's data-field budget - #222
Merged
Merged
Conversation
…a-field budget probe_xrecord measures the §20.4.104 field list and the group-code body on every XRECORD record, fixed type 0x4F or class: all 1117 records of the 19-file corpus close at delta 0 and their bodies walk clean. R14 carries XRECORD as a class, so its 345 records reach the dispatcher as custom-class objects and count as unhandled although the existing field list closes on them. R13 to R2004 body strings take an RS length, not the RC length §20.4.104 prints. probe_material reports each MATERIAL record's data-field budget and tests a candidate field list against all 65 records at once. It derives no field list: only the R2018 file holds a material that is not a default (#49).
DrunkOnJava
enabled auto-merge (squash)
October 26, 2026 08:53
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 26, 2026
Open
DrunkOnJava
disabled auto-merge
October 26, 2026 09:27
6 tasks done
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
Lands two probes that were stranded untracked in the
feat/xrecord-materialworktree since 2026-08-30:probe_xrecordshows the §20.4.104 XRECORD field list closes on all 1117 XRECORD records of the corpus, R14 included, andprobe_materialpins the data-field budget every MATERIAL record leaves after its common object data. XRECORD (345) and MATERIAL (65) are the two largest unhandled kinds incoverage_report.Spec reference
BL numdatabytes, the databytes,BS cloning flagon R2000+ only; the databytes areRSgroup-code/value pairs. The section types XRECORD(varies).What the output makes derivable
coverage_report's unhandled histogram are the 115 records of each R14 file, where XRECORD has a class-map type code;entities/dispatch.rssends only the fixed code0x4Ftoobjects::xrecord. The field list that decoder already reads closes on every one of them. Routing theXRECORDclass name to it would move 345 records from skipped to decoded (recorded in §20 family: Dictionaries and non-graphical objects (§20.4.44, §20.4.45, §20.4.71, §20.4.72, §20.4.74, §20.4.76, §20.4.77, §20.4.79, §20.4.83, §20.4.89, §20.4.90, §20.4.92 to §20.4.95, §20.4.104) #149; not done here, since this PR adds probes only).RSlength, then theRCcodepage, then the bytes; §20.4.104 prints the length asRC.arc_R14.dwghandle0x2ABholds102="EXTNAMES" 1="*MODEL_SPACE" 2="*Model_Space"in 47 databytes: 3 × (2 + 2 + 1) + 32. AnRClength gives 44.sample_AC1032.dwgholds a material that is not a default, so the per-map layout cannot yet be separated from its values (MATERIAL (30 records): per-map block layout needs a corpus file with a non-default material #49).docs/data/spec-coverage.tsvis unchanged: §20.4.104 stayspartialuntil the R14 records decode in the crate itself. Its note ("Skipped as unmatched across the corpus") is wrong for R2000 to R2018 and is corrected with that state change.Test plan
rustfmt --edition 2024 --checkandcargo clippy --release --all-features --example probe_xrecord --example probe_material -- -D warningsclean;RUSTFLAGS="-D warnings" cargo build --releaseof both examples clean.arc_/circle_/line_files andsample_AC1032.dwg). No unit tests added.Group codes per band (
XR_CODES=1;arc_files,circle_andline_are identical):The same run with no spec over all 19 files prints 65 records with the budgets in the table of the module doc (
0/65 MATERIAL records close at delta 0, as an empty spec must).MAT_BD=1onarc_2010.dwgfinds1/48at bits 46, 120, 250, 324, 510, 584, 706, 780, 900, 974, 1096 and 1170, the offsetssrc/objects/acad_material.rsdocuments.Changes from the stranded originals: the module docs (what each proves, measured table, how to verify), the MATERIAL probe's
§19.4.2citation corrected to §20.1, and an unused cursor removed from itsMAT_BDscan. Output is byte-identical before and after.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 §20.1, §20.3 and §20.4.104 of the ODA's freely-redistributable Open Design Specification for .dwg files (v5.4.1), which says the XRECORD indicator numbers "follow the normal AutoCAD DXF convention for group codes", and on the corpus bytes. The code-to-width table follows that convention; the widths marked
(measured)are the ones that make every body walk clean. No third-party code or comments were read.Developer Certificate of Origin
By submitting this PR, I certify that the contribution complies with the Developer Certificate of Origin 1.1.