Repository navigation
feat(dxf): score MULTILEADER in the value oracle (§20.4.48) - #385
Merged
Merged
Conversation
The MULTILEADER decoder (#229) is now compared with AutoCAD's export field by field. The export nests the record's parts in marker groups (300 CONTEXT_DATA{ to 301, 302 LEADER{ to 303, 304 LEADER_LINE{ to 305) that reuse each other's codes, so the oracle scores each part within its own groups: the context before and after its leader roots, every root before and after its lines, every line, and the entity's tail. Colours are the CMC's 32-bit word, a bare index before R2004 as MLEADERSTYLE. The has-block bit the DWG stores only without text, and the R2013-only leader-extended flag, are scored only where the DWG holds them. On the 49 drawing pairs: 90 records, R2000 to R2018 (15 per release), 8532 values equal the export and 3 differ: the text background colour of three R2000 records, which the R2000 file holds as ACI 9 and the export as the true colour 0xC2C8C8C8 that the R2004 to R2018 saves hold in full (#381). 495 decoded values have no DXF group (the per-line style fields the export omits, the unnamed MC and B, the pre-R2010 arrow and label lists, the text's trailing flag). tools/oracle/baseline.tsv gains the 602 new rows; the §20.4.48 row of docs/spec-coverage.md says what the oracle measured, and the oracle's section map files the class under §20.4.48. Refs #99, #102, #147, #381
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: c5c622ce5b
ℹ️ 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".
… when it has no leader roots
Without a 302 LEADER{ block the context's groups after the roots lie
in the same range as those before them, so groups 272 and 273 were looked up in an
empty range and reported as DWG-only with their DXF counterparts not
decoded. No corpus record lacks a root: the oracle's output is unchanged.
Refs #99, #102, #147
DrunkOnJava
enabled auto-merge (squash)
October 27, 2026 16:10
This was referenced Oct 27, 2026
DrunkOnJava
added a commit
that referenced
this pull request
Oct 28, 2026
…10-27 (#416) * docs: bring README, ROADMAP and CHANGELOG up to the landings of 2026-10-27 README's code-page and DXF writer text named work in review that has landed (#371, #380, #382, #384); jev_review.py prose ranked those sentences 0.72 to 0.96. ROADMAP's "where it stands" table was a 2026-10-21 snapshot whose numbers, CI row and release row were all out of date; it now points to the rendered numbers instead of repeating them. CHANGELOG gains #371, #380, #382, #384, #385 and #404. * docs(changelog): record the CI-only merge train (#408) * docs: OBJECTS landed (#372): README, ROADMAP and CHANGELOG * docs: LAYOUT, GROUP and MLINESTYLE (#373), the class map writer (#405) and the double-byte round trip (#414) landed * docs: VISUALSTYLE landed (#413) * docs(readme): name the skipped types still in review without per-type counts; MATERIAL landed (#325) * docs(readme): point to the open decoder PRs instead of a list that each landing makes stale
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
The value oracle scores MULTILEADER (§20.4.48, decoded by #229) against AutoCAD's DXF export: 90 records, R2000 to R2018.
The export nests the record in marker groups (
300 CONTEXT_DATA{to301,302 LEADER{to303,304 LEADER_LINE{to305) whose fields reuse each other's codes (90, 91, 92, 290, 291, 40, 10, 11, 170, 171, 271 to 273). Each part is scored within its own groups: the context before and after its leader roots, each root before and after its lines, each line, and the entity's tail. Colours are the CMC's 32-bit word (before R2004 the DWG holds the bare index, as MLEADERSTYLE does). The has-block bit, which the DWG stores only on a multileader without text, and the R2013-only leader-extended flag, are scored only where the DWG holds them.Spec reference
Spec §20.4.48 MULTILEADER and §20.4.86 MLeaderAnnotContext (embedded in it). Before and after, on the 49 drawing pairs:
The 3 differences are the one finding, filed as #381: the text background colour of three R2000 records (handles 0xB22, 0xB23, 0xB24 of
sample_AC1015.dwg). The R2000 record holds the colour as a bare BS index (9); the export writes the true colour 0xC2C8C8C8 that the R2004 to R2018 saves hold in full, and those 45 records equal. The decoder is right (the record closes on its boundary with the index read); the two files hold different amounts of information, as for LAYER's true colour (#245). The oracle leaves the three scoreddifferent; it does not map the index onto the word.The 495 DWG-only values are measured export behaviour, not scorer gaps: the per-line style fields (170, 92, 171, 40, 93) of R2010+ lines, which the export omits (45 records x 5), the decoder's unnamed MC and B (R2010+), the pre-R2010 arrow-head and block-label lists, and the text's trailing flag. On R2010+ the export still writes the
-R2007block (294, 178, 179, 45) that the DWG no longer holds; those are not-decoded.tools/oracle/baseline.tsvgains the 602 new rows; no existing row changes (the ratchet against main's baseline passes). The §20.4.48 row ofdocs/spec-coverage.mdsays what the oracle measured; its state stayscloses.Test plan
cargo fmt --all -- --check,cargo clippy --all-targets --all-features -- -D warnings,cargo test --release --all-features,RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features,python3 tools/ci/spec_coverage.py --checkSource-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).dwg-rsis Apache-2.0 and must remain compatible.My contribution is based on:
CLEANROOM.md.No such reading was needed: the mapping is the DXF Reference's AcDbMLeader groups, read from AutoCAD's own exports as data.
See
CLEANROOM.mdfor the full allowed/forbidden source list and the honest scope of what "clean-room" means for this project.Developer Certificate of Origin
By submitting this PR, I certify that the contribution complies with the
Developer Certificate of Origin 1.1.
Specifically, I affirm that the contribution is my own work (or rightfully
licensed to me) and that it can be distributed under the project's Apache-2.0
license.
I will sign off commits with
git commit -swhen asked, which adds aSigned-off-bytrailer to the commit message asserting the DCO.Refs #99, #102, #147, #381.