Repository navigation
ci: every tests/*.rs file is a module of one test binary, integration (C6) - #732
Merged
Merged
Conversation
… (C6) Each tests/*.rs file built and linked as its own binary. Measured with C2's cache on 6373a2f (scratch runs 37318563451 and 37319682529, never merged): 77 binaries build units summing to 118 s (37 s of wall time) one binary 13.1 s second run 64.7 s against 10.2 s `autotests = false` and a `[[test]]` named integration whose main.rs holds each file as a `#[path]` module; the files themselves are unchanged. A file's tests are named `<file>::<test>`, so a single file runs with `cargo test --test integration -- <file>::`, and every `--test <file>` in CI, the tools and the docs now reads that way. tools/ci/verify-real-files.sh also fails when a tests/*.rs file is not a module of main.rs, or main.rs names one that is gone. Under nextest the targets are a filterset, `test(/^(a|b|...)::/)`, with each skip scoped to its module; without it, libtest's filters match substrings (`type_global_ids::` would pick `door_type_global_ids::` too), so the script lists the binary's tests and passes exact names, and refuses to run when it chooses none, because no names would run the unit targets too. `clippy::duplicate_mod` is allowed: each file declares its own `mod common;`, so tests/common compiles once per file that uses it, as it did when each file was a binary. Not caused by the merge: the unit-classed ifc_synthetic_project fails as its own binary on 6373a2f too (scratch run 37346485303, 12 property sets where it asserts 2); CI runs no unit target, and it is logged in BACKLOG.md.
DrunkOnJava
added a commit
that referenced
this pull request
Oct 5, 2026
In a plain YAML scalar `:: --nocapture` reads as a mapping, and GitHub refused ci.yml and corpus-nightly.yml (run 37366249245: "This run likely failed because of a workflow file issue"). Quoted, every workflow parses with yaml.safe_load.
The rewrite copied the script without its mode, so every job that runs it failed with "tools/ci/verify-real-files.sh: Permission denied" (run 37366709128, exit 126).
…indows path in the merged binary rvt_inspect_json_reports_corrupt_file_failure_mode names its temp file after the test thread. As a module of the integration binary the thread is named `rvt_inspect_cli::rvt_inspect_json_reports_corrupt_file_failure_mode`, and Windows rejects the colons. CI on 2dc1ed1, Windows job 111999344636: FAIL [ 0.009s] (185/231) rvt::integration rvt_inspect_cli::rvt_inspect_json_reports_corrupt_file_failure_mode thread 'rvt_inspect_cli::rvt_inspect_json_reports_corrupt_file_failure_mode' (7832) panicked at tests\integration\..\rvt_inspect_cli.rs:98:53: write corrupt fixture: Os { code: 123, kind: InvalidFilename, message: "The filename, directory name, or volume label syntax is incorrect." } Summary [ 3.343s] 231 tests run: 230 passed, 1 failed, 31 skipped The Linux and macOS jobs on the same head passed. Each `:` in the thread name now becomes `-`. The thread name stays in the path, since it keeps the path unique when libtest runs tests in one process with one pid. No assertion changes. The 31 skipped are the 24 tests of the five unit-classed files, now in the same binary, plus the manifest's 7 skips. Decision (advisor, 2026-10-05): this changes how a pre-existing test builds its input and keeps every assertion. The merge broke it, not the test's intent, so under the standing guidance it is an engineering call for the advisor, not the maintainer, and it gets its own commit.
6 tasks done
DrunkOnJava
added a commit
that referenced
this pull request
Oct 20, 2026
…and rvt-wasm crate (#849) ## Summary Two contributor-facing docs described a layout that C6 (2026-10-05: #724 split the bindings into `rvt-wasm`, #732 merged every test file into one binary) replaced. `docs/extending-layer-5b.md`'s Step 5 told a contributor to add a check that would never run, and the viewer docs named a bindings file that no longer exists. ## Motivation A scan of the docs for cited source paths that do not exist found these. The other misses it reported are dated notes about other repositories, historical reports, an ADR and a launch draft that says it was written for 0.1.2. - **`docs/extending-layer-5b.md`, Step 5.** It said to add a `#[test]` gated on a `corpus` feature to `tests/elements.rs`, opening `_corpus/examples/Autodesk/...` by a hard-coded path. There is no `corpus` feature and no `tests/elements.rs`. Since #732 every `tests/*.rs` file is a module of the one `integration` binary, and CI runs only the files `tools/ci/test-targets.txt` classes. A test written to the guide is neither compiled nor run, and the repository's rule is to resolve the corpus through `tests/common`, never a path. - **`docs/viewer-build-pipeline.md` and `AGENTS.md`.** Both named `src/wasm.rs` behind a `wasm` feature. #724 moved the bindings to their own crate, `rvt-wasm`, and `rvt` builds as a plain `rlib`. The build commands both docs give were already the `rvt-wasm` ones. ## Changes - `docs/extending-layer-5b.md`: - **Step 3** registers the decoder and lists its class in `elements::MVP_TYPED_CLASSES` before the corpus check, since production uses a typed decoder only for those classes (skipping an instance it rejects). The same change adds the class's arm to `typed_json::mvp_typed_view`, or the CLI and Python give it `typed: null`, and to the list `tests/python/test_decoded_api.py` pins and the class list in `docs/schemas/decoded-elements.schema.json`. It drops the `decoder_class_names_are_unique` tripwire, which no longer exists (`decoder_for_class` takes the first match). - **Step 5** says how a real-file check is added now: `tests/<name>.rs`, a line in `tests/integration/main.rs`, and the class `real` in the manifest, which fails CI for a file it does not class. The check uses the files whose oracle holds the class (the family corpus through `tests/common`, or project files through `RVT_PROJECT_CORPUS_DIR`), requires an instance only where the oracle has one, and fails on a missing file when `RVT_REQUIRE_CORPUS` is set, as `tests/elem_table_corpus.rs` does. Its example decodes through the production path (`walker::iter_elements`), keeps the schema rows (`record_kind` `schema_instance`, which typed and generic decodes share and partition records do not), asserts `provenance.decoder == "MyClassDecoder"` on each, and marks where each field is compared with the oracle by ElementId. - **The file list, Step 6 and Step 7** no longer put tests in the decoder file or say "unit-tested with synthesized bytes", and the commit scope is `elements`. - `docs/viewer-build-pipeline.md`: its note on what the snippets predate gains the `rvt-wasm` move (C6, #724) and says #260's per-ref concurrency group happened (it said "is proposed", though #260 merged on 2026-09-19). - `AGENTS.md`: the WASM package is rebuilt when `rvt-wasm/src/lib.rs` or the library code it reaches changes. ## Testing N/A: docs only. The example uses `RevitFile::schema`, `SchemaTable::classes`, `ClassEntry::{name, fields}` and `tests/common`'s `ALL_YEARS` and `sample_for_year`, as `tests/samples.rs` does. ## Audit-honesty checklist - [x] README / docs reflect the current state after this PR - [x] Commit messages describe what changed and why - [x] No emojis in code, docs, or commit messages - [x] No private paths, personal email addresses, or internal jargon in committed files ## Legal and contribution hygiene - [x] I agree this work is licensable under Apache-2.0 (see `CONTRIBUTING.md`) - [x] This PR contains no Autodesk proprietary source, decompiled internals, or NDA'd SDK content (see `CLEANROOM.md`) ## Breaking changes None. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Documentation-only updates with no runtime or CI behavior changes. > > **Overview** > Updates contributor docs so they match **C6**: WASM bindings live in **`rvt-wasm`**, and corpus checks plug into the single **`integration`** test binary plus **`tools/ci/test-targets.txt`**. > > **`docs/extending-layer-5b.md`** expands the “three-file” checklist to include **`typed_json`**, Python/schema class lists, and the corpus/CI wiring. Step 2’s example now **fails closed** in `decode` (not just `decode_instance`). Step 3 documents **`MVP_TYPED_CLASSES`**, production scoring/provenance, and where to register typed output. Step 5 **replaces** the obsolete `tests/elements.rs` / `corpus`-feature pattern with **`tests/<name>_corpus.rs`**, a module line in **`tests/integration/main.rs`**, and classing the file **`real`** in the CI manifest, including an oracle-driven `iter_elements` example. > > **`AGENTS.md`** and **`docs/viewer-build-pipeline.md`** point rebuild notes at **`rvt-wasm/src/lib.rs`** and record the bindings split and merged **per-ref** deploy concurrency as shipped. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 3873423. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
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.
The last C6 item from the CI audit: one test binary instead of 78.
Measured with C2's cache on 6373a2f (scratch runs 37318563451 and 37319682529, never merged):
This pull request's own CI gives the Windows and macOS job times against main.
What changes
Cargo.toml:autotests = falseand a[[test]]namedintegration,tests/integration/main.rs, which holds eachtests/*.rsfile as a#[path]module. The test files themselves are unchanged.<file>::<test>. Run one file withcargo test --test integration -- <file>::. Every--test <file>in ci.yml, corpus-nightly.yml, the tools and the docs now reads that way.tools/ci/verify-real-files.sh:test(/^(a|b|...)::/)with each skip scoped to its module;--list, because libtest's substring filters would lettype_global_ids::pickdoor_type_global_ids::too.clippy::duplicate_modis allowed: each file keeps its ownmod common;.Caused by this, and fixed here
<file>::<test>.rvt_inspect_cli's corrupt-file fixture puts that name in a temp path, and Windows rejects the colons (job 111999344636, os error 123). The test now replaces each:with-, in its own commit (0bbf054), with no assertion changed.tools/ci/verify-real-files.sh's executable bit, and the two workflows'<file>::run lines needed quoting to be valid YAML. Both are fixed.Not caused by this
ifc_synthetic_projectfails as its own binary on 6373a2f too (scratch run 37346485303): 12 property sets where it asserts 2.Note
Low Risk
Test-only packaging and CI/script invocation changes; individual test sources are untouched, with extra manifest checks to prevent orphaned or mis-selected tests.
Overview
Merges all
tests/*.rsintegration targets into a single test binary namedintegration(C6), cutting reported test build time from ~118s across 77 binaries to ~13s for one compile.Cargo.tomlsetsautotests = falseand declares[[test]] integrationattests/integration/main.rs, which#[path]-includes every existingtests/*.rsfile unchanged. Test names become<module>::<test>; docs, release checklist, corpus tooling, and GitHub workflows now invokecargo test --test integration -- <module>::instead of--test <module>.tools/ci/verify-real-files.shis updated to require eachtests/*.rsfile to appear inmain.rs, run nextest against--test integrationwith module-scoped regex filters (and skip rules per module), and without nextest select tests by exact names from--listso substring filters cannot pull in the wrong module (e.g.type_global_ids::vsdoor_type_global_ids::).Reviewed by Cursor Bugbot for commit 84ec9e7. Configure here.