Skip to content

feat(macos): add signed native test-build artifacts - #50

Draft
jalehman wants to merge 3 commits into
mainfrom
reltest-c7e/native-macos-test
Draft

jalehman wants to merge 3 commits into
mainfrom
reltest-c7e/native-macos-test

Conversation

@jalehman

@jalehman jalehman commented Nov 10, 2026 •

Copy link
Copy Markdown

What

Add an independent manual macOS native test-build workflow. It builds an exact openclaw/openclaw SHA, packages an arm64 production-bundle app with native iroh enabled, then signs it with the existing Foundation Developer ID on a separate runner. It uploads a plain test artifact only; it is not a release route.

Why

Native macOS daily-driver acceptance needs an exact-head Foundation-signed app without inventing a release tag, invoking release validation/publication, moving the production signing key to a workstation, or submitting a test app for notarization.

Changes

  • Separate candidate builds from credentialed signing
  • Build same-source bindings and macOS XCFramework
  • Verify exact identity, source, runtime and architecture
  • Require build version above current stable feed
  • Retain public signed artifacts for seven days
  • Leave existing release steps byte-unchanged

Release-path diff

No existing release step is touched. openclaw-macos-publish.yml, openclaw-macos-variant.yml, openclaw-macos-validate.yml, the npm/evidence workflows, and all existing scripts are unchanged. The only workflow diff is the new openclaw-macos-test-build.yml; the only existing-file edit is additive README documentation. No tag input, release/npm validation entrypoint, distribution packager, notary credentials/submission, appcast generation/publication, GitHub Releases write, or call into the publish workflow is added.

Approval and risk

Packaging prerequisite cleared; awaiting human merge/run approval. The product-source crate-staging repair is published in #194201 at f7d7aec209dafc959c6f40c1565503e1f5e6f720 and included through the final Apple stack in the exact #196759 integration candidate: 1ac9f290c27d626b7b3d5c1c2e0a976c06cf7b97. Its canonical branch openclaw-e3b/macos-live-ocid was verified by GitHub's branches-where-head API. The complete exact-head release/arm64/native-enabled product packaging entry point now passes on an independent Studio checkout with private build state and explicit ad-hoc signing. No workflow-side source patch or relabeling was used. See concrete qualification below; this clears the earlier packaging P1, not the human approval or production-signing gates.

  • DRAFT: do not dispatch. A release manager or Josh must approve both merge and each mac-release run, including the exact reviewed source SHA and build version. The existing environment is main-only but has no required-reviewer gate; the operator must obtain approval before dispatch. CODEOWNERS remains the release-manager team.
  • Actor guard in both jobs: trusted static ALLOWED_ACTORS contains vincentkoc, steipete, joshavant, RomneyDa, Patrick-Erichsen, plus explicitly authorized test operator jalehman. It checks both GITHUB_ACTOR and GITHUB_TRIGGERING_ACTOR, so an unlisted dispatcher or rerun actor fails closed. The list mirrors release-managers-openclaw (with the explicit jalehman exception) and must be updated through reviewed code changes whenever team membership changes; no live team lookup or extra token is used. This is enforced before candidate checkout in the build job and before any signing secret is materialized in the signing job. Adding operators requires a reviewed code change.
  • Canonical-source guard in both jobs: the fixed GitHub openclaw/openclaw/commits/{sha}/branches-where-head API is queried using the workflow's contents: read token, not a PAT or signing secret. Admission requires a named canonical-repository branch whose current head exactly matches the requested SHA. Fork-only/PR-ref-only commits, absent/mismatched heads, malformed responses and API failures are rejected. Signing reasserts the same condition. This intentionally requires a current branch head, not an arbitrary ancestor; keep the reviewed branch pinned through signing. Canonical membership is not a substitute for review or human run approval.
  • The source SHA executes build/dependency code on the credential-free build runner. The separate signing job executes only trusted workflow tooling and the product signer pinned at 0409efbc343c579f3d711f723811c58fa9497f05, never candidate scripts or binaries. Only the existing P12/password secrets are read; no notary, publisher or Sparkle keys. Signing cleanup runs before artifact upload.
  • version_override is the existing numeric APP_BUILD/CFBundleVersion, which Sparkle compares. The live stable appcast floor is checked before build and signing. Marketing/runtime versions remain unchanged to preserve clean-source provenance. Automatic updates remain enabled: a later higher official version may replace this app. Reinstall the saved/current official app to restore normal updates immediately.
  • The artifact is signed but not notarized; Gatekeeper may require a human approval. Same-team signing is not proof of TCC/Keychain continuity. Installation, real enrollment/invocation and cold restart require a separate approved acceptance window with SSH rollback.
  • No Actions caches are restored or saved. Final signed zip, checksum and source/build provenance expire after seven days; the intermediate ad-hoc zip expires after one day. Artifacts/logs are public, with no encryption, as requested. Neither artifact is attached to a release.

Testing

  • PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s tests -p test_macos_test_build.py -v — 9 tests passed, including all six authorized users in each actor field, unauthorized original/rerun actor denial, canonical branch-head/fork-only/missing/malformed/API-error admission, the allowed happy path, stable-feed admission, archive confinement, exact app/runtime provenance, signing success/failure cleanup, artifact provenance, and workflow isolation. New guard regressions failed on 63c439a before the correction and pass with it.
  • node --test 'tests/*.test.mjs' — 16 tests passed on the prior candidate; the guard correction does not touch Node code or its consumers.
  • mise exec [email protected] -- actionlint .github/workflows/openclaw-macos-test-build.yml and git diff --check — passed.
  • Independently fetched the actual stable feed and exercised the corrected item-level sparkle:version parser; observed maximum 2611000290. That parser-only check did not dispatch a workflow or build source; the separate exact-source local packaging proof is recorded below.
  • Independent Astra high review of the full four-file candidate found one P1 (wrong appcast XML location) and one P2 (failed-job rerun used the consumer attempt rather than the successful build's artifact). Both were verified against the real owner/action contracts and fixed. The regression test run failed with those two issues before the fixes, then all six focused tests passed. Signing now consumes the producer's immutable artifact ID and rejects an empty/malformed handoff before downloading. A fresh full four-file Astra high review of the guard-corrected candidate confirmed both admission guards and found one P1 product-source prerequisite, since resolved and qualified below: the native packager stages apps/shared but not crates, leaving OpenClawKit's relative native package dependency unavailable in the staged SwiftPM tree. No additional verified P0–P2 findings. See the exact-candidate qualification below. These are narrative independent reviews, not claims that a machine-enforced review harness certified the code.
  • Broad Python suite incomplete: the full suite and one unfinished-module attempt were stopped by the shared-host execution memory limit while entering the existing test_macos_pretag module. Both processes are gone; there is no full-suite success claim and no further broad retry. The draft's CI can run the existing regression suite on its normal runners. Existing release files are byte-unchanged.
  • Real local packaging now qualified; Foundation signing remains unproved: the complete exact-source native app, private runtime, actual ditto archive generation and data-only signing-input admission pass as recorded below. Actual Foundation certificate use, runner cancellation cleanup, complete Actions handoff and installed-app behavior still require the separately approved run/acceptance window. Mocked tests and ad-hoc signing do not establish those outcomes.

No workflow was dispatched, certificate accessed, app installed, staging resource touched, release created, or environment policy changed. The local package proof does not prove Foundation signing or the complete Actions run; those require an approved post-merge dispatch.

Release-manager allowlist update

The new six-user regression fails against 14ff4af and passes with the updated static list. Workflow call sites, canonical-source checks and signing behavior are unchanged. The former P1 crate-staging prerequisite is now published, pinned and qualified for the exact candidate below. This remains a draft awaiting explicit merge/run approval.

Short independent Astra high delta review: no verified P0–P2 findings in the three-file allowlist change; five relevant tests passed independently. Narrative subagent review, not helper-certified isolation. That allowlist review did not itself clear the packaging P1; the subsequent product-source repair and real package proof below do.

Exact integration candidate and packaging qualification

  • Proposed source_sha: 1ac9f290c27d626b7b3d5c1c2e0a976c06cf7b97 (#196759), current canonical branch openclaw-e3b/macos-live-ocid, stacked on #196445 d44a16557b1fd2663f3c5d7ab1b2e2de12201829. Keep that branch pinned through signing. The SHA is a reviewed candidate, not dispatch authorization.
  • Local proof used version_override/APP_BUILD 2611000391, above the observed stable floor 2611000390. Recheck the live floor at the approved run; both workflow jobs enforce it. Marketing version remains 2026.11.2.
  • OPENCLAW_IROH_NATIVE=1 BUILD_CONFIG=release BUILD_ARCHS=arm64 BUNDLE_ID=ai.openclaw.mac through the product scripts/package-mac-app.sh completed exit 0 in 13m16s, using private HOME/XDG/TMP/state and explicit ad-hoc signing. Source remained tracked-clean. The source-matched native FFI artifact was reused because its complete crate tree is unchanged from the qualified parent; Actions will build its own same-source bindings.
  • Final arm64 app passes codesign --verify --deep --strict, contains 54 defined native FFI symbols, the native CLI helper and complete MLX helper. App/runtime exact SHA, version, timestamp and build ID match; runtime build ID is 2026.11.2-1ac9f290c27d-2026-11-10T21-19-04.000Z. The product's bundled Bun/native-module/runtime checks passed.
  • A real macOS ditto input archive passes this PR's unchanged validate_archive and verify_metadata checks. Ad-hoc zip SHA-256: e4c025aaad67eba5133fbf4de5644fd4a4199c54cfb78093910a74abd353c0d2; app executable SHA-256: e44d5e965b0d342c3d663f733a73912f4daa1142a8d62e5e0e89b78046356308. These identify local qualification outputs, not a future Foundation-signed Actions artifact.
  • Native app/shared test-bundle builds and 38 distinct shared/session + 26 app tests pass. A seven-test storage rerun resolved a test-sandbox canonical-path metadata restriction on the task-owned container; personal-data/Keychain restrictions stayed in place. Short independent delta review found no verified P0–P2 issues. This is not an exact-head full-CI claim.
  • Boundary retained: independent checkout; original owner checkout still tracked-clean at f7d7aec209dafc959c6f40c1565503e1f5e6f720; no app launch/install, personal Keychain, staging, Foundation certificate use, merge or workflow dispatch. The output is ad-hoc (TeamIdentifier unset), not distribution-qualified. Production Keychain/TCC continuity, GUI enrollment, real invocation and cold restart remain separate acceptance gates.

This branch has not been deployed

No deployments
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