Repository navigation
feat(ifc): value sources for profiles, stair runs and landings (#1368) - #1370
Merged
Merged
Conversation
A profile solved from sketch lines, a column's type section, a stair run and a landing slab now name the records they were read from in the provenance table, behind --element-provenance as before. A source made of several records lists them in parts (capped at 64, parts_left_out counts the rest); the rule frame names the frames of other elements' records. value_source_counts gains a current count.
…x or from that profile (#1368)
… measured (#1368) Office as built: 6,128,625 bytes of compact JSON (5,987,841 on main in the same run), 159 times the diagnostics without it; the pretty sidecar 10,920,400 bytes. Core Interior: 715,966 compact, 1,500,700 pretty. From Measure run 41875078758. Rooms are named as the elements that keep selected_frame_box, and no model exercises the current rule.
…count partitions (#1368) A part is re-read by what it is (a frame by its id or its enclosing record's, a line's data by its header and id, a run type by its id object); a landing type's and a Revit 2025 run type's records are sources of the values they give; a stair run's native record is a source of a 2025 straight run; a base cut and a Sketch list are noted only when used; a sketch_list alone no longer replaces selected_frame_box; differs_from_frame counts the Sketch list for a profile's lines; type_section and stair_run_type count the partitions that held the record; the docs and changelog state what was measured.
…e run 41882133812 (#1368) Office as built: 6,131,584 bytes of compact JSON (5,987,841 on main in the same run, 159 times the 38,640-byte diagnostics), pretty sidecar 10,927,629. Core Interior: 718,828 compact (440,909 on main), 1,511,498 pretty. Figures only; the two doc comments that carry them are the only source lines touched.
DrunkOnJava
marked this pull request as ready for review
November 4, 2026 18:04
DrunkOnJava
enabled auto-merge (squash)
November 4, 2026 18:05
This was referenced Nov 4, 2026
Merged
DrunkOnJava
added a commit
that referenced
this pull request
Nov 4, 2026
…d a sketch's value-source notes cost nothing when off (#1374) (#1376) ## 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 #1368's notes are. This file is not in #1373. `profile.segment_ids = ...collect()` next to it predates #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 - [x] 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). - [x] No emojis, no private paths. ## Breaking changes None. ## Related issues Closes #1374 (to become `Closes #1374` once Deploy viewer is green on this head).
DrunkOnJava
added a commit
that referenced
this pull request
Nov 4, 2026
… pipe axes (#1368) (#1373) ## Summary Part 2 of #1368; Refs #1368 (it stays open for the rows listed below). The provenance table (`--element-provenance`) now names the records a room's outline, a hollow or I section column and a pipe's axis were read from: - a room whose outline is read from its stored solid lists the header of each solid that gave it (`room_solid_faces`, `parts`, in the room's own partition). These were the `selected_frame_box` left after #1370 (116 on Core Interior, 234 on the office); - a column drawn as its type's hollow section lists the four parameter entries (`b`, `Ht`, `t`, `kr`) it took the section from (`type_hollow_section`); a column drawn as its type's I section the six entries of the I section (`type_i_section`), with `instance_transform` for the plan angle of its X axis; - a pipe drawn from its connector entries lists the two entries whose points are its ends (`pipe_connectors`). At a connected end the entry is keyed by the element connected there, so a part's `element_id` may be a neighbouring fitting, not the pipe (RE-131). Opt-in as before: nothing is noted unless the table is asked for, so the IFC and the default diagnostics are not changed. ## Changes - `partition_room_boundaries::{outline_of_solids_at, resolved_outline_of_solids_at}`: the same readers, also giving, when asked, the headers of the solids that gave the outline. `attach_room_outlines` notes them (rule `frame`: only the room's own partition is read, its solids in other partitions are not compared). No new pass. - `partition_type_parameters`: `scan_partition_length_places`, `type_i_sections_at`, `type_named_lengths_at` and `type_lengths_at` give the offset of the first copy of each entry the same pass reads, kept only when asked (`want_places`); `note_parameter_source` builds the source for an element from its type's entries. `attach_column_sections` and `attach_beam_sections` call it where they attach the section. `I_SECTION_PARAMETERS` is the one list of the I section's parameters. `VALUE_BLOCK_MARK` is public for the test. - `partition_pipe_axes::connector_points` also gives the offset of each kept entry, only when asked; `scan_pipe_bodies` notes the two entries that are the first body's ends, for the bodies that agree across partitions. - `element_provenance`: `body_readers` for `family_type_hollow_section`, `family_type_i_section` and `partition_pipe_axis` (each with the frame for the box the section or radius is held to), `profile_readers` for a room outline, and the new readers in `PROFILE_FRAME_READERS`, so an element with one is `selected_frame`, not `selected_frame_box`. - MCP: `ValueSourceOut` doc comments list the new readers and the rule `frame`. **An MCP tool's output description changed, so `docs/mcp-tools.json` and `docs/mcp-tools.md` need CI's `mcp-tools` artifact; I did not edit them.** - `docs/export-diagnostics.md` (a row for each reader, the remaining list), the schema description and `changelog.d/added/1368-value-sources-part2.md`. - `tests/value_sources_offsets.rs`, each new part re-read by what it is, and as a set: - a room's solid is the room's id and the solid's tag, and read again (`room_outline_at`, or `resolved_outline_of_solids` with the kind its profile source names) it gives an outline with the vertex count the room holds; - a type's parameter entry is `f64`, `ff` x 8 and an `i64`, in the value block of the nearest mark whose owner is declared (as the reader's blocks are) and is the type. An I section's parts are the six expected parameter ids, distinct; a hollow section's are four distinct entries whose parameters the `ParamElemFamily` elements caption `b`, `Ht`, `t` and `kr`; - a pipe's entry is the keyed element's `u64`, an index of at most 255, the `u32` 1 and a point; the two parts are distinct and their points make a cylinder with the pipe's record box (`pipe_body`). - Pinned in `MIN_READERS`: `room_solid_faces`, `type_hollow_section` and `pipe_connectors` on the office, `room_solid_faces` on Core Interior, `pipe_connectors` on RE1 Mechanical and Plumbing. ## Measured (final head af26e4d, runs 41890988954 and 41890994176) - Flag off (41890988954): the IFC and `diagnostics.json` are byte-identical to main's (208e8c5) on Core Interior, the office, RE1 Mechanical and RE1 Plumbing. Flag on (41890994176): the IFC hash equals main's on all four. The earlier head 9878143 (runs 41887783776 and 41887789579) gave the same. - Counts with the flag on (rules: `room_solid_faces` is `frame`; `type_hollow_section` and `pipe_connectors` are `agreeing`): | | before (main) | now | | --- | --- | --- | | Core Interior | selected_frame_box 116 | room_solid_faces 116; no selected_frame_box | | Office | selected_frame_box 234 | room_solid_faces 234, type_hollow_section 79, pipe_connectors 12; no selected_frame_box | | RE1 Mechanical | no pipe source | pipe_connectors 6 | | RE1 Plumbing | no pipe source | pipe_connectors 63 | `type_i_section` appears on none of the four: no element has the I section body, so that reader is untested on real files (the docs say so). No source has the rule `current`. The `type_section` counts (176 on Core Interior, 1 on the office) are #1370's, for the columns whose `profile_source` is `family_type_symbol_envelope`, unchanged here. - Table size, from run 41890994176's `diagnostics.json` (compact JSON of `decoded.element_provenance`; main measured in the same run). The docs and changelog fragments carry these figures. | | main | this PR | | --- | --- | --- | | Office, table compact | 6,131,584 | 6,202,130 (+1.2%; 160.5 times the 38,640-byte diagnostics) | | Office, pretty sidecar | 10,927,629 | 11,098,081 (211 times the 52,677-byte flag-off sidecar) | | Core Interior, table compact | 718,828 | 733,326 (+2.0%; 35.7 times the 20,563-byte diagnostics) | | Core Interior, pretty sidecar | 1,511,498 | 1,549,080 (56 times the 27,588-byte flag-off sidecar) | | RE1 Mechanical, compact / pretty | 41,824 / 87,442 | 43,745 / 91,938 | | RE1 Plumbing, compact / pretty | 51,675 / 101,270 | 71,361 / 147,585 | Since #1360 (5,987,841 and 440,909 bytes compact on the office and Core Interior) the value sources of #1368 add 3.6% and 66%. ## Still without a source (#1368 stays open) - `partition_area_boundary_lines`: left for last, as #1371 rewrites the Area readers. - `partition_roof_slope` and `partition_roof_extrusion`: each is made of several readers (edge slopes, arrow heights, fascia depth, rafter cuts; sketch lines, arcs and splines) keyed by sketch line and mapped to the roof, which is its own change; not started here. - `family_extrusions`: drawn from the family's own document (`FormDocument`), not from an instance's native record, so its records are the document's; a different mechanism, not started here. - The I section of a beam (`BEAM_AXIS` body), a wall's layers and a rectangular column's sides have no source either; they are values of bodies that already have other sources. ## Testing Nothing was built or run locally (lane rule: CI and Measure are the build); the results below are CI's and Measure's. - [x] `cargo fmt --all -- --check`, `tools/release/changelog.py check` and `tools/ci/api-doc-ids.py` were run locally and are clean; clippy, rustdoc and the build are CI's. - [x] Final head af26e4d, filtered Measure on `core-interior`, `nordic-office-as-built`, `re1-mechanical` and `re1-plumbing`: plain run 41890988954 and `--element-provenance` run 41890994176 are green and read above. - CI on 6c1799b (af26e4d plus the watcher's MCP contract commit; run 41891745041) passed in full, including Corpus health, which runs `tests/value_sources_offsets.rs` with the new part checks on Core Interior, the RE1 models and the office. The commit after it changes docs and doc-comment figures only. ## Audit-honesty checklist - [x] README / docs reflect the current state after this PR - [x] Changelog fragment `changelog.d/added/1368-value-sources-part2.md` - [x] Limitations documented in the PR body and in code - [x] No emojis, no private paths in committed files - [ ] Reverse-engineering finding: N/A Limitations, stated: - Which copy is the right one is not measured. A type parameter entry is the first copy found; every copy holds the same value (a parameter two partitions disagree on, or whose value block holds two values, is skipped by the reader and leaves no section), so `agreeing` there means the values agree, not that the copies are the same bytes. - A room's source is `frame`: its solids in other partitions are not read. A room none of whose solids closes has no outline and no source. - A pipe's connector entries are in the partition of the pipe's record; where its body came from two partitions the first is listed, and they agree. An entry is listed because its point is the pipe's end, not because it belongs to the pipe. - The hollow and I section sources do not cover the box the section is compared to: that is the element's `selected_frame`, listed beside them.
DrunkOnJava
added a commit
that referenced
this pull request
Nov 4, 2026
…that do not list readers (#1375) (#1378) ## Summary The provenance table's size is stated once, in `docs/export-diagnostics.md` ("Provenance table size"), with the run that measured it. Every other place links to it and states no number. The MCP `ValueSourceOut` and `SourcePartOut` descriptions describe the fields and point to `docs/export-diagnostics.md` for the readers and rules, without naming a reader. Docs and doc comments only: no code changes, so no Measure is needed and the default export cannot move. ## Motivation Closes #1375. Every value-source PR on 2026-11-04 (#1364, #1370, #1373) needed an extra commit and a full CI round, for two reasons that are churn rather than content: the size figures sat in seven places, and the MCP descriptions listed the readers, so each new reader drifted `docs/mcp-tools.json`. ## Changes - `docs/export-diagnostics.md`: a new section, "Provenance table size", with one table (office, Core Interior, RE1 Mechanical and Plumbing: diagnostics, table and sidecar sizes and their ratios) from Measure run 41890994176. The CLI section, the export-decisions paragraph and the schema table now link to it. - `docs/mcp.md`, `docs/python.md`, `docs/schemas/export-diagnostics.schema.json` and the doc comments of `src/ifc/element_provenance.rs`, `export_pipeline.rs` and `mod.rs` link to it and state no number. Changelog fragments of unreleased work keep their own figure. - `rvt-mcp/src/schema.rs`: `ValueSourceOut` and `SourcePartOut` describe each field generically and refer to `docs/export-diagnostics.md`, "Value sources", for the readers, the rules and what each source's `parts` are. `docs/schemas/export-diagnostics.schema.json` does the same for its `reader`, `parts`, `offset`, `partitions` and `differs_from_frame` descriptions (its `rule` keeps its enum). - **An MCP tool's output descriptions changed, so `docs/mcp-tools.json` and `docs/mcp-tools.md` need CI's `mcp-tools` artifact; I did not edit them.** This is the last time a reader changes them. ## Testing Nothing was built or run locally (lane rule: CI is the build). - [x] `cargo fmt --all -- --check`, `tools/release/changelog.py check`, `tools/ci/api-doc-ids.py` and `tools/ci/render-mcp-tools.py --check` were run locally and are clean; the schema JSON parses. - [ ] `tool_contract_is_committed` fails on this head until the watcher commits the server's contract; that commit is the one expected change of the contract. NOT MEASURED until then. - [x] No figure outside the new table: `grep` for the table's byte counts and ratios over `docs/`, `src/`, `rvt-mcp/` and `python/` finds only the table. ## Audit-honesty checklist - [x] README / docs reflect the current state after this PR - [x] Changelog fragment: none, since nothing user-visible changes - [x] Limitations documented in the PR body - [x] No emojis, no private paths in committed files - [ ] Reverse-engineering finding: N/A Limitation: the diagnostics schema's `rule` description still names the five rules, because the property is an enum; a new rule changes the enum and so the schema anyway.
DrunkOnJava
added a commit
that referenced
this pull request
Nov 4, 2026
…n extrusion (#1368) (#1379) ## Summary Part 3 of #1368; Refs #1368 (it stays open for the rows listed below). Under `--element-provenance`: - a roof drawn from its slopes (`partition_roof_slope`) lists the slope block of each sketch line the slope was made from (`roof_slope_edges`: the defining edges, or the slope arrow and the boundary lines it rises from), those lines' own data (`roof_line_data`), its fascia depth and rafter cut where they were read (`roof_fascia_depth`, `roof_rafter_cut`) and the layers of its type that give its thickness (`roof_type_layers`), beside the outline (`sketch_lines`, `sketch_list`) and the box (`selected_frame`) it already listed; - a roof drawn from an extrusion (`partition_roof_extrusion`) lists the first frame of each of its sketch lines (`sketch_lines`, rule `frame`: the other frames are not compared), their data (`roof_line_data`), its Sketch's curve list (`sketch_list`) and `roof_type_layers`. Opt-in as before: nothing is noted unless the table is asked for, so the IFC and the default diagnostics are not changed. ## Changes - Each owner map is built where the roof reader already resolves its sketch, with no new pass: `attach_roof_slopes` (the lines of `defining`, `sloped_by_arrow` and `sloped_by_arrows`) and `attach_extrusion_roofs` (`lines_of`). `note_line_source` joins the notes the line scans made, by line id, into one source of the roof, one part per line. - The scans that read the blocks note their choice where they make it, through a new `CopyTrail`: `scan_edge_slopes` (`edge_slope`), `scan_arrow_heights` (`arrow_heights`), `scan_fascia_depths` (`roof_fascia_depth`, keyed by the roof) and `scan_type_layers` (`type_layers`, keyed by the type and attributed to each roof of it with `attribute_value_source`, as for a stair run's type). `scan_rafter_cuts` notes the roof's native record through `Options::value_source` and takes the note back for a roof that gave no cut. - `element_provenance`: `body_readers` for `partition_roof_slope` and `partition_roof_extrusion`; `CopyTrail`. - `tests/value_sources_offsets.rs`: both rows are `Recorded` (`roof_slope_edges`; `roof_line_data`). A roof's slope block is read again and must decode to a slope or a slope arrow (`edge_slope_in`, `arrow_heights`); its sketch line to a line, an arc, a circle, a curve or a spline; its type's layers are an element-data header and the type's id. A new test reads puzzbobb's Revit 2025 models (`RVT_R2025_DIR`): `MIN_READERS` pins `02_1Slope` and `05_1Slope_ArrowDefined` (roof_slope_edges, roof_line_data, roof_type_layers) and `11_RoofByExtrusion` (sketch_lines, roof_line_data, roof_type_layers) by name, the models must be in the set, and the set together must have sources from `R2025_READERS`. - `.github/workflows/ci.yml`: Corpus health restores puzzbobb's models from the Actions cache under the key Measure uses for them (`r2025-<hash of research/r2025-models.tsv and tools/ci/fetch-r2025-models.sh>`), fetches them with `tools/ci/fetch-r2025-models.sh` on a miss, and saves them on main. An unreachable host leaves `RVT_R2025_DIR` unset and the target skips; an archive that no longer matches its pin fails the job. This was not asked for: the brief asked for a Measure pair with `-f r2025=true`, but no model of the CI gate has a roof drawn from these readers (the `value-sources` report of run 41891745041 shows no `partition_roof_slope`, `partition_roof_extrusion` or `family_extrusions` body on Core Interior, RE1, Einhoven or the office), and Measure does not run the test. Without these models the new parts are read by nothing. - `docs/export-diagnostics.md` (a row for each reader, the remaining list, the Revit 2025 models), `changelog.d/added/1368-value-sources-roofs.md`. - No MCP edits: the reader names in `rvt-mcp/src/schema.rs` were removed by #1378, which this branch merged (a signed merge of `origin/main`), so the contract does not move. - `docs/export-diagnostics.md`: the one size table gains three Revit 2025 rows (run 41902619175); the first four rows are unchanged. ## Still without a source (#1368 stays open) - `partition_area_boundary_lines`: waits for #1371, which rewrites the Area readers. - `family_extrusions`: drawn from the family's own document (`FormDocument`), not from an instance's native record; last. ## Testing Nothing was built or run locally (lane rule: CI and Measure are the build); the results are CI's and Measure's, read at head fff508e (CI run 41902701866) and the runs below. - [x] `cargo fmt --all -- --check`, `tools/release/changelog.py check`, `tools/ci/api-doc-ids.py` and `tools/ci/render-mcp-tools.py --check` were clean locally, also after the merge of main. `yaml.safe_load` was not available; `actionlint` parses `ci.yml` and reports only the seven existing `uses: $/.github/actions/fetch-corpus` errors, none in the new steps. - [x] Corpus health passed on its first run on this change. `r2025_value_sources_name_the_copy_the_reader_took` ran on all 24 Revit 2025 models (and the pins in `MIN_READERS`, `R2025_READERS` and the existence of the pinned models held), and every report line reads "re-read and confirmed" in full: for example 02_1Slope 13 of 13 sources and 7 of 7 records, 11_RoofByExtrusion 11 of 11 and 3 of 3, 13_Rooms_Stairs 37 of 37 and 10 of 10, which reads the 2025 stair sources of #1370 (`native_run`, `native_run_type`) for the first time. No fix was needed. - [x] Filtered Measure, 26 models (`core-interior`, `nordic-office-as-built`, 24 `r2025-*`), head fff508e against main 29a715d: flag off (run 41902614550) the IFC and `diagnostics.json` are byte-identical to main's on all 26; flag on (run 41902619175) the IFC hash equals main's on all 26. Every Revit 2025 model with a roof drawn from its slopes lists `roof_slope_edges`, `roof_line_data`, `roof_type_layers`, `roof_fascia_depth` and `roof_rafter_cut`; `11_RoofByExtrusion` lists `sketch_lines`, `roof_line_data` and `roof_type_layers`. Core Interior and the office have none, and their flag-on tables are byte-identical to main's. - **Corpus health cost.** The job took 13.9 min on this head against 7.2 (#1373) and 8.3 min (#1378) on recent green PR runs and 8.3 and 9.4 min on pushes to main, but 6.9 min of it was the existing step "Fetch the Revit 2025 oracle (Drshelden/IFC-ECS RE1, MIT)", 3 s in the other runs: a slow download unrelated to this change. What this change adds: restoring the R2025 cache and the fetch step took 1 s (a cache hit: Measure saved it on main); "Tier-two gates" took 4.4 min, the same as #1373's 4.4 min (5.8 min on the push to main that merged it); the new test took 8.4 s, in parallel with the others (the office test, 26.8 s, ends the step). So it adds no measurable time on a hit, and it stays in Corpus health. A cache miss was not measured (every run found the cache): it downloads three archives of 26 MB in all and extracts them, seconds at the runner's rate, and the cache is saved on main. ## Audit-honesty checklist - [x] README / docs reflect the current state after this PR - [x] Changelog fragment `changelog.d/added/1368-value-sources-roofs.md` - [x] Limitations documented in the PR body and in code - [x] No emojis, no private paths in committed files - [ ] Reverse-engineering finding: N/A Limitations, stated: - `roof_slope_edges` and `roof_line_data` list the sketch lines the slope was made from; the roof's box (its height and plan centre) is the element's `selected_frame`. The thickness is the type's layers, whose copies agree (a type whose copies differ is dropped by the reader). - `edge_slope`, `arrow_heights` and `type_layers` are `agreeing` because a line or type whose copies disagree is dropped by its reader; `roof_line_data` is `current` where a line's copy was chosen as the current partition's (RE-216). - The `sketch_lines` source of a roof by extrusion is `frame`: the first frame of each line by frame order, as the roof reader keeps it, without comparing the others. - A roof whose body is its box (a slope that does not reproduce its box) gets none of these sources: the sources are listed only where the final `BodySource` is drawn from them.
DrunkOnJava
added a commit
that referenced
this pull request
Nov 5, 2026
…e balanced legs on a faster WASM build (#1394, #1374) (#1395) ## Summary The viewer's Playwright suite becomes part of `CI passed`: `viewer-test.yml` is a reusable workflow that `ci.yml` calls as its `viewer` job in the full set, listed in `ci-ok`'s `needs`. A pull request cannot merge before the suite has passed on its head. Deploy viewer loses its `pull_request` trigger; on a push to main it builds and publishes the site and runs the suite and the saved-mesh measurement again on the release WASM it publishes, and its deploy job waits for both and for `CI passed`. ## Motivation Pull requests merge on `full / CI passed` alone, and the suite ran in Deploy viewer's pull-request run, which `CI passed` does not wait for. #1370 merged before that run had finished (skipped as a draft, then cancelled by a later push), and Deploy viewer went red on main (#1374). The maintainer's `arm.sh` checks the viewer run only when a PR is armed, so a PR updated with main after arming could still merge before the viewer tests reran. Issue: #1394. ## Changes - `.github/workflows/viewer-test.yml` (new): the former Deploy viewer `build` job, with `workflow_call` and `workflow_dispatch` (a draft's viewer can still be checked by hand). Permissions: `contents: read`. Every action keeps its pinned SHA. The legs are a JSON input: ci.yml runs three, groups of spec files packed by length (`--shard` cuts in file order and put four 30-second Core Interior tests in one shard), and a first step that fails when a spec file is in no leg. The failure report artifact is now `playwright-report-<leg>` (three legs cannot share a name; nothing reads it by name); `viewer-saved-meshes-measurement` is unchanged. - `ci.yml`: job `viewer`, in the full set only, with `viewer-paths` before it, which skips the viewer for a pull request that changes nothing but documentation (the file list Deploy viewer's deploy step already uses, except `docs/viewer-demos.json` and `docs/support-matrix.json`, which the viewer is built from; an answer the API does not give runs the tests). Both are in `ci-ok`'s `needs`; a skipped job passes. It passes `release_wasm: false`. - The WASM for CI is built without LTO, at 16 codegen units: 55 s warm against 150 to 225 s for the release profile, and every leg waits for it. **This is a decision for the maintainer**: the suite in `CI passed` tests a different build from the one published. Deploy viewer therefore runs the suite and the measurement again on the release build before it deploys. `release_wasm: true` in `ci.yml` (one line) tests the release build in CI, at about 1 to 2 minutes more per leg (150 to 225 s of build against 82 to 126 s). - The saved-mesh measurement (12 minutes of every pull request's run) leaves `CI passed` for Deploy viewer. Its only gating assertion on the toggle, on Core Interior, stays in the suite (`saved-meshes-measure.spec.ts` runs its toggle test in the suite and its per-model sweep only with `RVT_VIEWER_MEASURE=1`); the per-model sweep (Core Interior, Einhoven, RE1 x 4, each on and off) is now post-merge only. - Playwright installs without `--with-deps`: its apt step added fonts only, and the mirror stalled on them for four minutes in two of three legs of one run. `RVT_VIEWER_FULLY_PARALLEL=1` (CI only) lets Playwright run tests of a file in parallel. gen-fixture is built beside the WASM, and the four RE1 models are cached on their pinned commit. - `deploy-viewer.yml`: no `pull_request` trigger; jobs `build`, `tests`, `measure`; `deploy` needs all three. - `RELEASE.md`, `CONTRIBUTING.md`, `docs/maintaining.md`, `docs/library.md`, `viewer/README.md`; `changelog.d/changed/1394-viewer-tests-in-ci-passed.md`. ## Testing Unit tests are banned in this repository; this is a workflow change, verified by running it. - [x] YAML parses (`ruby -ryaml`) on the four workflow files; `actionlint` reports the same 18 findings as on main, none new; file modes unchanged (the new file is 0644) - [x] `python3 tools/release/changelog.py check` and `tools/ci/api-doc-ids.py` pass - [x] This pull request's own full CI runs (below) pass, with the `viewer-paths` and `viewer` jobs in them. Deploy viewer dispatched on the branch (runs 41925472744, 41933471380, 41937570817): `build`, `tests` and `measure` pass and `deploy` is skipped, as it is off main. - N/A: no Revit files, exporter, or performance path is touched ## Timing Before this change a full CI run took 7.2 minutes (median of 11 recent runs, 5.9 to 9.2, first job start to last job end) and its longest job 6.7 (5.7 to 9.1). The viewer's job in Deploy viewer took 11.8 to 20.5 minutes (median 16.5, 12 runs): WASM build 230 s, demos 71 s, suite 377 s, measurement 218 s. Run to run, one runner's speed varies by a factor of two (the same Core Interior test took 26 s and 66 s). This pull request, full CI, first job start to last job end, and its viewer legs (minutes): | Run | Change | CI | Legs | |---|---|---:|---| | 41922224847 | one job split in three: two shards and the measurement | 13.1 | 12.4, 10.3, 6.4 | | 41925463765 | measurement out of CI, three shards, tests in parallel | 11.2 | 10.9, 10.6, 5.9 | | 41927452283 | Playwright without apt (it stalled 273 s) | 7.6 | 7.3, 6.3, 6.2 | | 41929893723 | four shards | 8.2 | 7.5, 7.2, 5.3, 4.8 | | 41931534840 | spec files in groups | 8.8 | 8.6, 5.2, 4.4 | | 41933470205 | WASM without LTO, cold cache, then warm | 5.9, 7.0 | 5.7, 5.3, 5.1; 6.8, 5.4, 4.8 | | 41935597082 | RE1 models cached | 7.3 | 6.1, 3.8, 3.5 | | 41936666251 | stop test to the second leg | 6.5, 7.3 | 4.7, 4.5, 4.3; 6.3, 4.0, 3.8 | The last two runs are the final workflow. In one the longest job was the Python wheel (6.5) and the viewer's longest leg 4.7; in the other the viewer's longest leg ran 6.3 minutes, starting 0.9 after the first job, and ended 0.9 after the longest other job (Python wheel, 5.7). So the viewer adds between 0 and about 1 minute to a full run, inside the variation between runs. What holds the legs now is the build every leg repeats (82 to 126 s) and the tests (106 to 180 s), whose longest single test is the 114-second toggle; the rest is runner speed and a queue of up to a minute and a half before a leg starts. ## Audit-honesty checklist - [x] README / docs reflect the current state after this PR - [x] A user-visible change has its entry as a fragment under `changelog.d/changed/` - [x] No emojis, private paths or personal addresses in committed files ## Breaking changes None. The required check is still `full / CI passed`. Deploy viewer's pull-request run no longer exists; nothing requires it by name. ## Related issues Closes #1394. Refs #1374.
2 tasks done
DrunkOnJava
added a commit
that referenced
this pull request
Nov 5, 2026
…dumps and Jev scores the diff (#1334) (#1419) ## Summary The advisory semantic merge check of #1334. Measure diffs the two sides' MCP dumps for each openly licensed model, and a `workflow_run` workflow gives the diff to Jev `jev-1.13.0` beside the pull request's own `## Summary` and `## Testing` and asks whether the export moves in a way they do not state specifically (Griffin, 2026-11-05: a described, intended change passes, an unexplained move fails; the main session, 2026-11-05: a move that only a general description such as "improves how walls are exported" covers fails too). The verdict is the check run `semantic diff (advisory)` on the commit Measure measured: not in the ruleset, no pull request comment, and a `fail` is a red check. Only a Measure run of every open model with a base on main writes it, it is written on the commit Measure measured and no other, and it cannot be a pass unless all 34 open models are compared in full and a same-repository pull request has that commit as its head. ## Motivation Measure is the byte-level oracle. A pull request that moves meaning should say so, specifically, before it is armed, not only show that bytes moved. The agent that makes a change also writes its Summary, so a sweeping Summary must not cover a change. Refs #1334. ## Changes - `tools/re/semantic_diff.py`: a pure function of two dumps. Elements added, removed and changed with the value before and after; byte offsets inside `provenance` dropped; order ignored; values compared to the dump's six decimals; an empty object or list the same as no field; identical changes collapsed by the whole (path, before, after) triple. Its `measure` mode is what the compare job runs: it fails the job on a dump in a model that is restricted or on neither list, and records in the manifest the open models no diff covers (`OPEN_MODEL_NAMES`, 34), each skipped model with its own reason, the groups dropped for size, and whether the run was asked for every open model (`--requested-all`). The measured commit and the base are the ones the compare job passes from the plan job's resolved refs (`--head-sha`, `--base-sha`); the `commit.txt` of a result folder is written by a shard job that runs the measured code and is read only when none is passed. - `tools/re/test_semantic_diff.py` and `tools/ci/test_jev_check.py`: failure-first tests of pure helpers, run in the PII guard job. The diff: 0.35 vs 0.3500001, a reorder with moved offsets, a bulk collapse that hides a different value, an uncovered model. The verdict logic: a model with no dump, a diff that failed, a dropped group, an unscored chunk or partial coverage never reads as a pass; an answer whose probabilities do not add up is refused; a chunk of non-ASCII text is never sent over the 16,000-character cap; a head commit that is not a 40-character SHA, a manifest with a non-string model, HTML and invisible characters in the pull request's text, and control characters in printed text. Each was checked to fail under the mutation it guards against. - `.github/workflows/measure.yml`: the compare job checks out the script, runs `measure` when there is a base, tells it whether the run was dispatched with no `models` filter and the office and Revit 2025 models on, and uploads `semantic-diff`. The documented command is `-f base=main -f nordic=true -f r2025=true` with no `models` filter. - `tools/ci/jev_check.py`: merges findings across models, chunks them (at most 8 findings, 16,000 characters as sent), reads the same-repository pull request whose head is the measured commit through the API, takes its `## Summary` and `## Testing` (HTML element tags and invisible characters removed, each cut at 2,500 characters as sent, all of it shown in the check's summary; text in angle brackets that is not an HTML element, such as `<set>.<property>`, stays), and asks Jev blind (labels A and B randomised per chunk; no model name, pull request number, title or branch in the state). Per finding Jev chooses: stated specifically / follows from a specific change they state / covered only by a general description / unstated / only rounding, a reordering or a spelling; "general" plus "unstated" is the finding's score, and the probabilities must add up to 1. A finding at 0.85 or more is a fail in a chunk rated 1.5 or more and a warn in one rated 1.0 or more. NOT MEASURED, never a pass, for no key, no same-repository pull request whose head is the measured commit (a fork's included, and an empty diff does not excuse it: the lookup is first), a check asked for on a commit other than the measured one (both commits in the title), a base that is missing or could not be checked, a pull request with no `## Summary` where the diff has findings, HTTP 402, a refused key, another model's reply, a time-out, an error (named by its type), no model compared, any open model not compared in full, a dropped group or a missing count, sampled property sets that one of a model's dumps alone holds too often (none held by both while either holds any, or more than a tenth of them), or an unscored chunk. A run whose base is not main or an ancestor of main writes no check, and names the base. The Jev call does not follow a redirect. An empty diff passes without a call and needs no Summary, but only on a complete run. - `.github/workflows/semantic-check.yml`: `workflow_run` on Measure (environment `jev`, main only), `workflow_dispatch` with a run id, and a keyless run on a pull request that changes the check. It scores only a Measure run whose event is `workflow_dispatch` and whose head repository is this repository, from `measure.yml` at that path; any other run posts nothing, with a notice. It writes the check on the commit the artifact names as measured, not on a pull request's live head. actionlint reports nothing on it and zizmor 1.32.0 reports nothing on it, `measure.yml` and `ci.yml` (the one `dangerous-triggers` finding, on `workflow_run`, is ignored inline with its reason). - `docs/maintaining.md` (where to find the verdict: it is on the measured commit, not necessarily the head, which the pull request page does not show, so look it up with `gh api repos/<repo>/commits/<sha>/check-runs?check_name=...`; a later commit does not clear a fail, only a new score of the same pull request does; a filtered Measure run writes no verdict, so a pull request that changes output needs its final unfiltered run; the Summary must state each change specifically: which classes, which property or geometry, how many where measured; a fail is fixed by changing the code or by stating the change in the Summary; a warn is answered in the body; the complete command; what a pass means: the dumps agree, not that the exports are identical, since the dump samples five elements per entity; what is sent, including element names and values that can hold an ElementId), a changelog fragment. ## Testing No local build (the lane runs no cargo); the tests above are the pure-helper exception and run in CI's PII guard job. End to end on real dumps: - [x] N/A for `tools/check-local.sh`: no Rust changed. - [x] Verified end to end on real Measure runs: see "Output samples". The keyed path (main's `workflow_run` job with the secret) is not yet exercised. ## Audit-honesty checklist - The keyed path cannot run before the workflow is on main: `environment: jev` takes only main, and a `workflow_run` workflow runs from the default branch. After the merge: `gh workflow run semantic-check.yml --ref main -f run_id=<a complete Measure run with a base>`. - The keyless path is exercised by this pull request's own run of the workflow, and it can only say NOT MEASURED: it writes on the pull request's head, which is never the commit Measure measured. At c36b71f (before the delta review) it did so with the wrong reason: Measure run 41987903774 (dispatched from this branch for #1425's head c8e55f5 against main 182ed21, `-f nordic=true -f r2025=true -f scorers=mcp_answers_vs_ifc`, no `models` filter) compared all 34 open models (0 skipped, 0 uncovered, `requested_all` true; findings only in the two office files, 7 each), and this workflow's run 41987854258 (attempt 2) wrote check run 127117767677 on c36b71f through `GITHUB_TOKEN` saying only "no Jev key", a check on a commit Measure had not measured. At b4d1932 such a check says "this check is for <the head>, but Measure measured <the other commit>" in its title (local scenario below; the CI proof is Measure run 41993282068 on #1425's head 722244e against main a4044dc, and this workflow's pull-request run after it: not yet measured on this head). Measure's own pull-request run 41987854320 covered 6 of 34 models and its compare step says "the semantic check writes no check run (this run was not asked for every open model)", the filtered path in a real run. An earlier pass of the keyless path (run 41966963563, attempt 2, on fd90cdc: no semantic difference in 6 models) predates the coverage rule and the commit check. - A pass means the dumps agree, not that the exports are identical: the dump samples five elements per entity, and a mesh vertex or a profile point is not in it. - The thresholds and the wording of the per-finding question were set on the in-sample cases below, so those cases are in-sample for them. The held-out round is the second table. Jev's answers move by about 0.02 between two calls with the same request (#1412's own Summary passes at 0.84 and fails at 0.86 on byte-identical requests, against a gate of 0.85), so a verdict within 0.05 of the gate is not stable. - B3 (a fork's run) and the redirect behaviour are tested by reading the code and the unit helpers, not by a fork's run: no fork pull request was opened. ## Breaking changes None. ## Output samples Everything below was scored with `tools/ci/jev_check.py` and `tools/re/semantic_diff.py` as committed at 49d5378, and the delta-review block below as committed at b4d1932 (which changes who may write a check, the gaps, and the stripping of HTML and invisible characters in the pull request's text; no prompt, threshold or chunking), and the key from the Keychain on this Mac, from the `semantic-diff` and `measure-*` artifacts of the Measure runs named. Nothing was scored with a threshold or a prompt other than the committed ones. **Ground truth is `ifc.sha256` per model**, not a pull request's title. Of 13 pull requests in the in-sample set (Core Interior, Einhoven, RE1 and the Revit 2025 models in every run; 34 models with the BIM4LCA office where `nordic` was on, 30 for #1402 and #1403 and 6 for #1398), the IFC differs on the two office files for #1388, #1400, #1401 and #1405 and on no model measured for the other nine. The semantic diff has findings on exactly those two models in each of those four runs, and none on any model whose IFC is identical, except the dump-only changes of #1373, #1379 and #1412. The documented command (no `models` filter) is what finds them: the earlier documented command, which filtered to Core Interior, Einhoven and RE1, reads "pass" on all four. **In-sample: the 7 pull requests whose diff is not empty** (runs 41972569847 #1388, 41972650013 #1400, 41972664107 #1401, 41972583508 #1405, 41972597118 #1373, 41972610208 #1379, 41972636527 #1412; each 34 models). "Own" is the pull request's real Summary and Testing. "Sweeping" is a one-line Summary that names an area and no kind of change ("Improves how walls and floors are exported." for #1388, "Improves how openings are written in the export." #1400, "Improves how walls are drawn in the export." #1401, "Improves how floors and walls are exported." #1405, "Improves how rooms, profiles and pipes are exported." #1373, "Improves how roofs are exported." #1379, "Improves the MCP server's answers." #1412), alone and beside the pull request's real Testing. "Wrong" is another pull request's full body: #1329 (a memory change that states the output does not change) and one other. The number in parentheses is the highest probability that Jev gave a finding as not stated specifically. | Pull request | Findings | Own | Sweeping alone | Sweeping + its Testing | Wrong: #1329 | Wrong: other | | --- | --- | --- | --- | --- | --- | --- | | #1388 | 7 | pass (0.31) | fail (0.99) | pass (0.74) | fail (0.99) | #1412: fail (0.95) | | #1400 | 14 | **fail (0.94)** | fail (0.99) | fail (0.98) | fail (0.98) | #1373: fail (1.00) | | #1401 | 12 | pass (0.63) | fail (1.00) | pass (0.77) | fail (0.96) | #1379: fail (1.00) | | #1405 | 2 | pass (0.51) | warn (0.99) | warn (0.90) | warn (0.96) | #1379: **pass (0.78)** | | #1373 | 88 | pass (0.63) | fail (1.00) | fail (0.99) | warn (0.97) | #1400: fail (1.00) | | #1379 | 94 | pass (0.24) | fail (0.99) | warn (0.90) | fail (0.96) | #1401: fail (1.00) | | #1412 | 23 | pass (0.84) | fail (1.00) | fail (0.89) | fail (0.99) | #1388: fail (1.00) | - **No sweeping Summary alone passes (0 of 7): 6 fail, 1 warns.** Beside the pull request's own Testing two pass (#1388 and #1401), because their Testing states the figures: that is the rule working, since a measured figure in Testing counts as stated. - **False positives: 1 of 22 expected passes, a fail.** The 22 are the 7 own Summaries, 6 jitter controls, 6 reordered controls and 3 empty-diff pull requests on complete runs (#1329, #1377, #1382: no finding on any model, IFC identical, each a pass without a call to Jev). #1402 and #1403 ran without the office, so under the new rule they write no check and are not counted. #1400 is a diff of 14 counters of the diagnostics, and the figure its Summary and Testing leave unstated is `parameter_value_count` +188 (office as built) and +174 (permit); its Motivation, which Jev is not given, gives 182. #1412's own Summary sits at the gate: the same request scored 0.84 (pass) at 4e81a95, 0.86 (fail) in one rescoring on this head's code and 0.84 (pass) in the table above, so it is a verdict the gate cannot hold; it could as well be counted a second false positive. - **False negatives: 1 of 21 expected non-passes** (7 sweeping alone, 7 with #1329's body, 7 with another's): #1405's whole diff is `total_entities` +8 on each office file, which a roofs Summary does not state (0.78, below the gate). - **Controls, complete** (all 34 models on both sides, one model changed; built from the dumps of run 41972569847): six jitter controls pass, a move of 1e-6 in every measurement of the sampled elements, the rooms' areas and the levels' elevations in Core Interior, RE1 architecture and mechanical, Einhoven, the office as built and a Revit 2025 model, scored beside #1329's body: highest probability 0.73 to 0.79, highest chunk rating 0.6 to 0.7, below the 1.0 rating gate; 412 findings in 65 chunks on the office. Six reordered controls (every row, set and room in another order, every byte offset shifted) are empty diffs. - **Coverage, on #1401's stored diff** (run 41972664107, own Summary), changing only the manifest: complete, **pass**; one model with no dump on the head side, **NOT MEASURED** naming it; one model whose diff failed, **NOT MEASURED** with that reason; a dropped group, **NOT MEASURED**; the same missing model with a run not asked for every open model, **no check run**; a manifest with a non-string model, an error and no check run. - **Unchanged by the review fixes:** 34 of 35 verdicts of the in-sample matrix are as scored at 4e81a95 (the one that moved is #1373 with #1329's body, fail to warn; both are non-passes), and #1401 and #1405 (the two the review asked for, runs 41972664107 and 41972583508) are unchanged in all five bodies. 18 of the 35 requests are byte-identical to the earlier scoring; the other 17 carry a Summary or Testing that is now cut by its length as sent (a newline or a quote in the text counts two, so a section over the cap is cut about 20 characters earlier), which is the review's cap fix and not a change of method. **Delta review (b4d1932).** Run on stored complete runs, with the key from the Keychain and real GitHub lookups, nothing posted: - Run 41972569847 (#1388's merge commit, base 240c7d7): the pull request is found through the API from the measured commit, the base is on main, Jev is asked with #1388's real Summary and Testing: **pass (7 findings in 34 models)**, as before. Run 41972583508 (#1405's merge commit): **pass (2 findings)**, as before. Run 41972664107 (#1401's head 2a35ede, which has since moved): NOT MEASURED, "no pull request of this repository has this commit as its head", the head-moved case in a real run; scored offline with #1401's real body the verdict is **pass**, and all five of its bodies give the verdicts of the table above (pass, fail, pass, fail, fail). #1388's five bodies and #1405's five are the same verdicts as the table, except #1405 with #1329's body, warn to fail (a non-pass either way, at a rating of 1.5). - Run 41987903774 (PR #1425's head c8e55f5 when measured): its head has since moved to 722244e, so the real-lookup scenario reads NOT MEASURED, "no pull request ... has this commit as its head". Asked to write on another commit (c36b71f), the same run reads NOT MEASURED with "this check is for c36b71f, but Measure measured c8e55f5". An empty diff on a merged pull request's commit (run 41980023307, #1358) is a pass; the same empty diff with a commit no pull request has is NOT MEASURED; a base that is the pull request's own head writes no check and names the base. - **Property sets held by one dump only** (`details_one_side`) are a gap per model only when none is held by both while either holds any, or when more than a tenth of all of them are held by one dump only (exactly a tenth is not a gap; main session, 2026-11-05). The dump samples the five lowest ElementIds of each entity, so a change that adds or removes elements of an entity moves the sample and a few are held by one dump only: that is not a defect, and the literal rule (any non-zero count) would have turned #1412's pass into NOT MEASURED. The defect it guards against is a head that lost its details. The check's summary says how many are held by one dump only, gap or not. On run 41972636527 (#1412, 1 of 115 sampled elements held by one dump only in each office file, no gap), scored offline with #1412's body three times: pass (0.84), fail (0.85), pass (0.83), all with no gap and the same chunk (a finding at the 0.85 gate, in a chunk rated 3.6), so its own Summary is a pass again, at the gate, and not a stable one. No other stored complete run has a non-zero count. **Held-out, thresholds and wording unchanged since they were set above.** Ten merged pull requests that were not used to set them, run with the same 34 models (`nordic` and `r2025` on): - #1337, #1352, #1356, #1372, #1341 and #1344 (Measure runs 41973688732, 41973701739, 41973714367, 41973727101, 41973740400, 41973754042): the IFC is identical on all 34 models and the dumps agree, so each has an empty diff and passes without a call to Jev, with its own Summary, a sweeping one, #1329's or another's alike. **They test the empty-diff path and nothing else**: none of their changes lands on an open model. - #1350, #1358, #1364 and #1370 (provenance and diagnostics additions; the IFC is identical on all 34 models in each, so these are dump-only changes), Measure runs 41980008692, 41980023307, 41980037727 and 41980053223, scored with the same four bodies per pull request (own Summary and Testing, a sweeping one-liner written before the runs finished, that line beside the real Testing, #1329's body, and another pull request's body). Scored first with `jev_check.py` as it was at 4e81a95 and again with the code of this head; nothing was changed after seeing a result, and the 20 verdicts are the same in both. | Pull request (run) | Findings | Own | Sweeping alone | Sweeping + its Testing | Wrong: #1329 | Wrong: other | | --- | --- | --- | --- | --- | --- | --- | | #1350 (41980008692) | 1034 in 142 chunks | **warn** (0.86, one chunk, rated 1.13) | fail (1.00) | fail (0.88) | fail (0.99) | #1358: **pass (0.84)** | | #1358 (41980023307) | 0 | pass, empty diff | pass, empty diff | pass, empty diff | pass, empty diff | pass, empty diff | | #1364 (41980037727) | 159 in 37 chunks | pass (0.14) | fail (1.00) | pass (0.60) | fail (0.97) | #1370: fail (0.92) | | #1370 (41980053223) | 98 in 16 chunks | **warn** (0.90, one chunk, rated 1.33) | fail (1.00) | fail (0.95) | fail (0.97) | #1350: **pass (0.21)** | The sweeping lines were "Improves what the export records about elements." (#1350), "Improves the diagnostics of the export." (#1358), "Improves what the export records about bodies." (#1364) and "Improves what the export records about profiles and stairs." (#1370). - **The held-out result is weaker than the in-sample one.** Real Summaries: 1 of 3 non-empty pull requests passes, 2 warn and none fail. Sweeping alone: 0 of 3 pass (all fail). #1329's body: 0 of 3 pass. Another pull request's body: 2 of 3 pass. With the empty diff counted, false positives are 2 warns (no fail) of 4 expected passes, and false negatives 2 of 9 expected non-passes. - **Why the two warns.** #1350 added fields to the dump's `summary.file` block (`layout_release`, `omitted_entries`, `partition_count`), which its Summary and Testing do not name: one chunk of 0.86 at a rating of 1.13, where a warn needs 0.85 and 1.0. #1370's warn is one chunk of `value_sources` parts of Core Interior's shading devices at 0.90, rated 1.33; a fail needs 1.5. Both are near their gates. - **The two cross-body passes are neighbours, not strangers.** #1350 (the provenance of every decoded element), #1358 (why an element was left out) and #1370 (value sources for profiles, stair runs and landings) all add provenance and diagnostics, so another's Summary covers part of the diff. They are counted as false negatives as defined. - **Run-to-run movement.** Jev's answers move by about 0.02 between two calls with the same request, and by more in the maximum of very many findings: with #1358's body on #1350 (1,034 findings) the highest scored 0.83, 0.97 and 0.84 in three scorings, only the middle one on a different grouping of the chunks (since reverted: a chunk is packed at full context). A verdict near a gate (0.85) is not stable. - **What it says about the thresholds.** On provenance and diagnostics additions Jev's probabilities for a change the pull request states sit near 0.9 where in-sample they sat at 0.2 to 0.8, so the 0.85 gate is close to the edge for real Summaries. A recalibration follow-up is warranted. #1314, #1316 and #1328 cannot be calibrated: their parents predate the server crate (71c0677), so Measure builds no `rvt-rs-mcp` there. ## Related issues Refs #1334
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
The provenance table (
--element-provenance) now names where the profile of a floor, slab, ceiling, column or box-bodied roof was read from, and the records a stair run and a landing slab were drawn from. A floor, slab, ceiling or roof lists the frame of each sketch line its profile was solved from (sketch_lines, withsketch_listfor the Sketch's curve list andsketch_line_datafor an outline read from the lines' own ends); a column lists its type symbol's frame (type_section); a stair run listsstair_run_lines,stair_run_ends,stair_run_typeandstair_run_base_cuts(a Revit 2025 run:native_runandnative_run_type); a landing slab listslanding_lines,native_landingandnative_landing_type. A value made of several records lists them inparts(at most 64;parts_left_outcounts the rest).value_source_countsalso counts, by reader, the elements whose copy was chosen as the current partition's. The IFC and the default diagnostics are not changed.Motivation
Closes #1368 (milestone 0.15.0). #1360 (#1364) left these readers
NotYet: on Core Interior 392 elements keptselected_frame_box(columns through their type section, floors and slabs, rooms) and 354 on the office, with the profile's copy unsourced.Changes
src/ifc/element_provenance.rs:SourcePartandValueSource::parts/parts_left_out(MAX_SOURCE_PARTS= 64),CopyRule::Frame(appended; the last frame of a record whose frames were not compared or do not agree),ValueSourceCount::current,profile_readers, andattach_value_sources, which attaches a noted source where the final model'sBodySourceorProfileSourceis drawn from that reader (a profile's sources only for a body drawn from the box or from that profile).selected_frame_boxstays unless asketch_linesortype_sectionsource is attached (asketch_listalone does not replace it).differs_from_frameof a profile's sketch lines is false when the Sketch's curve list has a copy in the frame's partition.partition_schema_mvp::slabs::sketch_plan_profiles(floors, slabs, ceilings, roofs): the frame of each line comes from theremappedrecords the solve is given;currentwhere a line's frames disagreed (RE-216).sketch_line_datajoins thesketch_line,sketch_curveandsketch_circlenotes Provenance: record the copy each body, profile and outline was drawn from, not only the selected frame #1360 made by line id.element_record_plan_profiles::scan_sketch_curve_lists: the Sketch's curve list is noted under the sketched element (sketch_list,agreeingorcurrent), after the filter that drops lists sharing a curve, so only a list that was used is a source.partition_schema_mvp::framing: the type symbol's frame, noted for each column that took its section from it (type_section:agreeingwith the partitions that hold a frame where every frame gives the same box, elseframe, the last).partition_stairs::scan_run_data(the one choke point forstair_run_lines,stair_run_ends,landing_lines) andscan_run_types(stair_run_type, noted once for the type with the partitions that held it and attributed to each run of it withRevitFile::attribute_value_source);native_run_base_cutsthroughOptions::value_source, taken back for a run whose record gave no cut (stair_run_base_cuts).native_stairs::native_runsandnative_landings_and_type_names: the run type's and the landing type's native records are attributed to the runs and landings that took values from them (native_run_type,native_landing_type), as apartsentry with the type's id; a Revit 2025 straight run's own record isnative_run.ElementProvenance.value_sourcesgainspartsandparts_left_out. An MCP tool's output changed, sodocs/mcp-tools.jsonanddocs/mcp-tools.mdneed CI'smcp-toolsartifact; I did not edit them (the watcher's commit 1e3e70c predates this push's doc-comment changes inrvt-mcp/src/schema.rs, so the contract drifts again).docs/export-diagnostics.md(rows for each new reader, the cap, the rule of a source made of parts, the remainingNotYetlist),docs/mcp.md,docs/schemas/export-diagnostics.schema.jsonand the changelog fragments (1368-value-sources-profiles.md, and the size figures in1325-element-provenance.md).tests/value_sources_offsets.rs: the stair run and landing rows areRecorded; every element whose profile is solved from sketch lines or is a type symbol's box must have a source from that profile's reader; each record inpartsis re-read by what it is (a frame has its element's id at its first bytes or, on a second-prologue frame, the id of the record that encloses it, found here from the bytes withpartition_record_chain; a sketch line's data is an element-data header and the line's own id; a run type or native type record starts with its id); a Sketch's curve list starts with the element-data header and names the sketched element atSKETCH_OWNER_OFFSET;differs_from_frameis checked againstpartsand the Sketch list.What is still without a source
partition_area_boundary_lines,family_type_hollow_section,family_type_i_section,partition_pipe_axis(RE1 Mechanical 6, Plumbing 63 elements),partition_roof_slope,partition_roof_extrusion,family_extrusions, a landing drawn as a tread's thickness (its stair's run types), and the values other than the body's (a wall's layers, a roof's slopes, the parameters of a type's section). An element of those bodies has no value source; that is not a claim that it read the frame. The docs list each. Every room keepsselected_frame_box: its outline is read from its solid's faces.The 47
The office has 13,021 entities with a
BodySourceagainst 12,974 distinct elements (the test prints both): entities that share an ElementId (the pieces of a floor) are one element and get one table entry, and 13,021 - 12,974 is the same 47 as #1364's 11,586 entities against 11,539 sources.Testing
Nothing was built or run locally (lane rule: CI and Measure are the build). Everything that needs a build is NOT MEASURED until the runs on this PR's head finish.
cargo fmt --all -- --check,tools/release/changelog.py checkandtools/ci/api-doc-ids.pywere run locally and are clean; clippy, rustdoc and the build are CI's.Done when:
tests/value_sources_offsets.rsfinds noNotYetrow forpartition_stair_run_sketchorpartition_landing_slab, requiressketch_linesandtype_sectionon Core Interior andstair_run_linesandlanding_lineson the office, and reads the bytes of every recorded part.Measure at 71c52eb (the docs-only commit 77f8c34 after it changes figures in docs and two doc comments): flag off (run 41882128191) the IFC hash and
diagnostics.jsonare byte-identical to main's oncore-interiorandnordic-office-as-built; flag on (run 41882133812) the IFC hash is identical to main's on both. Earlier head b5bd5f9 (runs 41875073137, 41875078758): the same, with the flag-off diagnostics sha256 1cae212e... for Core Interior (27,588 bytes) and 1238f7d0... for the office (52,677).Table size, from run 41882133812's
diagnostics.json(compact JSON ofdecoded.element_provenance; main measured in the same run). The docs and changelog fragments carry these figures.The office has 192 sources with
parts(1,494 parts listed; six sources hit the cap of 64, 100 parts left out); Core Interior 296 (3,890 parts, longest 57, none left out).value_source_countsat the final head. Core Interior: sketch_lines 100, sketch_list 100, sketch_line_data 20, type_section 176 (8 differing from their frame; no sketch source differs now that the Sketch list counts), selected_frame_box 116 (all rooms; 392 on main). Office: sketch_lines 119, sketch_list 119, sketch_line_data 17, type_section 1, stair_run_lines/ends/type/base_cuts 34 each, landing_lines 21, native_landing 22, native_landing_type 21, native_run 1, selected_frame_box 234 (all rooms; 354 on main). The rules on both models areselected,agreeingandnative;type_sectionisagreeingthroughout,frameappears nowhere.No source has the rule
currenton either model (nocurrentcount). That is weaker than "every copy set agrees": a set that disagreed and could not be resolved is dropped by its reader and leaves neither a source nor a count.Revit 2025 stairs (run 41882140063,
--element-provenance,r2025-13_Rooms_Stairstor2025-16_Rooms_Stairs_Monolithic, oneStairsRuneach): all 4 straight runs carry bothnative_run(rulenative, the run's record in the run's partition) andnative_run_type(parts: the run type's record, ids 2333 for models 13 to 15 and 2338 for 16, the same partition as the run);native_run_typeis listed only for a run whose body ispartition_stair_run_sketch, so each of the four was drawn and sourced. None of them is without a source. These models have noStairsLanding, so nonative_landingornative_landing_typeappears there. On the office (Revit 2024, run 41882133812): 35 runs, 34 withstair_run_lines,stair_run_ends,stair_run_typeandstair_run_base_cutsand the spiral withnative_run; 22 landings, 21 slabs withlanding_lines,native_landingandnative_landing_type, and the tread landing withnative_landingonly (its thickness is its stair's run types', which has no source). No run or landing is without a source (on main 34 runs and 21 landings were). These Revit 2025 and office stair counts come from the diagnostics;tests/value_sources_offsets.rsruns on the CI corpus, which has no 2025 stair model, so thenative_runandnative_run_typebytes are not re-read by it.Audit-honesty checklist
changelog.d/added/1368-value-sources-profiles.mdLimitations, stated:
currentisnative_document::current_partitions(RE-216); the test shows the bytes at the recorded place hold the element, not that the reader chose well. No CI model is known to exercisecurrentorbounded_arc.sketch_linessource lists the first of each line's frames by frame order, or the current partition's where they disagree;agreeingthere means no line's frames disagreed by the checkcurrent_sketch_recordsmakes. Atype_sectionsource is the last of the symbol's frames the column scan kept; its rule isagreeingonly where every frame gives the same box.tests/value_sources_offsets.rs.