Skip to content

Review only (do not merge): the v0.6.1 hotfix against v0.6.0 - #854

Closed
DrunkOnJava wants to merge 5 commits into
review/v0.6.0-basefrom
hotfix/v0.6.1
Closed

DrunkOnJava wants to merge 5 commits into
review/v0.6.0-basefrom
hotfix/v0.6.1

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

Review only, not for merge. hotfix/v0.6.1 is cut from v0.6.0 (RELEASE.md, "Hotfix process"), so no pull request into main shows its changes. This pull request compares it with a branch at v0.6.0, so the release text that crates.io and PyPI will show for good is reviewed before the tag. It will be closed unmerged, and the base branch deleted, once the review is answered; the release is the signed tag on the branch's head.

What to review

Evidence

  • CI on the branch: 39326770821 (e857af4) and 39327613157 (71bc3a9, after the witness refresh), every job passed, the i686 job and the macOS, Windows and MSRV builds among them. The latest commit changes only README.md and CHANGELOG.md.
  • Measure 39327047171, e857af4 (the same code as the branch's head) against v0.6.0, with Autodesk's sample projects, the family corpus, the BIM4LCA office and the R2025 models: 1,297 of 1,477 result files byte-identical (every rvt-info result, schema dump, diagnostics file and scorer output); the other 180 are the 89 IFC hashes (the version is in FILE_NAME and IfcApplication), the 87 export logs (only their time line), the two Core Interior witness observations (only witness_version), and the run's commit and runner files.

Note

Medium Risk
Targeted parsing hardening on untrusted Revit bytes affects the wasm viewer export path; 64-bit behavior is intended unchanged but family-corpus i686 coverage is new.

Overview
Patch release v0.6.1 on top of v0.6.0: version bumps across crates, locks, viewer, citation, and witness metadata, plus release notes and a tightened README support table (what is actually measured vs. overstated in 0.6.0, including IsExternal excluding curtain mullions/panels).

Runtime fix (#836): Partition scanning no longer trusts unchecked usize math on file-derived sizes. data_objects uses checked_add for object end offsets; opens_unset_map validates entry count before count * 12 so 32-bit targets (e.g. wasm in the browser viewer) cannot wrap bounds checks and panic on corrupt bytes.

CI: Pushes to hotfix/** run the workflow; a new i686-overflow job runs the same real-file / hardening suite on i686-unknown-linux-gnu with overflow checks enabled, and ci-ok now depends on it.

Reviewed by Cursor Bugbot for commit ab8a778. Configure here.

…h overflow checks on, and fix the two wraps they found (#836) (#839)

## Summary

CI runs the real-file, CLI, contract and hardening checks, the fuzz regressions among them, on 32-bit i686 with overflow checks on, so a length that wraps on a 32-bit target panics in CI instead of passing a bounds check. Its first runs found two such wraps on every family release, fixed here. Closes #836.

## Motivation

#835 found a parser panic only a 32-bit target can reach: `4 + char_count.saturating_mul(2)` saturates to `usize::MAX` on wasm32, the addition wraps to 3 in a release build, the bounds check passes and `&slice[4..3]` panics. In the browser viewer, which runs on wasm32, that aborts the export. Every CI job, fuzz target and corpus run builds for 64 bits, where a `u32` length times 2 cannot overflow, so nothing would catch the next one.

## Changes

- `.github/workflows/ci.yml`: a new job, **32-bit overflow checks (i686)**, on ubuntu-24.04. It fetches the phi-ag/rvt family corpus (`RVT_REQUIRE_CORPUS=1`, as the Linux test job does), installs the `i686-unknown-linux-gnu` target and `gcc-multilib`, and runs `tools/ci/verify-real-files.sh --profile ci --no-fail-fast --target i686-unknown-linux-gnu` with `CARGO_PROFILE_CI_OVERFLOW_CHECKS=true`. The `ci` profile keeps its release optimisation, so the corpus checks run at the usual speed, and overflow checks make any wrap panic. It has its own rust-cache key (`ci-i686`, saved from `main` only), so the shared `ci-release` cache is untouched. `CI passed` requires it.
- `src/partition_room_parameters.rs`: `data_objects`, the one-pass data-object scan (B70), tries a header at every offset of a partition and added the `u32` size it reads there to the offset unchecked. On a 32-bit target a size near 4 GiB from arbitrary bytes wrapped the end around, and a wrapped end below 4 made `end - 4` underflow and the next read panic: in the browser viewer, an aborted export. The addition is checked now, and an end past `usize::MAX` is not a plausible object.
- `src/partition_type_materials.rs`: `opens_unset_map` multiplied a count read from arbitrary bytes by 12 before checking it against its 64-entry limit. Its range check came next, so release builds did not misread, but the product overflowed. The count is checked first.
- `CHANGELOG.md`: `[Unreleased]` entries for the job and both fixes.

## Testing

The job's own runs on this pull request are the test. Each builds the integration binary and the CLIs for i686 and runs the manifest's real-file, CLI, contract and hardening targets on the 11 family releases:

| Commit | i686 result |
|---|---|
| dbdb866 (the job alone) | 233 passed, 11 failed: `partition_room_parameters.rs:353`, "attempt to add with overflow", in every test that exports a family |
| 99b1102 (+ data-object end checked) | 233 passed, 11 failed: `partition_type_materials.rs:258`, "attempt to multiply with overflow" |
| f1c9032 (+ map count checked first) | **244 passed**, 31 skipped (the project-corpus targets, which this job does not fetch) |

Neither fix can change a 64-bit export, where neither sum nor product can overflow, and the 64-bit jobs here are unchanged. The other multiplications and sums of file-read counts in `src/` were read too: each is checked against a limit before it is used (a string's units, a list's entries, a map's count) or uses checked arithmetic. `actionlint` and a YAML load pass on `ci.yml` (actionlint's only notes are the existing `$/.github/actions/fetch-corpus` references, which GitHub runs).

- [x] Verified end to end on real Revit files: the family corpus (phi-ag/rvt, fetched for the run, never committed) on i686
- N/A: not an IFC exporter or performance change

## 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
- N/A: not a reverse-engineering finding

## 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] No new test fixtures

## Breaking changes

None. A pull request now also needs the i686 job to pass.

(cherry picked from commit 05092f04e9d6a0d52d16bd0f8d0e7063aff2cfba)
…nged, and what the README's corrections were
@cursor

cursor Bot commented Oct 19, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 1287b1da-b238-4735-8dc2-de7fcdc83cab)

@DrunkOnJava

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: ab8a778ce3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Review answered (Codex: no findings on ab8a778). Closed unmerged as planned: v0.6.1 is the signed tag on ab8a778, publishing in run 39337625657. The temporary base branch is deleted.

@DrunkOnJava
DrunkOnJava deleted the hotfix/v0.6.1 branch October 20, 2026 00:57
DrunkOnJava added a commit that referenced this pull request Oct 20, 2026
… and its README corrections (#855)

## Summary

`main` takes what v0.6.1 shipped, as RELEASE.md's hotfix step 7 says, the way merging `hotfix/v0.6.1` back would: the version (0.6.1 in all nine places), the `[0.6.1]` changelog section, and the README's corrected support table and release section. v0.6.1 is the signed tag on ab8a778, cut from `v0.6.0` because `main` holds a breaking change (#841).

## Changes

- Version files: `Cargo.toml`, `rvt-py/Cargo.toml` (and its `=` pin), `rvt-wasm/Cargo.toml`, `tools/stream_evidence/Cargo.toml`, `viewer/package.json`, `CITATION.cff`, `.release-please-manifest.json` and both lockfiles' workspace entries, each line as the tag has it.
- `CHANGELOG.md`: the `[0.6.1]` section, identical to the tag's; #839's two entries (the i686 job and the data-object scan) move out of `[Unreleased]` into it; the `[0.6.0]` intro and heading say `IsExternal` is written on every class but curtain mullions and panels, as the tag's do; the descriptions entry (#851) says 0.6.1's registry descriptions are 0.6.0's.
- `README.md`: identical to the tag's README. `main`'s README had not changed since `v0.6.0`, so this is the support-table rows of #842 (2027 and 2015 partial, 2014 and earlier not measured, "no Revit export measured"), the IsExternal and comparator bullets, and the "Release 0.6.1 and main" section.
- Core Interior witness observations and verdicts: from this pull request's own CI run, since `main`'s export differs from the tag's (step 7).

The other latest-release statements (`docs/install.md`, `docs/status.md`, `docs/python.md`, `docs/supported-profile.md`, `ROADMAP.md`) move to 0.6.1 in #842 once each channel is checked.

## Testing

This pull request's CI, and its witness replay after the refresh. The tag's own checks: CI 39326770821 and 39327613157 on the hotfix branch, Measure 39327047171 against `v0.6.0` (1,297 of 1,477 result files identical; the rest are the IFC hashes, which carry the version, export times, `witness_version`, and the run's commit and runner), and Codex's review of the release text in #854 (no findings on ab8a778).

## 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
- N/A: not a reverse-engineering finding

## 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] No new test fixtures

## Breaking changes

None.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> No application logic in the diff—version bumps, changelog/README alignment, and witness JSON updates only.
> 
> **Overview**
> **Aligns `main` with the published v0.6.1 hotfix** (per RELEASE.md): workspace and packaging versions move from **0.6.0 → 0.6.1** (`Cargo.toml`, `rvt-py`/`rvt-wasm` pins, lockfiles, `viewer/package.json`, `CITATION.cff`, release-please manifest).
> 
> **Changelog and README** now match the tag: a new **`[0.6.1]`** section documents the 32-bit overflow hardening (#836), the required **i686 CI** job, and README support-table honesty; **`[Unreleased]`** drops those shipped items. Docs clarify **`IsExternal`** applies to every class **except** curtain mullions/panels, and tighten wording on which Revit years are measured vs merely opening.
> 
> **Research witness artifacts** refresh `witness_version` to **0.6.1** and updated verdict hashes from this branch’s CI replay.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f35ddad. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
DrunkOnJava added a commit that referenced this pull request Oct 20, 2026
…x reviews it, without anything waiting for it (#859)

Follow-up to #856. Codex reviews stay on, because its findings were useful (#842, #849, #853, #854), and nothing waits for one.

- RELEASE.md hotfix step 5: besides reading the branch's whole diff against the tag, open the review-only pull request into `review/vX.Y.Z-base` again, so Codex reviews the text crates.io and PyPI then keep for good. Nothing waits for that review, but a finding that arrives before the tag is acted on. Step 6 closes it and deletes the branch after the tag.
- ADR-005's amendment: a merge waits only on `CI passed`. Codex still reviews; Bugbot does not. Its findings are acted on and resolved when they arrive.
- BACKLOG.md's state line follows.

Docs only.
Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026

This branch was previously deployed

2 inactive deployments
pypi — ab8a778c Deployed Oct 19, 2026 by DrunkOnJava via Publish to PyPI #16
crates-io — ab8a778c Deployed Oct 19, 2026 by DrunkOnJava via Publish to crates.io #16
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