Skip to content

refactor(api)!: move the research readers to rvt::research behind the unstable-research feature (#873) - #890

Merged
DrunkOnJava merged 4 commits into
mainfrom
feat/873-stable-core
Oct 23, 2026
Merged

DrunkOnJava merged 4 commits into
mainfrom
feat/873-stable-core

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

Splits the crate's public API into a stable core and an opt-in research tree, the first half of #873 (1.0 criteria S1). 27 modules stay public and are what 1.0 keeps stable; the other 67 move to rvt::research, public only with the new unstable-research feature. RELEASE.md now names every surface 1.0 keeps stable and what each leaves out.

Motivation

Part of #873. All 95 modules were public, research ones included, so a 1.0 tag would have frozen code that changes with every finding: in the 30 days to 2026-10-23, at least 22 commits removed or rewrote a public item in a research module. The maintainer chose this split on 2026-10-23: stable core = reading and identity, elements, export, and writing; research behind a feature; docs.rs shows research marked unstable. The CLIs, the Python package, the output formats and the viewer's wasm API are named stable too.

Changes

  • src/research.rs (new): declares the 67 research modules with #[path = "<module>.rs"], so no file moves, every module keeps its //! docs, and open PRs touching those files do not conflict.
  • src/lib.rs: 27 stable pub mods, cli #[doc(hidden)], research public only with the feature, and pub(crate) use research::{...} so every crate::<module> path inside the crate is unchanged. The module overview lists all 27.
  • Research types no longer leak through stable items. The four RevitFile accessors that return them (element_names, design_options, second_prologue_ids, partition_data_objects) are pub only with the feature, over pub(crate) memoised_* methods that the crate's own readers call. The ElemTable linkers, arc_wall::decode_candidate and from_partition_arc_wall are feature-gated. EvidenceTier and the relation-domain registry the capability manifest reports moved into capability, re-exported from research::evidence and research::relations.
  • Cargo.toml: the unstable-research feature, and a path-only self dev-dependency that turns it on for probes, tests and benches only (stripped by cargo publish). fuzz/Cargo.toml enables it for the two research fuzz targets.
  • 144 probes, tests and fuzz targets: rvt::<module> to rvt::research::<module> (script, then rustfmt). The shipped binaries, rvt-py, rvt-wasm and the benches needed no change.
  • 22 doc links from stable items into research became plain code, so the default-features cargo doc -D warnings stays clean.
  • CI: a default-features cargo check --lib --bins with -D warnings -D unnameable_types (fails if a stable item hands out a research type), and a check that docs.rs marks rvt::research as needing the feature. tools/check-local.sh mirrors the first.
  • RELEASE.md "What 1.0 keeps stable"; docs/release-1.0-criteria.md S1 to passed; CONTRIBUTING.md says where a new reader goes; CHANGELOG.md has the breaking entry with the migration.

Testing

No unit tests (banned). The code is the same in both configurations; only visibility changes, so the evidence is the build matrix:

  • CI: clippy with every feature, the new default-features check, rustdoc (default) and the docs.rs preview (all features, banner grep), MSRV, the real-file tests, fuzz build
  • gh workflow run fuzz.yml --ref feat/873-stable-core (separate workspace)
  • Measure against main: every export unchanged (link in a comment)

Audit-honesty checklist

  • Docs reflect the state after this PR: RELEASE.md, the criteria page, CONTRIBUTING and the crate root
  • No emojis, private paths or internal jargon added

Legal and contribution hygiene

  • Apache-2.0; no Autodesk proprietary source; no fixtures added

Breaking changes

Yes, for library users of research modules. Enable unstable-research and add research:: to the path, e.g. rvt::partition_element_records becomes rvt::research::partition_element_records. The gated accessors and functions need the feature. rvt::evidence::EvidenceTier is also rvt::capability::EvidenceTier; relations::RelationDomain::for_edge_kind is relations::domain_for_edge_kind. Nothing changes for the CLIs, the Python package or the viewer.

Screenshots or output samples

N/A: no output change.

… unstable-research feature (#873)

The crate's stable API is now 27 modules (reading and identity, typed
elements and the element walk, export, the writer). The other 67, the
partition, native and element-record readers behind the format findings
and the Phase 1 contract stubs, are declared under src/research.rs with
#[path] so no file moves, and are public only with `unstable-research`.
Crate-internal paths are unchanged through pub(crate) aliases at the root.

Probes, tests and benches get the feature from a self dev-dependency;
`cargo build`, `cargo install` and the published crate do not. CI checks the
default-features build with `unnameable_types` denied, so no stable item can
hand out a research type, and checks that docs.rs marks the research module.

RELEASE.md names what 1.0 keeps stable (S1).
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review October 23, 2026 11:43
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Evidence so far, on e44eea6 (the commits after it touch CI only):

  • Measure against main (run 39946699318): on all six reference models ifc.sha256 and every scorer output are identical to main's; only timing lines differ.
  • Fuzz (run 39946696969, 30 s per target): all 11 targets built against the split crate and ran clean, including the two research targets that now enable unstable-research.
  • docs.rs preview: builds with every feature and marks rvt::research as needing unstable-research.
  • The default-features cargo check --lib --bins with -D unnameable_types passes: no stable item hands out a research type.

@DrunkOnJava
DrunkOnJava merged commit f2a394a into main Oct 23, 2026
29 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/873-stable-core branch October 23, 2026 11:54
DrunkOnJava added a commit to puzzbobb/rvt-rs that referenced this pull request Oct 23, 2026
…a stable elements::parameters::saved_parameters_lossy

DrunkOnJava#890 moved the research readers behind unstable-research, and CI builds
the library and its CLIs without the feature (cargo check --lib --bins),
so a CLI or rvt-py cannot call research::native_element_parameters. The
stable function wraps it and returns an opaque SavedParameters whose only
method gives an element's JSON entries, the shape the schema and the
Python stubs already describe; a file whose parameters cannot be read
gives none and a saved-parameters-unread warning, as before.
Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026
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