Skip to content

test(container): delete the container, section and primitive inline mirror suites, 1,467 lines - #431

Merged
DrunkOnJava merged 2 commits into
mainfrom
test/delete-container-suites
Oct 28, 2026
Merged

DrunkOnJava merged 2 commits into
mainfrom
test/delete-container-suites

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

Unit-suite staged deletion, area container, sections and primitives. The inline #[cfg(test)] modules of 14 files build synthetic byte buffers, bit streams and page maps in each parser's own layout and assert its fields. 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 Tests Lines
bitcursor.rs 14 260
lz77.rs 12 234
r2007.rs 9 128
section.rs 9 124
api.rs 14 122
crc.rs 11 121
r21_lz.rs 9 105
limits.rs 9 94
section_map.rs 4 59
cipher.rs 4 50
object_type.rs 6 49
metadata.rs 4 46
reed_solomon.rs 4 37
header.rs 2 22

Lines removed: 1,467. Production code is unchanged: each file's #[cfg(test)] items are its test modules (three in limits.rs), so no test-only helper goes with them, and no item can become dead code (one used only by tests would already warn in the non-test library build, which CI compiles with -D warnings).

No open PR touches these files, checked against gh pr list --state open at push time. string_stream.rs is left out on purpose: its pub(crate) mod tests supplies bits_of and build_payload to the test modules of 33 files under entities/, objects/ and tables/, some of which the open PRs #323 to #412 touch, so it goes after the last of them. reader.rs, object.rs, version.rs, header_vars.rs and classes.rs wait for the same PRs.

Coverage of the area

  • Every pinned drawing opens through these files. samples, corpus_roundtrip, class_census and r2013_entity_values (class real) read the 19 corpus drawings; the Corpus job measures every pinned drawing against tools/corpus/baseline.tsv, so a changed bit code, CRC, cipher, LZ77 or section-map result moves a decoded or errored count.
  • Checksums, ciphers and codes on real pages: probe_data_page_header --strict (the R2004-family page header and its CRC32 on every data page), probe_header_vars (the header CRC and every stream boundary), probe_r2007_rs (every Reed-Solomon codeword of every pinned R2007 drawing, intact, re-encoded and corrected after damage), and probe_code_page.
  • The specification's own worked examples (the §2 bit codes, §4.7 LZ77 and the rest of the printed tables) run in CI's Test job as examples/spec_examples.
  • object_type: code_table_agreement (class contract) checks it against the dispatcher's table and the specification's Table 4.
  • limits, api: no job checks the relationship between the three limit profiles or the diagnostics bookkeeping directly; both are exercised only through the CLIs and the corpus counts. Neither is a check on a value that real files give.

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.

…irror suites

The inline #[cfg(test)] modules of bitcursor, cipher, crc, lz77, r2007,
r21_lz, reed_solomon, section, section_map, header, metadata, limits, api and
object_type build synthetic byte buffers in each parser's own layout and
assert its fields. 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.
@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-28T12:42:33.896904Z fab2bd4 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aa606b16f8

ℹ️ 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".

Comment thread src/limits.rs Resolved
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 28, 2026 12:47
@DrunkOnJava
DrunkOnJava merged commit eb5da2a into main Oct 28, 2026
25 checks passed
@DrunkOnJava
DrunkOnJava deleted the test/delete-container-suites branch October 28, 2026 12:56
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