Repository navigation
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
Conversation
…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
marked this pull request as ready for review
November 4, 2026 19:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-measurementartifacts show (load-progress-core-interior.json, the wasm memory at each decoder report, Core Interior):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 istoo-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 tomemory-ceiling-cap-core-interior.jsonin theviewer-saved-meshes-measurementartifact, 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 ofcurrent_sketch_recordsare built only whilerf.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'ssrc/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 byrecordingor built from&'static strand empty collections.Testing
No local build or test run (repository rule).
cargo fmt --all -- --checkandpython3 tools/release/changelog.py checkpass.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 forCloses.memory-ceiling-cap-core-interior.json, toviewer-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
changelog.d/fixed/(the viewer test and a flag-off allocation; nothing user-visible moves).Breaking changes
None.
Related issues
Deploy viewer is green on this head (9b5e865).