Repository navigation
fix(entities): decode MULTILEADER on R14 to R2007 with §20.4.48's version branches (#229) - #278
Merged
Merged
Conversation
…sion branches (#229) AutoCAD writes MULTILEADER into every release it saves, a class on R14 to R2004, but the crate decoded it only from R2010, so all 60 R14 to R2007 multileaders of the public corpus were skipped. §20.4.48 and §20.4.86 print every branch the earlier releases need: the R2010+ class version and per-line, per-root and context style fields, and the -R2007 tail of arrow heads, block labels and four scalars; before R2004 a CMC is a bare index and before R2007 the TVs are inline. Read that way, all 105 MULTILEADER records close, R14 to R2018, and every value examples/probe_mleader.rs compares equals the DXF twin on R2000 to R2018 (0 of 7,935 differ). The unit test that pinned the R2007 refusal is removed. ARCHITECTURE.md §7t records it; §20.4.48 moves to closes.
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
DrunkOnJava
added a commit
that referenced
this pull request
Oct 26, 2026
On a loaded machine the governor refused the build of #278 after 600 s and the train dropped the PR as failed. refresh.sh now exits 75 when the build log says the governor gave no lease, and train.sh puts the PR back at the end of the queue, waiting TRAIN_DEFER_SLEEP (600 s) once every queued PR has been deferred in a row. spec_examples runs from the built binary instead of cargo run, so only the build can be refused.
# Conflicts: # ARCHITECTURE.md # docs/data/spec-coverage.tsv # docs/spec-coverage.md # src/entities/dispatch.rs # tools/corpus/baseline.tsv
# Conflicts: # ARCHITECTURE.md # docs/spec-coverage.md
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 MULTILEADER on R14, R2000, R2004 and R2007. This reads the R2010+ and
-R2007branches that §20.4.48 and §20.4.86 print, the pre-R2004CMC, and inlineTVs. All 60 R14 to R2007 multileaders of the public corpus were skipped; they now close. Every value compared equals AutoCAD's DXF export of the same drawing, on every release with a twin. The new probe also checks the R2010 to R2018 records the crate already decoded: 0 differences there too. Part of #229.Spec reference
§20.4.48 MLEADER and §20.4.86 MLeaderAnnotContext:
BS 270class versionBS 170,CMC 92,BL 171,BD 40,BL 93BS 271BS 273,BS 272B 293BS 271,BS 273,BS 272(and the 17 unnamed bits of §7g)BLarrow heads with aBeach,BLblock labels withTV,BS,BDeach, thenB 294,BS 178,BS 179,BD 45Before R2004 a
CMCis the bareBSindex (§2.11), and before R2007 theTVs are inline. The readers now share a smallSrc(string source plus release) instead of aStringReader.MLeadergainslegacy: Option<MLeaderPreR2010>for the-R2007tail.mleader::decodeis the inline entry point; dispatch routes the class name on R14 to R2004 and opens the split-stream path to R2007.Records it was measured on
examples/probe_mleader.rs(new) compares the decoded values with the twin'sAcDbMLeadergroup. It works part by part: the context, each leader root and its lines, and the entity's own fields. Each value is matched against the next group with its code. That covers about 87 values per record: context scale, points, sizes and attachments; the whole text block; base point, direction and vertical; every root and line; and the entity's style fields. On R2000 to R2007 it also covers the-R2007scalars.A comparator check: changing one character of a label in a copy of the R2000 twin is reported as exactly one difference.
The releases do not hold identical values.
0xB27stores content base x 527.42 with attachments 4/0 up to R2007, and 556.64 with 0/8 from R2010. Each release's DXF agrees with its own record, so AutoCAD converts the leader on save, and the probe compares each release with its own twin.Coverage,
../../samplesUnchanged (no multileader below R2018 in the 19 files): TOTAL 4256 / 180 / 9 on a main that includes #254.
Public corpus:
tools/corpus/baseline.tsv(regenerated, committed)52-file total: 14935 / 831 / 308 → 14995 / 771 / 308.
measure.py checkpasses. It is regenerated in the serial rebase.Class census and reference closure
Unchanged on all 19 files of
../../samplesand in the baseline's census and closure columns.Docs
docs/data/spec-coverage.tsv§20.4.48 →closes;docs/spec-coverage.mdregenerated.mleader.rsmodule doc records the branches and the measurement.Test plan
cargo fmt --all -- --checkcargo clippy --all-targets --all-features -- -D warningsRUSTFLAGS="-D warnings" cargo test --release --all-features(real-file tests ran against../../samples)RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-featurestools/corpus/measure.py checkpasses against the committed baselinemleader::tests::pre_r2010_is_unsupportedasserted that an R2007 record is refused. The corpus disproves that: all 15 R2007 records close and match their twin.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 §2.11, §20.4.48 and §20.4.86 of the ODA's freely-redistributable Open Design Specification for .dwg files (v5.4.1), including their DXF group codes, on the corpus bytes, and on AutoCAD's DXF exports of the same drawings, read as data files (ACadSharp
samples/atc30a97ce, MIT, pinned by #225). 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.