Skip to content

feat(ci): the semantic merge check: Measure diffs the two sides' MCP dumps and Jev scores the diff (#1334) - #1419

Merged
DrunkOnJava merged 27 commits into
mainfrom
ci/semantic-diff-1334
Nov 5, 2026
Merged

DrunkOnJava merged 27 commits into
mainfrom
ci/semantic-diff-1334

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

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:

  • N/A for tools/check-local.sh: no Rust changed.
  • 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 fix(ifc): the diagnostics count the elements the IFC writes, and say how many pieces were folded (#1424) #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 , but Measure measured " in its title (local scenario below; the CI proof is Measure run 41993282068 on fix(ifc): the diagnostics count the elements the IFC writes, and say how many pieces were folded (#1424) #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 (fix(mcp): an element's level and the element lists are the ones the IFC export writes (#1327) #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)

Delta review (b4d1932). Run on stored complete runs, with the key from the Keychain and real GitHub lookups, nothing posted:

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):

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).

#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

…port and Revit's (#1327)

A scripted client with no language model (tools/re/mcp_client.py) starts the built rvt-rs-mcp, opens each model Measure exports and asks a fixed query set. tools/re/mcp_answers_vs_ifc.py checks the answers against the model's own IFC export (a difference ends its output with exit 1) and against Revit's export with the pairing and tolerances of the existing class sets, storeys, space profiles, property sets and quantities scorers. Measure builds the server only when it scores it, keeps the count lines of the held-out models, and uploads each model's answers as a deterministic dump for the semantic merge check (#1334).
…t attribute and the type objects as checks of their own (#1327)

The diagnostics do not count an IFCOPENINGELEMENT as a building element (RE-84) while the summary lists it as a row, so the comparison with building_elements leaves the openings out and counts them on a line. A single disagreeing attribute (a room's name in list_elements) no longer hides the elements, ids, predefined types and storeys that agree, and the type objects' presence and their sets are separate checks.
…d the type object's entity and name (#1327)

The writer gives an IfcSpace the room number as Name and the room name as LongName, and a type object an entity and a Name of its own. The scorer compares each with the answers' fields, and accepts an absent name only where the IFC Name is the exporter's own <Revit class>-<ElementId> placeholder.
…and entity names, a crash shows in the summary, and the dump is for open models (#1327)

Review of the scorer: Report.line raises on anything but words written with W() and integers or IFC entity names as values, so a name or an id cannot reach the lines kept for restricted models; the dump is written for the openly licensed models only; the scrub keeps the exit line and the run summary reports a model with no verdict as such; a PASS names the checks that were not measured; a server that does not build leaves the step NOT MEASURED without failing the Build step or poisoning the binary cache; the client times discovery out on its own, turns a broken pipe into NOT MEASURED and samples the five lowest ElementIds of each entity; a room's number must be the IFC Name, a repeated IFC GlobalId is a failure, and the placeholder is matched as <class>-<ElementId>. Docs and the changelog fragment say what consistency can and cannot catch and restate the measured claims by run and head.
…ements' bodies from its summary (#1327)

The diagnostics count the further pieces of an element of separate loops as exported, the IFC does not write them as elements. When the summary lists them apart (elements.folded_into_bodies), the comparison of its counts with the diagnostics adds them back; without the field nothing is added.
…eck (#1327)

A family instance written as a space has neither a room number nor a room name and keeps its Family:Type:ElementId model name, which the IFC Name is and the row gives. The room check expected the <class>-<ElementId> placeholder of it, a false failure on 44 spaces of each BIM4LCA office file; it now expects the row's name, and the placeholder only where the row has none.
…iff as an advisory check (#1334)

tools/re/semantic_diff.py is a pure function of two dumps: elements added,
removed and changed with the value before and after, byte offsets that moved
for unrelated reasons dropped, order ignored, values compared exactly, and
identical changes collapsed by the whole (path, before, after) triple so a
bulk change never hides a different value. Measure's compare job runs it per
openly licensed model with a dump on both sides, asserts that no restricted
model holds a dump, and uploads the `semantic-diff` artifact.

The Semantic check workflow (workflow_run on Measure, environment jev, main
only) scores the artifact with Jev jev-1.13.0 in chunks of at most 16,000
characters, with labels A and B randomised per chunk and no model name, id or
direction in the question, and writes the `semantic diff (advisory)` check run
on the measured commit. Forks, a missing key, HTTP 402, a refused key, another
model's reply and time-outs report NOT MEASURED. No pull request comment.

Refs #1334
# Conflicts:
#	.github/workflows/measure.yml
…ounding, scores up to 150 chunks, and is documented (#1334)

The per-finding question was "do A and B state different facts": Jev answered
0.5 to 0.93 for a move of 1e-6 in every measurement of Core Interior, RE1,
Einhoven, the office and a Revit 2025 model, which is a difference and not a
change an importer sees. Asked whether the difference is more than rounding,
a reordering or a spelling of the same fact, it answered 0.06 to 0.34 for the
same chunks and 0.75 to 0.98 for the real differences of a server fix. The
chunk cap rises to 150 so a large diff is scored, a pull request that changes
the check writes its keyless check run on itself, and docs/maintaining.md
says how an agent treats a warn and a fail.

Refs #1334
… asks whether the export moves in a way it does not state (#1334)

Griffin, 2026-11-05: a fail is an unstated change. The scoring job finds the
same-repository pull request whose head is the measured commit through the
API, takes its `## Summary` (cut at 2,500 characters, comments removed), and
passes it beside each chunk as quoted state, with a fixed sentence in the
situation and in every question that the description cannot change what is
asked. The per-finding question is a choice among stated, implied by a stated
change, unstated, and only rounding, a reordering or a spelling; the labels
A and B stay randomised. A fork, no pull request, and a pull request with no
Summary where the diff has findings are NOT MEASURED, never a pass; an empty
diff passes without needing one. A finding at 0.85 unstated is a fail in a
chunk rated 1.5 or more and a warn in one rated 1.0 or more. The summary and
docs/maintaining.md say that a pass means the dumps agree, not that the exports
are identical, since the dump samples five elements per entity.

Refs #1334
…pull request's Testing section (#1334)

The agent that makes a change also writes its Summary, so "changes how walls
are drawn" could cover any wall movement, a mistake included. The per-finding
question is now one of: stated specifically (the element class or category and
the kind of change, or the figure), a figure that follows from a specific
change, covered only by a general description, unstated, or only rounding, a
reordering or a spelling. A general description counts as unstated, with the
same gates (a fail at 0.85 in a chunk rated 1.5, a warn at 1.0). The `##
Testing` section goes beside the Summary with the same quoting and cap, so a
measured figure counts as stated.

Two things the first calibration showed. A figure of the diagnostics or the
summary that counts the elements is now asked with the largest differences in
the elements beside it and a short gloss of what a known counter counts. A
change to a list of text lines is shown by the lines that differ: the first
form cut a list at 100 characters and hid the one line a pull request had
added, which is the thing its Summary stated. A log line whose words did not
change and only its figures did is listed and not asked about.

The check's summary says on a fail or a warn that a Summary must state each
change specifically, and docs/maintaining.md says what that means.

Refs #1334
@DrunkOnJava DrunkOnJava added the ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes label Nov 5, 2026
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 5, 2026 06:31
@DrunkOnJava DrunkOnJava removed the ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes label Nov 5, 2026
…40-character SHA (#1334)

The head commit comes from the artifact's manifest, which the measure.yml of
the dispatched ref wrote, and went into the `commits/{sha}/pulls` URL and the
check run unvalidated. It must now match ^[0-9a-f]{40}$ (from --head-sha or the
manifest), and so must the manifest's base commit that the summary prints;
anything else is NOT MEASURED with a reason, no pull request lookup and no check
run. --repo must be owner/name.

Refs #1334
…run or a partial run (#1334)

Review findings of #1419, all of them ways the check reported a pass it should
not.

- A model whose dump is missing or whose diff failed is no longer skipped
  silently: any open model that is not compared in full (against
  semantic_diff.OPEN_MODEL_NAMES, from this checkout and not from the artifact),
  a skipped model, a group of changes dropped for size and an unscored chunk
  make the verdict NOT MEASURED at best, with each model and its own reason in
  the summary. A warn or a fail found in what was scored stays.
- Only a Measure run dispatched in this repository is scored, and the check is
  written on the commit the artifact names as measured, found again through the
  API as the head of a same-repository pull request, not on a pull request's live
  head. A fork's run posts nothing.
- Only a run that was asked for every open model (no models filter, the office
  and the Revit 2025 models on) writes a check; a filtered run writes none and
  says why in its step summary. The documented command is the complete one.
- The Jev call does not follow a redirect; an incomplete read, a manifest with a
  non-string model and any error in the scoring are NOT MEASURED, named by type;
  the 16,000-character cap is enforced on what is sent, counting a character
  outside ASCII as the six it takes; a choice whose probabilities do not add up
  is refused; the pull request's text loses HTML tags and invisible characters
  and all of it is shown in the check's summary; an open pull request is
  preferred; text from the artifact is cleaned of control characters before it
  is printed.
- Docs and docstrings say values are compared to the dump's six decimals and
  that element names and values, which can hold an ElementId, are sent.
- Failure-first tests of the verdict logic run in the PII guard job.

Refs #1334
…ng may be shortened to fit (#1334)

The size ladder of the previous commit let the packing loop add a finding to a
chunk by shortening the context of all of them, which regrouped 4 of 142 chunks
of a held-out diff against the scoring at 4e81a95. The loop now tests the full
body, so a chunk that does not fit is split as before, and a chunk of a single
finding is the only one that is shortened.

Refs #1334
…t necessarily the head (#1334)

A pull request's page and its checks list show only the head's checks, so a
fail on the measured commit can sit unseen once the pull request moves on. Say
where to look it up, that a later commit does not clear it, and that a filtered
Measure run writes no verdict, so a pull request that changes output needs its
final unfiltered run. The docs no longer name the local arming script.

Refs #1334
@DrunkOnJava DrunkOnJava added the ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes label Nov 5, 2026
…measured, behind a pull request and a base on main (#1334)

Delta review of #1419.

- A check written on a commit other than the measured one (the keyless run of a
  pull request that changes the check passes its head) is NOT MEASURED, with
  both commits in the title; a pass could land on a commit Measure never ran.
- The same-repository pull request whose head is the measured commit is looked
  up first, always: an empty diff no longer passes on a fork's commit.
- The measured commit and the base are written in the compare job from the plan
  job's resolved refs; the commit.txt of a result folder comes from a shard job
  that runs the measured code.
- A run whose base is not main or an ancestor of main writes no check (a run
  against the pull request's own head scores an empty diff and would supersede
  an earlier fail on the commit); the base is named in the summary.
- Property sets only one dump holds, a missing dropped_groups and a missing
  coverage block are gaps, at best NOT MEASURED, never a zero.
- Only real HTML elements are stripped from the pull request's text:
  `<set>.<property>`, `Option<T>` and `<Revit class>-<ElementId>` stay. The
  variation selectors, fillers, combining grapheme joiner and Braille blank are
  removed with the other invisible characters.
- Failure-first tests of the three gates (0.85, 1.0, 1.5), the early verdicts,
  the gaps, the text helpers and the trusted commit.
- docs/maintaining.md: a NOT MEASURED check does not clear a fail, only a new
  pass or warn does; a moved head or another pull request's commit is NOT
  MEASURED for an empty diff too.

Refs #1334
… not when any (#1334)

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 property sets
are held by one dump only. Any non-zero count turned the pass of a change to the
export into NOT MEASURED (#1412: 1 of 115 in each office file). The defect it
guards against is a head that lost its details, so a model is a gap when none is
held by both while either holds any, or when more than a tenth of all of them
are held by one only (exactly a tenth is not). The check's summary says how many
are held by one dump only, gap or not.

Refs #1334
@DrunkOnJava DrunkOnJava removed the ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes label Nov 5, 2026
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) November 5, 2026 09:21
@DrunkOnJava
DrunkOnJava merged commit 4313e95 into main Nov 5, 2026
43 checks passed
@DrunkOnJava
DrunkOnJava deleted the ci/semantic-diff-1334 branch November 5, 2026 09:33
DrunkOnJava added a commit that referenced this pull request Nov 5, 2026
…is on when its head has moved on (#1334) (#1433)

## Summary

The semantic check wrote a verdict only when the measured commit was
still a pull request's head. A head moves on after Measure starts: the
MCP contract sync moves it within minutes on any PR that changes a tool
description, and the docs commit that records a run's figures moves it
again. So the check read NOT MEASURED on most of the PRs it exists for,
which nobody would notice, since NOT MEASURED does not block. It now
also takes the one open pull request that holds the commit.

## Motivation

Found on real data right after #1419 landed: `commits/f3c87e48/pulls`
returns #1432, open, with its head at `00bd7dd3`, which is `f3c87e48`
plus the watcher's contract sync. The delta read of #1419 objected to a
verdict landing on a live head that was not measured. This keeps that:
the verdict stays on the measured commit, and only the lookup of whose
commit it is changes.

## Changes

- `tools/ci/jev_check.py`: `pull_of_commit`, a pure function split out
of `find_pull_request`. An open same-repository PR comes first: the one
whose head it is, or else the only one holding it. Several holding it:
NOT MEASURED. With none open, the closed one whose head or merge commit
it is, so a run on a commit of main still finds the PR that landed it. A
fork's PR is never taken and never makes the choice ambiguous, since
anyone can open one holding any commit. The check's summary now names
the PR and the head it had when scored, and says when that is not the
measured commit and that the verdict says nothing about what changed
after it.
- `tools/ci/test_jev_check.py`: 12 failure-first tests of it (51 in
all), run by the PII guard job.
- `docs/maintaining.md` and the module's own text: what the lookup does.

## Testing

`python3 tools/ci/test_jev_check.py`: 51 pass. A real scored run reads
this path only on `main`, because the key is on `main` alone, so the
first real proof comes after this lands: `gh workflow run
semantic-check.yml --ref main -f run_id=<a complete Measure of a head
that has moved>`, which I will run on #1432's run 42002548557 and
report.

Not measured: which PRs hold a shared commit in practice. Measure's head
is normally a commit only one PR has; two open PRs holding it fail
closed.

## Audit-honesty checklist

- [x] No capability claim changes. The check stays advisory and not
required (Griffin, 2026-11-04).
- [x] No changelog fragment needed beyond #1334's, unreleased: this
corrects it before any release.
- [x] No emojis, private paths or personal addresses in committed files.

## Legal and contribution hygiene

- [x] Apache-2.0. No Autodesk proprietary source, decompiled internals
or NDA content.

## Breaking changes

None.

## Related issues

Refs #1334, #1427.
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