Repository navigation
ci(owner-surface): require Owner Surface Check in every gate context and run it in merge trains - #4670
Merged
Conversation
…and run it in merge trains (#4669) Ops VP ruling D. merge-gate.yml lists Owner Surface Check in the unlabeled, full-integration and merge_group EXPECTED_CHECKS contexts. owner-surface.yml gains workflow_call and gates the slice per step instead of per job, so every job runs on every event and the check passes trivially off a pull request; merge-train.yml calls it as the 'owner' tier that train-gate requires. The selection JSON moves to RUNNER_TEMP. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 21, 2026 18:43
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Concurrent local runs without RUNNER_TEMP share a temporary selection filename, risking overwrites that run the wrong tests or falsely report success with no tests selected.
1 open issue
What changed in this PR
This PR promotes Owner Surface Check from advisory to required, extending the existing CI gate and full merge-train coverage for #4669 without changing the ruleset or test-selection scope.
Changes:
- Requires the check in all gate contexts and adds an
ownermerge-train tier. - Moves slice gating to individual steps and stores selection JSON outside the checkout.
- Updates workflow contracts, CI documentation, and deployed documentation hashes.
| File | Description |
|---|---|
tests/unit/scripts/test_owner_surface.py |
Tests required-check wiring, step gating, and aggregate results. |
tests/quality/test_ci_topology.py |
Adds the owner tier to train topology and result contracts. |
scripts/owner_surface.py |
Moves selection JSON into temporary storage. |
docs/src/content/docs/contributing/integration-testing.md |
Documents required status and merge-train participation. |
apm.lock.yaml |
Refreshes both deployed CI instruction hashes. |
.github/workflows/owner-surface.yml |
Adds reusable invocation, step gating, and stricter aggregation. |
.github/workflows/merge-train.yml |
Calls the owner tier and requires its result. |
.github/workflows/merge-gate.yml |
Requires Owner Surface Check in all three contexts. |
.github/instructions/cicd.instructions.md |
Updates deployed CI guidance. |
.apm/instructions/cicd.instructions.md |
Updates source CI guidance. |
Review effort: Balanced
…ytest (#4669) Review: a fixed temp filename let concurrent local runs overwrite each other's selection. Each run now writes into its own TemporaryDirectory (under RUNNER_TEMP when set) that lives until pytest.main returns. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This was referenced Nov 22, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
This makes
Owner Surface Check(#4627) a required check, per Ops VP ruling (D).The rule it has to satisfy is in
tests/quality/test_ci_topology.py: every PR-required check must also be required at merge time, and (since #4582) every merge-time check must be produced by a full merge train. So the change touches three workflows:merge-gate.yml:Owner Surface Checkjoins all threeEXPECTED_CHECKScontexts: unlabeled PR,full-integration-labeled PR, and merge_group. The labeled context stays the unlabeled one plus the four full-integration checks.owner-surface.yml:workflow_calltrigger with abase_shainput;slicejob no longer has a job-levelif; each of its steps is gated onneeds.select.outputs.run == 'true'. Every job now runs on every event, so off a pull request the slice is a fast no-op that ends insuccess;selectandsliceboth to besuccess;$RUNNER_TEMP), removed after pytest; it is never written tobuild/.merge-train.yml: a newownertier callsowner-surface.ymlon full scope, andtrain-gaterequiresOWNER_RESULT.TRAIN_TIERSandTRAIN_GATE_RESULTSare pinned in the topology test.cicd.instructions.md(both copies) andintegration-testing.mddrop the "advisory" wording and list theownertier. Both lock hash slots are updated.Cost: 3 short no-op slice jobs on PRs that touch no owner surface. The VP judged that worth keeping the invariant.
First true catch while advisory: #4559 broke 2
test_architecture_outcome_guards.pytests on the exact path it changed. Its owner has been told.Issue and approved scope
Issue: Fixes #4669 (Refs #4625, #4627)
Human scope-approval comment: #4669 (comment)
Does this PR complete the issue, or what remains? It completes #4669. The ruleset is not touched:
gatestays the only required context.Type of change
Testing
Tested locally
All existing tests pass
Added tests for new functionality (if applicable)
pytest tests/unit/scripts/test_owner_surface.py: 39 passed. This covers the new pins: triggers includeworkflow_call, every job runs with only the slice steps gated, the check is required in all 3 contexts and is a train tier, and the aggregate truth table.pytest tests/quality/test_ci_topology.py -k "merge_group or train or full_integration or expected or spec_checks or gate": 134 passed, 1 error. The error istest_shard_file_lists_match_full_collection[ci.yml-windows-compat-gate-1], a known local artifact: the shared venv imports another worktree's package. It does not involve this change.scripts/check_test_assertions.py: clean. ruff (0.15.12) check/format: clean.The full suites were not run locally (host load hold); CI covers them.
Changelog
## [Unreleased]inCHANGELOG.md:user-visible effect first, 25 words or fewer, ending with
(#PR);breaking changes only under upgrade notes; no Highlights; see
.github/instructions/changelog.instructions.md.Spec conformance (OpenAPM v0.1)
N/A: no
req-XXXbehaviour changes.