Skip to content

fix(macos): avoid self-named defaults suite - #117690

Merged
steipete merged 2 commits into
mainfrom
codex/fix-macos-nix-defaults-suite
Aug 2, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/fix-macos-nix-defaults-suite

Conversation

@steipete

@steipete steipete commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Foundation emits a launch-time warning when the macOS app opens its own ai.openclaw.mac bundle identifier as a separate defaults suite. Reported by @onlinejourno in #88909.

Why This Change Was Made

UserDefaults.standard already owns the current bundle domain. Select the stable Nix suite only for renamed app bundles; preserve existing preference values and avoid migrations, writes, or new configuration.

User Impact

Normal OpenClaw launches no longer trigger the nonsensical-suite Foundation warning, while renamed Nix-managed app bundles still read their existing stable defaults domain.

Evidence

  • Real signed Foundation boundary proof: Apple /usr/bin/osascript -l JavaScript reproduces the exact nonsensical-suite warning for its own bundle identifier; standard defaults emit no warning, and the distinct ai.openclaw.mac suite initializes without warning.
  • Focused native regressions cover matching bundle identifiers, renamed bundles, non-app processes, and existing stable-suite Nix preference reads.
  • Exact-head hosted CI run 30727517908 passed macos-swift, macos-node, and openclaw/ci-gate on 5ef245d86bb133c8c2f5ea31204e58d140ac47cd. Earlier exact-code run 30723598474 also passed the release app build, OpenClawKit, full Swift tests, and required CI gate.
  • Fresh final-head structured gpt-5.6-sol xhigh autoreview exited zero with no accepted or actionable findings and 0.99 correctness confidence.
  • A direct post-fix packaged OpenClaw launch was not performed because this environment cannot produce an operator-approved signed app bundle. The signed Apple Foundation differential and hosted native tests are the executed dependency-boundary proof.

Fixes #88909.

@openclaw-barnacle openclaw-barnacle Bot added app: macos App: macos size: XS maintainer Maintainer-authored PR labels Aug 1, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Aug 1, 2026
@clawsweeper

clawsweeper Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 1, 2026, 9:47 PM ET / August 2, 2026, 01:47 UTC.

ClawSweeper review

What this changes

Avoid creating a separate macOS defaults suite when the running app already uses ai.openclaw.mac, while continuing to read that suite for renamed Nix-managed app bundles.

Merge readiness

⛔ Blocked until stronger real behavior proof is added - 4 items remain

Keep this PR open: the source change is a focused, coherent repair that preserves the documented stable Nix defaults domain for renamed app bundles, but it still needs direct post-fix packaged-app launch evidence and completion of the exact-head macOS check before merge.

Priority: P2
Reviewed head: 5ef245d86bb133c8c2f5ea31204e58d140ac47cd

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The repair is focused and well-covered in source, but direct app-level proof remains the merge gate.
Proof confidence 🦐 gold shrimp (3/6) Needs stronger real behavior proof before merge: The PR body describes a real signed Foundation differential, but it does not provide direct after-fix packaged OpenClaw launch output showing the changed app behavior; add redacted terminal output or a recording before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: The PR body describes a real signed Foundation differential, but it does not provide direct after-fix packaged OpenClaw launch output showing the changed app behavior; add redacted terminal output or a recording before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 5 items Current-main defect boundary: Current main constructs UserDefaults(suiteName: launchdLabel) during isNixMode; the constant and app Info.plist both define ai.openclaw.mac, so the normal app bundle takes the self-named-suite path reported by the linked issue.
Proposed owner-boundary repair: The PR makes stable-suite construction conditional on a renamed app bundle, then passes that optional suite through the existing Nix-mode resolver; its regression tests cover matching identifiers, renamed bundles, and non-app processes.
Existing Nix compatibility contract: The user-facing Nix documentation instructs macOS operators to write openclaw.nixMode to ai.openclaw.mac; retaining that suite for renamed bundles is therefore necessary compatibility behavior.
Findings None None.
Security None None.

How this fits together

The macOS app determines Nix mode during launch from environment variables and persisted defaults. That decision controls whether onboarding and configuration-writing paths become read-only for declarative Nix installations.

flowchart LR
  A[macOS app launch] --> B[Read bundle identifier]
  B --> C{Matches stable defaults domain?}
  C -->|Yes| D[Use standard defaults]
  C -->|Renamed app| E[Read stable Nix defaults suite]
  D --> F[Resolve Nix mode]
  E --> F
  F --> G[Configure onboarding and settings behavior]
Loading

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: The PR body describes a real signed Foundation differential, but it does not provide direct after-fix packaged OpenClaw launch output showing the changed app behavior; add redacted terminal output or a recording before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - The change alters persisted-defaults routing for Nix-mode detection; the tests preserve the renamed-bundle path, but a real signed OpenClaw app launch has not yet shown that the warning is gone while the existing Nix preference remains effective.
  • Resolve merge risk (P1) - The exact-head macos-swift check is still running, so native compilation and the focused regression suite are not yet confirmed for the current PR head.
  • Complete next step (P2) - The remaining work is contributor-owned real-behavior evidence and completion of an in-progress native check, not a mechanical repair for an automated fix lane.
Agent review details

Security

None.

PR surface

Other +33. Total +33 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 36 3 +33
Total 2 36 3 +33

Review metrics

Metric Value Why it matters
Defaults routing 1 suite-selection condition changed The condition decides whether an existing Nix-managed preference is read from a stable defaults domain during app startup.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #88909
Summary: This PR is the focused candidate repair for the self-named defaults-suite warning reported in the linked macOS issue.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Require app-level proof before merge (recommended)
    Capture redacted after-fix signed-app launch output that shows the warning is absent and confirms the renamed-bundle Nix preference still resolves.
  2. Accept Foundation-boundary proof
    Maintainers may explicitly accept the documented signed Foundation differential as sufficient if a packaged-app launch cannot be produced, while retaining the current regression coverage.

Technical review

Best possible solution:

Land the conditional suite selection only after a redacted signed packaged-app launch demonstrates both warning removal and preserved renamed-bundle Nix-mode behavior, with the current-head macOS check green.

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

Yes—source establishes that the normal app bundle identifier and the stable suite identifier are both ai.openclaw.mac, so current main enters the reported self-named-suite construction path. A local macOS signed-app reproduction was not available in this read-only checkout.

Is this the best way to solve the issue?

Yes—the PR repairs the decision at the defaults-suite owner boundary instead of masking the warning downstream, and it retains the documented stable-suite behavior for renamed Nix bundles.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.

Label justifications:

  • P2: This is a bounded macOS launch warning and settings-detection repair with limited blast radius.
  • merge-risk: 🚨 compatibility: The PR changes which persisted defaults domain is consulted for Nix-mode detection on existing macOS installations.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The PR body describes a real signed Foundation differential, but it does not provide direct after-fix packaged OpenClaw launch output showing the changed app behavior; add redacted terminal output or a recording before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Current-main defect boundary: Current main constructs UserDefaults(suiteName: launchdLabel) during isNixMode; the constant and app Info.plist both define ai.openclaw.mac, so the normal app bundle takes the self-named-suite path reported by the linked issue. (apps/macos/Sources/OpenClaw/ProcessInfo+OpenClaw.swift:36, 6a527b6e5531)
  • Proposed owner-boundary repair: The PR makes stable-suite construction conditional on a renamed app bundle, then passes that optional suite through the existing Nix-mode resolver; its regression tests cover matching identifiers, renamed bundles, and non-app processes. (apps/macos/Sources/OpenClaw/ProcessInfo+OpenClaw.swift:16, 27861fd011a7)
  • Existing Nix compatibility contract: The user-facing Nix documentation instructs macOS operators to write openclaw.nixMode to ai.openclaw.mac; retaining that suite for renamed bundles is therefore necessary compatibility behavior. Public docs: docs/install/nix.md. (docs/install/nix.md:61, 6a527b6e5531)
  • Feature provenance: The stable Nix defaults suite originated in the macOS Nix-mode change, whose commit message explicitly describes preserving Nix defaults across app-bundle identifier churn. (apps/macos/Sources/OpenClaw/ProcessInfo+OpenClaw.swift:16, 69aa3df116d3)
  • Current validation state: The supplied PR state shows the exact-head macos-swift check still in progress; the PR body describes an executed Foundation-boundary differential but does not include direct after-fix packaged-app launch output. (5ef245d86bb1)

Likely related people:

  • steipete: Current-main blame attributes the Nix-mode defaults construction to this area’s most recent file rewrite, and the PR repair follows that same launch-time path. (role: recent macOS area contributor; confidence: high; commits: 2fcb1f728028, 5d1311c19e65; files: apps/macos/Sources/OpenClaw/ProcessInfo+OpenClaw.swift, apps/macos/Tests/OpenClawIPCTests/NixModeStableSuiteTests.swift)
  • joshp123: The original stable-suite implementation and its stated renamed-bundle compatibility goal date to the Nix defaults commit. (role: introduced stable Nix defaults behavior; confidence: high; commits: 69aa3df116d3; files: apps/macos/Sources/OpenClaw/ProcessInfo+OpenClaw.swift, docs/install/nix.md)

Rank-up moves

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

  • Post redacted after-fix signed OpenClaw app-launch output that directly demonstrates warning removal and preserved Nix-mode behavior.
  • Wait for the current-head macos-swift check, then refresh the review if the result or head changes.

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 (2 earlier review cycles)
  • reviewed 2026-08-01T23:39:56.952Z sha 27861fd :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-02T00:16:03.397Z sha 27861fd :: needs real behavior proof before merge. :: none

@steipete steipete self-assigned this Aug 2, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 2, 2026
@steipete
steipete merged commit 78193de into main Aug 2, 2026
67 of 69 checks passed
@steipete
steipete deleted the codex/fix-macos-nix-defaults-suite branch August 2, 2026 01:57
@steipete

steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
* fix(macos): avoid self-named defaults suite

* chore: keep changelog release-owned
llwijvbw123 pushed a commit to llwijvbw123/openclaw that referenced this pull request Aug 28, 2026
…elf-release

* commit '10a390ed7fa88d09da0d4523c3ed1e3550ece5c6': (4646 commits)
  fix(release): allow larger npm plugin artifacts (openclaw#117745)
  refactor(macos): consolidate gateway process fixtures (openclaw#117740)
  fix(ui): preserve complete persisted log messages (openclaw#117666)
  fix(ui): decode artifact previews as UTF-8 (openclaw#117657)
  fix(control-ui): restore sandbox media previews (openclaw#117689)
  fix(plugins): link host declared as direct dependency (openclaw#117738)
  fix(macos): avoid self-named defaults suite (openclaw#117690)
  fix(inference): preserve run ownership and completion delivery (openclaw#117731)
  test(talk): align browser E2E tool completion
  test: consolidate OpenClaw E2E fixtures (openclaw#117701)
  fix(release): ignore bundle fields in npm locks (openclaw#117730)
  fix(meeting-bot): keep configured host options internal
  refactor(line): remove dead card helpers (openclaw#117729)
  perf(cli): attribute command startup stages (openclaw#117720)
  refactor(whatsapp): deduplicate reply delivery test fixtures (openclaw#117710)
  docs(changelog): note bounded WebRTC tool calls
  docs(changelog): note meeting audio bounds
  fix(meeting-bot): preserve node host SDK surface
  test(talk): split WebRTC tool lifecycle coverage
  fix(meeting-bot): break node host import cycle
  ...

# Conflicts:
#	package.json
#	src/agents/model-auth.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos maintainer Maintainer-authored PR 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. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NSUserDefaults warning: app passes own bundle identifier as suite name

1 participant