Repository navigation
ci: wider PR checks (Windows units on PR, blast-radius slice, lazy CLI imports, linter cache, shard file lists, mutation floors, receipts gate) - #4150
Merged
Conversation
The PR Windows Compatibility Gate ran only `-m windows_compat` while main push ran the full Windows unit suite, so Windows-only unit regressions reached main (11 of 21 red main pushes, 2026-11-05..19). - scripts/ci_selections.py owns the Windows unit selection (new architecture owner ci-validation-topology); the PR gate shards and the build-release push/full Windows unit steps all run it. - Each of the 3 gate shards runs its unit slice (-n 4, windows-unit seed) then its windows_compat integration slice; the aggregate check name and fail-closed aggregation are unchanged. - Guard: tests/quality/test_ci_topology.py:: test_pr_windows_gate_runs_every_windows_unit_node (red on main) plus drift mutations; lexical rule contracts-tooling-ci-validation-topology with its own MutationCase; bug-ledger row (PERF-H2). Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…led-CLI import budget (#4118) apm --help imported every command module and GitPython (767 modules, 37 git modules, ~440 ms). Every root verb now registers as a _LazyCommand stub carrying its exact summary source, and apm_cli.deps resolves its public names lazily (PEP 562), so --help imports 332 modules and no GitPython. Help output and exit codes are byte-identical for apm --help and all 87 subcommand --help invocations. New owner cli-startup-import-budget: installed-CLI -X importtime guard (count budget + must-not-import list), static rule registry_delegation.cli_startup_imports, and one mutation case. Bug-ledger row PERF-H5. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
… guard (#4118) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Resolve build-release.yml: the 3 Windows push shards (#4032) run through scripts/ci_selections.py; recompute the tests.instructions.md lock hash; reuse RELEASE_WORKFLOW in test_ci_topology.py. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…4119) LinterSession reuses one inventory walk, one owner-registry validation and one parse per (path, content sha256, linter-source sha256, collectors) across run_selected_rules calls inside linter_session(); per-case source_overrides apply on top. Outside a session every run gets a private session, so single runs are unchanged. New owner architecture-linter-performance with two closed-world guards (content key, parse once), one MutationCase each, plus runtime guards: byte-equal findings cached vs cold (always-on per-group sample, full matrix under benchmark in the nightly lane) and a parse-once counter over the full matrix. N vs 2N ratio added to Architecture Scaling. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…#4119) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…#4118) apm --version still seeds config.json through the experimental-flag read; strict xfail until H3 lands the pure read. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…ector (#4118) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…ts; drift guard Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
USER_ROOT_ROUTING_MUTATIONS repeats guard ids, so the full-matrix byte-equal guard compared cases against another case's cold report. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…terally (#4118) cli.py stays selected by process-interrupt-signals; the cli-startup-import-budget rule reads it by path. A literal __all__ lets ruff see the TYPE_CHECKING re-exports. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Copilot App <[email protected]>
This was referenced Nov 20, 2026
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
…dius slice, lazy CLI imports, linter cache, shard file lists, mutation floors, receipts gate) Co-authored-by: Copilot App <[email protected]>
…nder signal - Drop the session-cache 2.2x wall-clock ratio from the Architecture Scaling job: timing asserts flake (2.83x on a busy runner); the deterministic parse-once guard gates the cache, per the owner ruling. - AQ003: the parse-once guard asserts each cached mutated run still fails; the startup budget helper is an assertion helper; the ratio benchmark asserts its commands succeed. - Lifecycle concurrency: lazy CLI imports no longer spawn git version at startup, so the contender's start is now its own lock acquire (engine) or its first git call once the holder is parked (binary). Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
…dius slice, lazy CLI imports, linter cache, shard file lists, mutation floors, receipts gate) Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
Co-authored-by: Copilot App <[email protected]>
cli.py defined its lazy _check_and_notify_updates wrapper, so tests that patch apm_cli.cli._check_and_notify_updates patched an owner they import (AQ004). The wrapper now lives in apm_cli/update_notice.py; cli.py imports it under the same name, so the patch target and startup budget are kept. Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
…dius slice, lazy CLI imports, linter cache, shard file lists, mutation floors, receipts gate) Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
Co-authored-by: Copilot App <[email protected]>
… shards CI's integration lanes pass an explicit -m expression, which overrides the default benchmark deselection, so the ~15-minute full-matrix replay ran in a 25-minute shard and timed it out. Gate it on PYTEST_PERF=1; the per-group transparency sample and the full-matrix parse-once guard stay always-on. Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
…dius slice, lazy CLI imports, linter cache, shard file lists, mutation floors, receipts gate) Co-authored-by: Copilot App <[email protected]>
The PYTEST_PERF-gated full-matrix byte-equality replay now runs in its own job in lifecycle-journeys.yml (nightly cron and ref dispatch), and the tracking-issue signal waits for it. test_ci_topology pins the job, its env, its node and the signal dependency. Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
Co-authored-by: Copilot App <[email protected]>
5 of 10 tasks
…st fails Diagnostic for an order-dependent CI-only failure; the oracle is unchanged. Co-authored-by: Copilot App <[email protected]>
…e ref resolver GitHubPackageDownloader imports git_reference_resolver on first construction. With lazy CLI imports and per-shard file lists, that first import can happen inside test_install_pipeline_orchestration_logic's patch of apm_cli.utils.github_host.is_github_hostname (return_value=False), so the resolver keeps the mock for the rest of the xdist worker and later tests see github.com as a generic host. Load the resolver at module import instead. Reverts the temporary diagnostic in test_list_remote_refs_io. Co-authored-by: Copilot App <[email protected]>
A session-finish hook (xdist workers report to the controller) names every apm_cli module global that is a unittest.mock object: a patch at a source module captured by a module first imported inside it. The preflight polluter now pre-imports the whole lazily imported downloader stack. Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
…dius slice, lazy CLI imports, linter cache, shard file lists, mutation floors, receipts gate) Co-authored-by: Copilot App <[email protected]> # Conflicts: # tests/quality/test_ci_topology.py
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
…4464/#4490/#4494/#4498 Co-authored-by: Copilot App <[email protected]>
H3's experimental-flag pure read landed on main, so the strict xfail turned into XPASS on the merged tree. Co-authored-by: Copilot App <[email protected]>
…start The lazy CLI imports each verb (and the downloader, plugin-phase, marketplace and policy modules) on first use, so a test that patched a source module and then exercised one left the consumer bound to the mock for the worker. Load them once at session start; the session-finish check fails on any new case. Replaces the per-file pre-import in the preflight test. Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
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
Integration PR for the 0.37.0 "P1: CI topology" stream. Widens PR checks and makes them cheaper:
Worker lanes land on this branch as merge commits; status per lane is tracked below and updated as they merge.
Session-cache gating (not a timing ratio)
The architecture-linter session cache (#4119) is gated by deterministic checks only:
tests/integration/test_architecture_linter_session_cache.pycovers parse-once (each(path, content)built once, one tree walk, cached mutated runs still fail) and cached-vs-cold byte-equal findings. It runs in Integration Tests (Linux) (ci-integration.yml,integration-tests-shard). That job is required bymerge-gate.ymlonmerge_groupand onfull-integration-labeled PRs, and it also runs in the main and nightly integration lanes.contracts-tooling-linter-cache-content-keyandcontracts-tooling-linter-cache-parse-oncerun inscripts/lint_architecture_boundaries.py(ci.yml Lint job, every PR). Their teeth are proven byMutationCaseentries intest_architecture_owner_rule_mutations.py.test_session_cache_findings_match_uncached_runs_full_matrix, ~15 min) runs on demand withPYTEST_PERF=1 -m benchmark. CI keeps the full-matrix parse-once guard and the per-group byte-equality sample.test_session_cached_mutation_matrix_scales_within_2_2x_from_n_to_2n) is not in CI. It is non-gating by owner ruling and runs locally withPYTEST_PERF=1 -m benchmark.Issue and approved scope
Issue:
Fixes #4115
Refs #4117 (blast-radius slice follows in its own PR)
Fixes #4118
Fixes #4119
Fixes #4120
Refs #4121 (mutation floors follow in their own PR)
Human scope-approval comments:
Does this PR complete the issue, or what remains? Completes #4115 #4117 #4118 #4119 #4120 #4121 once every lane is merged; #4122 ships in its own PR after T1. Out of scope (per records): removing Windows units from main push, merge queue (#4116, separate PR), test deletion/moves, rule-semantics changes, ruleset changes, obligation set / cells.json changes.
Type of change
Testing
Red-before / green-after evidence per guard, collect-only diffs, import counts, linter cache diff, kill-rate table and negative controls are added here as lanes merge.
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)
CONFORMANCE.{md,json}regeneratedapm-spec-waiver: deps/init.py PEP 562 lazy exports are a startup perf rewrite with identical public names and no observable behaviour delta (#4118)