Repository navigation
Closed
Labels
area:ciWork in the ci area.priority:P2Important quality, usability, or hardening work.type:featureNew product or library capability.
Description
Every PR that changes decoder output gets a semantic diff of its exports against main, scored blind by Jev (TypeSafe's judgment API). A change that moves meaning is then visible before the PR is armed, not only that bytes moved. Measure stays the byte-level oracle; this sits above it.
Decided (2026-11-04)
- Advisory check. The verdict is a check run on the PR's head commit, with the verdict in its summary. It is not a required check, and nothing is posted as a PR comment. Agents fix a
failbefore arming, and answer awarnin the PR body. Merging still waits only onfull / CI passed. - What Jev reads. Element-level diffs come only from openly licensed models: Core Interior, Einhoven, RE1 (MIT), the BIM4LCA office (CC BY-SA) and the Revit 2025 models (Apache-2.0). Autodesk's samples and the held-out, spent and BIMcollab models contribute counts only, and nothing of theirs is sent.
Design
- Extractor. The MCP server's semantic dump (MCP server: rvt-rs-mcp, a stateless stdio server over the decoded model (MCP 2026-07-28) #1324, Measure: score the MCP server's answers against the export and Revit's IFC #1327): every element's id, category, class, name, type, storey, phase where read, property sets, a geometry summary (body kind, bounding box, profile count, no vertices), trust markers and provenance (Provenance for every element: carrier, stream, record offset, class and release #1325 where available), plus the diagnostics. Measure runs it on both sides.
- It is deterministic: sorted output, floats at fixed precision, no timestamps.
- It is the same layer as the MCP answers, not a new copy.
- Normalizer (
tools/re/semantic_diff.py). It reads two dumps and writes one diff:- elements added, removed and changed, with before and after values;
- offsets that shift for unrelated reasons are dropped;
- identical bulk changes are collapsed into one line ("400 walls: +property X");
- per-category totals are included.
It writes the human-readable summary itself. It is a pure function of two JSON files, so a few fast tests of its failure modes are allowed (pure-helper exception): a cosmetic-looking change that is semantic (0.35 vs 0.3500001 ft), a reorder with no change, and a bulk collapse that hides a different value.
- Scoring. Jev answers yes/no, choice and rating questions with probabilities, and reads at most 16,000 characters per question.
- The diff is scored per chunk, by category or by finding, with neutral framing: "two decoders, labels A and B, randomised per run; is the meaning different, and how much would an importer notice?"
- The check's score is aggregated from the chunks' probabilities. Jev's findings are the normalizer's lines, each with Jev's probability attached.
- Model
jev-1.13.0is pinned, as the PR queue pins it.
- CI.
- The job that runs PR code (Measure's export) holds no secret.
- A separate job, triggered by
workflow_runon Measure's completion or as a later job that only downloads the dump artifacts, calls Jev withTYPESAFE_API_KEYand writes the check run on the PR head. - Fork PRs get no secret, and the check reports
NOT MEASURED. - Dumps are cached by content hash, with the same exclusions as the score cache (no held-out, spent or BIMcollab outputs).
- Cost. Jev is billed at $0.042 per million input tokens. A diff of a few hundred kilobytes costs well under a cent. The monthly credit running out (HTTP 402) reports
NOT MEASURED, never a pass.
Calibration
Score the recent output-changing PRs retroactively: #1314 (wall corners), #1316 (2015–2023 Areas), #1328 (rooms outside the export phase), and #1329 (byte-identical, so it should score as equivalent). Measure the false-positive rate before relying on the check.
Done when
- The check runs on an output-changing PR from a Measure run with base=main.
- It scores the calibration set as expected.
- Its inputs never include a held-out, spent, BIMcollab or Autodesk sample element.
Depends on #1324 (the server) and #1331 (the shared export pipeline). Refs #1327.
Metadata
Metadata
Assignees
Labels
area:ciWork in the ci area.priority:P2Important quality, usability, or hardening work.type:featureNew product or library capability.
Activity
ci(measure): score the MCP server's answers against the same run's ex…
feat(ci): the semantic check asks whether a difference is more than r…
feat(ci): the semantic check gives Jev the pull request's Summary and…
docs(ci): the scorer's docstring points at the calibration instead of…
feat(ci): a general description covers no change; Jev also reads the …
fix(ci): the scorer makes no request for a head commit that is not a …
fix(ci): the semantic check cannot pass on a skipped model, a fork's …
fix(ci): a chunk is packed at full context; only a chunk of one findi…
docs(maintaining): the semantic verdict is on the measured commit, no…
fix(ci): the semantic check writes a pass only on the commit Measure …
fix(ci): property sets held by one dump only are a gap when too many,…
feat(ci): the semantic merge check: Measure diffs the two sides' MCP …
fix(ci): an open holder comes before a closed pull request, a fork ne…
fix(ci): the semantic check finds the pull request a measured commit …
feat(ifc): Areas from Revit's plan topology, and on Revit 2025 to 2027 (
chore(release): prepare v0.16.0 (#1564)