Skip to content

feat(api)!: element ids are an rvt::ElementId newtype (#873) - #923

Merged
DrunkOnJava merged 7 commits into
mainfrom
feat/element-id
Oct 24, 2026
Merged

DrunkOnJava merged 7 commits into
mainfrom
feat/element-id

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

The 1.0 ElementId newtype (#873, S1). The typed layer of the stable API carries Option<rvt::ElementId>:

  • the element structs' ids (level_id, host_id, type_id, symbol_id and the rest, 95 fields);
  • geometry::recovery::OpeningHostRelationship::host_element_id;
  • the arc-wall record's ids.

ElementId wraps an i64, the Revit API's ElementId.Value, and serialises as the bare number. So the JSON the CLIs print and the values Python sees are the same integers, and the schemas and stubs are unchanged.

What keeps the u32. The wire-level views mirror the bytes and keep the u32 the file stores: walker::DecodedElement::id, walker::InstanceField::ElementId and elem_table::ElemRecord. DecodedElement::element_id() gives the typed id. The line is the one between the walker, which reads the file, and the element structs, which interpret it. Converting the walker too would have meant about 130 call-site changes in research code, for a type that describes raw fields.

The type

  • ElementId::new(i64) and get() -> i64.
  • From<u32>, and from_raw(u64) -> Option<ElementId>, which applies the no-id rule: 0, and values from u32::MAX up, name no element (RE-30, RE-43).
  • as_u32() -> Option<u32> gives the stored form.
  • It derives Copy, Eq, Ord, Hash and transparent serde, and implements Display.

How it was made

sweep.py rewrites a fresh main mechanically and is idempotent. It retypes the fields, converts the decoders' Some(*id) assignments, and makes exact edits at the typed layer's edges. It will be re-run after #886 and #887 land, so the edits apply to the code as it is then. This stays a draft until that re-run is green.

Testing

Audit-honesty checklist

  • README / docs reflect the current state after this PR (CHANGELOG "Breaking")
  • No limitation resolved or introduced
  • Commit messages describe what and why
  • No emojis
  • No private paths, personal email addresses, or internal jargon in committed files
  • Reverse-engineering finding: N/A

Legal and contribution hygiene

  • I agree this work is licensable under Apache-2.0
  • This PR contains no Autodesk proprietary source, decompiled internals, or NDA'd SDK content

@DrunkOnJava
DrunkOnJava marked this pull request as ready for review October 24, 2026 19:25
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

#886 and #887 have landed. The sweep script didn't survive (a local scratch file), so instead of re-running it I merged main into this branch. It merged cleanly apart from the changelog, whose entry is now a fragment, changelog.d/changed/element-id-newtype.md (#938).

I checked the code main gained since this branch's base (cfbb0034) against the 32 fields the sweep retypes (host_id, level_id, type_id, symbol_id and the rest). None of it reads or sets those fields on the element structs; the only matches are record.identity.element_id in the native index, which this PR leaves as it is. Marked ready so CI compiles the merged tree; draft PRs run no CI here. It stays unarmed: it is a breaking API change, and v0.7.0 is cut without it, so it lands after the tag.

@DrunkOnJava DrunkOnJava mentioned this pull request Oct 24, 2026
10 of 12 tasks
DrunkOnJava added a commit that referenced this pull request Oct 24, 2026
## Summary

Prepares v0.7.0 (RELEASE.md steps 4 to 8): the version files, the
`[0.7.0]` changelog section assembled from `changelog.d/`, the README's
release section, and corrections to the status docs where they still
described the state before RE-212 or before the BIM4LCA office was
measured. Merging this is not the release; the signed tag on its squash
commit is.

## Motivation

Griffin's go-ahead (2026-10-24, about 3:00 PM): tag v0.7.0 once #887,
#930, #935, #940, #942 and #943 are on main with CI green. All six have
landed, the last at b04c0cb (#930). #934 (`--revit-property-sets`,
breaking) and #923 (the `ElementId` newtype, breaking) go in the next
release.

## Changes

- **Version files** (0.6.1 to 0.7.0): `Cargo.toml`, `rvt-py/Cargo.toml`
(and its `=0.7.0` pin on `rvt`), `rvt-wasm/Cargo.toml`, the `rvt` pin in
`tools/stream_evidence/Cargo.toml`, `viewer/package.json`,
`CITATION.cff` (`date-released: 2026-10-24`),
`.release-please-manifest.json`, and the workspace crates' entries in
`Cargo.lock` and `fuzz/Cargo.lock`.
- **`CHANGELOG.md`**: `python3 tools/release/changelog.py assemble`
moved the nine fragments in, then `[Unreleased]` became `[0.7.0] —
2026-10-24`, with an introduction, credits to puzzbobb (#870, #886,
#887, #935) and n3ur0m4n (#882), and "Upgrading from 0.6": the research
readers behind `unstable-research`, the `#[non_exhaustive]` types, the
error variants (and Python's `ValueError`), `SimpleDecoder`, the
property set builders' `Vec`, the removed `ifc::pset_validate`, the
element walk failing closed, and changed exports. Headings in the
assembler's order (Added, Changed, Fixed, Removed, Research), one each.
`[Unreleased]` is left empty.
- **Entries corrected for the release as a whole**: #847's pipe-port
entry said In ports' axes were wrong because their flow direction was
not read, and that other family-instance ports had no placement; RE-212
and #943 changed both, and it now gives main's counts (Measure
40126110706, base side: 124 of 124 and 62 of 62 with Revit's axis;
joined ports 108 and 53 as Revit's, 10 and 6 opposite). The
unjoined-ports entry says Revit 2025 in its headline. RE-215's entry
adds the office.
- **`README.md`**: "Release 0.7.0 and main", what 0.7.0 adds in brief.
The 0.6.1 section listed RE-215 under 0.6.0's additions; it shipped in
neither.
- **`docs/support-matrix.json`**:
- `native-symbol-cut-sizes`: the BIM4LCA office's result, and
`user_impact` limited to families whose symbol cuts an outline;
- `element-record-mep-connections`: still said HVAC and piping
directions, names and descriptions are not read and In ports' axes are
reversed; it now states RE-212 (direction, `InPort_`/`OutPort_` names,
`Flow` descriptions, axes), keeps SystemType and the electrical
description as unread, and lists RE-212's probe, scorer, test and report
as evidence.
- **`docs/status.md`** and
**`reports/element-framing/RE-215-symbol-cut-loops.md`**: the office,
which §6 called NOT MEASURED, as measured on 2026-10-24 (Measure
40121636312 and 40122363218): 187 of its 269 doors cut an outline and
have Revit's sizes; its 269 windows and other 82 doors are drawn by
symbols with no cut loop (#810).

## Testing

Unit tests are banned in this repository: do not add them. Show the
change working end to end on real files instead.

- [ ] `tools/check-local.sh` passes: this PR's CI. No code changes; the
version string changes the IFC header.
- [x] Verified end to end on real Revit files: no behaviour changes; the
measurements cited are the runs named above.
- [ ] If this touches the IFC exporter: the IFC header carries the
version (#417), so both Core Interior `rvt-rs.json` observations and
their verdicts are refreshed from this PR's CI run (its
`octetproof-core-interior` artifact) in a follow-up commit here,
differing only in `witness_version` and the verdict hashes.
- N/A: performance.

## Audit-honesty checklist

- [x] README / docs reflect the current state after this PR
- [x] The changelog section is assembled from the fragments;
`changelog.py check` passes with none left
- [x] Resolved limitations updated (RE-212's in the support matrix, the
office's NOT MEASURED)
- N/A: no new limitation
- [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
- N/A: not a reverse-engineering finding

## Legal and contribution hygiene

- [x] Apache-2.0
- [x] No Autodesk proprietary content
- [x] No fixtures

## Breaking changes

The release's, listed under "Upgrading from 0.6" in `CHANGELOG.md`. This
PR itself changes no API.

## Screenshots or output samples

N/A: the IFC changes only in its header's version.
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 24, 2026 20:36
@DrunkOnJava
DrunkOnJava merged commit 07da31a into main Oct 24, 2026
27 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/element-id branch October 24, 2026 20:42
@DrunkOnJava DrunkOnJava mentioned this pull request Oct 25, 2026
12 tasks done
DrunkOnJava added a commit that referenced this pull request Oct 25, 2026
## Summary

Prepares v0.8.0 (RELEASE.md steps 4 to 8), on the maintainer's go-ahead
in chat (2026-10-25: "Cut 0.8.0 after #988"). Scope: `main` at 7483b2b
(#988), nothing after it.

## Changes

- Version 0.8.0 in `Cargo.toml`, `rvt-py/Cargo.toml` (and its `=0.8.0`
pin), `rvt-wasm/Cargo.toml`, `tools/stream_evidence/Cargo.toml`,
`viewer/package.json`, `CITATION.cff` (dated 2026-10-25),
`.release-please-manifest.json`, `Cargo.lock` and `fuzz/Cargo.lock`.
- `CHANGELOG.md`: the 25 fragments assembled (`changelog.py assemble`)
into `[0.8.0] — 2026-10-25`, with an introduction and "Upgrading from
0.7" (`ElementId`, `IfcModel::type_property_sets`, `RevitGlobalIds`'s
new fields); `[Unreleased]` empty above it.
- `README.md`: the release section names 0.8.0 (packed into the crate
and the wheel).
- `rvt-py/README.md` (the wheel's README): saved parameters reach IFC
with `--revit-property-sets`.
- The Core Interior witness observations and verdicts follow from this
pull request's CI run (the IFC header carries the version), in a second
commit.

## Testing

Unit tests are banned in this repository: do not add them. Show the
change working end to end on real files instead.

- [x] `tools/check-local.sh`: CI run 40223501543 green on e8e450d (`CI
passed`).
- [x] Witness files refreshed from run 40223501543's
`octetproof-core-interior` artifact (5c701eb): only `witness_version`
(0.7.0 to 0.8.0) and the two verdict hashes differ; the IfcOpenShell and
IFClite observations are unchanged.

## Audit-honesty checklist

- [x] README / docs reflect the current state after this PR
- [x] A user-visible change has its entry in `CHANGELOG.md` (the release
assembles the fragments)
- [x] Resolved limitation updated (support matrix, status): no change in
this PR
- [x] Limitation documented: no change
- [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`)
- [x] Any new test fixtures use synthetic values: none added

## Breaking changes

The release carries #923, #934 and #970's, listed under "Upgrading from
0.7".
Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026
DrunkOnJava added a commit that referenced this pull request Nov 3, 2026
… by their checked lists instead of repeating counts; RELEASE.md said 11 bindings where rvt-wasm exports 12 (#1267)

## Summary

`RELEASE.md`'s table of what 1.0 keeps stable said "The 11 JavaScript
bindings"; `rvt-wasm` exports 12, as the README and `docs/viewer-api.md`
say. The count went stale because it was a copy that nothing checks.
This PR names the CLIs and the wasm bindings by their checked lists
instead of repeating their counts, in `RELEASE.md` and
`docs/library.md`, in `RELEASE.md`, `docs/library.md`,
`docs/release-1.0-criteria.md` (which said 22) and `docs/viewer-api.md`.
The README's two sentences stay the only places with a count, and both
are checked. The launch drafts under `docs/launch/` still say "9 CLIs",
but are marked as written for 0.1.2.

## Motivation

The README's "**Nineteen CLIs ship**" sentence is checked by
`tests/binary_inventory.rs`, and its "12 JS-callable" by
`tools/ci/wasm-api.py docs`. The copies in `RELEASE.md` and
`docs/library.md` were checked by nothing. #1263's review flagged the
library page's copies, and `RELEASE.md`'s binding count had already
drifted.

## Changes

- `RELEASE.md`:
- "The 19 CLIs" becomes the `[[bin]]` targets `Cargo.toml` declares,
which the README lists.
- "The 11 JavaScript bindings `docs/viewer-api.md` lists" becomes the
bindings it lists.
- `docs/library.md`: the `rvt-wasm` row names the bindings by
`docs/viewer-api.md`, and the CLI block's lead names the CLIs by the
README's list. Its examples cover most CLIs, not every one.
- `docs/release-1.0-criteria.md`: S2 said "the 22 wasm bindings"; it now
names the bindings `docs/viewer-api.md` lists.
- `docs/viewer-api.md`: the sentence above the checked table drops its
own count.
- **The stable modules (08282cf):**
- RELEASE.md defines the stable crate surface as "the 27 modules the
crate root's module overview lists". The overview, though, leaves out
`element_id`, the module of `rvt::ElementId`, which the 1.0 API decision
(#873, #923) made part of the stable core.
  - `src/lib.rs`'s overview now lists `element_id`.
- RELEASE.md and the 1.0 criteria name the stable modules by that
overview, and the research modules by `rvt::research`, without counts.
The criteria said 67 research modules; there are 74.

## Testing

`tools/ci/wasm-api.py docs` still passes: the README and
`docs/viewer-api.md` list the 12 bindings. Every link added resolves
(`README.md#command-line-tools`,
`viewer-api.md#the-javascript-bindings`). Docs only.

## Audit-honesty checklist

- [x] Docs reflect the current state; no capability change, so no
fragment
- [x] No emojis, private paths or internal jargon

## Legal and contribution hygiene

- [x] Apache-2.0

## Breaking changes

None. The stable surfaces are the same lists, named without a count.
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