Repository navigation
feat(dxf): write the OBJECTS section, paired with AutoCAD's export (#126) - #372
Conversation
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: c9cff7684a
ℹ️ 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".
…s and the 330 relation (#126)
# Conflicts: # .github/workflows/ci.yml # ARCHITECTURE.md # src/dxf_convert.rs
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: db5475a028
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 426e066d3f
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7965340c9b
ℹ️ 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".
# Conflicts: # ARCHITECTURE.md
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f11366f3f
ℹ️ 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".
f5cb7a2 to
842fa62
Compare
…pplication data (§20.4.104, #126) The probe's bracket walk read a `102 {ACAD_REACTORS` inside an XRECORD's application data as a structural reactor bracket, so a 330 to an absent handle there counted as a dangling reactor. It now stops at `100 AcDbXrecord` through the same `DxfRecord::data_start` that `top_level` uses, now public. A second synthetic check writes that payload beside a control XRECORD with a real reactor to an absent handle: the payload must count as an application's handle and the control as one dangling reactor.
b54aae5 to
f70883b
Compare
… an auto-merge that cannot fire (#417) * fix(ci): hand back a PR with an unsigned commit instead of waiting on an auto-merge that cannot fire main's ruleset requires signed commits. On 2026-10-27 #372 carried one unsigned commit (842fa62) and sat BLOCKED with all 25 checks green and auto-merge on for half an hour, until land.sh's deadline would have expired. land.sh now lists the PR's unverified commits before turning auto-merge on and exits 5 naming them. * fix(ci): read every page of a PR's commits when checking signatures Codex on #417: the check read only the first 100 commits. It now passes --paginate and joins the unverified SHAs from every page.
…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
Summary
Stacked on #371 (BLOCKS): this branch contains that commit, so until #371 lands the diff shows both; the OBJECTS change is the second commit,
c9cff76.dwg-to-dxfnow writes the OBJECTS section from the decoded objects, in AutoCAD's order, andprobe_dxf_objects(wired into the Corpus job) pairs every record with AutoCAD's own export. Follow-on to #371 (#126), one PR per section. The kinds written first are the dictionary family (DICTIONARY and ACDBDICTIONARYWDFLT with each entry's key and handle, DICTIONARYVAR), XRECORD, SCALE and ACDBPLACEHOLDER; a dictionary entry whose object is not written yet is left out, and the probe states why. The placeholder records the converter wrote for every object (an owner of 0 and no body) are gone: an object is written with its owner, reactors, extension dictionary and body, or counted in the skipped comment.Spec reference
ODA v5.4.1 §20.4.44 DICTIONARY, §20.4.45 DICTIONARYWDFLT, §20.4.74 DICTIONARYVAR, §20.4.92 SCALE, §20.4.104 XRECORD. The handle stream of an object is read by
tables::handles::refs(owner, reactors, extension dictionary, then the object's own handles: a dictionary's item handles in key order, a WDFLT's default after them). An XRECORD's data is typed by the group code's range, as in DXF (XRecord::items).src/dxf_objects.rs: the planner, the order and the writer;src/dxf_convert.rs: the planned handles feed TABLES and ENTITIES, then OBJECTS is built last with every handle the output defines.src/objects/xrecord.rs:XRecord::items,XValue,XItem. Up to R2004itemsreads the data through feat(objects): read XRECORD values and extended entity data in the code page each string names (§28, §20.4.104, #375) #380'sextended_data::xrecord_items(each string in the code page its page byte names; a string outside ASCII in a page the crate does not name is refused and the XRECORD counted(not written)); from R2007 it reads the UTF-16 strings itself.plan()offers a handle only for an object whose record writes, so the handles the tables, entities and dictionaries are told are all emitted.Test plan
cargo fmt --all -- --check,cargo clippy --all-targets --all-features -- -D warnings,RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-featurescargo test --release --all-features: 921 passed, 0 failed (26 result lines), run onc579b1a; the pushed head differs from it only by the merge of main with feat(dxf): score MULTILEADER in the value oracle (§20.4.48) #385, which changes the DXF oracle's files (examples/dxf_oracle/scorers.rs,tools/oracle/) and two spec-coverage lines. This branch adds no unit test. CI runs it on the head too.cargo run --release --features dxf-reader --example probe_dxf_objects -- <dwg-corpus>pairs every record with the export's (42 drawings R2000 to R2018, 10 without a twin of the release skipped): 5,944 written, 5,736 paired, 0 disagree, 0 extra, in AutoCAD's order. Exit 0.The order is a walk, not a sort: AutoCAD's export starts at the named object dictionary and then at every object not owned by an object (a table's, a table record's, a block's or an entity's extension dictionary), in the order of its owner in TABLES, BLOCKS and ENTITIES, and visits a dictionary's entries and then an object's extension dictionary, level by level. The probe checks the order of every paired record against the export's.
What is not paired, with a stated reason: the export registers again 1,020 DICTIONARYs, 107 DICTIONARYVARs and 1,111 XRECORDs (extension dictionaries and what they hold) under handles of its own, which the probe pairs by owner or by the dictionary key that holds them; 208 records the export does not hold at all (34 dictionaries, 174 XRECORDs: an extension dictionary whose owner it writes without one, an entry its dictionary lacks, what those own, an owner it does not write); 184 group values are relations the probe names (the editing time and save date of
DWGPROPS, the saved file's identity ofACAD_LAST_SAVED_VERSION_INFO, a handle of an object the export registers again, the styles AutoCAD lists again in anACDB_RECOMPOSE_DATAXRECORD (group 330, which the probe now compares after the record's owner), the tail of a round-trip XRECORD that AutoCAD consumes on load). 4,360 dictionary entries are written and 1,751 left out (1,670 name objects not written yet, 81 objects the export made itself, 58 objects it leaves out). Extended data on a dictionary (28 groups) is not decoded.python3 tools/maintainer/train/arch.py checkandpython3 tools/ci/spec_coverage.py --check: 0 problems.Existing tests and code changed
None of the existing tests changed.
dxf_convertno longer calls the placeholder collector for a drawing whose tables and entities are written (the fallback path for the others keeps it), and the wording of the probes' reasons for a material or visual style handle changes from "written as an untyped record" to "not written to OBJECTS yet", since the untyped records are gone.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:
The only other inputs are the public corpus and AutoCAD's own DXF exports of its drawings. No algorithm-description comments in other projects were read.
Developer Certificate of Origin
I affirm the contribution is my own work and may be distributed under the project's Apache-2.0 license.