Skip to content

feat(mac): add canonical elevation host workflow - #123569

Merged
steipete merged 6 commits into
mainfrom
codex/mac-elevation-distribution
Aug 14, 2026
Merged

steipete merged 6 commits into
mainfrom
codex/mac-elevation-distribution

Conversation

@steipete

@steipete steipete commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add one canonical --elevation-host runtime plan that implies attach/background behavior, keeps Gateway connectivity, Mac node, termination handling, and Peekaboo Bridge active, and suppresses updater, Dock promotion, automatic windows, deep links/reopen, pairing/exec presenters, Quick Chat hotkeys, voice/cookie startup, GUI Keychain loading, and modal startup errors
  • add a closed OpenClaw Foundation signing/notarization path with no Apple Events entitlement, a plain MLX helper signature, accepted notary result capture, and an immutable full-source-SHA ZIP/receipt/checksum that is reverified after extraction
  • add a separate ai.openclaw.mac.elevation-host launchd lifecycle (package, install, status, recover, uninstall) with conflict refusal, RunAtLoad/KeepAlive ownership, transactional rollback, passive TCC reporting, and no changes to ordinary ai.openclaw.mac Launch at login
  • scope prerequisites by lifecycle command, define Bridge-ready installation as committed even when TCC is degraded, fail closed when the permission probe fails or returns an invalid selected-source document, and document package as a Foundation release-operator path rather than a public artifact source
  • bind attach-only's disable marker to the selected state directory instead of mutating the default state when OPENCLAW_STATE_DIR is isolated
  • repair the cloud-startup effort-picker race exposed by exact-head CI and split its oversized suite at the recovery boundary instead of adding a max-lines suppression; current main independently landed the workspace and terminal owner fixes, so the rebase drops this branch's duplicate terminal commits

Root cause and ownership

--background-only owned presentation suppression, not a complete unattended-host contract. The existing development packager could produce a signed but unnotarized app, ordinary Launch at login intentionally remains user-quittable and interactive, signing propagated app entitlements to the MLX helper, and attach-only ignored a default-profile state-directory override. The result required operator-specific launchd files and indirect artifact evidence.

This change keeps the normal login owner untouched and gives deployment one explicit owner: a closed runtime mode, one release artifact contract, and one separate transactional service lifecycle. Missing TCC is reported without opening System Settings. install succeeds only after the exact launchd-owned process is Bridge-ready; incomplete TCC is then a degraded status result rather than a false rollback signal.

Production/tooling delta is +737/-46 lines; tests are +478/-72 after discounting 281 lines moved unchanged into the split recovery suite (+759/-353 raw), and docs are +57/-7. The positive production delta is the new package/install/status/recover/uninstall capability and its fail-closed artifact/rollback/TCC boundary; the runtime change itself consolidates behavior behind one plan instead of adding parallel service implementations.

Proof

  • pnpm build
  • pnpm test:macos:ci — 212 tests locally; delegated Linux lane 307 pass / 38 platform skips
  • focused Swift suites — 21/21
  • pnpm format:swift; pnpm lint:swift — zero violations
  • pnpm format:check; pnpm check:docs; git diff --check
  • shellcheck and bash -n for all changed shell owners
  • pnpm check:changed on Blacksmith Testbox tbx_01kzznjc55bz6he16x7v6cz803 — all 34 original phases passed
  • review-fix check:changed on Testbox tbx_01kzzsq7cg415pt3jhkx2nry97 / run 31788345897 — green
  • combined elevation + UI-race check:changed on Testbox tbx_01kzzt38pn7j0729525ee9hyfs / run 31788814066 — green, including guards, both typecheck lanes, UI/script lint, and 309 macOS/tooling tests
  • current main independently landed the better workspace-popover and exact-agent terminal fixes; after rebasing and dropping duplicate terminal commits, the four affected UI files pass together 19/19 on the final tree
  • the third hosted failure's cloud-startup suite passes 7/7 plus three bounded repetitions (21/21); all four repaired/split files pass together 19/19
  • max-lines split check:changed on Testbox tbx_01kzzwfzqxryk7gg1df30qf9nm / run 31791702174 — green, including exact 760/295-line split, max-lines ratchet, typecheck, and targeted lint with zero warnings/errors
  • executable elevation-host status regressions return degraded code 4 for both a failed permission command and invalid JSON, never print TCC: ready, and pass 9/9; the stricter predicate also accepts the installed Peekaboo permission document
  • unrelated hosted gateway flakes were test-order defects: image requests now use atomic rpcReq instead of send-before-listen, and restart-drain proof awaits its controlled persistence deferred instead of polling; the full 55-test gateway file passes three consecutive runs (165/165)
  • final combined check:changed on Testbox tbx_01kzzzt3t4gk470eqy4719avvj / run 31795565395 — green across env/max-lines/API/plugin guards, both typecheck lanes, targeted UI/gateway/script lint, and 311 macOS/tooling tests
  • the saturated audit-worker shard now preserves pre-ready admission coverage while awaiting worker readiness before flush/stop (7/7 across three runs); the Windows encoding probe uses a test-only 10-second cold-start budget while production retains its 3-second fail-soft route budget
  • audit/Windows/terminal follow-up check:changed on Testbox tbx_01m001rq1yhybr436y0r2hs9g4 / run 31797862442 — green; current-main rebase then dropped the superseded terminal hunk and preserved the audit/Windows patches exactly
  • exact head 6b997a804a2 passed all eight UI shards, gateway chat, audit writer, Windows LAN-host, macOS Node, macOS Swift, and ClawSweeper; its sole failure was a five-byte startup-gzip overage caused by SHA-dependent compression against a nearly exhausted baseline, then current main@ad400d810b3 landed the owning baseline update and the six-commit patch rebased identically
  • structured autoreview on the original branch, exact rebase, review repair, and final combined bundle — clean, no accepted/actionable finding
  • source-blind behavior contract — satisfies_contract at 0.97 confidence; all 4 user tasks and 4 anti-cheat probes passed

Known proof boundary

No release, tag, appcast, notarization submission, installation, service change, or TCC mutation is part of this PR. The current OpenClaw dependency still pins Peekaboo Bridge protocol 1.24 while the required 1.26 revision is in a separate landing lane. A disposable current-pin notarization would duplicate an Apple submission and produce misleading terminal evidence, so the real package / install / status / recover / uninstall trace is intentionally deferred until the final Peekaboo revision lands. Final elevation artifact certification will use that landed source revision and will attach the redacted lifecycle trace; existing background-host smoke is not represented here as full lifecycle proof.

@clawsweeper

clawsweeper Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: macos App: macos scripts Repository scripts size: XL maintainer Maintainer-authored PR labels Aug 14, 2026
@steipete steipete self-assigned this Aug 14, 2026
@steipete
steipete force-pushed the codex/mac-elevation-distribution branch from c7a6c49 to ec74de5 Compare August 14, 2026 09:20
@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. P2 Normal backlog priority with limited blast radius. 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 Aug 14, 2026
@clawsweeper

clawsweeper Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 14, 2026, 8:25 AM ET / 12:25 UTC.

ClawSweeper review

What this changes

This PR adds a Foundation-signed macOS elevation-host package and separate launchd lifecycle, plus runtime suppression and CI-stability test updates.

Merge readiness

⚠️ Ready for maintainer review - 5 items remain

Keep open for macOS release-owner review: this adds a privileged signed unattended-host boundary, while its stated dependency prerequisite and real lifecycle certification are deferred. Likely related people: steipete (assigned workflow owner; high confidence).

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

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch has substantial source and mock coverage, but the dependency and real privileged lifecycle remain unverified.
Proof confidence 🌊 off-meta tidepool Not applicable: The member-authored PR is not subject to the external-contributor proof gate, though its own release-lifecycle proof remains deferred and is a merge risk.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The member-authored PR is not subject to the external-contributor proof gate, though its own release-lifecycle proof remains deferred and is a merge risk.
Evidence reviewed 6 items Current-main comparison: The checked-out current main does not contain the proposed elevation-host command, so the central capability is not already implemented.
Lifecycle boundary: The proposed installer separately stages, starts, verifies, rolls back, and reports the elevation launchd service.
Runtime ownership: The elevation mode suppresses updater, Dock, and interactive services while retaining connection and Bridge startup paths.
Findings None None.
Security Needs attention Validate the signed lifecycle before adoption: The release path validates notarization and signer state in code, but the PR body confirms that no real package, install, recovery, or TCC run has been performed on the final dependency revision.

How this fits together

The macOS app normally owns interactive presentation, Gateway connectivity, and the local Peekaboo Bridge. The proposed elevation host is a separate launchd-managed runtime that installs a signed artifact, waits for Bridge readiness, and reports degraded permissions through status.

flowchart LR
  A[Release operator] --> B[Notarized elevation archive]
  B --> C[Elevation host installer]
  C --> D[Separate launchd job]
  D --> E[Unattended macOS app]
  E --> F[Gateway and Peekaboo Bridge]
  C --> G[Status and recovery]
Loading

Decision needed

Question Recommendation
Should the Foundation-operated elevation-host signing and launchd boundary wait for the required Peekaboo revision and real lifecycle certification before merge? Stage certification: Keep the PR open until the prerequisite revision and a redacted signed artifact lifecycle trace are available.

Why: This is a privileged deployment surface with release credentials and a deferred dependency contract, so source review cannot safely substitute for release-owner acceptance.

Before merge

  • Resolve security concern: Validate the signed lifecycle before adoption - The release path validates notarization and signer state in code, but the PR body confirms that no real package, install, recovery, or TCC run has been performed on the final dependency revision.
  • Resolve merge risk (P1) - The PR’s stated Peekaboo protocol prerequisite is not in the current dependency pin, so the readiness and permission probes lack dependency-level confirmation.
  • Resolve merge risk (P1) - No real signed package/install/status/recover/uninstall trace exists yet; the PR body explicitly defers it until the prerequisite revision lands.
  • Complete next step (P2) - This protected member-authored PR needs release-owner acceptance of a new signing and unattended-host boundary, not an automated repair.

Findings

  • [medium] Validate the signed lifecycle before adoption — scripts/mac-elevation-host.sh:169
Agent review details

Security

Needs attention: The code hardens the signing boundary, but the privileged artifact and launchd workflow still lacks the deferred real certification trace.

PR surface

Tests +366, Docs +50, Config 0, Other +731. Total +1147 across 25 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 9 713 347 +366
Docs 2 57 7 +50
Config 1 1 1 0
Generated 0 0 0 0
Other 13 782 51 +731
Total 25 1553 406 +1147

Review metrics

Metric Value Why it matters
Production versus test delta production/tooling +737/-46; tests +478/-72 after discounting 281 moved lines; docs +57/-7 The new release and launchd capability explains the production growth, while the separate test changes should be judged independently.
New operator lifecycle 6 commands: package, install, status, recover, uninstall, print-plist This adds a distinct privileged deployment interface that needs release-owner acceptance and lifecycle proof.

Stored data model

Persistent data-model change detected: serialized state: src/gateway/server.chat.gateway-server-chat.test.ts, serialized state: test/scripts/notarize-mac-artifact.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Certify before merge (recommended)
    Land the required Peekaboo revision and attach a redacted signed package-to-recovery trace before merging.
  2. Accept deferred lifecycle proof
    A release owner can explicitly accept post-merge certification of the new signing and service boundary.

Technical review

Best possible solution:

Complete the required Peekaboo revision, then validate one Foundation-signed artifact through the full isolated launchd lifecycle with a redacted trace before approving this deployment path.

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

Not applicable: this is a new deployment workflow, not a report of broken current-main behavior; its claimed real lifecycle proof is explicitly deferred.

Is this the best way to solve the issue?

Unclear: the canonical runtime and separate launchd owner are coherent, but the required dependency revision and real signed lifecycle proof are still absent.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a new, bounded macOS operator workflow rather than an active default-path regression.
  • merge-risk: 🚨 security-boundary: The PR introduces a Foundation-signed, notarized application and unattended local automation host.
  • merge-risk: 🚨 availability: The new launchd install, rollback, and readiness path controls whether the macOS host remains running.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool 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 member-authored PR is not subject to the external-contributor proof gate, though its own release-lifecycle proof remains deferred and is a merge risk.

Evidence

Security concerns:

  • [medium] Validate the signed lifecycle before adoption — scripts/mac-elevation-host.sh:169
    The release path validates notarization and signer state in code, but the PR body confirms that no real package, install, recovery, or TCC run has been performed on the final dependency revision.
    Confidence: 0.95

What I checked:

Likely related people:

  • steipete: The supplied timeline shows steipete assigned to the PR and the six proposed commits carry the macOS lifecycle work. (role: assigned proposed feature owner; confidence: high; commits: fab521dc20d5, 6d9590ff7348; files: scripts/mac-elevation-host.sh, apps/macos/Sources/OpenClaw/MenuBar.swift)

Rank-up moves

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

  • Land the required Peekaboo revision.
  • Attach a redacted Foundation-signed package/install/status/recover/uninstall trace.

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 (6 earlier review cycles)
  • reviewed 2026-08-14T09:26:06.583Z sha ec74de5 :: found issues before merge. :: [P1] Document a usable elevation artifact path | [P2] Scope host-tool checks to each lifecycle command
  • reviewed 2026-08-14T09:56:08.707Z sha d2fabdb277d4946f78ce9538859dc67370289d06 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-14T10:41:37.664Z sha 6db33b1cff7124a23d73ac7a1c28e822ff1db62c :: needs maintainer review before merge. :: none
  • reviewed 2026-08-14T11:07:37.508Z sha c46bafc14f8c280d99367ba67818466a2444123e :: found issues before merge. :: [P2] Fail closed when the TCC query fails
  • reviewed 2026-08-14T11:34:27.259Z sha 051500b74c57079c0ac018101013d0893a14d7b2 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-14T12:12:51.411Z sha 6b997a8 :: needs maintainer review before merge. :: none

@openclaw-barnacle openclaw-barnacle Bot added the app: web-ui App: web-ui label Aug 14, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 14, 2026
@steipete
steipete force-pushed the codex/mac-elevation-distribution branch from 5df2071 to 6db33b1 Compare August 14, 2026 10:35
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 14, 2026
@openclaw-barnacle openclaw-barnacle Bot added the gateway Gateway runtime label Aug 14, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 14, 2026
@steipete
steipete force-pushed the codex/mac-elevation-distribution branch from 051500b to 6b997a8 Compare August 14, 2026 12:06
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 14, 2026
@steipete
steipete force-pushed the codex/mac-elevation-distribution branch from 6b997a8 to 6d9590f Compare August 14, 2026 12:18
@clawsweeper clawsweeper Bot added status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 14, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready at exact head 6d9590ff7348152baceeeccf7f248da99a3cb439.

Proof completed:

  • exact CI run 31799794392 and openclaw/ci-gate job 94768259236: green
  • build artifacts 94765046283, macOS Node 94765046270, and macOS Swift 94765046241: green
  • every Control UI E2E shard plus the gateway-chat, audit-writer, and Windows LAN-host regression lanes: green
  • final exact ClawSweeper run 31799920073 / job 94765250682: no actionable source finding
  • Blacksmith changed gates 31788814066, 31791702174, 31793783335, 31795565395, and 31797862442: green on their frozen deltas
  • final-tree focused proof: UI 19/19, gateway chat 55/55, audit writer 7/7, elevation tooling 9/9; format/lint/shell/docs/diff gates and structured review are clean
  • repo-native review artifacts and OPENCLAW_TESTBOX=1 scripts/pr prepare-run 123569: validated successfully

Known sequencing boundary: the final Foundation-signed package/install/status/recover/degraded-TCC lifecycle certification intentionally waits for the compatible landed Peekaboo revision. This PR does not claim or publish a disposable artifact from the current dependency pin.

@steipete
steipete merged commit 44dd983 into main Aug 14, 2026
188 checks passed
@steipete
steipete deleted the codex/mac-elevation-distribution branch August 14, 2026 12:39
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 15, 2026
* feat(mac): add canonical elevation host workflow

* fix(mac): clarify elevation host deployment

* test(ui): stabilize cloud startup effort flow

* fix(mac): fail closed on unknown TCC status

* test: synchronize async CI boundaries

* test: remove remaining CI timing races
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XL 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