Skip to content

feat(release): add a checkpoint-only packaging boundary for split macOS notarization - #157117

Merged
steipete merged 3 commits into
mainfrom
upd/mac-packaging-checkpoint-contract
Sep 24, 2026
Merged

steipete merged 3 commits into
mainfrom
upd/mac-packaging-checkpoint-contract

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

macOS packaging cannot currently hand a complete signed checkpoint to a separate notarization job: it begins notarizing immediately and may still need to create and sign the DMG during recovery.

User Impact

Release operators can finish compilation, signing, and the frame audit with --checkpoint-only, then resume notarization and packaging without a compiler or Developer ID private key. Explicit ad-hoc smoke builds can exercise both halves without notarization; release-signed apps cannot use that bypass.

Why This Change Was Made

The packaging script now creates and signs the DMG before sealing the existing source/version/build/hash-bound checkpoint. Resume verifies and re-audits retained app and DMG bytes, reuses Apple submissions, staples accepted artifacts, and emits the final zip, DMG, and symbol archive. The --checkpoint-only flag remains discoverable by the workflow's grep -Fq feature check, so older sources can retain the single-job path.

Legacy recovery shipped in #135601, but checkpoints require the exact producer source SHA. Older checkpoints without a DMG continue to use their original script and signing credentials; the new resume path never constructs a missing DMG. The existing workflow owns release-tag/producer binding in workflow-release.json, variant naming, and appcast generation, including its smoke/beta exclusions.

This addresses L1259's three packaging prerequisites. Related release-ops context: variant-aware recovery. The L1259 split-job follow-up targets the current macOS publisher; no separate follow-up PR was available when this change was authored. The notarization helper is unchanged for L1258. Its retry behavior is accommodated by making the existing recovery fixture interrupt stapling instead of relying on a one-shot network failure.

Evidence

  • Final head: 90898c3d89c3f15ea9c5334cb7875d122bab55c3, rebased onto main before publication.
  • The new checkpoint boundary failed before the change with unexpected packaging argument: --checkpoint-only; the completed tests cover signed-DMG retention, resume without build tools or signing credentials, smoke acceptance, release refusal (even with the smoke flag), tampering, missing DMG, and audit refusal.
  • pnpm test test/scripts/package-mac-dist.test.ts --maxWorkers=1 passed 3 times on the final Testbox snapshot: 18 passed / 9 macOS-only skips each. Test time: 4.097 / 3.933 / 3.905 s; runner wall time: 5.91 / 5.13 / 5.07 s.
  • Local macOS focused file: 27/27 passed, 81.67 s test time / 87.89 s runner wall. The existing native archive tests compile both architectures and mount real DMGs; the portable fake-tool boundary runs in under five seconds. The native fixture now requests ad-hoc linker signatures explicitly for x86_64 as well as arm64.
  • pnpm check:changed passed, including root-test typechecking, script lint, macOS tooling CI suites, and changed-test lint. The first remote pass found four missing-brace lint errors; those were corrected before this final green run.
  • All five test files referencing the changed production owner passed together: 754 passed / 18 platform skips, 107.30 s runner wall (package-mac-dist, build-and-run-mac, changed-lanes, package-mac-app, and ci-changed-scope). No individual test exceeded 30 seconds.
  • Fresh Codex autoreview: --mode branch --base origin/main --max-priority P2, scoped-clean on the final head. git diff --check and Bash syntax validation passed.
  • Blacksmith Testbox: tbx_01m393zx4ma3a9c5ca5q6cbbqp, run 35968158694, final command exit 0, 11m47.799s. The lease was stopped after proof.
  • LOC: production +71 / -38, tests +239 / -8, docs +4 / -2. Auto-merge is off; this authoring lane stops at a ready PR.

Real Developer ID signing/notarization end-to-end proof was not possible without signing identities. Native archive/signature fixtures and fake Apple services exercise the packaging boundary without live credentials. No runtime update, configuration, dependency, SQLite, or appcast ownership changes are included.

@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts size: M labels Sep 24, 2026
@steipete
steipete marked this pull request as ready for review September 24, 2026 07:24
@steipete
steipete enabled auto-merge (squash) September 24, 2026 07:28
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 24, 2026
@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 24, 2026, 8:44 AM ET / 12:44 UTC (Revision 2).

ClawSweeper review

What this changes

Adds a macOS packaging mode that seals a signed app and disk image for later notarization, alongside release guidance and packaging tests.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 7 items remain

Current main does not provide the checkpoint-only handoff. The prior smoke-signing finding remains on this head, and the new DMG-signing requirement also breaks packaging that uses the documented automatic certificate selection.

Priority: P2
Reviewed head: 6ad6395b7a6949fcee855e26327dc8ae91070257
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The checkpoint work has focused validation, but two signing-default regressions and an unresolved signed-boundary proof choice limit readiness.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: The provided Repository State classifies the author as MEMBER, so the external-contributor proof gate does not apply. The PR reports macOS native archive tests and a fake-Apple packaging boundary, but no credentialed Developer ID checkpoint and resume result. Existing checkpoints remain bound to the exact producer source SHA; the new payload does not require a cross-source migration.
Patch quality 🦐 gold shrimp (3/6) 2 actionable review findings remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The provided Repository State classifies the author as MEMBER, so the external-contributor proof gate does not apply. The PR reports macOS native archive tests and a fake-Apple packaging boundary, but no credentialed Developer ID checkpoint and resume result. Existing checkpoints remain bound to the exact producer source SHA; the new payload does not require a cross-source migration.
Evidence reviewed 9 items Smoke guard remains: The guard requires an ad-hoc app when notarization is skipped, but runs after the app-building script has selected its signing identity. The packaging script is unchanged from the earlier reviewed head at this location.
Automatic certificate selection: With no explicit identity, the existing signer selects an installed Developer ID, distribution, or development certificate before considering ad-hoc fallback.
Publisher smoke inputs: The current macOS publisher sets ALLOW_ADHOC_SIGNING and SKIP_NOTARIZE for smoke packaging without setting SIGN_IDENTITY. This is the workflow contract the PR body cites.
Findings 2 actionable findings [P1] Choose ad-hoc signing before the smoke app build
[P1] Preserve automatic identity selection for signed packaging
Security None None.

How this fits together

The macOS packaging scripts take release source, build settings, and signing settings and produce app archives for publication. A retained checkpoint lets a later job verify those artifacts and finish notarization without rebuilding.

flowchart LR
A[Release source and settings] --> B[Build macOS app]
B --> C[Choose signing mode]
C --> D[Audit and seal checkpoint]
D --> E[Verify on resume]
E --> F[Apple notarization]
F --> G[Release archives]
E -->|Smoke build| G
Loading

Decision needed

Question Recommendation
After the signing regressions are repaired, must this signed checkpoint and resume path receive a credentialed Developer ID rehearsal before merge, or do the native fixtures and existing signed release gate suffice? Rehearse the split boundary: Run a nonpublishing Developer ID checkpoint and resume rehearsal with redacted results before merging.

Why: The PR changes the boundary between signing and Apple notarization, while the supplied evidence explicitly lacks a Developer ID end-to-end run; the release owner must choose the acceptable release proof.

Before merge

  • Choose ad-hoc signing before the smoke app build (P1) - The publisher sets ALLOW_ADHOC_SIGNING=1 and SKIP_NOTARIZE=1 without an identity, but the app signer selects any installed certificate first. On that runner, this guard aborts the smoke job after the build. Set an implicit smoke build to SIGN_IDENTITY=- before invoking the app builder, preserve explicit identities, and cover a signer-equipped host.
  • Preserve automatic identity selection for signed packaging (P1) - Late discovery on code unchanged since the previous review: the app signer supports and documents automatic certificate selection, but this new empty-identity check stops an ordinary signed package before creating its DMG. Carry the selected signing identity into DMG signing, or otherwise retain that established packaging path.
  • Resolve merge risk (P1) - The existing smoke publisher can fail on a certificate-equipped Mac because it leaves the identity implicit while the new guard requires an ad-hoc signed app.
  • Resolve merge risk (P1) - Operators who rely on automatic certificate selection can now finish signing the app but fail before DMG checkpoint creation.
  • Resolve merge risk (P1) - The signed Developer ID checkpoint-to-resume path has fixture and native archive coverage, but its end-to-end credentialed behavior has not been observed.
  • Complete next step (P2) - Repair smoke identity selection and implicit signed packaging, add coverage for both paths, and obtain the release owner's signed-boundary proof decision before merge.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.

Findings

  • [P1] Choose ad-hoc signing before the smoke app build — scripts/package-mac-dist.sh:276-283
  • [P1] Preserve automatic identity selection for signed packaging — scripts/package-mac-dist.sh:397-403
Agent review details

Security

None.

PR surface

Tests +231, Docs +2, Other +33. Total +266 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 239 8 +231
Docs 1 4 2 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 1 71 38 +33
Total 3 314 48 +266

Review metrics

Metric Value Why it matters
Packaging command surface 1 new CLI flag The new checkpoint mode becomes a release-operator entry point.
Production and test delta production +71/-38; tests +239/-8 The production growth implements the earlier signed-artifact boundary, while the larger test addition exercises checkpoint and recovery behavior.

Merge-risk options

Maintainer options:

  1. Repair both signing defaults (recommended)
    Preserve the smoke publisher's implicit ad-hoc intent and the signed build's automatic certificate selection, then get the release owner's proof decision.

Technical review

Best possible solution:

Make the packaging owner choose a consistent app and DMG signing identity for each mode, retain source-bound checkpoint verification, and validate the handoff under the release owner's accepted proof gate.

Do we have a high-confidence way to reproduce the issue?

Yes. Source establishes both failing paths: a certificate-equipped smoke runner can sign with that certificate, and a signed build with an implicit identity reaches the new DMG error. Neither path was executed in this read-only review.

Is this the best way to solve the issue?

No, not at this head. Sealing a signed DMG before notarization fits the existing recovery owner, but both established signing defaults need to survive the new boundary.

Full review comments:

  • [P1] Choose ad-hoc signing before the smoke app build — scripts/package-mac-dist.sh:276-283
    The publisher sets ALLOW_ADHOC_SIGNING=1 and SKIP_NOTARIZE=1 without an identity, but the app signer selects any installed certificate first. On that runner, this guard aborts the smoke job after the build. Set an implicit smoke build to SIGN_IDENTITY=- before invoking the app builder, preserve explicit identities, and cover a signer-equipped host.
    Confidence: 0.94
  • [P1] Preserve automatic identity selection for signed packaging — scripts/package-mac-dist.sh:397-403
    Late discovery on code unchanged since the previous review: the app signer supports and documents automatic certificate selection, but this new empty-identity check stops an ordinary signed package before creating its DMG. Carry the selected signing identity into DMG signing, or otherwise retain that established packaging path.
    Confidence: 0.91
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.91

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against da5e443fe5bb.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded macOS release-tooling improvement with concrete merge blockers, rather than an active core-runtime outage.
  • merge-risk: 🚨 compatibility: The introduced DMG guard rejects an existing packaging path that uses automatic certificate selection.
  • merge-risk: 🚨 automation: The unchanged smoke publisher's settings can trigger the new post-build ad-hoc guard on a signer-equipped runner.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The provided Repository State classifies the author as MEMBER, so the external-contributor proof gate does not apply. The PR reports macOS native archive tests and a fake-Apple packaging boundary, but no credentialed Developer ID checkpoint and resume result. Existing checkpoints remain bound to the exact producer source SHA; the new payload does not require a cross-source migration.

Evidence

Acceptance criteria:

  • [P1] pnpm test test/scripts/package-mac-dist.test.ts --maxWorkers=1.
  • [P1] pnpm check:changed.
  • [P1] git diff --check.

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Dallin Romney: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Cover the current smoke publisher settings on a host with an installed signing certificate.
  • Preserve an ordinary signed package that omits SIGN_IDENTITY but has an automatically selected certificate.
  • Obtain the release owner's decision on credentialed checkpoint and resume proof.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-24T07:34:49.853Z sha 90898c3 :: blocked before merge. :: [P1] Make smoke signing deterministic before the ad-hoc guard

@steipete
steipete merged commit 4ed527d into main Sep 24, 2026
95 checks passed
@steipete
steipete deleted the upd/mac-packaging-checkpoint-contract branch September 24, 2026 13:03
steipete added a commit that referenced this pull request Sep 24, 2026
…OS notarization (#157117)

* feat(release): add checkpoint-only macOS packaging boundary

* style(test): add required braces to packaging fixtures

(cherry picked from commit 4ed527d)
@roboclaw-bot roboclaw-bot mentioned this pull request Sep 24, 2026
2 of 8 tasks
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
…OS notarization (openclaw#157117)

* feat(release): add checkpoint-only macOS packaging boundary

* style(test): add required braces to packaging fixtures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant