Skip to content

feat(release): harden M1 beta qualification lifecycle - #10530

Merged
Git-on-my-level merged 11 commits into
mainfrom
agent/qualification-infra-reliability
Jul 25, 2026
Merged

Git-on-my-level merged 11 commits into
mainfrom
agent/qualification-infra-reliability

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Jul 25, 2026 •

Copy link
Copy Markdown
Member

Summary

  • make macOS Beta qualification M1 Studio-only and globally serialized
  • isolate every qualification run with lease-owned ports, state, staging, and cleanup evidence
  • remove the M4/Codemagic qualification executors while preserving normal Codemagic candidate build dispatch
  • harden promotion admission to exact content-addressed qualification evidence

Product invariants affected

  • INV-AUTH-1
  • INV-CHAT-1
  • INV-DATA-1
  • INV-BETA-1

Failure class

Failure-Class: none

Verification

  • bash scripts/dev-harness/run-tests.sh — 56 passed
  • backend/.venv/bin/python -m pytest backend/tests/unit/test_qualified_beta_promotion.py -q — 182 passed
  • bash desktop/macos/tests/test-fault-suite-launch-env.sh
  • bash desktop/macos/tests/test-fault-suite-owned-app-cleanup.sh
  • bash desktop/macos/tests/test-qualification-stage-isolation.sh
  • bash desktop/macos/tests/test-qualify-desktop-beta-contract.sh
  • python3 .github/scripts/test_desktop_release_flow_contract.py
  • actionlint -config-file .github/actionlint.yaml .github/workflows/desktop_qualify_beta.yml
  • python3 .github/scripts/check-release-process-guards.py

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Performed agentic security review orchestration across all configured modules and posted one net-new finding after triage, deduplication, and latest-head verification.

Open in Web View Automation 

Sent by Cursor Security Agent: Security Reviewer


@contextmanager
def _locked(root: Path) -> Iterator[None]:
root.mkdir(parents=True, exist_ok=True)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Agentic Security Review
Severity: MEDIUM
The lease root is created with default permissions under a predictable /tmp path, and the active lease file later stores a live release token. Without enforcing owner-only directory/file modes (and rejecting unsafe root conditions), another local user on a shared host can tamper with or read lease state and disrupt qualification lifecycle ownership.

Impact: Cross-user local interference with release-gate qualification state (including unauthorized lease release / lifecycle DoS) on shared runners.

Fix in Cursor Fix in Web

Reviewed by Cursor Security Reviewer for commit 4972862. Configure here.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4972862e2d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Git-on-my-level
Git-on-my-level force-pushed the agent/qualification-infra-reliability branch 2 times, most recently from 47c304a to ca3b357 Compare July 25, 2026 04:55
@Git-on-my-level

Copy link
Copy Markdown
Member Author

@cursor fix merge conflict, ci, and new review comments

@cursor

cursor Bot commented Jul 25, 2026 •

Copy link
Copy Markdown

Handled merge conflicts, CI-related flake, and the new review items on agent/qualification-infra-reliability (pushed as c5cc09e526).

Merge conflict

  • Resolved .github/failure-classes/FC-single-machine-release-gate.json by keeping the PR’s M1-only contract (not main’s multi-lane Codemagic wording) and completed the merge from origin/main.

Review comments

  1. P1 — Actions artifact name for beta admission
    Upload now uses desktop-qualification-evidence-${{ inputs.release_tag }} with overwrite: true, matching _qualification_artifact_id in qualified_beta_promotion.py.

  2. P1 — Redispatch leaves ambiguous release evidence
    Before upload, the workflow deletes existing release assets matching qualification-evidence-${TARGET_SHA}-* via the GitHub API, then uploads the new content-addressed asset.

  3. Security — lease root permissions
    qualification.py enforces 0700 on the lease root and 0600 on lease/lock files, with a regression test for rejecting 0755 roots.

CI

  • desktop-beta-admission-supervisor: test_supervise.mjs “timeout drains emulator children” was timing out at 3s on loaded runners; default waitFor is now 15s (15s for the fixture-readiness case in that test).

Verification run locally

  • scripts/dev-harness/run-tests.sh (57 passed)
  • pytest on qualification lease + promotion + release script tests (217 passed)
  • test_desktop_release_flow_contract.py, test_supervise.mjs, check-release-process-guards.py

PR description could not be auto-updated (not agent-managed on GitHub); CI should re-run on the new commit. I can watch checks if you want.

Open in Web Open in Cursor 

@Git-on-my-level
Git-on-my-level force-pushed the agent/qualification-infra-reliability branch 2 times, most recently from 1d40585 to 059425e Compare July 25, 2026 08:21
@Git-on-my-level

Copy link
Copy Markdown
Member Author

Monitor pass update:

  • Resolved the two trusted Codex review threads after verifying the current workflow now preserves desktop-qualification-evidence-${tag} and deletes stale qualification-evidence-${source_sha}-* release assets before uploading replacement evidence.
  • Rebased the PR branch onto current origin/main and force-with-lease pushed 059425e6bf4a to agent/qualification-infra-reliability.
  • Fixed rebased Desktop Swift compile issues by importing OmiSupport where DesktopLocalProfile is used and making the bounded diagnostic context cross the actor boundary safely.

Local verification:

  • git diff --check
  • xcrun swift build --package-path desktop/macos/Desktop --target "Omi Computer"
  • python3 .github/scripts/check-release-process-guards.py
  • python3 .github/scripts/test_desktop_release_flow_contract.py
  • bash desktop/macos/tests/test-qualify-desktop-beta-contract.sh

Post-push re-scan: no unresolved trusted Codex/Cubic threads found. Most CI checks are green; Desktop Swift Static & Test Contracts is still running as of the last poll.

Git-on-my-level added a commit that referenced this pull request Jul 25, 2026
…st contracts

Three pre-existing Desktop Swift test failures from #10523 (chore: add
storage and bridge diagnostics) were never caught on main because the
Desktop Swift CI path-filter skips the build for non-Swift commits. PR
#10530's Swift compile fixes trigger the full suite, exposing them.

Fixes:
1. AgentRuntimeBridgeLifecycle.StartFailure rawValue now snake_case
   (handshake_timed_out) matching the bounded telemetry convention the
   test asserts.
2. DesktopDiagnosticsManager.cloudIncidentSnapshotKeys now includes
   path_class/database_file_size_bytes/volume_free_bytes/volume_total_bytes
   so StorageFailureDiagnostics context survives into beta trail snapshots.
3. RewindStorageErrorClassificationTests source-inspection updated for the
   CGImage frame logError that now carries structured context (multi-line).
Git-on-my-level added a commit that referenced this pull request Jul 25, 2026
…st contracts

Three pre-existing Desktop Swift test failures from #10523 (chore: add
storage and bridge diagnostics) were never caught on main because the
Desktop Swift CI path-filter skips the build for non-Swift commits. PR
#10530's Swift compile fixes trigger the full suite, exposing them.

Fixes:
1. AgentRuntimeBridgeLifecycle.StartFailure rawValue now snake_case
   (handshake_timed_out) matching the bounded telemetry convention the
   test asserts.
2. DesktopDiagnosticsManager.cloudIncidentSnapshotKeys now includes
   path_class/database_file_size_bytes/volume_free_bytes/volume_total_bytes
   so StorageFailureDiagnostics context survives into beta trail snapshots.
3. RewindStorageErrorClassificationTests source-inspection updated for the
   CGImage frame logError that now carries structured context (multi-line).
@Git-on-my-level
Git-on-my-level force-pushed the agent/qualification-infra-reliability branch from 3fef38b to abdc981 Compare July 25, 2026 13:36
@Git-on-my-level

Copy link
Copy Markdown
Member Author

Monitor pass — diagnostic contract alignment for #10523 Swift tests

PR #10530's Swift compile fixes (commit 059425e) trigger the full Desktop Swift CI suite, which exposed three pre-existing test failures from #10523 (d0215a4: chore: add storage and bridge diagnostics). These were never caught on main because Desktop Swift CI path-filters and skips when there are no Swift changes.

Fixed (commit 3fef38b)

  1. AgentRuntimeBridgeLifecycle.StartFailure — rawValue now snake_case (handshake_timed_out instead of handshakeTimedOut) matching the bounded telemetry convention the test asserts.
  2. DesktopDiagnosticsManager.cloudIncidentSnapshotKeys — added path_class, database_file_size_bytes, volume_free_bytes, volume_total_bytes so StorageFailureDiagnostics context survives into beta trail snapshots.
  3. RewindStorageErrorClassificationTests — source-inspection updated for the CGImage frame logError that now carries structured context: (multi-line call from SCA-103: add macOS failure diagnostic context #10523).

Fixed (commit abdc981)

  1. e2e flow coverage — added AgentRuntimeBridgeLifecycle.swift to chat-hermetic.yaml covers list (exercised via AgentRuntimeProcess).

PR body updated

  1. Added INV-CHAT-1 to product invariants (required because AgentRuntimeBridgeLifecycle.swift touches chat continuity invariant surface).

Remaining CI failure (pre-existing, flaky)

desktop-beta-admission-supervisor → SIGTERM drains emulator children expects exit code 143 but gets 124 on the GitHub Actions macOS runner. This test passes locally and passed on the first CI run for this PR. It is an environment-specific signaling/timing issue, not a code defect.

Git-on-my-level and others added 10 commits July 25, 2026 11:57
…st contracts

Three pre-existing Desktop Swift test failures from #10523 (chore: add
storage and bridge diagnostics) were never caught on main because the
Desktop Swift CI path-filter skips the build for non-Swift commits. PR
#10530's Swift compile fixes trigger the full suite, exposing them.

Fixes:
1. AgentRuntimeBridgeLifecycle.StartFailure rawValue now snake_case
   (handshake_timed_out) matching the bounded telemetry convention the
   test asserts.
2. DesktopDiagnosticsManager.cloudIncidentSnapshotKeys now includes
   path_class/database_file_size_bytes/volume_free_bytes/volume_total_bytes
   so StorageFailureDiagnostics context survives into beta trail snapshots.
3. RewindStorageErrorClassificationTests source-inspection updated for the
   CGImage frame logError that now carries structured context (multi-line).
…flow

The desktop e2e flow coverage manifest check requires changed Swift files
to have corresponding flow coverage. AgentRuntimeBridgeLifecycle.swift is
exercised by the hermetic chat flow (AgentRuntimeProcess consumes the
lifecycle reducer), so add it to chat-hermetic.yaml covers.
@Git-on-my-level
Git-on-my-level force-pushed the agent/qualification-infra-reliability branch from cb5ffc0 to c75287b Compare July 25, 2026 16:17
@Git-on-my-level
Git-on-my-level merged commit d4cb01a into main Jul 25, 2026
37 checks passed
@Git-on-my-level
Git-on-my-level deleted the agent/qualification-infra-reliability branch July 25, 2026 17:16
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.

1 participant