Skip to content

feat(control): the progress an open reports covers the recovery over the element records, as a partition-recovery stage the viewer counts (#1195) - #2095

Merged
DrunkOnJava merged 3 commits into
mainfrom
feat/1195-recovery-progress
Nov 19, 2026
Merged

DrunkOnJava merged 3 commits into
mainfrom
feat/1195-recovery-progress

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

The progress an open reports gains a stage, partition-recovery, that counts the partition recovery's steps after the last Partitions/* stream is inflated. The viewer's loading card shows it as "Reading element records" with its count, where it swept with "Building the model". No export changes.

Motivation

#1195, the part left open on 2026-11-15: on Core Interior the decoder reported nothing for 26.4 s of a 31.6 s open in the viewer (load-progress.spec.ts), because recover_partition_schema_mvp runs its passes with no control of its own once the streams are inflated.

Changes

  • src/control.rs: Stage::PartitionRecovery (partition-recovery), at the end of the #[non_exhaustive] enum.
  • src/reader.rs: report_recovery_section, through the control the handle already holds for the partition inflates; nothing until every stream is inflated; the last stream, when the recovery inflates it, reports the recovery's step in progress instead of the stream count at its end.
  • src/research/partition_schema_mvp.rs: a report at each of the recovery's 86 section headings, and at its end.
  • viewer/src/main.ts, viewer/tests/load-progress.spec.ts, rvt-wasm/src/lib.rs (docs), docs/viewer-api.md, a changelog fragment.

Testing

Unit tests are banned in this repository. Rows registered here before any run is read:

  1. No export changes. A Measure against main with the samples of every year has every ifc.sha256 and diagnostics.json identical, and the same-project gates pass.
  2. The viewer counts the recovery. In Deploy viewer's browser tests, load-progress.spec.ts on Core Interior passes with its new lines: at least two counted partition-recovery reports, the bar rising through them, the card reading "Reading element records" with "N of M steps", and the announcements in the order streams, element records, building the model, with "Building the model" said once.
  3. The CLI's progress still ends the walk as before. tests/rvt_gltf_progress_cli.rs passes unchanged (the walk's last partition-scan report is 1 of 1).
  4. As it comes: the share of the Core Interior open the card now counts, from the test's timing table.

Results:

  1. No export changes: met. Measure 44493295189 on the landing head 27840447 against main at 19df0fe7, the reference models and the samples of every year: 65 of 65 ifc.sha256 and 65 of 65 diagnostics.json identical, no scorer output moved (the same as 44488420875 on 3a57d2c0).
  2. The viewer counts the recovery: met. Deploy viewer 44493300075 on 27840447 (and 44490131073 on d0aea009): 28 of 28 browser tests pass, load-progress.spec.ts on Core Interior with its new lines among them.
  3. The CLI's progress ends the walk as before: met. rvt_gltf_progress_cli is unchanged and passes in CI's real-file tests.
  4. As it comes. The first Deploy viewer run on this branch (44488437867) failed two tests of memory-ceiling-capped.spec.ts, both because the recovery is now counted. Einhoven under a 16 MiB cap now stops "while reading element records", the new step, which the test did not allow. On Core Interior the stretch the decoder reports nothing in no longer grows the wasm memory at all (308.1 MiB at the recovery's end and at the saved graphics' start), so a cap had nothing to stop in there. The test now caps halfway through the largest late growth between two reports and checks that the note names the step it stopped in; both pass. The semver gate then found RevitFile losing Freeze, from two atomic fields that held the recovery's step; 27840447 keeps them as plain integers set through &mut self, so the only public change is the new Stage variant at the end of a #[non_exhaustive] enum, and the gate passes. The share of the open the card counts is not in this run's artifacts.
  • tools/check-local.sh: not run (no local builds here); CI runs it. rustfmt --check and tools/release/changelog.py check pass locally.

Audit-honesty checklist

  • docs/viewer-api.md names the stage and what it counts; the changelog fragment says no export changes.

Legal and contribution hygiene

  • Apache-2.0. No new fixtures.

Breaking changes

None: Stage is #[non_exhaustive] and the variant is added at its end. A caller that names every stage it shows sees one more, partition-recovery.

…the element records, as a partition-recovery stage the viewer counts (#1195)

On Core Interior the decoder reported nothing for 26.4 s of a 31.6 s open in
the viewer: after the last Partitions/* stream was inflated, the partition
recovery ran its passes with no control of its own, and the card swept with
Building the model (load-progress.spec.ts).

Stage::PartitionRecovery (partition-recovery) counts the recovery's
sections, one for each heading of recover_partition_schema_mvp's body (86),
reported through the handle that already carries the partition inflates'
control, and only once every stream is inflated so the two stages do not
interleave. The last stream, when the recovery inflates it, reports the
recovery's section in progress instead of the stream count at its end, so
the card goes from the streams to the steps without naming for an instant
what comes after them. The viewer names the stage Reading element records,
with its count; the binding's docs, the viewer API page and the viewer's
progress test name it too. No export changes.

Claude-Session: https://claude.ai/code/session_01NCFPVqpXUmLDmXf35nPPeP
…oder now reports (#1195)

Deploy viewer run 44488437867 on this branch failed two tests of
memory-ceiling-capped.spec.ts, both because the recovery is now counted:

- Einhoven under a 16 MiB cap stops while reading element records, the new
  step, which the note names; the test allowed only the two steps before it.
- The Core Interior test capped the memory halfway through the growth of
  the stretch the decoder reported nothing in. With the recovery counted
  that stretch no longer grows the memory (308.1 MiB at the recovery's end
  and at the saved graphics' start), so there was nothing to stop in. The
  test now caps halfway through the largest growth between two consecutive
  reports from the recovery's first to the saved graphics', and checks the
  stop came there and the note names that report's step. The growth of the
  uncounted stretch is still written to the measurement file, not judged.
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 19, 2026 08:59
… change adds an item to the stable API and changes nothing in it (#1195)

The semver gate on this pull request found RevitFile and corpus::Sample
losing Freeze: the recovery's section was kept in two AtomicU64 fields so
that a &self method could move it, and an atomic is interior mutability.
The recovery holds the handle as &mut, so the report takes &mut self and
the fields are plain integers. The only public change left is the new
Stage::PartitionRecovery, at the end of a #[non_exhaustive] enum.
@DrunkOnJava
DrunkOnJava merged commit eb6ddc0 into main Nov 19, 2026
45 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/1195-recovery-progress branch November 19, 2026 09:32
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