Repository navigation
feat(objects): decode ACAD_EVALUATION_GRAPH from AutoCAD's own DWG and DXF output (#152) - #339
Merged
Merged
Conversation
…49, #152) ODA spec v5.4.1 prints no MATERIAL layout. The field list is derived by the CLEANROOM.md method of 2026-10-26: the data bits of all 212 corpus records (R14 to R2018) against the AcDbMaterial AutoCAD exported to DXF for the same handle. Every record closes on its data-stream boundary on every release, from R2007 on a string stream the list consumes entirely, and 13,058 values equal the DXF twin by handle with 0 differences. Fields no DXF group shows are named unknown_* and listed in ARCHITECTURE.md section 7s. probe_material becomes the twin probe over the shared harness (examples/support/twin.rs, identical to the objects lane's copy). The strings-only read_strings and its tests are kept untouched. Baseline: decoded +212, skipped -212, errored 0.
…XF output (#152) WIPEOUTVARIABLES, ACDB_DYNAMICBLOCKPURGEPREVENTER_VERSION, ACDB_BLOCKREPRESENTATION_DATA, PDFDEFINITION and DBCOLOR have no spec layout. Each is derived by the CLEANROOM.md method of 2026-10-26 from the data bits of the 42 corpus records (R14 to R2018) against the DXF object of the same handle. All close on every release, from R2007 on a fully consumed string stream, and 50 values equal the DXF twin with 0 differences. DBCOLOR from R2004 reads the colour word (group 420 and xdata 1071), name and book; its leading BS is unverified. One probe per class over the shared twin harness. Baseline: decoded +42, skipped -42, errored 0.
…AD's own DWG and DXF output (#152) BLOCKGRIPLOCATIONCOMPONENT, BLOCKLINEARGRIP, BLOCKVISIBILITYGRIP, BLOCKLINEARPARAMETER, BLOCKVISIBILITYPARAMETER and BLOCKSCALEACTION have no spec layout. Derived by the CLEANROOM.md method of 2026-10-26 from the data bits of the 84 corpus records (R14 to R2018) against the DXF objects of the same handles: a shared AcDbEvalExpr / AcDbBlockElement / AcDbBlockGrip base chain and a tail per class. All close on every release, from R2007 on a fully consumed string stream, and 1,158 values equal the DXF twin with 0 differences. Handles are not decoded. Baseline: decoded +84, skipped -84, errored 0.
…152) ODA spec v5.4.1 prints no DIMASSOC layout. Derived by the CLEANROOM.md method of 2026-10-26 from the data bits of the 21 corpus records (R14 to R2018) against the AcDbDimAssoc of the same handle: a flags word, two head values and one osnap point reference per set flag bit. All close on every release, from R2007 on a fully consumed string stream, and 264 values equal the DXF twin with 0 differences. The dimension and reference handles are not decoded. Baseline: decoded +21, skipped -21, errored 0.
…CAD's own DWG and DXF output (#152) ODA spec v5.4.1 prints no layout for the solid-history records. Derived by the CLEANROOM.md method of 2026-10-26 from the data bits of the 21 corpus records (R14 to R2018) against the DXF objects of the same handles; the box shares the evaluation base of the dynamic-block objects. All close on every release, from R2007 on a fully consumed string stream, and 152 values equal the DXF twin on R2007 to R2018 with 0 differences (the R2000 and R2004 exports hold neither object). Handles are not decoded; ACSH_EXTRUSION_CLASS is not decoded. Baseline: decoded +21, skipped -21, errored 0.
…as no twin for it AutoCAD's R2000 and R2004 DXF exports omit ACSH_HISTORY_CLASS and ACSH_BOX_CLASS entirely, and the twin harness failed every such record as unpaired. When a release's export holds no record of the kind at all, the record is now checked by its boundary only and says so, as on R14; a missing record where the export holds others of the kind still fails.
…st AutoCAD's own DXF (#152) The dispatcher routed the UNDERLAY family on R2010 and later only, so the PDFUNDERLAY records of R14, R2000, R2004 and R2007 were skipped. The arm moves beside IMAGE and WIPEOUT, which run on every release. With the routing repaired the R14, R2000 and R2004 records ended 8, 8 and 16 bits past their data-stream boundary: the decoder read the definition handle inline before R2007, but the handle is in the handle stream on every release, so the read and the Underlay.definition_handle field are gone. All seven corpus records (one per release, R14 to R2018) now close exactly on the boundary, and 36 values (groups 10, 20, 30, 280, 281, 282) equal the DXF twin by handle on R2000 to R2018 with 0 differences (examples/probe_underlay.rs). Scale, rotation, normal and the clip-vertex encoding are unverified by value: the DXF omits them at their defaults. Baseline: decoded +1, skipped -1 on each of R14, R2000, R2004 and R2007. Tests touched: the four in-module tests of entities::underlay lose the inline handle write and its assertions and the version argument; none added.
ODA spec v5.4.1 prints no layout for the sun of a drawing's lighting settings. The earlier entities::sun decoder sat on the fixed type code 0x4F9, which no corpus record carries, and its layout rested on no AutoCAD output; it is replaced by one derived by the CLEANROOM.md method of 2026-10-26 from the data bits of the corpus's one SUN record (geoloc.dwg, R2018) against the AcDbSun object of the same handle in its DXF export. SUN is a non-entity object, so it now reaches the dispatcher as a custom class. The record closes on a fully consumed string stream and 11 values (groups 90, 290, 421, 40, 291, 91, 92, 292, 70, 71, 280) equal the DXF with 0 differences. The corpus holds no SUN on any other release; group 63 is not a field of the data bits. Baseline: decoded +1, skipped -1 (geoloc.dwg). Tests touched: the two in-module tests of the replaced entities::sun::decode are removed with it (a writer round trip of the earlier layout and a pre-R2007 refusal); none added. dispatch.rs loses OBJECT_TYPE_SUN from the list its fixed_entity_label_covers_every_body_arm check walks.
…#152) ODA spec v5.4.1 prints no layout for the table of typed columns AutoCAD writes for the data a drawing's fields and links draw on. Derived by the CLEANROOM.md method of 2026-10-26 from the data bits of the six corpus records (R14, R2000 and R2004; two per release) against the DATATABLE objects of the R2004 DXF export, which AutoCAD gave different handles; each record is paired with the DXF object that no DWG record shares a handle with, in file order. All six close on the data-stream boundary on every release the class occurs in, and 155 values (groups 70, 90, 91, 1 and, per column, 92, 2 and the cells of groups 93 and 40) equal the DXF with 0 differences. The handle column (group 360) is in the handle stream and is not decoded; column types other than 1, 2 and 6 are refused as unsupported. Baseline: decoded +2, skipped -2 on each of sample_AC1014, sample_AC1015 and sample_AC1018. Tests touched: none; none added.
… own DWG and DXF output (#152) ODA spec v5.4.1 prints no layout for the annotation-scale state AutoCAD keeps for a text object. Derived by the CLEANROOM.md method of 2026-10-26 from the data bits of the seven corpus records (two in each sample_base save of R2010, R2013 and R2018, and one in export_sample.dwg) against the DXF objects of the same handles. All seven close on the data-stream boundary, and 48 values (the two groups 70, and 290, 50, 10, 20, 11 and 21) equal the DXF with 0 differences. The R2004 and R2007 saves declare the class and hold no object. Unverified by value: the unit of the rotation (0.0 in both twins) and the order of groups 11 and 21 (both 0.0); the scale handle (group 340) is not decoded; a release before R2010 is refused as unsupported. Baseline: decoded +2, skipped -2 on each of sample_AC1024, sample_AC1027 and sample_AC1032; decoded +1, skipped -1 on export_sample. Tests touched: none; none added.
…d DXF output (#152) ODA spec v5.4.1 prints no layout for the dependency graph AutoCAD keeps for the evaluation of a dynamic block. Derived by the CLEANROOM.md method of 2026-10-26 from the data bits of the 21 corpus records (three per release, R14 to R2018: one graph of 12 nodes and 10 edges and two of one node) against the objects of the same handles in the DXF export. All 21 close on the data-stream boundary on every release, and 1,342 values equal the DXF with 0 differences; the node and edge counts, which no DXF group shows, equal the number of nodes and edges the DXF holds. What the link values of a node and an edge mean is not read from the corpus (each is tied to its group by position and value); the node handles are not decoded. Baseline: decoded +3, skipped -3 on each of the seven acadsharp sample_AC10xx drawings. Shared harness: examples/support/twin.rs gains Pairing::HandleOrAbsent, for a record the DXF export omits while holding others of its kind (AutoCAD's R2000 and R2004 exports keep one of the three graphs); it is boundary-only and the line says so. Other probes are unaffected. Tests touched: none; none added.
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
Unprinted classes: decoded from one drawing each; provisional until controlled AutoCAD drawings
#348
Open
DrunkOnJava
added a commit
that referenced
this pull request
Oct 28, 2026
DrunkOnJava
added a commit
that referenced
this pull request
Oct 28, 2026
DrunkOnJava
added a commit
that referenced
this pull request
Oct 28, 2026
# Conflicts: # CLEANROOM.md
…t commit of #335 it holds
DrunkOnJava
marked this pull request as draft
October 28, 2026 06:53
2 tasks done
DrunkOnJava
added a commit
that referenced
this pull request
Oct 28, 2026
DrunkOnJava
marked this pull request as ready for review
October 28, 2026 07:31
DrunkOnJava
enabled auto-merge (squash)
October 28, 2026 07:47
DrunkOnJava
added a commit
that referenced
this pull request
Oct 28, 2026
* fix(ci): hold a stacked PR until the older PR it builds on lands A PR stacked on an older open PR targets main but holds that PR's commits. When the train held the older PR on a review thread it went on to the next one: landed first, that PR would have carried the older one's work into main under its own title (#337 over #335, #339 over #337 were drafted by hand to stop it), and its refresh merged main over the older PR's commits, so after that PR landed its merge base no longer applied and a lane had to merge it by hand. The train now sends such a PR to the end of the queue while an older open PR (a lower number) shares commits with it that main does not have. On the queue of 2026-10-28: #324 waits for #323, #355 for #324, #356 for #355, #410 for #356, #412 for #410, #339 for #337 and #341 for #339; #323, #337, #389 and #296 wait for nothing. * fix(ci): check every open PR, skip landed work, and defer on a failed lookup The stack check listed at most 200 open PRs, only those targeting main, treated any shared commit as outstanding even when it belonged to a PR that had already landed by squash, and let a PR through when a fetch or gh call failed. It now fetches every PR head to refs/train/pr/<n> in the main clone, pages through all open PRs whatever they target, ignores a shared commit that a merged PR's head holds, and returns 2 on any failed lookup, which sends the PR to the end of the queue. Checked in a scratch repository (two PRs built on a landed PR do not wait for each other; a PR built on another waits for it; a failing gh returns 2) and on the live queue, where the R13 and unp stacks give the same order as before. * fix(ci): count only PRs merged into main as landed when checking a stack A PR merged into a feature branch has merged_at set too, so its commits were treated as landed and a newer PR holding them went ahead of the open PR they were waiting in. The exemption now takes only PRs whose base is main. All 187 merged PRs so far target main, so the live order is unchanged.
DrunkOnJava
added a commit
that referenced
this pull request
Oct 28, 2026
…t commit of #339 it holds
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
Stacked on #337 (which is stacked on #335, #332, #331, #330, #329, #328, #326 and #325): this branch contains their commits and lands after them; its own change is the single commit on top.
Decodes ACAD_EVALUATION_GRAPH on every release from R14 to R2018. ODA spec v5.4.1 prints no layout for the dependency graph AutoCAD keeps for the evaluation of a dynamic block; the field list is derived by the CLEANROOM.md method of 2026-10-26 from the data bits of the corpus records against AutoCAD's own DXF export. Every field is a signed
BL: groups 96 and 97, a node count, the nodes (groups 91, 93, 95 and four 92), an edge count, the edges (groups 92, 93, 94, two 91 and five 92). Node handles (group 360) are in the handle stream and are not decoded.Spec reference
None: §20.4 has no entry for it, so there is no
docs/data/spec-coverage.tsvrow; theACAD_EVALUATION_GRAPH, ACDBASSOC*row ofdocs/spec-coverage.md("Classes the spec does not prescribe") is split and ACAD_EVALUATION_GRAPH is set tocloses. Layout and evidence: ARCHITECTURE.md §7ab (provisional letter). Per-class record: CLEANROOM.md (2026-10-26).Evidence (
cargo run --release --example probe_eval_graph -- ../dwg-corpus):The records are one graph of 12 nodes and 10 edges and two of one node and no edge, per release. The two counts are
BLfields no DXF group shows, so the probe checks them by structure: the groups after group 97 must number 8 per node and 10 per edge, and each node and edge must open with the group codes the layout names. Unverified by value: what the four link values of a node and the five of an edge mean (each equals its DXF group by position and value only; the corpus holds one large graph to vary them against) and any larger graph. AutoCAD's R2000 and R2004 DXF exports keep the large graph and omit the two small ones, so those four records are boundary-only, as are R14's three. The shared harness failed such a record for want of a partner, soexamples/support/twin.rsgainsPairing::HandleOrAbsent(a record the export omits while holding others of its kind is boundary-only, and the line says so); no other probe is affected. Corpus baseline, relative to #337's head: decoded +3 and skipped -3 on each ofsample_AC1014tosample_AC1032, errored 0 (measure.py checkpasses on this head).Test plan
cargo fmt --all -- --check,cargo clippy --all-targets --all-features -- -D warnings,RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features,cargo test --release --all-featurespass locally on this headprobe_eval_graphover the 52 pinned drawings (21 records close, 1,342 values against the DXF twins, 0 differ)python3 tools/ci/spec_coverage.py --checkpassesSource-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:
My contribution is based on AutoCAD's own output, by the method recorded in CLEANROOM.md (2026-10-26): AutoCAD-written DWG files compared with AutoCAD-written DXF exports of the same drawing, from the pinned public corpus (ACadSharp
samples/sample_base; data files only). No third-party DWG or DXF implementation was consulted, ACadSharp's and ezdxf's reading code, comments, tests and derived data included. No vocabulary beyond the DXF group codes and subclass marker in the twins was used.Developer Certificate of Origin
I affirm that the contribution is my own work and can be distributed under the project's Apache-2.0 license.