Skip to content

feat(ci): the same-project gates write their verdict as a check run on the measured commit - #1448

Merged
DrunkOnJava merged 7 commits into
mainfrom
feat/same-project-gates-check
Nov 5, 2026
Merged

DrunkOnJava merged 7 commits into
mainfrom
feat/same-project-gates-check

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

The same-project gates now write what they found as a check run, same-project gates, on the commit Measure measured. success means both gates compared every save and passed, failure means a difference or a missing result, and neutral (NOT MEASURED) means they compared less, which never counts as a pass. The maintainer's landing script reads it across a pull request's commits.

Motivation

Griffin chose these gates so that a difference blocks landing (2026-11-05, "Same-project gate"). They run only in a dispatched Measure with samples=true, Measure is not a required check, and a run without them leaves a notice and reads green, so "blocks" meant only that the maintainer read the run. A later change to a reader could land unchecked. A required check is not the answer: a pull request's Measure doesn't fetch the samples.

Changes

  • tools/ci/same_project_verdict.py: reads the results and prints the conclusion, title and summary. Its judgement is a pure function, judge.
  • tools/ci/test_same_project_verdict.py: 12 failure-first tests of what must never read as a pass: a run that could not check, no samples expected, a missing result, a pass line with a failed exit, PARTIAL, SKIPPED, Areas only skipped, no Areas result. CI's job beside test_jev_check.py runs them.
  • .github/workflows/measure.yml: same-project-gates gets checks: write and a last step writing the verdict on the measured commit, on a dispatched run only.
  • docs/maintaining.md: what the verdict means and what a landing does with it.

The landing script itself (arm.sh) is local and not in this repository. It refuses a PR that changes src/ or the gates' own files unless a commit holding every such change has a passing verdict, and refuses outright when the newest verdict on such a commit fails. A clean merge of main is not such a change; a merge that resolves a conflict there is. An override exists only for a missing or stale verdict, needs a stated reason and is logged; it can't override a fail.

Testing

Unit tests are banned except a pure helper's: judge, worst, body_state, areas_state and expected_samples are pure. python3 tools/ci/test_same_project_verdict.py: 20 pass.

The step on real runs, dispatched from this branch at cfd59382, each read as the check run it wrote on that commit:

  • 42055812190, samples=true: success, "pass: 6 samples held to their earlier saves, and the Areas on 4 saves".
  • 42055816219, samples=true sample_years=2027: neutral, "NOT MEASURED: the gates compared less than every save", where the first version would have written a false failure.
  • 42055820684, samples=true sample_years=2027 ifc_flags=--saved-meshes: neutral, "NOT MEASURED: the exports used ifc_flags (--saved-meshes)", with the job green, where the first version crashed on a single-token flag.

The landing script read the pass on this commit in a dry run. Reading the three runs also showed that the check-runs API returns only the newest run of a name on a commit by default, so a later NOT MEASURED would have hidden a fail; the script now reads with filter=all.

Not measured: a run with a red shard. Its path is covered by the helper tests only.

Audit-honesty checklist

  • No capability claim changes, and no export changes.
  • No changelog fragment: a change to Measure only.
  • No emojis, private paths or personal addresses in committed files.

Legal and contribution hygiene

  • Apache-2.0. No Autodesk proprietary source, decompiled internals or NDA content.

Breaking changes

None.

Related issues

Refs #1261, #1426, #1446.

@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 13:55
@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
…erdict

A single-token ifc_flags no longer crashes the step (the = forms); a run with a red shard reaches the verdict, as NOT MEASURED unless a result fails; one year in sample_years means from it on; no Areas result fails, as the shell gate does; an error after exit 0 fails; the worst of two shards' results decides; the summary names the workflow commit and run.
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) November 5, 2026 15:50
@DrunkOnJava
DrunkOnJava merged commit 0c64196 into main Nov 5, 2026
43 of 44 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/same-project-gates-check branch November 5, 2026 16:12
DrunkOnJava added a commit that referenced this pull request Nov 5, 2026
…p from the native record (#1357) (RE-343) (#1438)

## Summary

#1357 asks for a door's or window's hand flip and facing flip, or how to
derive them. They are two booleans of the instance's native
`FamilyInstance` record, `m_flippedX` and `m_flippedY`. The decoded Door
and Window records now carry them as `m_hand_flipped` and
`m_facing_flipped`, and the typed Door view's `flip_hand` and
`flip_facing` read them. No door or window is stored as a reflection, so
the transform (and `m_opening_facing`, its Y axis) holds neither flip as
such; `reports/element-framing/RE-343-door-window-flips.md` gives both
answers with counts.

## Motivation

#1357. The reporter's two questions, answered in the report from Measure
runs 42014420180, 42015182768, 42021277032, 42021280392, 42021284465,
and 42024103319, 42024107131, 42024111444 (the last three at
`e2f8accc`), and 42037268099 and 42037272808 (at `18954f33`) and Snowdon
Towers scored locally:

- A mirrored transform: none is stored. The first orthonormal block has
determinant 1 on 1,439 doors and windows scored against Revit's export,
and the native `InstanceInfo.m_Trf.m_3x3` on all 1,219 of the open
models'; and on 1,820 of the 2024 to 2027 samples.
- `m_opening_facing` turns with `m_flippedX` only. For a door or window
set in a plain wall rvt-rs binds, Revit's own placement is the stored
axes reversed where the two booleans differ, so the direction it faces
(the placement's +Y) is `m_opening_facing` reversed there: exact on 653
doors and 626 windows (0 wrong), and on 41 doors and 105 windows of
held-out models. The two office files are one building and R2025 models
12 to 17 one layout six times: counted once, 456 doors and 346 windows.
The case where the booleans differ (287 doors, 286 windows; 186 and 146
counted once) is measured on three 2024 buildings, one 2025 door, one
2026 house and no 2027 element. The 160 doors rvt-rs binds to no plain
wall follow the rule on 111 and not on 49 (exact inversions, uniform by
`IfcDoorType`, which fits revit-ifc's `StyleTransform`: report sections
1 and 3, not shown); nothing is claimed for them.
- The fields are carried, equal to the booleans, by 1,820 of the 1,820
doors and windows of the 2024 to 2027 samples and by none of 2015 to
2023, whose doors and windows are not decoded as Door and Window
records.

## Changes

- `src/research/native_symbol_cuts.rs`,
`partition_schema_mvp/openings.rs`, `fields.rs`,
`../partition_schema_mvp.rs`: `OPENING_FLIP_FIELDS`. On 2024 and 2025
the flips are read in the pass `instance_cuts_and_symbols` already makes
over the doors' and windows' records (`attach_cut_loop_sizes` passes it
every door and window, those that are an opening alone too; the symbols
it sizes are still those of the doors with a body): no pass is added.
`InstanceCuts` is now a struct. On 2026 and 2027, and on no other
release, `attach_opening_flips` makes one pass of its own
(`graph_classes` limited to `FamilyInstance`). Both take the element's
one current record (`native_document` allows one per channel and id).
- `src/elements/openings.rs`: the typed `Door` view matched `fliphand`
and `flipfacing`, names no record carries; it now matches the new
fields, and its module doc no longer promises a hinge side.
- `probes/examples/probe_re343_door_flips.rs`,
`tools/re/door_flips_vs_ifc.py`: the probe and scorer;
`tools/ci/scrub-holdout-results.sh` keeps the scorer's count lines for
held-out models, a `field ... values` line only with values true, false,
null or under 100.
- `reports/element-framing/RE-343-door-window-flips.md`, a
`docs/format-reconnaissance.md` addendum, `docs/status.md`,
`docs/support-matrix.json` and
`changelog.d/added/1357-door-window-flips.md`.
- Revit's IFC as rvt-rs writes it is not changed (nothing reads the
fields). What rvt-rs writes for a door's local axes is not measured
here; a follow-up issue measures and decides it.

## Testing

No unit tests (banned). End to end on real files:

- [x] Measure runs of the probe and scorer on the open reference models,
the office, the R2025 models, the 58 Autodesk samples and the 18
held-out models (runs above); Snowdon Towers (local only) scored on a
Mac, counts only.
- [x] At `e2f8accc`: the unfiltered Measure against `main` (run
42024095189): `ifc.sha256` equal on all 111 models; the timing run
(42024099050), 64 files: no peak memory moves by more than 1 MiB, export
time within 1.2% of `main` on the files of 2023 to 2025 and within 1.6%
on those of 2026 and 2027, against 7% either way on the 33 files of 2015
to 2023 that the change does not touch.
- [x] At the head `18954f33` (the second review's changes): G
42037262675, a filtered byte-identity run (the two office files and the
58 samples) against `main` at `a0639777`: `ifc.sha256` equal on all 60
models, no semantic finding. D'' 42037268099 and F'' 42037272808, the
probe on the open models and the samples: the fields and the typed Door
view equal to the booleans on 132 of 132 doors of Core Interior, 5 of 5
of RE1 Architecture, 268 of 268 of the office (as built, and at permit),
1 of 1 of R2025 model 12, and 1,588 of 1,588 doors of the 2024 to 2027
samples; none of the 1,540 doors of 2015 to 2023.
- [x] Merged with `main` at `dd3dc116` (signed; the last merge brought
#1435 and #1446, which this change does not touch). The measured code
differs from what the run at `e2f8accc` measured (the second review's
edits and everything `main` gained), so the unfiltered run was repeated
on the merged head `80a9d72c`, with `main` at `afec5e37` as its base:
run 42040585454 (`-f base=main -f nordic=true -f r2025=true -f
holdout=true -f samples=true`), read. All 15 jobs that ran succeeded
(the three timing jobs are skipped by design). `ifc.sha256` is the same
on head and base on all 111 models (the 58 samples among them), the
semantic diff has no finding on its 111 folders, and the scorer diff's
one line is `Only in measure-head: areas_across_saves.txt`, the Areas
gate's own output. `Same-project gates` passed (bodies 6 of 6 samples;
the 25 Areas of `rac_advanced` equal on its four saves) but test beams,
stairs, sketch outlines and Areas, not doors or windows: the evidence
for this change is the byte identity. The run predates #1448, so the
PR's gates verdict is by override citing it. Since that run `main` has
moved to `dd3dc116`; this change's own `src/` files are unchanged (`git
diff 18954f3 HEAD` over the five).

## Audit-honesty checklist

- [x] Every figure names its run and head in the report; what is not yet
measured on this head is labelled.
- [x] A user-visible change has its fragment under `changelog.d/added/`;
`docs/status.md` and `docs/support-matrix.json` say what
`decoded_elements()` now shows.
- [x] No emojis, private paths, personal email addresses or internal
jargon in committed files; held-out data is not in them.
- [x] Reverse-engineering finding: the probe is included, with a dated
addendum to `docs/format-reconnaissance.md`.

## Legal and contribution hygiene

- [x] I agree this work is licensable under Apache-2.0
- [x] The changes in this PR are based on public byte observations of
the redistributable reference models and Autodesk's public sample
projects, the buildingSMART IFC specification, and Autodesk's
open-source exporter `revit-ifc` (CLEANROOM.md source 5), read for what
Revit's export writes (`DoorWindowInfo`, `FamilyInstanceExporter`,
`PlacementSetter`); `ExporterIFCUtils.GetTransformForDoorOrWindow` is
cited by its public name only. It cites no source outside CLEANROOM.md's
five: the assignment of `m_flippedX` to the hand and `m_flippedY` to the
facing rests on revit-ifc's `DoorWindowInfo` (source 5), with the API
names as exported symbols (source 2), and on the measurements. I have
not used Autodesk SDK source, ODA SDK source, leaked internal
documentation, NDA material, or decompiled internal Revit implementation
code beyond public symbol exports, and I have not copied or translated
code from revit-ifc.
- [x] No test fixtures

## Breaking changes

None. Two fields are added to decoded Door and Window records, and the
typed Door view's two fields stop being null.

## Related issues

Refs #1357
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