diff --git a/README.md b/README.md index 1acc32a3..cc75a497 100644 --- a/README.md +++ b/README.md @@ -171,8 +171,9 @@ MEASURED**; no claim of superiority to another reader is made. ## What works today -The container layer is the most mature part of the crate. `cargo test --release --all-features` -ran 921 tests, all passing, on 2026-10-27 (run it for the current count). +The container layer is the most mature part of the crate. It is measured on real +drawings, not by a test count: the `Corpus (public DWG)` job opens every pinned +drawing and fails on any change from the committed baselines. - Version identification from AC1014 (R14, 1997) to AC1032 (2018 and later) - R13 to R15 file header and the R2004-family XOR-encrypted header @@ -346,7 +347,7 @@ mechanism. ## Verification ```text -$ cargo test --release --all-features # 921 tests on 2026-10-27 +$ tools/ci/run_test_targets.sh --release --all-features # the real-file, contract and hardening targets, then the doc tests $ cargo clippy --all-targets --all-features -- -D warnings # clean $ cargo fmt --all -- --check # clean $ RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features # clean @@ -360,7 +361,7 @@ fetches the 52 pinned drawings, measures them, runs the probes and the value oracle, and fails on any change from the committed baselines. The older real-file suites (`samples`, `block_names`, `corpus_roundtrip`, `r2013_entity_values`) read a 19-file subset and skip silently when it is -absent, so a green local `cargo test` says nothing about real drawings unless +absent, so a green run of them says nothing about real drawings unless `python3 -I tools/corpus/fetch.py --legacy-samples ../../samples` has run. ## Safety @@ -422,7 +423,7 @@ The project needs help, in rough order of impact: Before submitting a PR: -- Run `cargo fmt --all`, `cargo clippy --all-targets --all-features -- -D warnings` and `cargo test --release --all-features`. +- Run `cargo fmt --all`, `cargo clippy --all-targets --all-features -- -D warnings` and `tools/ci/run_test_targets.sh --release --all-features`. Unit tests are banned: do not add one ([`CONTRIBUTING.md`](./CONTRIBUTING.md)). - Cite the ODA spec section for any new decoder behavior, numbered as in v5.4.1 ([`docs/spec-coverage.md`](./docs/spec-coverage.md) lists them). - **Source-provenance declaration**: confirm in the PR body that your contribution does not incorporate executable code (not just comments, not just API shapes) from any source whose license is incompatible with Apache-2.0: no Autodesk SDK source, no ODA SDK / Teigha source, and no GPL-licensed DWG implementation source (LibreDWG). Reading algorithm-description comments in permissively licensed projects (MIT / Apache / BSD) to resolve a spec ambiguity is allowed and must be disclosed in the PR body so it can be recorded in [`CLEANROOM.md`](./CLEANROOM.md). The PR template has a checkbox for this. - Follow the [Contributor Covenant 2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct/) code of conduct. diff --git a/STATUS.md b/STATUS.md index 7f106ab0..5f289fcd 100644 --- a/STATUS.md +++ b/STATUS.md @@ -9,15 +9,11 @@ the current capability matrix. ## Summary -- **Tests:** `cargo test --release --all-features` ran 921 tests, all - passing, on 2026-10-27; clippy and fmt clean. (The 2026-08-30 - snapshot had 774 lib tests.) -- **WASM tests:** 40 passing in `wasm/` sub-crate. -- **Integration tests:** DXF round-trip (7), glTF smoke (3), SVG - goldens (3), fuzz-corpus regression (6), write-path (5), - entity-regression (18), real-DWG value regression (8), - legacy-container (11: R14 / R2000 byte-built flat files, the R2007 - string-stream boundary, and four corpus-gated pins). +- **Tests:** unit tests are banned, and no test count is quoted: a pass + count is not evidence. CI's Test job runs the real-file, contract and + hardening targets of `tools/ci/test-targets.txt` and the documentation + examples (`tools/ci/run_test_targets.sh`), and the Corpus job runs the + corpus-reading targets on the 19 pinned drawings; clippy and fmt clean. - **Current real-file decode coverage, measured in CI** (the `Corpus (public DWG)` job, [run 40676458194](https://github.com/DrunkOnJava/dwg-rs/actions/runs/40676458194) on 2026-10-28, on the public drawings pinned in `tools/corpus/pins.tsv`): 122,330 decoded / 32 skipped / **0 errored** / > 99.9 % of all records on 61 drawings; the median drawing decodes 100.0 %. Per source (drawings): nextgis 100.0 % (42), acadsharp 99.8 % (10), bookviewerapp3 98.7 % (4), oshw-jetson 100.0 % (4), planar-algorithm 100.0 % (1). Per version: R14 99.5 %, R2000 99.9 %, R2004 > 99.9 %, R2007 > 99.9 %, R2010 > 99.9 %, R2013 99.9 %, R2018 99.9 %. diff --git a/tests/fixtures/canonical/README.md b/tests/fixtures/canonical/README.md index fc18d362..a9d56fca 100644 --- a/tests/fixtures/canonical/README.md +++ b/tests/fixtures/canonical/README.md @@ -107,9 +107,9 @@ R13/R14 preamble and the §20.4.21 `3BD` LINE body, which the `ElementEncoder` implementations do not write; R2007's §5.1-§5.4 container is implemented read-only, and writing one would need a Reed-Solomon encoder and a §5.10 compressor this crate does not have. -Both releases are covered on the read side by the real corpus and by -`tests/integration_legacy_container.rs`, whose R14 fixtures are built -byte-by-byte in the test itself. +Both releases are covered on the read side by the real corpus; the byte-built +R14 fixtures of `tests/integration_legacy_container.rs` are unit tests, which no +job runs. ## What CI does with this @@ -123,14 +123,14 @@ corpus)**: threshold stated in the workflow. The tight companion gate is [`tests/canonical_corpus.rs`](../../canonical_corpus.rs), -which runs under `cargo test` and pins the exact per-file record counts +which CI's Test job runs (class `real` in `tools/ci/test-targets.txt`) and which pins the exact per-file record counts *and* decoded field values — so a bit-alignment regression that still "decodes" into garbage coordinates fails there even when the ratio would stay at 100 %. [`tests/block_names.rs`](../../block_names.rs) runs the block-name gate -(#70) on these five files, in `cargo test` on every platform (`ci.yml`, job -**Test**, step `cargo test --release`, as `canonical_fixtures_block_names_agree_with_their_sentinels`): +(#70) on these five files, in CI's Test job on every platform (`ci.yml`, job +**Test**, step *Real-file, contract and hardening targets*, as `canonical_fixtures_block_names_agree_with_their_sentinels`): each BLOCK_HEADER's resolved name must equal the name its BLOCK sentinel carries, the resolved names must be unique, and the header's stored string must be that name