Skip to content

test(writer): delete the bit writer's, encoders' and handle map's inline mirror suites, 1,019 lines - #430

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

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

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

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 to tools/ci/run_test_targets.sh (#428). Git history is the archive.

File Tests Lines
handle_map.rs 14 301
bitwriter.rs 14 209
element_encoder.rs 7 166
lz77_encode.rs 12 105
section_writer.rs 6 100
handle_allocator.rs 7 71
reed_solomon_encode.rs 6 60

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 open at push time. file_writer.rs and classes.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_fixtures writes the five canonical fixtures through them. coverage-smoke regenerates the fixtures, which are byte-deterministic, and fails on any diff from the committed files; canonical_corpus and block_names (class real) read them back through the public API.
  • reed_solomon_encode: probe_r2007_rs in 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_map is called by build_fixtures and probe_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 in lib.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.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.

…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.
@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:27:31.425477Z f6ef9ac 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/53d62b2401bdb8494d453534c27575c8705e3fcf/src/handle_allocator.rs#L108-L110
P1 Badge 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".

@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 28, 2026 12:31
@DrunkOnJava
DrunkOnJava merged commit 9675bdb into main Oct 28, 2026
25 checks passed
@DrunkOnJava
DrunkOnJava deleted the test/delete-writer-suites branch October 28, 2026 12:40
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