Skip to content

test(objects): delete the object decoders' inline mirror suites, 1,021 lines - #433

Merged
DrunkOnJava merged 3 commits into
mainfrom
test/delete-object-suites
Oct 28, 2026
Merged

DrunkOnJava merged 3 commits into
mainfrom
test/delete-object-suites

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

Unit-suite staged deletion, area object decoders. The inline #[cfg(test)] modules of 13 files under src/objects/ build synthetic bit streams in each decoder's own field layout and assert the fields they decode, or round-trip them through a hand-written encoder. They are unit tests, which this repository bans, and no job runs them since the Test job moved to tools/ci/run_test_targets.sh (#428). Git history is the archive.

File (src/objects/) Tests Lines
acad_layout.rs 5 162
xdata.rs 4 95
acad_plot_settings.rs 3 91
acad_group.rs 5 90
acad_property_set_data.rs 4 90
acad_scale.rs 5 88
acad_mlinestyle.rs 4 81
proxy_entity.rs 4 65
proxy_object.rs 4 63
custom_dict_entry.rs 4 60
acad_material.rs 2 46
dictionary_var.rs 3 41
placeholder.rs 3 35

Lines removed: 1,021 (50 tests; 1 line reworded). Production code is unchanged apart from one doc line: each file's only #[cfg(test)] item is its test module, so no test-only helper goes with it. acad_material.rs documented AcadMaterial as "kept with its tests"; it is public API that Material supersedes, so it stays and the line now says that.

Skipped: files an open PR touches, and the four they pin

Checked against gh pr list --state open at push time.

Coverage of the area

Every decoder here is self-validating: a field list must end exactly on the record's data-stream boundary, or it returns an error. What checks it now is the Corpus job, on every pinned drawing:

  • the per-file decoded, skipped and errored counts of tools/corpus/baseline.tsv;
  • the DXF value oracle (tools/oracle/baseline.tsv), which has rows for LAYOUT (acad_layout), MLINESTYLE, SCALE, DICTIONARYVAR and ACDB_PLACEHOLDER among these files;
  • canonical_corpus and the class-census probes on the committed canonical fixtures.

The oracle has no row for acad_group, acad_material, acad_plot_settings, acad_property_set_data, custom_dict_entry, proxy_entity, proxy_object and xdata. For those, the check is the errored count, which only sees a type the pinned drawings contain; the deletion removes the only other check.

Spec reference

Not a decoder change. No corpus count moves: tools/corpus/baseline.tsv and tools/oracle/baseline.tsv are untouched.

Test plan

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:

  • No Autodesk DWG SDK source (RealDWG, ObjectARX, ObjectDBX) or NDA-protected Autodesk documentation was consulted or imported.
  • No Open Design Alliance Teigha / Drawings SDK source was consulted or imported. The ODA's public Open Design Specification for .dwg files PDF is explicitly allowed (see CLEANROOM.md).
  • No GPL-licensed DWG implementation source (LibreDWG, etc.) was consulted or imported. This matters because dwg-rs is Apache-2.0 and must remain compatible.

My contribution is based on:

  • The ODA's freely-redistributable Open Design Specification for .dwg files (v5.4.1);
  • Public reverse-engineering notes, research papers, or blog posts cited inline;
  • Reading algorithm-description comments (not executable code) in permissively-licensed projects (MIT / Apache / BSD) to resolve spec ambiguities: none were read for this change.

See CLEANROOM.md for 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.

The inline #[cfg(test)] modules of 17 files under src/objects/ build
synthetic bit streams in each decoder's own field layout and assert the
fields they decode, or round-trip them through a hand-written encoder. They
are unit tests, which this repository bans, and no job runs them since the
Test job moved to tools/ci/run_test_targets.sh. Git history is the archive.

acad_material's doc no longer says AcadMaterial is kept with its tests.
The five object files an open pull request touches keep theirs until those
land.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T13:14:20.162170Z deff1fe New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

acad_detail_view_style, acad_mleader_style, acad_section_view_style and
acad_visual_style are the last users of modern::tests::r2004_object_prefix
and write_inline_tv. modern.rs is touched by the open R13 pull requests, so
the helpers stay, and with them these four suites, until those land: with
their users gone the helpers are dead code in the lib test build, which
-D warnings rejects (Test, windows-latest, stable).
@DrunkOnJava DrunkOnJava changed the title test(objects): delete the object decoders' inline mirror suites, 1,832 lines test(objects): delete the object decoders' inline mirror suites, 1,021 lines Oct 28, 2026
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 28, 2026 13:18
@DrunkOnJava
DrunkOnJava merged commit 754a153 into main Oct 28, 2026
25 checks passed
@DrunkOnJava
DrunkOnJava deleted the test/delete-object-suites branch October 28, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant