Skip to content

fix(viewer): downloaded diagnostics keep their per-type counts, and the whole journey is tested on the six reference models (W9) - #927

Merged
DrunkOnJava merged 10 commits into
mainfrom
test/viewer-journey
Oct 24, 2026
Merged

DrunkOnJava merged 10 commits into
mainfrom
test/viewer-journey

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

W9 of docs/release-1.0-criteria.md asks for the viewer journey (open, inspect, schedule, export, diagnostics) verified end to end on the reference models. The existing browser tests cover each step on Einhoven, and only opening on Core Interior. This adds one test per redistributable reference model that runs the whole journey and checks every download against the others and against the CLI.

What the first run found

On all six models the downloaded diagnostics had "by_ifc_type": {} (run 40000049644), while the schedule listed every element. The cause: the bindings hand a Rust map over as a JavaScript Map, and JSON.stringify writes a Map as {}. The same Map made the status panel's Shapes row, which says how many bodies are bounding boxes (#409), sum an empty list, so the row never appeared after it landed on 2026-09-27. The viewer now turns the diagnostics' maps into objects when it receives them. The journey also checks that the Shapes row shows the body total. docs/viewer-api.md said results were plain JSON values; it now says what serde-wasm-bindgen makes of a map.

Motivation

W9 is "not measured". The parts were tested separately, never as one run, and nothing tied what the viewer exports to what rvt-ifc exports for the same file.

Changes

  • viewer/tests/journey.spec.ts, for Einhoven (2023), Core Interior (2024) and RE1 Architecture, Mechanical, Plumbing and Electrical (2025):
    • opens the file (gallery card, or the file input for RE1);
    • inspects the first element of the first category that has a Tag, and keeps its ElementId and IFC type;
    • downloads the schedule, IFC, GLB, plan SVG and diagnostics;
    • checks that the element is in the schedule and in the IFC under its ElementId; that the schedule lists exactly the elements exported.by_ifc_type counts, type by type; that the GLB is a glTF 2.0 container whose length field is its size; and that the diagnostics give the file's release;
    • on Einhoven and Core Interior, checks every decoder_metric that tests/fixtures/project-counts/*.json pins, read the way tests/project_count_fixtures.rs reads it. So the browser's export must have the CLI's counts: Core Interior's 360 walls, 132 doors, 256 columns, 80 slabs, 116 spaces, 15 storeys and 6,466 property sets, for example.
  • .github/workflows/deploy-viewer.yml: fetches the four RE1 .rvt files the way ci.yml does (pinned commit, sha256).
  • docs/viewer-demos.json: the Einhoven card said 24 ArcWalls and 42 materials, from before RE-81 and RE-116. It now gives 26 walls, 9 curtain panels, 2 windows and 36 materials, and a hint of 37 elements.
  • CHANGELOG.md.

Testing

Deploy viewer runs the new spec on this PR. No browser runs on this machine. The W9 row moves to passed in this PR only after that run is green on all six models.

  • tools/check-local.sh passes: left to CI
  • End to end on real Revit files: Einhoven and Core Interior (magnetar-io/revit-test-datasets, MIT), RE1 (Drshelden/IFC-ECS, MIT)
  • N/A: exporter unchanged
  • N/A: performance

Audit-honesty checklist

  • Docs reflect the state after this PR (the card's numbers)
  • No limitation resolved
  • No new limitation
  • Commit message says what and why
  • No emojis
  • No private paths
  • N/A: not a format finding

Legal and contribution hygiene

  • Apache-2.0
  • No Autodesk proprietary content
  • No new fixtures

Breaking changes

None.

Screenshots or output samples

The Playwright report is uploaded by Deploy viewer.

Related issues

Refs #408 (W9 of the 1.0 criteria)

…the CLI's pinned counts (W9)

viewer/tests/journey.spec.ts opens Einhoven, Core Interior and the four RE1
models, inspects an element, downloads the schedule, IFC, GLB, plan SVG and
diagnostics, and checks them against each other and, where a project-count
fixture exists, against the counts the CLI's export is pinned to. Deploy
viewer fetches the RE1 models by commit and hash. The Einhoven demo card's
numbers were from before RE-81 and RE-116.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f07d503801

ℹ️ 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".

Comment thread viewer/tests/journey.spec.ts Resolved
Comment thread viewer/tests/journey.spec.ts Resolved
Comment thread docs/viewer-demos.json Resolved
Comment thread CHANGELOG.md Resolved
…eps its per-type counts and the Shapes row appears (W9)

serde-wasm-bindgen hands a Rust map over as a JavaScript Map, which
JSON.stringify writes as {} and Object.values reads as empty. The journey
test found exported.by_ifc_type empty in the downloaded diagnostics on all
six models; the status panel's Shapes row (#409) summed the same empty map
and never rendered. docs/viewer-api.md said results were plain JSON.
@DrunkOnJava DrunkOnJava changed the title test(viewer): the whole journey on the six reference models, held to the CLI's pinned counts (W9) fix(viewer): downloaded diagnostics keep their per-type counts, and the whole journey is tested on the six reference models (W9) Oct 23, 2026
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 23, 2026 18:22
@DrunkOnJava
DrunkOnJava merged commit a0188a6 into main Oct 24, 2026
29 checks passed
@DrunkOnJava
DrunkOnJava deleted the test/viewer-journey branch October 24, 2026 18:02
DrunkOnJava added a commit that referenced this pull request Oct 24, 2026
…ured again (#945)

The header of `docs/release-1.0-criteria.md` lists the rows measured
again since 2026-10-21: S1, S2 and S4. #927 measured W9 on 2026-10-23
(Deploy viewer run 40001472629) and has landed, so the header now names
W9 too. Docs only, no changelog fragment needed. Every other row is
unchanged.
DrunkOnJava added a commit that referenced this pull request Oct 24, 2026
…e assembles (#938) (#940)

## Summary

Changelog entries become fragments, one file per pull request at
`changelog.d/<section>/<name>.md`, and a release assembles them into
`CHANGELOG.md` (`tools/release/changelog.py assemble`). CI checks every
fragment (`tools/release/changelog.py check`). Closes #938.

## Motivation

Every pull request added its entry at the top of the same `[Unreleased]`
section, so each landing left every other open pull request in conflict
with main on `CHANGELOG.md`. The queue then skipped them as `DIRTY`
until someone merged main into each one by hand. On 2026-10-24 that
happened after every landing:

- #926 landing put #927 and #930 back in conflict;
- #936 landing did the same to #886, #887, #927, #930 and #935, all with
green CI.

The `merge=union` driver that resolves such conflicts is in a
maintainer's own git configuration, not this repository, and GitHub's
merge never applied it. Nor does union merging keep the blank line
between two entries.

A fragment is a file of its own, so two pull requests never touch the
same lines, and GitHub's update-branch, which the queue uses, merges
them cleanly.

## Changes

- `tools/release/changelog.py` (stdlib only):
- `check` fails on a fragment outside a known section (`added`,
`changed`, `fixed`, `removed`, `security`, `research`), an empty one, or
one whose first line does not start an item (`- **`);
- `assemble` puts each fragment at the top of its section under
`[Unreleased]`, making the heading in Keep a Changelog order where it is
missing, one blank line apart, in name order, and deletes the fragments.
- `changelog.d/README.md`: the format.
`changelog.d/changed/changelog-fragments.md`: this PR's own entry.
- `.github/workflows/ci.yml`: the `check` step, beside the
conflict-marker guard.
- `RELEASE.md` step 5 runs `assemble` first.
- `CONTRIBUTING.md`, `docs/maintaining.md` and the PR template point at
`changelog.d/`.
- `CHANGELOG.md`'s preamble says unreleased changes are also in
`changelog.d/`.

This PR leaves the existing `[Unreleased]` entries where they are. The
open pull requests' entries move into fragments in those pull requests,
each with one last merge of main.

## Testing

I ran the tool on a scratch copy of main's `CHANGELOG.md`:

- `check` with three fragments: `changelog.d: 3 fragment(s), each in a
section and starting an item`;
- `assemble` put two `added` fragments at the top of `### Added`, in
name order with a blank line between, and made `### Security` between
`### Removed` and `### Research`; it deleted the three fragments and
left `README.md`;
- `check` on a fragment that does not start an item, and on one in an
unknown directory: both reported, exit 1;
- on this branch, `check` passes on its one fragment, and
`tools/ci/api-doc-ids.py` and the YAML parse pass.

## 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 for users. Contributors write their entry under `changelog.d/` from
now on.
DrunkOnJava added a commit that referenced this pull request Oct 30, 2026
…#1122)

## Summary

Two files nothing uses, and stale notes in `.gitignore`. Found in a
repository audit (2026-10-30).

## Motivation

- `uv.lock` (7 lines: an editable `rvt`, `requires-python >=3.8`) was
committed by accident with the viewer change #927. Nothing reads it; CI
installs Python tools from the hashed `tools/ci/requirements-*.txt`, and
`git grep uv.lock` finds no reference.
- `tools/ci/re-citations.py` was never wired to a workflow (`git log -S
re-citations` finds no file that ever named it). What it checks, that an
`RE-NN` in `src/` rustdoc has a report, is a subset of
`tools/ci/api-doc-ids.py`, which the PII guard job runs over `src/`,
`rvt-py/src`, the type stubs, the README and the user docs.
- `.gitignore`'s notes said the crate ships 7 binaries, that CLAUDE.md
lives in the parent directory, that Python and Node tooling might be
added one day, and carried a planning label.

## Changes

- Delete `uv.lock` and `tools/ci/re-citations.py`.
- `.gitignore`: comments only; no pattern changes (the diff has no
changed non-comment line).

## Testing

N/A: no code, export or measurement changes.

## Audit-honesty checklist

- [x] No user-visible change, so no changelog fragment
- [x] No emojis, private paths or internal jargon

## Legal and contribution hygiene

- [x] Apache-2.0; no Autodesk material

## Breaking changes

None.

## Related issues

None.
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