Skip to content

test(tables): delete the symbol-table decoders' inline mirror suites, 375 lines - #434

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

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

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

Unit-suite staged deletion, area symbol-table decoders. The inline #[cfg(test)] modules of four files under src/tables/ build synthetic bit streams in each decoder's own field layout and assert the fields they decode. 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/tables/) Tests Lines
ltype.rs 5 170
style.rs 4 135
appid.rs 2 40
mod.rs 1 26

Lines removed: 375 (12 tests). Production code is unchanged: each file's only #[cfg(test)] item is its test module, so no test-only helper goes with it, 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).

Skipped: files an open PR touches

Checked against gh pr list --state open at push time. block_record, dimstyle, layer, ucs, view and vport keep their inline suites: #355, #356, #410 and #412 touch all six, and #323 and #324 all but dimstyle. string_stream.rs, whose pub(crate) mod tests the test modules of these files use, goes after the last of them.

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. The Corpus job checks these on every pinned drawing: the per-file counts of tools/corpus/baseline.tsv, and the DXF value oracle (tools/oracle/baseline.tsv), which has rows for APPID, LTYPE and STYLE (30, 186 and 78 field rows) and for the entry header they share. canonical_corpus reads the committed canonical fixtures through the dispatcher.

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 tables/appid, ltype, style and mod build
synthetic bit streams in each decoder's own field layout and assert the
fields they decode. 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.

The six table 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:27:09.079597Z a55ded7 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

https://github.com/DrunkOnJava/dwg-rs/blob/4b02ff28456de24d112d1d41acedb351a1ad4ffb/src/tables/style.rs#L177-L179
P1 Badge Preserve the existing symbol-table test suites

The repository guidance in CLAUDE.md:103, incorporated by AGENTS.md, explicitly requires existing suites to stay and pass; it prohibits adding new unit tests, not retaining existing ones. The stated justification that CI no longer runs these suites also does not match this commit: .github/workflows/ci.yml:78–79 still runs cargo test --release --all-features, which includes these inline tests. Deleting the four modules therefore removes active regression checks, including STYLE's malformed-boundary rejection check, contrary to the repository's preservation requirement. Retain the existing suites.

AGENTS.md reference: AGENTS.md:L3-L3

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

@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 28, 2026 13:33
@DrunkOnJava
DrunkOnJava merged commit fa3cd96 into main Oct 28, 2026
25 checks passed
@DrunkOnJava
DrunkOnJava deleted the test/delete-table-suites branch October 28, 2026 13:44
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