Repository navigation
refactor(apple): deslop shared Swift and macOS fourth pass - #160710
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 28, 2026, 11:37 PM ET / September 29, 2026, 03:37 UTC (Revision 8). ClawSweeper reviewWhat this changesThe branch simplifies shared Swift chat and macOS app code, binds delayed file selections to their conversation, and scopes rendered link previews to their URL. Merge readiness⛔ Blocked before merge - 2 items remain Keep open. Current main still has the two reported failure paths, and the related merged PRs address separate work. The prior preview finding is resolved at this head; this review found no blocking defect. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw's shared Swift chat UI receives conversation input, file selections, and link data for the Apple apps; it stages attachments and renders chat. The macOS app also connects that UI to Gateway routing and local approvals. flowchart LR
A[File selection] --> B[Captured conversation]
B --> C{Still current?}
C -->|Yes| D[Attachment staging]
C -->|No| E[Discard stale selection]
F[Message link URL] --> G[URL scoped preview]
G --> H[Rendered chat]
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep session admission and preview identity with their existing shared Swift owners, retain the focused regressions, and land through the native macOS review workflow. Do we have a high-confidence way to reproduce the issue? Yes, current-main source shows both late attachment ownership and URL-unscoped preview results. The PR records original-failure controls, although this read-only review did not execute native code. Is this the best way to solve the issue? Yes. Capturing the existing session owner and gating rendered preview data by URL repair the failures within their current owners. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6391a9ad3311. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (7 earlier review cycles)
|
df89ce5 to
864fac5
Compare
864fac5 to
b46ba7c
Compare
Consolidate chat projections, native request and file-panel helpers, subprocess preparation, shared types, and redundant testing forwards. Preserve rendering, wire formats, authentication, approval checks, permissions, persisted keys, and update/signing settings. Also bind delayed attachment callbacks to their originating conversation and invalidate obsolete link-preview generations before fetch eligibility. Regression controls reproduce both defects; the full shared package and remote scope checks pass.
Preserve the single deferred cancellation while unwrapping TaskGroup<String?>.next() explicitly. This avoids the pinned SwiftLint redundant-nil-coalescing rule without changing nil completion or cancellation behavior.
b46ba7c to
c509447
Compare
…160710) * refactor(apple): deslop shared Swift and macOS fourth pass Consolidate chat projections, native request and file-panel helpers, subprocess preparation, shared types, and redundant testing forwards. Preserve rendering, wire formats, authentication, approval checks, permissions, persisted keys, and update/signing settings. Also bind delayed attachment callbacks to their originating conversation and invalidate obsolete link-preview generations before fetch eligibility. Regression controls reproduce both defects; the full shared package and remote scope checks pass. * test(apple): use canonical endpoint snapshot enum values * refactor(apple): keep explicit task-group result unwrap Preserve the single deferred cancellation while unwrapping TaskGroup<String?>.next() explicitly. This avoids the pinned SwiftLint redundant-nil-coalescing rule without changing nil completion or cancellation behavior. * fix(apple): scope retained preview rendering to its URL
The cold-start tests introduced in 418f22b (#158954) still referenced setTestingLastFailureReason and the bundlePath argument. Those were intentionally removed by 6cc8e7f (#163372) and 669db5d (#160710). Use the same direct property writes and port-only calls as the sibling tests, preserving all assertions.
The cold-start tests introduced in bac884e (openclaw#158954) still referenced setTestingLastFailureReason and the bundlePath argument. Those were intentionally removed by 9c6018f (openclaw#163372) and 4e79f38 (openclaw#160710). Use the same direct property writes and port-only calls as the sibling tests, preserving all assertions.
* refactor(apple): simplify old shared and macOS bookkeeping Replace redundant generations with existing cancellation or actual owner identity, consolidate parallel fallback/policy paths, and remove test-only forwarding layers. Preserve authority, FIFO, durable state, resource bounds, public protocol/config shapes, signing, permissions, and visible rendering. Reuse canonical session-key normalization for Voice Wake delivery selection: opaque Signal group IDs remain case-sensitive and main aliases are not added. Use canonical IP-literal policy for discovery labels and remote CLI validation. Best-effort tradeoffs accepted - Palette generation (#159350): synthetic direct completions bypassed the sole cancellation-owning caller; unsupported future callers can show stale results until the next search. Current cancellation/request/agent checks remain. - Link preview generation (#160710): synthetic URL replacement without caller cancellation is outside the SwiftUI task lifecycle; a late cosmetic result can remain until the next refresh. Network/SSRF checks and bounded caches remain. - Sidebar preview generation (#147197): same-request overlapping cache reads can finish out of order; no linked human failure report, and a later refresh replaces the cosmetic projection. Owner/request checks remain. - Source-preview producer revision (#148906): duplicate of exact task cancellation, with no human failure report. Consumer revision and authenticated resource authority remain. - Mermaid generations (#135470/#135746): feature stress fixtures, no linked human race report. Exact subscriber cancellation and job/WebView identity retain the same admission; no extra failure accepted. - Camera JPEG UUID (#107879): duplicates exact task cancellation; #107804 was a human feature request, not a generation-specific incident. Captured session/agent/route and attachment admission remain. - Discovery generation (#145435): speculative queued callbacks, no linked human incident. A stopped browser may publish one late discovery projection; next discovery/refresh repairs it. Connection authority remains separate. - FSEvents generation (#145453): synthetic stop/restart fixtures, no linked human incident. An old callback after restart may cause one extra refresh; serial lifecycle ownership and pending-work cancellation remain. - Menu generations (#139688): feature-local late-result fixtures, no linked human incident. Exact task cancellation replaces duplicate tokens; drain-before-disconnect and real consumer/window authority remain. - Cron generation (#131466/#137502): #138209 cut every load over to one cancel-and-drain chain. No direct concurrent load caller remains; cancellation and physical source leases stay checked after awaits. - WebChat visibility acknowledgement/retry (#113634/#137089): synthetic timeout/reconnect interleavings, no linked human incident. A timed-out visibility update is best effort until the next transition/reconnect; FIFO and live socket leases remain. - WebChat cleanup UUID (#113634/#137089): retain one bounded completed Task handle per live connection instead of matching cleanup tokens. Completion releases captures; replacement/retirement removes the handle. - Child-exit polling (#145437): synthetic missed-notification coverage, no linked human report. A lost OS exit notification may wait for the existing deadline; final non-reaping liveness/status checks and cleanup remain. - Realtime iterator borrowing trap (#156772): every real consumer awaits its own iterator sequentially. Unsupported concurrent next calls no longer get a custom custody protocol; bounded stream/cancellation/socket checks remain. - Receipt projection admission (#161745): both real callers already match receipt and row identity immediately before synchronous projection. Those effect checks remain; no unsupported internal caller is defended twice. - Recap attribution heuristics (#112188/#113084): synthetic guard matrix, no linked human race report. Missing initial rows or very late unrelated completion may supply a cosmetic footer; per-session freshness, failed-turn handling and settled results remain. - PortGuardian per-write schema scans (#110527): synthetic live-handle version advance, no linked human incident. Concurrent external schema upgrades are best effort until reopen; initial admission, migration locks, receipts, transactions and durability remain. - Unread queue counter (#110019): actual Task equality replaces the duplicate integer token. Exact-tail reclamation, bounded bookkeeping, FIFO and route authority remain unchanged. Review dispositions: the claimed Task compilation failure is disproved by the selected SDK's Equatable conformance and native builds. Repeated receipt identity admission is unnecessary at its internal projector because both real callers retain it immediately before projection. Per-write schema revalidation was declined under the explicit best-effort policy above. Proof and scope Net production reduction: 369 lines (148 added, 517 deleted), excluding tests. Fresh seven-day census permits all substantive production edits; the only recent caller change is the unavoidable one-line fallback-to-parse rename. Shared Swift build passed. Final focused shared tests passed 396 cases in six suites (6.683s execution), Watch decoder tests passed five cases (0.003s), and isolated whole-owner native tests passed 16 cases. macOS SwiftPM compiled all products and the test bundle. Final macOS and iOS/Watch xcodebuild builds passed (89.60s and 120.87s wall), without signing changes or app launches. Canonical Apple lint/format checks passed; the initial iOS format failure in WatchCommands was ours and corrected, with no gate weakened. Lint-suppression tests passed 3/3 (14.09s wall). Earlier runtime cycles and Madge each reported 0; the TypeScript graph is unchanged. Native localization stayed at 4476 entries. The 45 original packaging/elevation timeout cases passed one focused retry (94.79s wall), with no assertion/budget change and no claim of a diagnosed fix. Known gaps: seven issues remained in the earlier ChatStreamReplayTests narration=false package cases; causality/current-main attribution is unproven. App-hosted macOS tests were not executed on the operator desktop. No hosted CI or PR was started: the explicit BELOW-500 rule requires a branch-only handoff. * refactor(ui): consolidate old UI owners and validation Share route decoding, attachment retention, gallery preparation, transient identity encoding, override copying, and extension classification. Remove duplicate admission/schema mirrors and obsolete supported-browser fallbacks. Both Lit and Solid paths remain; no rendering change is intended. No config, protocol, persisted shape, dependency, or public SDK change. Best-effort tradeoffs accepted - Malformed internal native requests (#140988): all callers are typed and native hosts validate at the effect; their error replaces the renderer mirror. - Worker replacement during an identity query (#140484): added for synthetic autoreview interleavings, not a human incident. Return false; normal worker announcements and foreground recovery observe the next active worker. - Native readiness changing between synchronous checks (#140484/#109719): rely on queued events. A broken native event can require another worker event or reload; camera readiness retains its existing five-second error deadline. - Overlapping application-root health reporters (#152638): startup mounts one root. Unsupported overlapping roots are last-publication-wins; the actual reported health/status feature and native trusted-document checks remain. - Polling after stop (#139704): its sole owner retires eligibility first. Scheduling now uses that owner admission, not a separate read-only generation. - Resetting an observer without retiring its connection (#116887): no production caller does this. Canonical connection epochs remain the sole retirement owner; unsupported direct live-scope reset no longer fences an old response separately. - Upload policy changing during local reads (#158567): decoded/hash work can finish. Draft publication and every upload request retain live policy checks. - Missing supported browser primitives (#105240/#151388/#100024/#102745): unsupported runtimes error instead of code-point initials, skipped input yield, wall-clock timing, or approximate microtask paint. The human progress-card fix in #151386 keeps its browser yield and durable FIFO handoff unchanged. - URL APIs disappearing after URL creation (#100024/#149330): supported browsers keep paired APIs. An unsupported replaced global can throw during cleanup; undefined URLs, creation fallback, cancellation and release ordering remain. - Malformed internal MCP calls bypassing AppBridge (#161747): may throw. The SDK still rejects malformed wire blocks before dispatch, proved over real in-memory App/AppBridge transport. UI content, authority, confirmation and custody policy remain. The introducing PR cites no human incident for the second mirror. Production: +176/-394, net -218 lines across 21 eligible old files. Tests: +30. Focused owner/sibling tests, targeted types/lint/format, lint-suppression and independent P0-P2 review pass. Import edges are unchanged; runtime/Madge cycle proof remains zero. Whole-tree Knip timed out at existing limits; heavy gallery renderer runs did not reach assertions, while its owning controller suite passed. * refactor(ui): remove obsolete Fetch capability branch The supported Control UI browser floor includes Fetch. Start attachment metadata reads directly rather than leaving an unsupported runtime in a permanent checking state. Best-effort tradeoffs accepted - Missing global Fetch: the guard originated in #64104, whose feature report cites no human missing-Fetch incident. An unsupported runtime that replaces Fetch now reaches the existing rejected-request/unavailable path. Metadata validation, auth/tickets, allow POST, cancellation, resource admission, expiry and bounded retry remain unchanged. No intended rendering change. Unchanged lifecycle baseline: 21/21, 25.09 s. Final lifecycle and attachment siblings: 50/50, 14.77 s. UI types, typed lint, formatting and lint-suppression checks pass. This cut removes five production lines including formatter reflow, bringing the lane to 223 net production lines removed. Fresh independent P0-P2 review is scoped-clean with no actionable findings. * fix(ui): use global frame scheduling APIs Preserve double-frame paint timing and cancellation without requiring a Window object in renderer-free hosts that supply the standard global APIs. The existing access suite reproduces seven unhandled errors before this fix and passes on main; all 130 affected cases plus 262 timing/state/send sibling cases now pass without test changes.
…#170823) * refactor(apple): simplify old shared and macOS bookkeeping Replace redundant generations with existing cancellation or actual owner identity, consolidate parallel fallback/policy paths, and remove test-only forwarding layers. Preserve authority, FIFO, durable state, resource bounds, public protocol/config shapes, signing, permissions, and visible rendering. Reuse canonical session-key normalization for Voice Wake delivery selection: opaque Signal group IDs remain case-sensitive and main aliases are not added. Use canonical IP-literal policy for discovery labels and remote CLI validation. Best-effort tradeoffs accepted - Palette generation (openclaw#159350): synthetic direct completions bypassed the sole cancellation-owning caller; unsupported future callers can show stale results until the next search. Current cancellation/request/agent checks remain. - Link preview generation (openclaw#160710): synthetic URL replacement without caller cancellation is outside the SwiftUI task lifecycle; a late cosmetic result can remain until the next refresh. Network/SSRF checks and bounded caches remain. - Sidebar preview generation (openclaw#147197): same-request overlapping cache reads can finish out of order; no linked human failure report, and a later refresh replaces the cosmetic projection. Owner/request checks remain. - Source-preview producer revision (openclaw#148906): duplicate of exact task cancellation, with no human failure report. Consumer revision and authenticated resource authority remain. - Mermaid generations (openclaw#135470/openclaw#135746): feature stress fixtures, no linked human race report. Exact subscriber cancellation and job/WebView identity retain the same admission; no extra failure accepted. - Camera JPEG UUID (openclaw#107879): duplicates exact task cancellation; openclaw#107804 was a human feature request, not a generation-specific incident. Captured session/agent/route and attachment admission remain. - Discovery generation (openclaw#145435): speculative queued callbacks, no linked human incident. A stopped browser may publish one late discovery projection; next discovery/refresh repairs it. Connection authority remains separate. - FSEvents generation (openclaw#145453): synthetic stop/restart fixtures, no linked human incident. An old callback after restart may cause one extra refresh; serial lifecycle ownership and pending-work cancellation remain. - Menu generations (openclaw#139688): feature-local late-result fixtures, no linked human incident. Exact task cancellation replaces duplicate tokens; drain-before-disconnect and real consumer/window authority remain. - Cron generation (openclaw#131466/openclaw#137502): openclaw#138209 cut every load over to one cancel-and-drain chain. No direct concurrent load caller remains; cancellation and physical source leases stay checked after awaits. - WebChat visibility acknowledgement/retry (openclaw#113634/openclaw#137089): synthetic timeout/reconnect interleavings, no linked human incident. A timed-out visibility update is best effort until the next transition/reconnect; FIFO and live socket leases remain. - WebChat cleanup UUID (openclaw#113634/openclaw#137089): retain one bounded completed Task handle per live connection instead of matching cleanup tokens. Completion releases captures; replacement/retirement removes the handle. - Child-exit polling (openclaw#145437): synthetic missed-notification coverage, no linked human report. A lost OS exit notification may wait for the existing deadline; final non-reaping liveness/status checks and cleanup remain. - Realtime iterator borrowing trap (openclaw#156772): every real consumer awaits its own iterator sequentially. Unsupported concurrent next calls no longer get a custom custody protocol; bounded stream/cancellation/socket checks remain. - Receipt projection admission (openclaw#161745): both real callers already match receipt and row identity immediately before synchronous projection. Those effect checks remain; no unsupported internal caller is defended twice. - Recap attribution heuristics (openclaw#112188/openclaw#113084): synthetic guard matrix, no linked human race report. Missing initial rows or very late unrelated completion may supply a cosmetic footer; per-session freshness, failed-turn handling and settled results remain. - PortGuardian per-write schema scans (openclaw#110527): synthetic live-handle version advance, no linked human incident. Concurrent external schema upgrades are best effort until reopen; initial admission, migration locks, receipts, transactions and durability remain. - Unread queue counter (openclaw#110019): actual Task equality replaces the duplicate integer token. Exact-tail reclamation, bounded bookkeeping, FIFO and route authority remain unchanged. Review dispositions: the claimed Task compilation failure is disproved by the selected SDK's Equatable conformance and native builds. Repeated receipt identity admission is unnecessary at its internal projector because both real callers retain it immediately before projection. Per-write schema revalidation was declined under the explicit best-effort policy above. Proof and scope Net production reduction: 369 lines (148 added, 517 deleted), excluding tests. Fresh seven-day census permits all substantive production edits; the only recent caller change is the unavoidable one-line fallback-to-parse rename. Shared Swift build passed. Final focused shared tests passed 396 cases in six suites (6.683s execution), Watch decoder tests passed five cases (0.003s), and isolated whole-owner native tests passed 16 cases. macOS SwiftPM compiled all products and the test bundle. Final macOS and iOS/Watch xcodebuild builds passed (89.60s and 120.87s wall), without signing changes or app launches. Canonical Apple lint/format checks passed; the initial iOS format failure in WatchCommands was ours and corrected, with no gate weakened. Lint-suppression tests passed 3/3 (14.09s wall). Earlier runtime cycles and Madge each reported 0; the TypeScript graph is unchanged. Native localization stayed at 4476 entries. The 45 original packaging/elevation timeout cases passed one focused retry (94.79s wall), with no assertion/budget change and no claim of a diagnosed fix. Known gaps: seven issues remained in the earlier ChatStreamReplayTests narration=false package cases; causality/current-main attribution is unproven. App-hosted macOS tests were not executed on the operator desktop. No hosted CI or PR was started: the explicit BELOW-500 rule requires a branch-only handoff. * refactor(ui): consolidate old UI owners and validation Share route decoding, attachment retention, gallery preparation, transient identity encoding, override copying, and extension classification. Remove duplicate admission/schema mirrors and obsolete supported-browser fallbacks. Both Lit and Solid paths remain; no rendering change is intended. No config, protocol, persisted shape, dependency, or public SDK change. Best-effort tradeoffs accepted - Malformed internal native requests (openclaw#140988): all callers are typed and native hosts validate at the effect; their error replaces the renderer mirror. - Worker replacement during an identity query (openclaw#140484): added for synthetic autoreview interleavings, not a human incident. Return false; normal worker announcements and foreground recovery observe the next active worker. - Native readiness changing between synchronous checks (openclaw#140484/openclaw#109719): rely on queued events. A broken native event can require another worker event or reload; camera readiness retains its existing five-second error deadline. - Overlapping application-root health reporters (openclaw#152638): startup mounts one root. Unsupported overlapping roots are last-publication-wins; the actual reported health/status feature and native trusted-document checks remain. - Polling after stop (openclaw#139704): its sole owner retires eligibility first. Scheduling now uses that owner admission, not a separate read-only generation. - Resetting an observer without retiring its connection (openclaw#116887): no production caller does this. Canonical connection epochs remain the sole retirement owner; unsupported direct live-scope reset no longer fences an old response separately. - Upload policy changing during local reads (openclaw#158567): decoded/hash work can finish. Draft publication and every upload request retain live policy checks. - Missing supported browser primitives (openclaw#105240/openclaw#151388/openclaw#100024/openclaw#102745): unsupported runtimes error instead of code-point initials, skipped input yield, wall-clock timing, or approximate microtask paint. The human progress-card fix in openclaw#151386 keeps its browser yield and durable FIFO handoff unchanged. - URL APIs disappearing after URL creation (openclaw#100024/openclaw#149330): supported browsers keep paired APIs. An unsupported replaced global can throw during cleanup; undefined URLs, creation fallback, cancellation and release ordering remain. - Malformed internal MCP calls bypassing AppBridge (openclaw#161747): may throw. The SDK still rejects malformed wire blocks before dispatch, proved over real in-memory App/AppBridge transport. UI content, authority, confirmation and custody policy remain. The introducing PR cites no human incident for the second mirror. Production: +176/-394, net -218 lines across 21 eligible old files. Tests: +30. Focused owner/sibling tests, targeted types/lint/format, lint-suppression and independent P0-P2 review pass. Import edges are unchanged; runtime/Madge cycle proof remains zero. Whole-tree Knip timed out at existing limits; heavy gallery renderer runs did not reach assertions, while its owning controller suite passed. * refactor(ui): remove obsolete Fetch capability branch The supported Control UI browser floor includes Fetch. Start attachment metadata reads directly rather than leaving an unsupported runtime in a permanent checking state. Best-effort tradeoffs accepted - Missing global Fetch: the guard originated in openclaw#64104, whose feature report cites no human missing-Fetch incident. An unsupported runtime that replaces Fetch now reaches the existing rejected-request/unavailable path. Metadata validation, auth/tickets, allow POST, cancellation, resource admission, expiry and bounded retry remain unchanged. No intended rendering change. Unchanged lifecycle baseline: 21/21, 25.09 s. Final lifecycle and attachment siblings: 50/50, 14.77 s. UI types, typed lint, formatting and lint-suppression checks pass. This cut removes five production lines including formatter reflow, bringing the lane to 223 net production lines removed. Fresh independent P0-P2 review is scoped-clean with no actionable findings. * fix(ui): use global frame scheduling APIs Preserve double-frame paint timing and cancellation without requiring a Window object in renderer-free hosts that supply the standard global APIs. The existing access suite reproduces seven unhandled errors before this fix and passes on main; all 130 affected cases plus 262 timing/state/send sibling cases now pass without test changes.




What Problem This Solves
Fourth-pass cleanup of shared Swift and macOS code after the previous Apple sweeps. Repeated projections, pass-through layers, duplicate types and unused state obscured the owners of existing behavior.
User Impact
Existing layouts/styles, Gateway wire formats, pairing/authentication, Keychain handling, execution approvals, permissions, persisted keys, signing and update settings remain unchanged.
Fixes found along the way
Why This Change Was Made
No dependency, configuration, schema, protocol-version, migration or retention change is introduced. The original Gateway label interpolation is retained because its source form owns an existing localization inventory identity.
Evidence
Measured change: 848 net production lines removed (543 added, 1,391 removed); 615 net lines removed including tests, across 111 files. This is below the 1,000-line target after the full subtree sweep. The coverage appendix records all 244 production files over 200 lines, sorted by size, with a READ disposition. Reviewed #159778 and merged Apple PR name-only diffs since 2026-09-15 before selecting changes.
nice -n 10 swift buildandswift test, two build jobs and Swift Testing width 2. The final rebased source passed 1,890 OpenClawKit tests in 155 suites, 16 NativeState tests in two suites, and 60 XCTest cases (two existing skips). Build: 197.49 seconds wall; full test command: 418.49 seconds wall including compilation; OpenClawKit test execution: 88.287 seconds.nice -n 10 swift build --package-path apps/macos --build-system native --product OpenClaw --jobs 2 --force-resolved-versionspassed on the final preview source in 349.64 seconds wall and again after the requested rebase in 711.55 seconds wall. The Apple patch is byte-identical across that rebase.node scripts/check-changed.mjs,pnpm protocol:check,pnpm native:i18n:verify(4,087 entries,changed=false), and all five import-boundary suites passed. Command: 319.65 seconds; boundary runner: four shards in 12.02 seconds. Leasetbx_01m3nhe1t1e9cawgmh07neyfz3is stopped, as are all earlier lane leases.Independent Codex review of the complete cleanup and fresh review of the final preview boundary both have no actionable P0–P2 findings. Current-head ClawSweeper revision 7 also clears the preview finding and reports no actionable defect; its remaining automatic compatibility flags are dispositioned below. Current head:
c5094477b5f54b37db654f52507119fac99501d6, based on9b5b439dcb6e11b929c982d9b40e8ddcb4c9b2e5. The requested rebase is patch-identical. Main's generated model additions were read and preserved unchanged; they are not part of this PR's diff. Exact-head CI completed successfully, including macOS native app/shared-package tests, iOS smoke/screenshots, Android, security, and macOS Node lanes. All current checks pass; the PR remains open with auto-merge disabled. Prior-head CI36505495608passed, including 2,322 native tests / 272 suites, two rendered tests, six named-profile tests, shared packages, iOS smoke/screenshots, Android, and macOS Node lanes.Compatibility: this PR changes no stored-data shape, persisted defaults key, config contract, wire format, schema, dependency, version, permission, migration, retention, signing, or update configuration. Canonical endpoint enum reuse preserves raw values. The original Gateway label interpolation remains because its source form owns an existing localization inventory identity. Hosted review's two compatibility checklist items come from
unknown-truncated-pull-files; its technical review explicitly finds no stored-data contract change. Source verification confirmsSourceSnapshotis an in-memory, non-Codable projection; it now consumes the existing AppState enums directly. Persisted enum raw values, config readers/writers, defaults keys and keychain identities remain unchanged. No migration is needed.Relevant failures and repairs: native compilation caught two stale enum-conversion fixture calls, now direct typed values with assertions unchanged. First-head CI caught a redundant optional expression in the Talk waiter; the explicit unwrap retains its single cancellation owner and passes lint. The auth rebase retained the owners and checks introduced by #159860; a saved-profile reconnect fixture failed because notification-started work could leave its identity scope. The already-owned fix in #160763 merged and is included here; this PR does not duplicate it. The prior exact-head native suite subsequently passed that regression.
The isolated package's first full run lacked its repository TalkConfig fixture; adding the unchanged fixture repaired the harness. An unbounded run under extreme host load hit bootstrap/network/audio timeouts; the successful full run used the existing Swift Testing width flag, without changing assertions, timeouts, retries, or product configuration. This is not claimed as a flake repair. A remote snapshot refused one changing test file before execution; the stable snapshot and gates passed. Standalone strict SwiftLint reports existing file-size limits of 1,505 for GatewayConnection and 1,534 for DashboardManager; the existing repository GitHub CI policy reports those as warnings. No limits, baselines, or suppressions changed. Full macOS app tests run only on disposable CI, not the operator desktop. No workflow dispatch or job rerun was requested.
Synthetic before/after captures
Full production coverage log (244 files over 200 lines)
Apple fourth-pass production coverage
Initial source:
d9569745764fa53d540dbfe3a0b536975bc69a7d. All 631 initial Swift production files and four native C/Objective-C/Rust files were read, including the previous Apple sweeps. The three Swift auth owners added on main were subsequently read, as were the incoming changes through9b5b439dcb6e11b929c982d9b40e8ddcb4c9b2e5. One obsolete Swift forwarding file was removed. The current subtree has 633 Swift and 4 other native production files.This table uses current line counts and covers all 244 production files over 200 lines, sorted by size. Generated Gateway model review used exhaustive template/field inspection and complete non-template source and generator reads; later generated-field additions were read separately.
apps/shared/OpenClawKit/Sources/OpenClawProtocol/GatewayModels.swiftapps/macos/Sources/OpenClaw/GatewayConnection.swiftapps/shared/OpenClawKit/Sources/OpenClawKit/GatewayNodeSession.swiftapps/macos/Sources/OpenClaw/DashboardManager.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatViewModel.swiftapps/macos/Sources/OpenClaw/OnboardingAISetup.swiftapps/shared/OpenClawKit/Sources/OpenClawKit/GatewayChannel.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatComposer.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatView.swiftapps/macos/Sources/OpenClaw/AppState.swiftapps/shared/OpenClawKit/Sources/OpenClawKit/RealtimeTalkRelaySession.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatTranscriptCache.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatViewModel+TransportEvents.swiftapps/macos/Sources/OpenClaw/DashboardWindowController.swiftapps/macos/Sources/OpenClaw/GatewayProcessManager.swiftapps/macos/Sources/OpenClaw/WebChatSwiftUI.swiftapps/macos/Sources/OpenClaw/NodeMode/MacNodeModeCoordinator.swiftapps/macos/Sources/OpenClaw/TalkModeRuntime.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatTransport.swiftapps/macos/Sources/OpenClaw/ApplicationRelocator.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatMessageViews.swiftapps/macos/Sources/OpenClaw/QuickChatModel.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatViewModel+Outbox.swiftapps/macos/Sources/OpenClaw/GatewayEndpointStore.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatModels.swiftapps/macos/Sources/OpenClaw/NodeMode/MacNodeCodexThreadCatalog.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatMarkdownBlockSegmenter.swiftapps/macos/Sources/OpenClaw/NodeMode/MacNodeClaudeSessionCatalog.swiftapps/shared/OpenClawKit/Sources/OpenClawKit/GatewayTLSPinning.swiftapps/macos/Sources/OpenClaw/NodeMode/MacNodeRuntime.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatViewModel+SessionActions.swiftapps/macos/Sources/OpenClaw/ComputerWindowActionExecutor.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatQuestionCard.swiftapps/macos/Sources/OpenClaw/Onboarding.swiftapps/macos/Sources/OpenClaw/NodeMode/MacNodeHostWorker.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatSessions.swiftapps/macos/Sources/OpenClaw/PostUpdate.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatLinkPreview.swiftapps/macos/Sources/OpenClaw/DebugSettings.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatInlineWidgetView.swiftapps/macos/Sources/OpenClaw/QuickChatController.swiftapps/shared/OpenClawKit/Sources/OpenClawKit/GatewayConnectionProblem.swiftapps/macos/Sources/OpenClaw/MacGatewayProfiles.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ClientDatabases.swiftapps/macos/Sources/OpenClaw/OnboardingAISetupView.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatViewModel+HistoryReconciliation.swiftapps/shared/OpenClawKit/Sources/OpenClawKit/WatchCommands.swiftapps/macos/Sources/OpenClaw/OpenClawConfigFile.swiftapps/macos/Sources/OpenClaw/TalkModeRuntime+Realtime.swiftapps/macos/Sources/OpenClaw/PortGuardian.swiftapps/macos/Sources/OpenClaw/ComputerScreenActionExecutor.swiftapps/macos/Sources/OpenClaw/OnboardingView+Pages.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatSessionSidebar.swiftapps/macos/Sources/OpenClaw/ControlChannel.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatViewModel+Sending.swiftapps/macos/Sources/OpenClaw/OnboardingAISetupSupport.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/OpenClawMascotAnimator.swiftapps/macos/Sources/OpenClaw/ExecCommandResolution.swiftapps/macos/Sources/OpenClaw/VoiceWakeRuntime.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatGatewayRequest.swiftapps/shared/OpenClawKit/Sources/OpenClawNativeState/OpenClawNativeStateSQLite.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatSessionSidebarModel.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatMarkdownRenderer.swiftapps/macos/Sources/OpenClaw/ExecApprovalsStore.swiftapps/macos/Sources/OpenClawDiscovery/GatewayDiscoveryModel.swiftapps/macos/Sources/OpenClaw/CLIInstaller.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatToolDiff.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/OpenClawMascotView.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatSessionManagementViews.swiftapps/macos/Sources/OpenClaw/MacRealtimeTalkAudioCapture.swiftapps/macos/Sources/OpenClaw/NodeMode/MacNodeCodexThreadCatalogClient.swiftapps/macos/Sources/OpenClaw/StatusMenuSummaries.swiftapps/shared/OpenClawKit/Sources/OpenClawKit/DeviceIdentitySQLiteStore.swiftapps/macos/Sources/OpenClaw/NodePairingApprovalPrompter.swiftapps/macos/Sources/OpenClaw/WebChatManager.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatViewModel+ModelControls.swiftapps/shared/OpenClawKit/Sources/OpenClawKit/DeepLinks.swiftapps/macos/Sources/OpenClaw/ComputerActionService.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatWindowShell.swiftapps/macos/Sources/OpenClaw/TalkMLXSpeechSynthesizer.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatWorkingClawView.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/TalkWaveformView.swiftapps/shared/OpenClawKit/Sources/OpenClawKit/DeviceSettingsContract.swiftapps/macos/Sources/OpenClaw/StatusMenuRenderer.swiftapps/macos/Sources/OpenClaw/CuaDriverHostCoordinator.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatToolActivityViews.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/CleanChatComposerControls.swiftapps/macos/Sources/OpenClaw/CommandResolver.swiftapps/macos/Sources/OpenClawMacCLI/ConfigureRemoteCommand.swiftapps/macos/Sources/OpenClaw/ExecApprovalsSocketPathGuard.swiftapps/macos/Sources/OpenClaw/QuickChatWindowPicker.swiftapps/shared/OpenClawKit/Sources/OpenClawKit/ExecApprovalsSQLiteStore.swiftapps/macos/Sources/OpenClaw/PairingApprovalPanelView.swiftapps/macos/Sources/OpenClawMacCLI/WizardCommand.swiftapps/shared/OpenClawKit/Sources/OpenClawKit/DeviceAuthStore.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatViewModel+SessionKeys.swiftapps/macos/Sources/OpenClaw/HostEnvSecurityPolicy.generated.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatViewModel+ComposerCapabilities.swiftapps/macos/Sources/OpenClaw/NativeConversationView.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/Swarm.swiftapps/shared/OpenClawKit/Sources/OpenClawKit/WatchChatDelivery.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatSheets.swiftapps/shared/OpenClawWatchRTC/src/lib.rsapps/macos/Sources/OpenClaw/QuickChatView.swiftapps/macos/Sources/OpenClaw/CameraPTZService.swiftapps/macos/Sources/OpenClaw/GatewayLaunchAgentManager.swiftapps/shared/OpenClawKit/Sources/OpenClawKit/DeviceIdentity.swiftapps/macos/Sources/OpenClaw/PortGuardianRecordStore.swiftapps/macos/Sources/OpenClaw/OnboardingView+Layout.swiftapps/macos/Sources/OpenClaw/ConnectionSettingsView.swiftapps/macos/Sources/OpenClaw/MenuBar.swiftapps/macos/Sources/OpenClaw/StatusMenuSessions.swiftapps/macos/Sources/OpenClaw/TailscaleIntegrationSection.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatTranscriptCacheContracts.swiftapps/macos/Sources/OpenClaw/CloudWorkerHost.swiftapps/macos/Sources/OpenClaw/RemotePortTunnel.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatViewModel+Attachments.swiftapps/macos/Sources/OpenClaw/CLIInstallPrompter.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatComposerTextView.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/WatchMessageJournal.swiftapps/macos/Sources/OpenClaw/NativeConversationBridge.swiftapps/macos/Sources/OpenClaw/SessionMenuPreviewView.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatViewModel+Thinking.swiftapps/macos/Sources/OpenClaw/ExecApprovalQueueStore.swiftapps/macos/Sources/OpenClaw/HealthStore.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/VoiceNoteRecorder.swiftapps/macos/Sources/OpenClaw/QuickChatFocusedTextCapture.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatModelSignIn.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatCodeHighlighter.swiftapps/macos/Sources/OpenClaw/StatusMenuController.swiftapps/macos/Sources/OpenClaw/VoiceWakeTester.swiftapps/macos/Sources/OpenClaw/ExecApprovalsSocket.swiftapps/macos/Sources/OpenClaw/CritterStatusLabel+Behavior.swiftapps/macos/Sources/OpenClaw/PermissionManager.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatComposer+CleanControls.swiftapps/macos/Sources/OpenClaw/RemoteTunnelManager.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatEffortControl.swiftapps/macos/Sources/OpenClaw/DashboardNativeBrowserHost.swiftapps/macos/Sources/OpenClaw/CritterIconRenderer.swiftapps/macos/Sources/OpenClawCameraPTZNative/OpenClawCameraPTZNative.mapps/macos/Sources/OpenClaw/VoicePushToTalk.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatSourcePreviews.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatInputHistory.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatMediaAudioAttachment.swiftapps/macos/Sources/OpenClaw/GatewaysMainMenu.swiftapps/macos/Sources/OpenClaw/CloudflareAccessLogin.swiftapps/macos/Sources/OpenClaw/LocalSocketServer.swiftapps/macos/Sources/OpenClaw/ShellExecutor.swiftapps/macos/Sources/OpenClaw/CookieSyncManager.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatComposer+Capabilities.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatMediaVideoAttachment.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatSpeechController.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatMermaidRenderer.swiftapps/macos/Sources/OpenClawMacCLI/ConnectCommand.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatInlineMath.swiftapps/macos/Sources/OpenClaw/GatewaySettings.swiftapps/macos/Sources/OpenClaw/DebugActions.swiftapps/macos/Sources/OpenClawDiscovery/TailscaleServeGatewayDiscovery.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatView+Previews.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatMermaidBlockView.swiftapps/macos/Sources/OpenClaw/CameraCaptureService.swiftapps/macos/Sources/OpenClaw/BrowserProfileImportModel.swiftapps/macos/Sources/OpenClaw/StatusMenuHeaderView.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatMarkdownBlockViews.swiftapps/macos/Sources/OpenClaw/AudioInputDeviceObserver.swiftapps/macos/Sources/OpenClaw/GatewayEnvironment.swiftapps/macos/Sources/OpenClaw/PairingApprovalCenter.swiftapps/macos/Sources/OpenClaw/MacDesktopAvailabilityCoordinator.swiftapps/macos/Sources/OpenClaw/AppLifecycleSupport.swiftapps/macos/Sources/OpenClaw/ExecApprovalEvaluation.swiftapps/macos/Sources/OpenClaw/DashboardManager+Construction.swiftapps/shared/OpenClawMLXTTSProtocol/Sources/OpenClawMLXTTSProtocol/MLXTTSProtocol.swiftapps/shared/OpenClawKit/Sources/OpenClawKit/ComputerCommands.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatWorkingProgress.swiftapps/macos/Sources/OpenClaw/ExecSystemRunCommandValidator.swiftapps/shared/OpenClawKit/Sources/OpenClawKit/GatewayErrors.swiftapps/macos/Sources/OpenClaw/ControlUIDocumentHost+NavigationPolicy.swiftapps/macos/Sources/OpenClaw/DashboardManager+Routes.swiftapps/macos/Sources/OpenClaw/NodesStore.swiftapps/macos/Sources/OpenClaw/NodeMode/MacNodePresenceReporter.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatMarkdownPreprocessor.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatSourceResources.swiftapps/macos/Sources/OpenClaw/TailscaleService.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatTheme.swiftapps/macos/Sources/OpenClaw/VoiceWakeOverlayController+Session.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatCommandPalette.swiftapps/shared/OpenClawKit/Sources/OpenClawKit/WatchChatDeliveryStore.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatViewModel+ProgressCard.swiftapps/macos/Sources/OpenClaw/DashboardBrowserSessionStore.swiftapps/macos/Sources/OpenClaw/RemoteGatewayProbe.swiftapps/macos/Sources/OpenClaw/CameraPTZNativeController.swiftapps/macos/Sources/OpenClaw/DevicePairingApprovalPrompter.swiftapps/macos/Sources/OpenClaw/ManagedProcess.swiftapps/macos/Sources/OpenClaw/NodesMenu.swiftapps/macos/Sources/OpenClaw/OnboardingView+Monitoring.swiftapps/macos/Sources/OpenClawDiscovery/WideAreaGatewayDiscovery.swiftapps/macos/Sources/OpenClaw/ChromeExtensionSetup.swiftapps/macos/Sources/OpenClaw/DashboardGatewayCatalog.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatSessionAttention.swiftapps/macos/Sources/OpenClaw/BrowserProfileImportBannerView.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatGatewayPayloadCodec.swiftapps/macos/Sources/OpenClaw/ScreenRecordService.swiftapps/shared/OpenClawKit/Sources/OpenClawKit/ToolDisplay.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatComposer+Controls.swiftapps/macos/Sources/OpenClaw/NotificationManager.swiftapps/macos/Sources/OpenClaw/GatewayRemoteConfig.swiftapps/macos/Sources/OpenClaw/DashboardWindowController+DeviceSettings.swiftapps/macos/Sources/OpenClaw/ExecApprovals.swiftapps/shared/OpenClawKit/Sources/OpenClawKit/NativeConversationContract.swiftapps/macos/Sources/OpenClaw/NodeServiceManager.swiftapps/macos/Sources/OpenClaw/ConfigStore.swiftapps/macos/Sources/OpenClaw/CanvasChromeContainerView.swiftapps/macos/Sources/OpenClaw/CuaDriverHostLifecycle.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatTranscriptRows.swiftapps/macos/Sources/OpenClaw/PrimaryGatewayConnectionEditor.swiftapps/shared/OpenClawKit/Sources/OpenClawKit/RealtimePCMStreamingAudioPlayer.swiftapps/macos/Sources/OpenClaw/DashboardFailurePage.swiftapps/macos/Sources/OpenClaw/MacControlRequestHandler.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatWebConversation.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatCompletedWork.swiftapps/macos/Sources/OpenClaw/StatusMenuDescriptor.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/WatchMessageJournal+Storage.swiftapps/macos/Sources/OpenClaw/ExecApprovalsPromptPresenter.swiftapps/macos/Sources/OpenClaw/WorkActivityStore.swiftapps/macos/Sources/OpenClaw/PeekabooBridgeHostCoordinator.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatComposerCapabilities.swiftapps/macos/Sources/OpenClaw/AppLaunchPresentationPolicy.swiftapps/macos/Sources/OpenClaw/ControlUIDocumentHost.swiftapps/macos/Sources/OpenClaw/ExecInlineCommandParser.swiftapps/macos/Sources/OpenClaw/LaunchAgentManager.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatProgressCard.swiftapps/macos/Sources/OpenClaw/OnboardingAISetupSheet.swiftapps/macos/Sources/OpenClaw/MacControlLiveOwner.swiftapps/shared/OpenClawKit/Sources/OpenClawKit/TalkPlaybackLevelMeters.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatComposerTextViewIOS.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatCameraFlipButton.swiftapps/macos/Sources/OpenClaw/Logging/OpenClawLogging.swiftapps/macos/Sources/OpenClaw/DeepLinks.swiftapps/macos/Sources/OpenClaw/ExecApprovalPanelView.swiftapps/macos/Sources/OpenClaw/VoiceWakeOverlayTextViews.swiftapps/shared/OpenClawKit/Sources/OpenClawKit/ShareGatewayRelaySettings.swiftapps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatContextUsage.swiftapps/macos/Sources/OpenClaw/OnboardingProviderArtwork.swiftapps/macos/Sources/OpenClawIPC/MacControlProtocol.swift