Skip to content

ci(#962): call the macOS code-signing action steps as Python (#2794) - #2795

Merged
zackees merged 2 commits into
masterfrom
infra/2794-setup-macos-codesigning-python
Oct 28, 2026
Merged

zackees merged 2 commits into
masterfrom
infra/2794-setup-macos-codesigning-python

Conversation

@zackees

@zackees zackees commented Oct 28, 2026

Copy link
Copy Markdown
Member

ci-lint precheck reported four GEN-005 findings for
.github/actions/setup-macos-codesigning/action.yaml (runs.steps[0..3], the
last block of that shape in the action). Each step is now a single call into
ci/setup_macos_codesigning.py, matching the merged compatibility-validator
port (#2692).

RED

f3e84762d — ci/test_setup_macos_codesigning.py, 18 cases (22 with
subtests). Fails on that commit: ci/setup_macos_codesigning.py does not exist
(FAILED (failures=18, errors=4), every behavioural case reporting
can't open file .../ci/setup_macos_codesigning.py) and ci.toml still
carries the GEN-005 exception for the path.

GREEN

f3f448128:

  • ci/setup_macos_codesigning.py — guard / codesign / provisioning /
    notarization, each the same sequence of security, plutil and base64
    work the zsh step ran, in the same order, writing the same
    $GITHUB_OUTPUT / $GITHUB_ENV lines. Only the three shell constructs the
    steps used changed shape: the ${${IDENTITY##* }//(\(|\))/} team extraction,
    the print ${RANDOM} | shasum | head -c 32 keychain password, and the
    base64 --decode pipelines.
  • The action's four run: steps are one uv run --no-project --script call
    each, and a pinned astral-sh/setup-uv step (with save-cache and the
    CACHE-013 pr-<N> cache-suffix, so it adds no CACHE-013 finding) is added
    above the guard, because the guard now calls uv and a macOS runner has none
    of its own.
  • The GEN-005 [[exceptions]] block for the path is deleted from ci.toml.

Evidence

  • uv run python -m unittest ci.test_setup_macos_codesigning — 18 tests OK
    (security/plutil stubs record argv; the codesign branch's six security
    calls, the decoded certificate, the generated 32-hex keychain password, the
    team transform, the profile UUID/install and the mismatch ::notice:: are
    all asserted).
  • uv run ci/local_gate.py --only self-test — == self-test: ok (the
    ci/test_uv_run.py scan included).
  • ./lint — == lane lint: ok (37.5s).
  • ci-lint precheck (pin a1917ce7…) — 5 violation(s), 416 approved exception(s), 10 needs_review on origin/master → 5 violation(s), 412 approved exception(s), 10 needs_review here, and no other rule moves.

What is not proven here

The signing path only runs with the release credentials, so the
credential-present security argv is proven by the stubs, not on a macOS
runner; a real certificate import is the next daily beta's job (the
haveCodesignIdent=false branch is what every PR and master macOS job
exercises today). No docs/features.md line: CI only, no user-visible change.

Refs #2794

@zackees
zackees added this pull request to the merge queue Oct 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 28, 2026
@zackees
zackees enabled auto-merge October 28, 2026 13:27
@zackees

zackees commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

Handed off to the coordinator.

All checks are green (Format 🔍 / checks, Build 🧱 / Fast Gate ⚡, CI Gate ✅; every other lane skipped for a ci/-only scope), the two commits are f3e84762d (RED) and f3f448128 (GREEN), and no local-gate stamp is attached because the change touches no Rust, C, CMake or build input.

RED: ci/setup_macos_codesigning.py does not exist and ci.toml still carries
the GEN-005 exception for .github/actions/setup-macos-codesigning/action.yaml,
so all 22 cases fail (18 failures, 4 errors).
GREEN: `ci/setup_macos_codesigning.py` carries the four steps as subcommands
(`guard`, `codesign`, `provisioning`, `notarization`), each action step is one
`uv run --no-project --script` call, and the add-module step installs `uv`
first. The `ci.toml` GEN-005 exception for the action is deleted.

`ci-lint precheck` moves 416 -> 412 approved exceptions with no other count
changing.
@zackees
zackees force-pushed the infra/2794-setup-macos-codesigning-python branch from f3f4481 to 7a2e116 Compare October 28, 2026 13:29
@zackees
zackees added this pull request to the merge queue Oct 28, 2026
@zackees

zackees commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

Rebased onto origin/master (e86118b06) so the queue entry is not DIRTY. One conflict, in ci.toml only: sibling #2793 deleted the adjacent run-swift-format GEN-005 block. Resolved as "master's list minus my block" (git checkout --ours ci.toml, then delete the six-line block), and git diff origin/master -- ci.toml shows only that block gone.

Rebased SHAs: RED 14db70538, GREEN 7a2e1161c (the original f3e84762d/f3f448128 in the description are stale). Re-ran on the new tip: 18 tests OK, ci/local_gate.py --only self-test ok, ci-lint precheck 407 approved on this branch against 411 on master (the same four), and PR CI is green (Fast Gate ⚡, Format 🔍 / checks, CI Gate ✅).

Merged via the queue into master with commit 4d62fbf Oct 28, 2026
33 checks passed
@zackees
zackees deleted the infra/2794-setup-macos-codesigning-python branch October 28, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant