Skip to content

[0.38] ci(gate): require the spec conformance checks in every gate context - #4577

Merged
Daniel Meppiel (danielmeppiel) merged 3 commits into
mainfrom
danielmeppiel-4337-spec-gate-required
Nov 21, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 3 commits into
mainfrom
danielmeppiel-4337-spec-gate-required

Conversation

@danielmeppiel

@danielmeppiel Daniel Meppiel (danielmeppiel) commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Description

TL;DR

gate now requires Spec conformance gate and its three Spec tests (N/3) shards in every context: unlabeled PRs, full-integration PRs and merge groups.

spec-conformance.yml drops its pull_request paths: filter, so the gate never waits for a check that was filtered out. merge_group already ran unfiltered.

What changed

  • .github/workflows/merge-gate.yml:
    • The four spec checks are added to each EXPECTED_CHECKS branch.
    • In the labeled context they sit after Test Architecture Ratchets, so the existing invariant "labeled = unlabeled + the four integration checks" still holds.
    • The comment block says why the spec checks are listed and why Check conformance statement is not: the spec gate already aggregates it.
  • .github/workflows/spec-conformance.yml: the paths: list is removed from pull_request, and a comment explains why.
  • tests/quality/test_ci_topology.py: test_spec_conformance_checks_gate_every_context asserts that:
    • every context names the four spec checks;
    • each check comes from exactly one unconditional spec-conformance.yml job;
    • the workflow triggers on exactly pull_request and merge_group, with no paths or paths-ignore filter;
    • Check conformance statement and Architecture Scaling (Linux) are never required.
  • Mutation cases that fail the guard:
    • each spec name dropped from each context (12 cases);
    • a restored paths or paths-ignore filter;
    • a shard made conditional on merge_group;
    • a second producer of the same name;
    • Check conformance statement listed in a context.
  • Docs (last commit): contributing/integration-testing.md states that gate requires Spec conformance gate and its three shards on every PR and merge group.

Controls stay green unchanged: test_test_architecture_ratchets_are_required_in_every_context, test_ratchet_aggregate_cannot_ignore_the_contracts, test_architecture_scaling_is_never_required, the full-integration opt-in guard and the merge-group producer guard.

Trade-off: every PR now runs the spec workflow, including docs-only PRs (the statement job plus three shards, a few minutes in parallel). That is the record's choice: a filtered-out required check would leave gate waiting forever.

Issue and approved scope

Issue: Fixes #4337

Human scope-approval comment: #4337 (comment) (scripts/governance/eligibility.cjs: record-present, contact_confirmation_needed: false).

Does this PR complete the issue, or what remains? It completes the narrowed scope.

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Maintenance / refactor

Testing

  • Tested locally
  • All existing tests pass: CI green at 8f4ab9f (33 pass, 3 skipping), including all four spec checks on this PR.
  • Added tests for new functionality (if applicable)

Local results:

  • uv run --extra dev pytest tests/quality/test_ci_topology.py: 360 passed.
  • Against main's merge-gate.yml and spec-conformance.yml, the new guard fails: "merge_group EXPECTED_CHECKS does not require ['Spec conformance gate', ...]".
  • Ruff, format and the architecture linter are clean.

Changelog

  • One line in one section under ## [Unreleased] in CHANGELOG.md
  • N/A -- internal-only change (CI, tests, refactor). Per the record and changelog.instructions.md.

Spec conformance (OpenAPM v0.1)

  • N/A -- this PR does not change OpenAPM-observable behaviour.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The guard accepts a label-gated condition for spec producers, allowing unconditional spec checks to be skipped on unlabeled PRs without detection.

1 open issue
What changed in this PR

This PR addresses the narrowed scope of #4337 by requiring spec conformance checks in every merge-gate context.

Changes:

  • Adds the spec gate and three test shards to required checks for ordinary PRs, full-integration PRs, and merge groups.
  • Removes the spec workflow’s PR path filter so required checks are not filtered out.
  • Adds topology guards and mutation tests, and documents the requirement.
File Description
tests/​quality/​test_ci_topology.py Adds guards and mutation tests for required spec checks and their producers.
docs/​src/​content/​docs/​contributing/​integration-testing.md Documents spec checks required on PRs and merge groups.
.github/​workflows/​spec-conformance.yml Removes PR path filtering.
.github/​workflows/​merge-gate.yml Requires all four spec checks in every context.

Review effort: Balanced

Comment thread tests/quality/test_ci_topology.py Resolved
…4337)

merge-gate.yml now waits for "Spec conformance gate" and its three
"Spec tests (N/3)" shards for unlabeled PRs, full-integration PRs and
merge groups. spec-conformance.yml drops its pull_request paths: filter,
so the gate never waits for a check that was filtered out; merge_group
already ran unfiltered. "Check conformance statement" stays aggregated by
the spec gate and is not listed on its own.

tests/quality/test_ci_topology.py pins it: every EXPECTED_CHECKS context
names the four spec checks, each comes from exactly one unconditional
spec-conformance.yml job, and the workflow has no paths or paths-ignore
filter. Mutation cases drop a spec name from each context, restore a
filter, make a shard conditional, add a second producer, or list the
statement check.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
The spec conformance guard reused _runs_on_merge_group, which also
accepts the full-integration label gate. A label-gated spec job would
skip on unlabeled PRs yet still pass the guard. Spec producers must now
carry no condition or always(), including the ${{ }}-wrapped forms,
and label-gated mutations prove the guard rejects them.

Co-authored-by: Copilot App <[email protected]>
@danielmeppiel
Daniel Meppiel (danielmeppiel) force-pushed the danielmeppiel-4337-spec-gate-required branch from 6cbff98 to ed8add5 Compare November 21, 2026 10:56
@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit 8fab1ca into main Nov 21, 2026
45 checks passed
@danielmeppiel
Daniel Meppiel (danielmeppiel) deleted the danielmeppiel-4337-spec-gate-required branch November 21, 2026 11:20
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.

merge gate: aggregate the architecture ratchet checks

2 participants