Repository navigation
fix(macos): isolate profiles and report direct Gateway failures - #127007
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs changes before merge. Reviewed August 21, 2026, 1:00 AM ET / 05:00 UTC. ClawSweeper reviewWhat this changesThe PR prevents named macOS profiles from inheriting a development checkout and changes Gateway failure messages to identify direct remote endpoints safely. Merge readinessKeep this maintainer PR open: it fixes real profile and direct-Gateway failures, but its new error path synchronously rereads config after a connection failure, so it can report a newly edited endpoint rather than the endpoint that failed and can block the main actor on file I/O. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (partial) — step 2 Assertions:
How this fits togetherThe macOS app selects a project root before it can launch local worker processes, and ControlChannel reports Gateway connection failures to the app UI. Profile state and Gateway routing feed those owners, which determine worker startup and recovery guidance. flowchart LR
A[Profile selection] --> B[Project-root resolver]
B --> C[Local worker launch]
D[Gateway route snapshot] --> E[Gateway connection]
E --> F[Failure formatter]
F --> G[Recovery message]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceOther +174. Total +174 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Carry the route or endpoint snapshot used by the failed connection into error formatting, and remove the catch-path config-file reread so recovery text stays route-consistent and non-blocking. Do we have a high-confidence way to reproduce the issue? Yes in source: trigger a Gateway failure while the configured route changes; the request uses an endpoint snapshot, but the changed catch path rereads the current config and formats that later state. Is this the best way to solve the issue? No: repairing the two stated owners is right, but formatting must receive the attempted endpoint rather than reconstructing it from a post-failure config read. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1fb4857e3cc2. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
…claw#127007) * fix(macos): isolate named-profile development project roots * fix(macos): report actual direct gateway connection failures * fix(macos): satisfy SwiftLint remote recovery line limit * fix(macos): sync native IPv6 endpoint localization inventory * fix(macos): keep IPv6 endpoint formatting out of localization inventory
Summary
Root cause
CommandResolver.projectRootinherited the default development-checkout fallback before named app profiles existed.ControlChannel.friendlyGatewayMessagelikewise assumed every remote route was an SSH tunnel and repeatedly reconstructed its target from the profile's local Gateway port. Both assumptions became invalid when isolated profiles and directws/wssremote transport were introduced.The fixes repair the canonical project-root and error-formatting owners. The normal default-profile checkout and explicitly selected per-profile checkout remain available. Direct endpoint display is built only from the parsed host and effective port; SSH and local routes retain their existing recovery guidance.
Verification
Projects/openclawinstead of.openclaw-isolated; the default profile and explicit override remain covered.xcrun swift test --package-path apps/macos --scratch-path <isolated-cache> --skip-update --disable-automatic-resolution --manifest-cache none --disable-build-manifest-caching --filter 'ControlChannelGatewayMessageTests|ControlChannelStateDebouncerTests|CommandResolverTests|AppProfileTests|GatewayEnvironmentTests|GatewayEndpointStoreTests|RemoteGatewayProbeTests|MacNodeHostWorkerTests|OnboardingViewSmokeTests': 172 tests across 9 suites passed.codesign --verify --deep --strict; fresh isolated background profile launched with no CLI, no checkout override, and privileged bridges disabled.mac node gateway connect failed: OpenClaw Gateway is not installed yet.without starting a source worker or changing the existing checkout.Cannot reach gateway at 127.0.0.1:42675; check the Gateway URL and remote gateway.and loggedcontrol channel recovery ensured remote endpoint port=42675; the running operator app and Gateway were unchanged.git diff --check: clean.Production delta: +49/-30 (net +19); tests: +158/-3. The additional production lines establish the profile ownership boundary and credential-safe transport-aware endpoint reporting across all existing error callers.