Repository navigation
test(writer): delete the bit writer's, encoders' and handle map's inline mirror suites, 1,019 lines - #430
Conversation
…ine mirror suites The inline #[cfg(test)] modules of bitwriter, lz77_encode, reed_solomon_encode, section_writer, element_encoder, handle_allocator and handle_map round-trip synthetic values through the writer and its reader and pin the bytes. 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.
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/53d62b2401bdb8494d453534c27575c8705e3fcf/src/handle_allocator.rs#L108-L110
Preserve the existing suites required by repository guidance
The repository guidance incorporated by AGENTS.md explicitly says in CLAUDE.md:103 that “existing suites stay and must pass”; the prohibition concerns adding new unit tests, not retaining existing ones. This deletion removes those suites across seven modules. Contrary to the commit's justification, the reviewed revision's .github/workflows/ci.yml:78–79 still runs cargo test --release --all-features, so these checks are active CI coverage, not archived tests. Preserve the existing suites rather than removing their regression checks.
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 bit writer, encoders and handle map. The inline
#[cfg(test)]modules of seven files round-trip synthetic values through the writer and its reader and pin the bytes. 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: 1,019. 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).No open PR touches these files, checked against
gh pr list --state openat push time.file_writer.rsandclasses.rs, the writer's other two files, are touched by six open PRs each (#323, #324, #355, #356, #410, #412) and wait.Coverage of the area
bitwriter,element_encoder,lz77_encode,section_writer:examples/build_fixtureswrites the five canonical fixtures through them.coverage-smokeregenerates the fixtures, which are byte-deterministic, and fails on any diff from the committed files;canonical_corpusandblock_names(classreal) read them back through the public API.reed_solomon_encode:probe_r2007_rsin the Corpus job re-encodes every Reed-Solomon codeword of every pinned R2007 drawing and compares it with AutoCAD's parity.handle_map:write_handle_mapis called bybuild_fixturesandprobe_reference_cap; the parser reads every pinned drawing (samples,corpus_roundtrip, the census and closure probes, and the Corpus job's baseline of decoded counts).handle_allocator: nothing in the tree calls it but its re-export inlib.rs, so no job exercises it on any input. That is a gap the deletion exposes.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.