Repository navigation
test(fixtures): emit BLOCK_HEADER and BLOCK pairs so the name gate runs in CI (#78) - #407
Merged
Merged
Conversation
…ns in CI (#78) The canonical fixtures carried no block definitions, so the #70 join of a BLOCK_HEADER's name with its BLOCK sentinel's ran only on a machine that had the local sample directory. build_fixtures now writes three definitions per fixture (FixtureBlock and the two auto-generated names *D1 and *D2, whose table entries both store the stem *D), each a BLOCK_HEADER with its BLOCK sentinel and the handle that joins them, and the five fixtures are regenerated. tests/block_names.rs runs the join on them in the Test job, where it cannot skip. The record counts that tests/canonical_corpus.rs and tools/streaming/verify_walk.py pin move with the six new records.
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. |
Merged
3 tasks done
DrunkOnJava
enabled auto-merge (squash)
October 28, 2026 04:37
DrunkOnJava
added a commit
that referenced
this pull request
Oct 28, 2026
…till skipped (#424) CHANGELOG gains the table objects (#313, #316, #317, #319), the nineteen classes derived from AutoCAD's output (#326 to #341), the DIMENSION scorer (#387), the BLOCK fixtures (#407), the maintainer tools (#406, #383) and the merge train's stack handling (#421 to #423). README said every skipped type had a decoder in review; only SHAPE (#310) and the VIEWPORT entity header (#311) do, and the rest are twelve custom classes in the BookViewerApp3 drawings with no DXF export yet, now named. STATUS's pending section says its counts are the 2026-08-30 snapshot.
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
examples/build_fixtures.rsnow writes three block definitions into every canonical fixture, each a BLOCK_HEADER table entry plus the BLOCK sentinel it names, so the #70 join of a header's name with its sentinel's name runs in CI and not only on a machine that has the local sample directory. Closes #78.Spec reference
§20.4.52 BLOCK_HEADER and §20.4.6 BLOCK (v5.4.1). The fixtures stay synthetic: no spec section changes state, so
docs/spec-coverage.mdis untouched.The fixture blocks are
FixtureBlock(header and sentinel store the same name) and two anonymous blocks whose headers both store the stem*Dwhile the sentinels read*D1and*D2: the pair that made the pre-#70 reader resolve eight blocks ofsample_AC1032.dwgto*D. Each header's handle stream holds the block control object (a soft pointer to handle 1, which is not in the file), the NULL anchor and its BLOCK; the references after the BLOCK (entities, ENDBLK, layout) are left out.Where the gate runs now
tests/block_names.rs::canonical_fixtures_block_names_agree_with_their_sentinelsreplacescanonical_fixtures_carry_no_block_definitions(the test that pinned "no blocks" and said to extend the gate the daybuild_fixturesgrew a block). It sharescheck_block_nameswith the corpus test, so it applies the same checks: one BLOCK sentinel per BLOCK_HEADER,resolve_block_namescovering every header and reproducing the sentinel's name, the header's stored string being the full name minus a decimal suffix, no name resolved twice. It also asserts the resolved names are exactly["FixtureBlock", "*D1", "*D2"]on each of the five fixtures (R2000, R2004, R2010, R2013, R2018).Unlike the corpus test it never skips: the fixtures are committed, so it runs under
cargo testin CI job Test, step cargo test --release, on Linux, macOS and Windows, on stable and 1.85. Job Coverage smoke test (canonical corpus) also reads the new records: step Verify the committed corpus matches the generator diffs the committed fixtures againstbuild_fixtures, Run coverage_report and assert minimum decode ratio and The object walk must be closed on every canonical fixture walk them.Test plan
cargo fmt --all -- --checkpassescargo clippy --all-targets --all-features -- -D warningspassescargo test --release --all-featurespasses,block_names5 of 5 including the new testRUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-featurespassespython3 tools/ci/spec_coverage.py --checkandpython3 tools/maintainer/train/arch.py checkpass.github/workflows/streaming.ymlthat read the canonical fixtures (verify,verify_walk,verify_source,verify_objects,verify_file,verify_sections,verify_maps,verify_lz77,verify_r2004,verify_wasm,verify_wasm_objects) exit 0 on the new fixtures. The four R2007 verifiers read only pinned drawings.Generation stays byte-deterministic. The five existing entity records are byte-identical to the previous fixtures:
build_recordwas generalised to take a type code and a body writer and the entity path goes through it unchanged (the first 274 object bytes of the old R2000 fixture equal the new one's).Existing tests changed
No test is added. Three existing pins move with the six new records per fixture:
tests/block_names.rs: the gate body is nowcheck_block_names, called by the corpus test and by the fixture test that replacescanonical_fixtures_carry_no_block_definitions.tests/canonical_corpus.rs: the per-fixture record count and the handle-map size are 11 (five entities plus six block records), not 5.tools/streaming/verify_walk.py: the canonical R2000 fixture's expected object count is 11, not 5.tests/fixtures/canonical/README.mdcarries the new table. Any evidence table that quotes a streaming run over the fixtures (such as the ones #400 records) will count six more records per fixture the next time that run is repeated.Source provenance: ODA v5.4.1 §20.4.6 and §20.4.52 only; the fixtures are generated by this repository's code. No algorithm-description comments from any other project were read, so there is nothing to add to
CLEANROOM.md.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:
CLEANROOM.md.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.
I will sign off commits with
git commit -swhen asked, which adds aSigned-off-bytrailer to the commit message asserting the DCO.