Skip to content

ci(owner-surface): require Owner Surface Check in every gate context and run it in merge trains - #4670

Merged
Daniel Meppiel (danielmeppiel) merged 2 commits into
mainfrom
p-owner-check-required
Nov 21, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 2 commits into
mainfrom
p-owner-check-required

Conversation

@danielmeppiel

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

Copy link
Copy Markdown
Collaborator

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 Check joins all three EXPECTED_CHECKS contexts: 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:
    • adds a workflow_call trigger with a base_sha input;
    • the slice job no longer has a job-level if; each of its steps is gated on needs.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 in success;
    • the aggregate requires select and slice both to be success;
    • each run writes its selection JSON into its own temporary directory (under $RUNNER_TEMP), removed after pytest; it is never written to build/.
  • merge-train.yml: a new owner tier calls owner-surface.yml on full scope, and train-gate requires OWNER_RESULT. TRAIN_TIERS and TRAIN_GATE_RESULTS are pinned in the topology test.
  • Docs: cicd.instructions.md (both copies) and integration-testing.md drop the "advisory" wording and list the owner tier. 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.py tests 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: gate stays the only required context.

Type of change

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

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 include workflow_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 is test_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

  • One line in one section under ## [Unreleased] in CHANGELOG.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.
  • N/A -- internal-only change (CI, tests, refactor).

Spec conformance (OpenAPM v0.1)

N/A: no req-XXX behaviour changes.

…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>

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

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 owner merge-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

Comment thread scripts/owner_surface.py Resolved
…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>
@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit 5413f66 into main Nov 21, 2026
50 checks passed
@danielmeppiel
Daniel Meppiel (danielmeppiel) deleted the p-owner-check-required branch November 21, 2026 20:21
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.

[FEATURE] ci: require Owner Surface Check in every gate context and run it in merge trains

2 participants