Skip to content

chore(#1351): wire determinism_check as required PR gate#1377

Merged
anchapin merged 1 commit into
mainfrom
fix/issue-1351-determinism-ci-gate
Jun 28, 2026
Merged

chore(#1351): wire determinism_check as required PR gate#1377
anchapin merged 1 commit into
mainfrom
fix/issue-1351-determinism-ci-gate

Conversation

@anchapin

Copy link
Copy Markdown
Owner

fixes #1351

Summary

Wires the Cross-Platform Determinism CI workflow conclusion as a single, non-matrix required PR gate (Fluxion Determinism Gate (Issue #1351)) that branch protection on main can reference. Closes the acceptance gap from #1297.

What this PR does

  1. .github/workflows/ashrae_validation.yml — adds a workflow_run trigger and a fluxion-determinism-gate listener job that:

    • fires after Cross-Platform Determinism CI completes for the same SHA,
    • exits 0 on success / neutral / skipped upstream conclusions,
    • exits 1 and posts a PR comment with the upstream run URL on failure / cancelled / timed_out upstream conclusions.
  2. Same file — adds explicit needs: compare-hashes to every isolation job (weather, solar, conduction, ventilation, zone-balance) so the whole gate (not just the validate job) blocks on cross-platform determinism.

  3. release_gates.yaml — adds Fluxion Determinism Gate (Issue #1351) to ci.required_checks and a matching entry in ci.workflow_index with the new observes_workflow field documenting the cross-workflow relationship. Mirrors the existing Wire strict ±15% annual-energy CI gate (un-ignore 4 tests blocked by #1323 cooling physics) #1333 strict-energy-gate pattern from PR feat(#1333): wire strict ±15% annual-energy CI gate #1368.

  4. .github/BRANCH_PROTECTION.md (new) — admin runbook documenting the manual branch-protection step, the canonical check name, the listener behaviour, the verification procedure (synthetic broken-determinism PR), and the linked issues (Establish cross-platform FP determinism CI gate — close intermittent failures #1297, Wire determinism_check as required PR gate in ashrae_validation.yml — close #1297 acceptance gap #1351, fix(ci): gate ort imports + add drift-check permissions + fix MultiNodeSolver false-positive #1357, [Testing] Verify Cross-Platform Floating-Point Determinism (Windows/Mac/Linux) #1063).

  5. docs/CONTRIBUTING.md — new "Cross-Platform Determinism CI Gate" subsection under "Deterministic Testing" with the local repro recipe matching the upstream RUSTFLAGS.

Manual step required (not in this PR)

GitHub branch protection is repository-side config that cannot be modified from a PR. A repository administrator must:

  1. Open the repository → SettingsBranchesmain rule → Require status checks to pass before merging.
  2. Add the exact check name: Fluxion Determinism Gate (Issue #1351).
  3. (Recommended) enable Require branches to be up to date before merging so the listener fires on the merge commit.

Full step-by-step is in .github/BRANCH_PROTECTION.md. Once applied, the verification procedure in that doc walks through a synthetic broken-determinism PR to confirm the gate actually blocks a merge.

Verification

  • python3 -c "yaml.safe_load_all(...)" parses both modified YAML files cleanly.
  • Job-graph inspection: every isolation job now has needs: compare-hashes; new listener job has no upstream needs: (fires from workflow_run).
  • No Rust changes — cargo build --release --features wiring-tracing not run (no Rust source modified).

Out of scope

Linked issues

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @anchapin, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

…lidation.yml

Closes the acceptance gap from #1297 by exposing a single, non-matrix
required status check ('Fluxion Determinism Gate (Issue #1351)') that
branch protection on main can reference.

Workflow changes (.github/workflows/ashrae_validation.yml):
- Add 'workflow_run' trigger on the 'Cross-Platform Determinism CI'
  workflow completion for the same SHA.
- Add 'fluxion-determinism-gate' listener job that:
  * exits 0 on 'success' / 'neutral' / 'skipped' upstream conclusions;
  * exits 1 and posts a PR comment with the upstream run URL on
    'failure' / 'cancelled' / 'timed_out' upstream conclusions;
  * uses the Python-list-of-strings PR-comment pattern already
    established by the in-workflow 'validate' job.
- Add explicit 'needs: compare-hashes' to every isolation job
  (weather, solar, conduction, ventilation, zone-balance) so the
  whole gate blocks on cross-platform determinism, not just the
  ASHRAE 140 'validate' job.

Configuration changes (release_gates.yaml):
- Add 'Fluxion Determinism Gate (Issue #1351)' to ci.required_checks.
- Add matching ci.workflow_index entry with 'observes_workflow'
  field documenting the cross-workflow relationship.

Docs:
- New .github/BRANCH_PROTECTION.md admin runbook documenting the
  manual branch-protection step (one-time, GitHub-side), the
  canonical check name, the listener behaviour, the verification
  procedure (synthetic broken-determinism PR), and the linked
  issues (#1297, #1351, #1357, #1063).
- docs/CONTRIBUTING.md: new 'Cross-Platform Determinism CI Gate'
  subsection under 'Deterministic Testing' with the local repro
  recipe matching the upstream RUSTFLAGS.

Manual step required (documented in .github/BRANCH_PROTECTION.md):
A repo admin must add the canonical check name
'Fluxion Determinism Gate (Issue #1351)' to the GitHub branch-
protection 'Required status checks' list on main. The PR cannot do
this — branch protection is GitHub-side config.

Fixes #1351
Closes #1297 (acceptance gap)
@anchapin anchapin force-pushed the fix/issue-1351-determinism-ci-gate branch from f5f3c30 to 67895e0 Compare June 28, 2026 00:43
@anchapin anchapin merged commit cc34511 into main Jun 28, 2026
27 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants