Skip to content

feat(viewer): stage the MIT magnetar real projects as hash-verified demos - #257

Merged
DrunkOnJava merged 4 commits into
mainfrom
feat/viewer-real-project-demos
Sep 19, 2026
Merged

DrunkOnJava merged 4 commits into
mainfrom
feat/viewer-real-project-demos

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Sep 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

Stage the two MIT-licensed real projects from magnetar-io/revit-test-datasets, Revit_IFC5_Einhoven.rvt (2023) and 2024_Core_Interior.rvt (2024), as hash-verified entries at the top of the viewer's demo gallery, so the public viewer opens a real model instead of only the 20 KB synthetic fixtures.

Motivation

Every .rvt in the deployed gallery was a gen-fixture synthetic that decodes to a single IFCPROJECT node and an empty viewport. The parser's real-project recovery (RE-21 to RE-26, the CI browser regression on Einhoven) was not reachable from the public site. The deploy workflow already checks out the magnetar corpus with LFS for the regression test; this reuses that checkout.

Changes

  • docs/viewer-demos.json: two real-project entries with sha256, size, provenance, MIT license and honest expected-quality notes; attribution strings updated.
  • viewer/scripts/stage-demos.mjs: stageRealProject resolves the file from source_candidates, _project_corpus/Revit/, or RVT_VIEWER_SAMPLE, refuses to stage on a sha256 mismatch, and writes the .license.json sidecar in the same shape as the tier1 sidecars.
  • viewer/tests/viewer-regression.spec.ts: two new tests. The Einhoven card asserts the Geometry label, storey tree nodes, storey_count: 4, and visible viewport content; the Core Interior card (marked slow, 300 s load budget) asserts it opens inside wasm32 memory with the Geometry label and storeys. Both skip when the sample is not staged.
  • viewer/index.html, README.md, .github/workflows/deploy-viewer.yml: copy and comments describe the real-project demos.

Testing

  • npm run stage:demos stages both files with sha256 verified
  • npm run typecheck, npm run build
  • npm run test:browser with RVT_VIEWER_SAMPLE set: 8 passed, including the two new real-project tests (Core Interior card: 32.9 s)
  • Headless Chromium: Einhoven loads in 0.5 s (57 entities, Geometry 100%, 5 storeys); Core Interior loads in 28 s (889 entities, Geometry 100%, 16 storeys, 854 elements with geometry)

Audit-honesty checklist

  • README and the in-page support matrix describe what actually decodes on each file
  • Expected-quality notes name the open gaps (Einhoven: no floors/doors/windows/rooms; Core Interior: rooms and materials)
  • No emojis, no private paths, no PII

Legal and contribution hygiene

  • Licensable under Apache-2.0; the staged samples are MIT (magnetar-io/revit-test-datasets), attributed in the catalog and sidecars
  • No Autodesk proprietary source, decompiled internals, or NDA'd SDK content
  • No real-world PII

Breaking changes

None.

Related issues

Depends on the compression reservation fix landing first so the Core Interior card opens in wasm32.


Note

Medium Risk
Changes core DEFLATE allocation behavior (affects all inflate paths) and ships large binary demos via CI; wasm/memory fix is targeted but touches security-sensitive decompression code.

Overview
Adds MIT-licensed real Revit projects (Einhoven 2023 and Core Interior 2024) to the public viewer demo gallery, with sha256-pinned staging from magnetar-io/revit-test-datasets and Playwright coverage so the site can open real geometry—not only tier1 synthetics.

Gallery & deploy: docs/viewer-demos.json lists the two real-project entries first; stage-demos.mjs copies from _project_corpus/, refuses mismatched hashes, and writes .license.json sidecars. README, viewer support copy, and deploy workflow comments describe the new demos.

Wasm stability for large files: inflate_at_with_limits caps initial Vec reservation at 1 MiB (instead of scaling with stream remainder × members), calls shrink_to_fit on outputs, and adds a regression test—fixing wasm32 linear memory blow-up when opening the ~33 MB Core Interior project.

Diagnostics: WASM installs a one-time panic hook that logs to console.error on byte-open entry points.

Tests: New browser tests assert Einhoven loads with Geometry quality, storeys, and viewport content; Core Interior loads within wasm memory (slow, 300s timeout) without unreachable traps.

Reviewed by Cursor Bugbot for commit 5036bfa. Configure here.

…reams fit wasm32 memory

inflate_at_with_limits reserved min(4 x remaining input, 256 MiB) for
every gzip member, and inflate_all_chunks_with_limits keeps every
member's buffer alive, so a stream with dozens of members reserved
O(members x stream) bytes. Native allocators back untouched capacity
lazily (rvt-ifc peaks at 427 MB RSS on 2024_Core_Interior.rvt); wasm32
linear memory commits every grown page, so the same call grew the
viewer module to 4057 MB in 139 ms and trapped at the 4 GiB ceiling.

Cap the reservation at 1 MiB in addition to the caller's output limit
and trim the retained buffer. Route wasm panics to console.error so a
trap reports its message and location instead of a bare unreachable.

Core Interior now decodes under Node in 29 s with 419 MB of linear
memory; Einhoven drops from 43 MB to 20 MB. Outputs are unchanged.
…emos

Every .rvt in the deployed gallery was a 20 KB gen-fixture synthetic that
decodes to a lone IFCPROJECT node and an empty viewport, so the public
viewer never reached the real-project recovery the CI regression gates.

Add Revit_IFC5_Einhoven.rvt (2023) and 2024_Core_Interior.rvt (2024) from
magnetar-io/revit-test-datasets (MIT) as the first two catalog entries,
pinned by sha256. The stager resolves them from the deploy workflow's
existing _project_corpus checkout, refuses a hash mismatch, and writes the
license sidecar. Browser tests open both cards and assert the Geometry
label, storey nodes and visible viewport content.
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) September 19, 2026 17:36
@DrunkOnJava
DrunkOnJava merged commit ba5ce3d into main Sep 19, 2026
23 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/viewer-real-project-demos branch September 19, 2026 17:40
DrunkOnJava added a commit that referenced this pull request Sep 19, 2026
…e CI audit path (#261)

## Summary

Bring the prose docs up to what merged on `main` on 2026-09-19 (#256,
#257, #258, #259, the four Dependabot bumps) and correct the
slab-profile claim in `docs/status.md` that RE-25 had already
invalidated. Docs, `README.md` and `CONTRIBUTING.md` only; no Rust, no
`viewer/`, no `CHANGELOG.md`.

## Motivation

`docs/status.md` reported 80 of 80 exact slab profiles from RE-25 and
then, about 40 lines later, still said the slab profile "is still the
bounding-box rectangle rather than the recovered boundary polygon
(#31)". `docs/supported-profile.md` carried the same claim in its
Unsupported list. Separately, nothing in the docs described the bounded
wasm32 inflate reservation, the wasm panic hook, the hash-verified
real-project demo gallery, or the `NOT MEASURED` npm audit path, and
`docs/demos.md` still listed the web viewer as "not yet implemented".

## Changes

- `docs/status.md` — review date to 2026-09-19; the stale slab-profile
sentence now says the profile is the polygon its `OST_SketchLines`
records close on 80 of 80 exported slabs, with the 20 rotated shading
plates named as the remaining rectangle; new paragraph on the
hash-pinned demo gallery; gzip and Browser viewer capability rows
updated with the 1 MiB reservation cap and the real-project demos.
- `docs/supported-profile.md` — the same stale slab claim replaced by
the 20-shading-plate remainder, and the door/window host-wall binding no
longer listed as unsupported (#222 matches Revit's `(host wall, filling
element)` pair set on 138 of 138; it is the opening-index rows that
carry no host claim).
- `README.md` — viewer and demo-gallery paragraphs only: wasm32 memory
behaviour and the panic hook, plus Einhoven / Core Interior sizes and
measured load times.
- `docs/viewer-api.md` — new "Panic reporting and wasm32 memory" section
covering the seven byte-opening bindings that install
`std::panic::set_hook`, `INITIAL_INFLATE_CAPACITY_BYTES`, and the
before/after measurements.
- `docs/viewer-build-pipeline.md` — states that VW1-01..24 shipped and
the recipe is the built workflow; a "wasm32 linear memory is the real
ceiling" subsection under VW1-20 so a future chunked path keeps the
bound.
- `docs/user-guide.md` — the two real-project demos and their honest
decode times in the browser steps; the 801 of 872 storey-containment
figure and the named 71.
- `docs/demos.md` — the "Web viewer ... not yet implemented" bullet
replaced by what actually ships and what is still missing (a broader
redistributable real-project corpus).
- `docs/supply-chain-policy.md` — the npm advisory 503 retry path, why a
`NOT MEASURED` run is not evidence of clean dependencies, and how a
measured advisory is still told apart by the output rather than the exit
code (#258).
- `CONTRIBUTING.md` — the same audit behaviour plus the narrower
pull-request CI shape (#260, open as of 2026-09-19); a fuzz note
explaining that `fuzz/` is outside the workspace gate, which is how
`fuzz_step_writer` broke from #236 until #259.
- `docs/contribution-map.md` — new "Open Remainders" section listing the
six issues closed today and the named remainder behind each of #32,
#33/#219, #23, #86 and #156.

## Testing

N/A: docs-only PR. No Rust or TypeScript changed, so `cargo test` /
`clippy` / `fmt` are unaffected by this diff. Verification performed
instead:

- Every number written was checked against the merged code or its
commit: `INITIAL_INFLATE_CAPACITY_BYTES` and `shrink_to_fit` in
`src/compression.rs`, the seven `install_panic_hook()` call sites in
`src/wasm.rs`, the `sha256` / `size_bytes` entries in
`docs/viewer-demos.json`, the two new Playwright tests in
`viewer/tests/viewer-regression.spec.ts`, the retry block in
`.github/workflows/ci.yml`, and the `#260` diff.
- Relative Markdown links in all ten changed files resolve to existing
paths.
- `git diff --stat` confirms only `docs/`, `README.md` and
`CONTRIBUTING.md` changed.

## Audit-honesty checklist

- [x] README / docs reflect the current state after this PR
- [x] A resolved limitation is updated: the slab boundary polygon moved
out of the Unsupported list in `docs/supported-profile.md` and out of
the stale sentence in `docs/status.md`, with the 20 rotated shading
plates named as what is genuinely left
- [x] No new limitation introduced
- [x] Commit message describes what changed and why
- [x] No emojis
- [x] No private paths, personal email addresses, or internal jargon
- [x] Not a reverse-engineering finding; no new probe or reconnaissance
addendum needed

## Legal and contribution hygiene

- [x] Licensable under Apache-2.0
- [x] No Autodesk proprietary source, decompiled internals, or NDA'd SDK
content
- [x] No new test fixtures; no real-world PII

## Breaking changes

None.

## Screenshots or output samples

N/A: docs-only PR. No UI or IFC output changed.

## Related issues

Refs #256, #257, #258, #259, #260. Documents the 2026-09-19 closures of
#30, #31, #66, #81, #83 and #87, and the named remainders on #32, #33,
#219, #23, #86 and #156. Closes nothing.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Markdown-only changes with no runtime, CI workflow, or dependency
edits in this diff.
> 
> **Overview**
> This **docs-only** PR brings README, CONTRIBUTING, and nine `docs/`
pages in line with what landed on `main` on 2026-09-19 (#256–#259,
related CI work), and fixes **stale capability wording** that still said
slab plan profiles were bounding-box rectangles after RE-25.
> 
> **Support-boundary honesty:** `docs/status.md` and
`docs/supported-profile.md` now state that **80 of 80** exported slabs
use closed sketch-line polygons; the **20 rotated shading plates** stay
rectangle/`ProfileResolved: false`. Door/window **host-wall binding on
the partition element-record carrier** is documented as closed (#222);
opening-index rows remain unsupported for host claims.
> 
> **Viewer and wasm:** README and `docs/viewer-api.md` /
`docs/viewer-build-pipeline.md` describe the **1 MiB per gzip member**
inflate reservation (#256), **wasm panic → `console.error`**,
hash-verified **Einhoven / Core Interior** demo gallery (#257) with
sizes and load times, and Playwright staging checks. `docs/demos.md`
replaces “web viewer not yet implemented” with what ships vs a broader
real-project corpus still missing.
> 
> **Contributor / CI prose:** `CONTRIBUTING.md` and
`docs/supply-chain-policy.md` explain **npm audit retries** and **`NOT
MEASURED` warnings** when the advisory API is down (#258), plus
**narrower pull-request CI** vs `main` (#260). CONTRIBUTING adds a
**fuzz workspace** note: PR gates do not compile `fuzz/`—run nightly
`cargo +nightly check --manifest-path fuzz/Cargo.toml` when changing
types fuzz targets construct (#259).
> 
> **Roadmap:** `docs/contribution-map.md` adds an **Open Remainders**
table naming what is left after six issues closed the same day.
`docs/user-guide.md` mirrors demo expectations and **801/872** storey
containment with the named 71 unbound.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
ac4354d. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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