Skip to content

fix(viewer): the stop-in-the-silent-stretch test measures its cap, and a sketch's value-source notes cost nothing when off (#1374) - #1376

Merged
DrunkOnJava merged 3 commits into
mainfrom
fix/1374-memory-ceiling
Nov 4, 2026
Merged

DrunkOnJava merged 3 commits into
mainfrom
fix/1374-memory-ceiling

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

Deploy viewer has failed on main since #1370 (runs 41885589164 twice, at 0ca5912; the last green was f1f80d9). The failing test is the Core Interior stop in viewer/tests/memory-ceiling-capped.spec.ts. The memory the open takes did not go up; the place where the wasm memory grows moved, and the test's hard-coded cap was tuned to the old place. This PR makes the test measure where the stretch is, and gates the two small value-source allocations #1370 left on the flag-off path.

Motivation

Closes #1374.

What the viewer-saved-meshes-measurement artifacts show (load-progress-core-interior.json, the wasm memory at each decoder report, Core Interior):

  • f1f80d9 (run 41870855196) and a689fec (run 41855734492): 275.4 MiB at the last partition stream, 309.1 MiB at the end of the walk, 325.4 MiB at the first saved-graphics report and to the end.
  • 0ca5912, run 41885589164: 275.4 MiB, 309.1 MiB, 309.1 MiB at the first saved-graphics report and at the first saved-meshes report, 325.4 MiB by the last meshes.
  • The peak is 325.4 MiB in all three. The last 16.3 MiB of growth moved from the silent gap before the saved graphics into the saved meshes.
  • The test capped the wasm memory at 310 MiB, which only stops in the gap before the saved graphics when the open has 309.1 MiB at its last report there. After the move the allocation that crosses 310 MiB is in the saved meshes, so the page says "while drawing doors and windows from saved meshes" (the failure text in the issue).

So the coordinator's reading that #1370 added memory on the flag-off path is not what the artifacts show; the flag-off path's peak is unchanged. I did find two small unconditional allocations in #1370's delta (below) and gated them, but they do not explain this failure, and I have not measured the memory they save (a set of ElementIds, small).

Changes

  • viewer/tests/memory-ceiling-capped.spec.ts: the Core Interior test no longer has a tuned cap. It opens the model once at the real 65,536-page ceiling and reads the decoder's reports from #status (data-load-progress). It takes the first report that leaves the card on "Building the model" and the first report after those, requires the memory to grow by at least 1 MiB between them (it fails with both figures if not, so it cannot pass with nothing to stop in), and sets the cap midway, on a page boundary. It then opens the model under that cap and requires: the failure is too-large; the open's reports are the measured ones (stage, count, memory, card) up to the stop, none above the cap; the last still reads "Building the model"; and the message says ", while building the model," and does not name the saved meshes. It writes the profile, the two reports the cap sits between, the cap and the capped open's reports to memory-ceiling-cap-core-interior.json in the viewer-saved-meshes-measurement artifact, so a failure can be read from the run.
  • src/research/partition_schema_mvp/slabs.rs: evidence.exact.insert(owner) and the returned key set of current_sketch_records are built only while rf.recording_value_sources() is on, as the rest of Provenance: value sources for the readers #1360 leaves NotYet (stair sketches, landings, area lines, sections, pipes, roofs, family extrusions, profiles) #1368's notes are. This file is not in feat(ifc): value sources for room outlines, hollow and I sections and pipe axes (#1368) #1373. profile.segment_ids = ...collect() next to it predates feat(ifc): value sources for profiles, stair runs and landings (#1368) #1370 and the profile writer reads it, so it stays.
  • changelog.d/fixed/viewer-memory-ceiling-profile.md.

The other flag-off allocations the #1370 review named (type parameters, room boundaries, pipe axes, and framing.rs, rooms.rs, element_provenance.rs) are #1373's and are not touched here. I read the rest of #1370's src/ delta (element_record_plan_profiles.rs, native_stairs.rs, partition_stairs.rs, stair_bodies.rs, partition_schema_mvp.rs, reader.rs) and found each note gated by recording or built from &'static str and empty collections.

Testing

No local build or test run (repository rule). cargo fmt --all -- --check and python3 tools/release/changelog.py check pass.

  • Deploy viewer on this branch: not yet measured on this head. Drafts are not built on pull_request, so it is dispatched on the branch (gh workflow run deploy-viewer.yml --ref fix/1374-memory-ceiling). Run 41893121186 ran at b7e2549 (the test as first written); run 41893864460 runs at 9b5e865, the head when this was written, which adds the artifact file below to that test and changes two comments and the changelog fragment. Their results are the evidence that the test passes; the PR's own Deploy viewer run once it is ready is the on-head proof for Closes.
  • The memory profile above comes from the downloaded artifacts of the runs named. The new test writes its own, memory-ceiling-cap-core-interior.json, to viewer-saved-meshes-measurement (the open's reports at the real ceiling, the two reports the cap sits between, the cap, and the capped open's reports up to the stop); it is not yet read on any head.

Audit-honesty checklist

  • A user-visible change has its entry as a fragment under changelog.d/fixed/ (the viewer test and a flag-off allocation; nothing user-visible moves).
  • No emojis, no private paths.

Breaking changes

None.

Related issues

Deploy viewer is green on this head (9b5e865).

…d a sketch's value-source notes cost nothing when off (#1374)

Refs #1374. Deploy viewer has been red on main since #1370 (runs at 0ca5912): the Core Interior test capped the wasm memory at 310 MiB, a figure tuned to where the open grows memory, and 16.3 MiB of that growth moved from before the saved graphics report into the saved meshes. The peak did not change (325.4 MiB in the Measure the viewer artifacts of f1f80d9 and 0ca5912).

The test now opens the model once at the real ceiling, puts the cap between the memory at the first report that leaves the card on Building the model and the memory at the first report after those, and requires the capped open to follow the measured reports up to a last one that still reads Building the model.

slabs.rs: evidence.exact and the disagreeing-lines key set are built only while the handle records value sources.
… and stopped reports to the measurement artifact (#1374)
@DrunkOnJava DrunkOnJava added the ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes label Nov 4, 2026
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 4, 2026 19:12
@DrunkOnJava DrunkOnJava removed the ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes label Nov 4, 2026
@DrunkOnJava
DrunkOnJava merged commit fdff701 into main Nov 4, 2026
54 checks passed
@DrunkOnJava
DrunkOnJava deleted the fix/1374-memory-ceiling branch November 4, 2026 19:30
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.

Deploy viewer red on main since #1370: the memory-ceiling stop lands while drawing saved meshes, not while building the model

1 participant