Skip to content

fix(release): bound macOS Intel integration coverage - #2423

Merged
Daniel Meppiel (danielmeppiel) merged 2 commits into
mainfrom
danielmeppiel-fix-intel-release-gate
Aug 2, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 2 commits into
mainfrom
danielmeppiel-fix-intel-release-gate

Conversation

@danielmeppiel

@danielmeppiel Daniel Meppiel (danielmeppiel) commented Aug 1, 2026 •

Copy link
Copy Markdown
Collaborator

fix(release): bound macOS Intel integration coverage

TL;DR

The v0.27.0 promotion replayed all 8,558 integration nodes on macOS Intel and hit the 30-minute step limit while still making healthy progress. This change gives Intel a marker-bounded lifecycle_smoke integration pass while preserving native binary startup and isolated release validation. macOS ARM and Linux remain the full-corpus authorities.

Note

The failed Intel job had 1,151 passing completions across all four xdist workers and reached 13% immediately before GitHub Actions enforced the timeout.

Problem (WHY)

  • Run 30712176510, job 91401431001 ended with The action 'Run integration tests' has timed out after 30 minutes at 13%, not with a stalled worker or a test failure.
  • The same run completed the macOS ARM job and both Linux integration jobs, so replaying the complete cross-platform corpus on Intel added a redundant release-critical capacity gate.
  • [!] Raising the timeout would retain the structural duplication and increase release latency without adding a distinct platform contract.

The fix follows the evidence rather than inferring a deadlock: "Grounding outputs in deterministic tool execution transforms probabilistic generation into verifiable action."

Approach (WHAT)

  • Select the existing lifecycle_smoke marker on macOS Intel and retain four-worker loadgroup scheduling plus the existing 30-minute ceiling.
  • Leave macOS Intel's native startup checks and isolated release-validation phase intact.
  • Keep the unfiltered integration corpus unchanged on macOS ARM and Linux.
  • Add semantic workflow contracts that reject either Intel full-corpus regression or ARM focused-subset regression.

Implementation (HOW)

File Change
.github/workflows/build-release.yml Renames the Intel phase to focused integration and sets PYTEST_EXTRA_ARGS to -m=lifecycle_smoke -n 4 --dist loadgroup; ARM remains unfiltered.
tests/unit/test_platform_contract_workflow.py Separates focused-Intel and full-corpus Unix contracts, including mutation tests for both sides of the partition.
.apm/instructions/cicd.instructions.md Records Intel as marker-bounded and ARM as the full-corpus macOS authority.
.github/instructions/cicd.instructions.md, apm.lock.yaml Rematerializes the Copilot instruction mirror and its integrity hash through apm install --target copilot.
docs/src/content/docs/contributing/integration-testing.md Documents the release-platform coverage split.
CHANGELOG.md Records the release-gate repair under [Unreleased].

Diagrams

Legend: promotion validation now divides platform-specific Intel evidence from the full corpus retained on ARM and Linux.

sequenceDiagram
    participant W as Release workflow
    participant I as macOS Intel
    participant A as macOS ARM
    participant L as Linux
    participant R as Create release

    W->>I: build native x86_64 binary
    I->>I: run version and rich-table startup
    rect rgb(255, 247, 200)
        Note over I: NEW: bounded promoted lifecycle subset
        I->>I: run lifecycle_smoke with 4 loadgroup workers
    end
    I->>I: run isolated release validation
    W->>A: run full integration corpus
    W->>L: run full integration corpus
    I-->>R: Intel validation passed
    A-->>R: ARM validation passed
    L-->>R: Linux validation passed
Loading

Trade-offs

  • Marker selection over file enumeration. Chose the existing declarative lifecycle_smoke contract; rejected a hand-maintained node list because it would drift as tests move.
  • Structural reduction over a larger timeout. Chose fewer redundant executions; rejected a timeout increase because it would hide capacity growth.
  • Full corpus retained on ARM and Linux. Chose Intel for distinct native evidence and ARM/Linux for complete coverage; rejected removing a full macOS corpus because that would weaken platform validation.

Benefits

  1. Intel executes 76 selected integration nodes instead of replaying all 8,558, a 99.1% reduction in executed corpus.
  2. Intel still runs two explicit native startup nodes, the promoted lifecycle subset, and isolated shipped-binary validation.
  3. ARM and Linux keep the exact unfiltered -n 4 --dist loadgroup integration contract.
  4. Four mutation tests prevent either side of the platform partition from silently drifting.

Validation

tests/unit/test_platform_contract_workflow.py:

.............................                                            [100%]
29 passed in 0.81s

Focused Intel selection:

76/8558 tests collected (8482 deselected) in 3.39s
Lint and integrity gates

uv run --frozen --extra dev ruff check src/ tests/:

All checks passed!

uv run --frozen --extra dev ruff format --check src/ tests/:

1592 files already formatted

uv run --frozen --extra dev python -m pylint --disable=all --enable=R0801 --min-similarity-lines=10 --fail-on=R0801 src/apm_cli/:

--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

bash scripts/lint-auth-signals.sh:

[*] Rule A: get_bearer_provider boundary (any reference)
[*] Rule B: git ls-remote auth-delegated annotation
[+] auth-signal lint clean

bash scripts/lint-architecture-boundaries.sh:

[+] architecture boundary lint clean

uv run --frozen apm audit --ci:

[>] Replaying install (cache-only)...
[+] Replayed 7 package(s)
[>] Diffing scratch vs working tree...
[+] No drift detected
[*] All 10 check(s) passed

Scenario Evidence

# Scenario (user promise) Principle(s) Test(s) proving it Type
1 A release validates the macOS Intel binary without replaying the entire cross-platform integration corpus DevX, OSS / community-driven tests/unit/test_platform_contract_workflow.py::test_intel_integration_is_marker_scoped_and_bounded
tests/unit/test_platform_contract_workflow.py::test_intel_full_corpus_mutation_is_rejected (regression-trap for run 30712176510)
unit
2 macOS ARM and Linux still execute the full release integration corpus Portability by manifest, OSS / community-driven tests/unit/test_platform_contract_workflow.py::test_linux_and_arm_retain_full_corpus_grouped_parallelism
tests/unit/test_platform_contract_workflow.py::test_arm_focused_subset_mutation_is_rejected
unit
3 Both macOS release artifacts still execute natively before upload Portability by manifest tests/integration/test_core_smoke.py::TestBinaryStartup::test_apm_version_runs
tests/integration/test_core_smoke.py::TestBinaryStartup::test_apm_rich_table_runs
tests/unit/test_platform_contract_workflow.py::test_macos_jobs_run_non_shell_binary_startup_after_build
e2e

How to test

  • Run uv run --extra dev pytest -q tests/unit/test_platform_contract_workflow.py and observe 29 passing contracts.
  • Run uv run --extra dev pytest tests/integration --collect-only -q -m lifecycle_smoke and observe 76 selected nodes.
  • Inspect build-and-validate-macos-intel and confirm startup, focused integration, and release validation remain ordered.
  • Inspect build-and-validate-macos-arm and integration-tests and confirm neither has a marker filter.
  • Run uv run --frozen apm audit --ci and observe all 10 checks pass.

Co-authored-by: Copilot [email protected]

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 48905dc9-f752-45ed-a2fd-c22ed985a953
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 48905dc9-f752-45ed-a2fd-c22ed985a953
@danielmeppiel

Copy link
Copy Markdown
Collaborator Author

Sergio Sisternes (@sergio-sisternes-epam) All checks are green. This is the final v0.27.0 release unblock: Intel keeps focused lifecycle/binary validation while ARM and Linux retain the full integration corpus. CODEOWNERS approval is the only remaining merge prerequisite.

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.

Pull request overview

This PR tightens release-time integration coverage on macOS Intel by switching that job to a marker-bounded lifecycle_smoke subset (while keeping ARM + Linux as full-corpus authorities), addressing GitHub Actions timeouts on Intel without weakening overall release validation.

Changes:

  • Update build-release.yml so macOS Intel runs focused integration tests via lifecycle_smoke while keeping ARM/Linux unfiltered.
  • Add/adjust unit workflow-contract tests to enforce the Intel-vs-full-corpus partition and guard against regressions.
  • Update docs, CI instructions mirrors, lock hash, and changelog to reflect the new release-platform coverage split.
Show a summary per file
File Description
.github/workflows/build-release.yml Switches macOS Intel integration phase to marker-bounded focused coverage; keeps ARM full-corpus.
tests/unit/test_platform_contract_workflow.py Updates workflow contract assertions and adds mutation tests for the Intel/full-corpus split.
docs/src/content/docs/contributing/integration-testing.md Documents the release-platform integration coverage split (Intel focused subset; ARM/Linux full corpus).
.github/instructions/cicd.instructions.md Updates CI/CD instructions mirror to reflect Intel focused subset vs ARM full-corpus authority.
.apm/instructions/cicd.instructions.md Updates APM instruction mirror to match the CI/CD documentation changes.
CHANGELOG.md Adds an Unreleased entry describing the release promotion coverage change.
apm.lock.yaml Updates integrity hashes due to instruction mirror changes.

Review details

  • Files reviewed: 7/7 changed files
  • Comments generated: 3
  • Review effort level: Lite

Comment on lines +223 to +226
# Intel validates the promoted lifecycle subset against its native
# binary. ARM and Linux retain the unfiltered integration corpus.
# loadgroup preserves HOME-mutating test serialization.
PYTEST_EXTRA_ARGS: "-m=lifecycle_smoke -n 4 --dist loadgroup"

# ── PHASE 2: INTEGRATION TESTS (tag/schedule/dispatch only) ──
- name: Run integration tests
# ── PHASE 2: FOCUSED INTEGRATION TESTS (tag/schedule/dispatch only) ──
Comment on lines +51 to +52
INTEL_FOCUSED_INTEGRATION_STEP = "Run focused Intel integration tests"
INTEL_FOCUSED_PYTEST_ARGS = "-m=lifecycle_smoke -n 4 --dist loadgroup"
@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit fbce219 into main Aug 2, 2026
18 checks passed
@danielmeppiel
Daniel Meppiel (danielmeppiel) deleted the danielmeppiel-fix-intel-release-gate branch August 2, 2026 07:39
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.

2 participants