Repository navigation
test(tables): delete the symbol-table decoders' inline mirror suites, 375 lines - #434
Conversation
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.
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
https://github.com/DrunkOnJava/dwg-rs/blob/4b02ff28456de24d112d1d41acedb351a1ad4ffb/src/tables/style.rs#L177-L179
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".
Summary
Unit-suite staged deletion, area symbol-table decoders. The inline
#[cfg(test)]modules of four files undersrc/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 totools/ci/run_test_targets.sh(#428). Git history is the archive.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 openat push time.block_record,dimstyle,layer,ucs,viewandvportkeep their inline suites: #355, #356, #410 and #412 touch all six, and #323 and #324 all butdimstyle.string_stream.rs, whosepub(crate) mod teststhe 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_corpusreads the committed canonical fixtures through the dispatcher.Spec reference
Not a decoder change. No corpus count moves:
tools/corpus/baseline.tsvandtools/oracle/baseline.tsvare untouched.Test plan
cargo fmt --all -- --checkpasses (run locally; nothing else is built here).--all-targets --all-features -D warnings, which builds the lib test target, where a helper left without a user fails as dead code), the six Test legs, Corpus (public DWG) withtools/corpus/baseline.tsvandtools/oracle/baseline.tsvunchanged, and Coverage smoke. This branch is based on main before chore(ci): class every tests/ target and run all but the unit ones #428, so its Test legs ran the oldcargo test; chore(ci): class every tests/ target and run all but the unit ones #428's run 40674359229 shows the classed runner, and CI runs again on this branch once chore(ci): class every tests/ target and run all but the unit ones #428 lands.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:
CLEANROOM.md).dwg-rsis Apache-2.0 and must remain compatible.My contribution is based on:
See
CLEANROOM.mdfor 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.