Repository navigation
fix(ci): isolate ratchet and scaling execution budgets - #3347
Conversation
Keep both original selections and five-minute execution caps, with an always-run success-only aggregate preserving the existing non-required check. Add topology, source, environment and failure-state regression coverage. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 067b35fc-52fb-4db4-b316-c606d23b4b34
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 067b35fc-52fb-4db4-b316-c606d23b4b34
There was a problem hiding this comment.
🔵 Needs a closer look
Current-head hosted completion within the separate five-minute budgets remains unconfirmed in the available evidence.
No open issues 🎉
What changed in this PR
This PR addresses architecture CI timeouts by giving the existing contract suite and scaling benchmark separate execution budgets, without changing application behavior or required-check membership.
Changes:
- Split both workloads into independent Linux jobs, each retaining its five-minute limit.
- Preserve
Test Architecture Ratchetsas an aggregate that succeeds only when both jobs succeed. - Add topology and aggregate-result regression tests, and document the scheduling change.
| File | Description |
|---|---|
tests/quality/test_ci_topology.py |
Validates job separation, preserved execution settings, and strict aggregate results. |
docs/src/content/docs/contributing/integration-testing.md |
Explains independent limits and unchanged non-required check status. |
.github/workflows/ci.yml |
Separates contract and scaling execution and adds the aggregate job. |
Review effort: Balanced
Merge Master delivery assessment:
|
Compose landed #3346 and #3347; preserve receipt source and both conformance bindings. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 13c28cd3-d648-498c-97d8-95dd47e91145
Description
fix(ci): isolate ratchet and scaling execution budgets
TL;DR
Run the existing architecture-contract selection and real scaling benchmark in separate Linux jobs, each retaining its five-minute limit. Keep
Test Architecture Ratchetsas an always-running aggregate that succeeds only when both executions succeed. This repairs a demonstrated job-budget cancellation without changing test selection, scaling thresholds, provisional-baseline policy or required-check membership.Important
This is a bounded CI scheduling repair, not release authorization. The ratchet check is not currently listed in
merge-gate.yml'sEXPECTED_CHECKS; this PR preserves that membership rather than adding a new policy gate.Problem (WHY)
7246bc54d7931d1342bbe151acdac33d21cd1eba, job 119772530067 was cancelled after 302 seconds. Its annotation states:The job has exceeded the maximum execution time of 5m0s.153 passed in 164.96sand1 passed in 113.07s. Those executions shared one five-minute setup-to-cleanup budget. All listed steps reported success, but the job was cancelled; passing test summaries do not turn that cancellation into a passing CI run.The recovery follows the Agent Skills validation-loop guidance: "do the work, run a validator (a script, a reference checklist, or a self-check), fix any issues, and repeat until validation passes." The linked run is the observed failure; local contracts and the unchanged benchmark are evidence layers, not a substitute for the new head's hosted results.
Approach (WHAT)
test-architecture-contracts.test-architecture-scaling.always()and both explicit dependencies; only two literalsuccessresults permit exit zero.Implementation (HOW)
.github/workflows/ci.ymltests/quality/test_ci_topology.pydocs/src/content/docs/contributing/integration-testing.mdDiagrams
Legend: the highlighted region separates the two existing executions and joins their actual results; it does not change required-check membership.
sequenceDiagram participant W as ci.yml participant C as Architecture Ratchet Contracts participant S as Architecture Scaling (Linux) participant G as Test Architecture Ratchets rect rgb(255, 247, 200) Note over W,G: NEW: independent jobs, unchanged workloads and five-minute caps par Contracts execution W->>C: Checkout current source and frozen setup C->>C: Run original six-module pytest selection and Scaling execution W->>S: Checkout current source and frozen setup S->>S: Run real benchmark with PYTEST_PERF=1 end C-->>G: CONTRACT_RESULT S-->>G: SCALING_RESULT Note over G: always() after both jobs alt Both results are literal success G->>G: Exit 0 else Failure, cancellation, skip or missing result G->>G: Print diagnostic and exit 1 end end Note over W,G: merge-gate.yml membership remains unchangedTrade-offs
Benefits
Issue and approved scope
Issue: none, under the user's explicit task-specific CI-recovery exception.
Human scope-approval comment: the user instructed, "you do it, and do not mandate for these fixes to require an issue and approval, it's not needed. get CI working ASAP". The coordinator subsequently directed a separate issue-less carrier for this observed scheduling defect, with the same sole writer and an actual-public-main base. This records the exception honestly; it is not a fabricated accepted issue, governance-admission pass or ruleset bypass.
This PR addresses only the architecture job-budget cancellation. The broader main-CI and non-publishing release-validation mission remains open. It does not expand the existing test-contract carrier #3343 / issue #3342, rewrite landed #3345, take #3344's receipt scope, or claim completion of #3341, #2070 or #1882. Those issues remain open; there are no closing directives.
Type of change
Testing
Validation
Current head:
c366f256dd49c7fb033db7756b6bf51136bb259c, composed from frozen7e33bc740b9c2894df8829081830193b73198d75and actual public mainfe2cfad0884bafceae78a478d13a8c8a9a7aaf0dafter #3346 landed. Rerere was disabled; the conflict-free merge preserves every public I5 path byte-for-byte. The three-path full-index diff remains identical to root's no-finding bounded review. The local and current-head hosted results below were independently observed; they do not claim full-main release validation.The original
7e33results (188 passes in 80.28s and one benchmark pass in 60.85s) remain a separately sealed historical snapshot. They are not relabelled as executions onc366.PYTEST_PERF=1and threshold unchangedterminal_evidence_required=truec366: CI run 39771865459 and required gate. All Windows, lifecycle, Linux, lint and actual CodeQL analysis jobs succeeded.Current-head hosted scheduling proof: contracts 188 passed in 162.62s, whole job 177s; real scaling one passed in 113.29s, whole job 126s; strict aggregate success in 3s. Both execution caps remain five minutes.
The captured terminal inventory is 28 checks: 25 success, two neutral, one skipped. The imposed-native CodeQL check is not claimed passed; the existing explicit user exception remains unchanged. Docs deployment was skipped. The sole bounded observer exited0, and actual run/job conclusions were verified separately. No new full release-validation dispatch occurred.
Executed commands and verbatim terminal summaries
The current-head invocation used the shared two-slot gate once, running both commands sequentially with separate temporary/JUnit paths and clean exact-head guards before and after. These are the executed inner commands; the full wrapper and its successful runtime receipt are preserved separately.
Each canonical command below completed successfully at current
c366:YAML-I/O, portable-relative-path and 2100-line guards also passed using exact Python-regex equivalents because macOS grep lacks
-P. Complete recorded commands, runtime receipts and XML are preserved in the owner's sealed evidence. No dependencies or validation thresholds changed.Scenario Evidence
tests/quality/test_ci_topology.py::test_ratchet_executions_are_separate_and_bounded(regression trap for the linked 302-second cancellation); original-selection XML binding; actual hosted jobs linked abovetests/quality/test_ci_topology.py::test_ratchet_aggregate_cannot_ignore_either_execution;test_ratchet_aggregate_cannot_suppress_failure; real shell over 36 result pairstests/quality/test_ci_topology.py::test_ratchet_execution_step_drift_fails;test_ratchet_execution_job_drift_fails;test_ratchet_execution_step_cannot_skip_or_suppresstests/perf/test_architecture_linter_scaling.py::test_ci_real_catalog_work_scales_below_fifteen_x_after_fixed_cost_subtraction, real catalog executionHow to test
PYTEST_PERF=1; expect one passing benchmark, not a skipped test.Architecture Ratchet Contracts,Architecture Scaling (Linux)andTest Architecture Ratchetsjobs; require all three to finish successfully, not merely print passing test summaries..github/workflows/merge-gate.ymland the benchmark source have no diff; do not dispatch a release, change policy, or retry an unchanged workflow merely to review this PR.Spec conformance (OpenAPM v0.1)
If this PR changes behaviour that an OpenAPM v0.1
req-XXXcovers,confirm the three-step ritual in the
development guide:
docs/src/content/docs/specs/openapm-v0.1.mdupdated(new/changed
<a id="req-XXX"></a>anchor + prose + Appendix Crow).
docs/src/content/docs/specs/manifests/openapm-v0.1.requirements.ymlupdated.
@pytest.mark.req("req-XXX")test undertests/spec_conformance/added or extended.CONFORMANCE.{md,json}regenerated viauv run --extra dev python -m tests.spec_conformance.gen_statementand committed.
Co-authored-by: Copilot [email protected]