Repository navigation
test(entities): delete the entity decoders' inline mirror suites, 3,797 lines - #432
Merged
Merged
Conversation
The inline #[cfg(test)] modules of 39 files under src/entities/ 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. The 18 entity files an open pull request touches, among them dispatch.rs, 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Unit-suite staged deletion, area entity decoders. The inline
#[cfg(test)]modules of 39 files undersrc/entities/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 totools/ci/run_test_targets.sh(#428). Git history is the archive.Lines removed: 3,797 (117 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. These 18 files keep their inline suites and get a later PR once the stack lands:arc,circle,dimension,dispatch,insert,leader,line,lwpolyline,mod,mtext,point,polyline,solid,text,three_d_face,tolerance,traceandviewport. The PRs are #323, #324, #355, #356, #410 and #412 (the R13 stack), #310, #311 and #427 (dispatch.rs,mod.rs).string_stream.rs, whosepub(crate) mod teststhe test modules of these and of theobjects/andtables/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. What checks it now is the Corpus job, on every pinned drawing:
tools/corpus/baseline.tsv, which fail on a change in either direction;tools/oracle/baseline.tsv), which compares every decoded field with AutoCAD's own export of the same drawing, and has rows for ATTDEF, ATTRIB, BLOCK, the seven DIMENSION subtypes, ELLIPSE, HATCH, MLINE, MULTILEADER, RAY, XLINE, the VERTEX records and POLYLINE_PFACE among these files;canonical_corpus(classreal), which reads the committed canonical fixtures through the dispatcher.A type the pinned drawings do not contain has no real-file check at all, only the compile; the deletion removes the only check of those decoders (the ones the oracle has no rows for and the corpus holds no record of: among them the surfaces,
helix,camera,ole2_frame,underlay,polygon_meshand the ACIS records). The open PRs #392, #394, #396, #399 and #402 add oracle rows for TOLERANCE, SPLINE, MESH, IMAGE, WIPEOUT and LEADER.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.