Repository navigation
refactor(apple): deslop macOS and iOS apps third pass - #159778
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. |
d2ac094 to
6e2ad0a
Compare
|
Codex review: blocked before merge. Reviewed September 28, 2026, 11:01 AM ET / 15:01 UTC (Revision 14). ClawSweeper reviewWhat this changesThe branch consolidates macOS, iOS, and Watch app code and repairs malformed health decoding, extreme percentage handling, and native chat session metadata. Merge readiness⛔ Blocked before merge - 2 items remain Keep this PR open. Current main still has the native health, percentage, and chat-metadata defects addressed by the branch. The prior compatibility concern is resolved by the canonical preference read and unchanged Watch serialization contract; this review found no actionable introduced defect. Priority: P2 Review scores
Verification
How this fits togetherThe native Apple apps turn Gateway responses, saved device state, and notifications into chat and status screens, Watch messages, and device actions. The changed adapters sit between those inputs and the rendered or dispatched result. flowchart LR
A[Gateway responses] --> C[Native adapters]
B[Saved device state] --> C
C --> D[Mac chat and status]
C --> E[iOS screens]
E --> F[Watch inbox]
G[Approval notifications] --> H[Authority checks and actions]
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metricsNone. Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Retain the repairs in their existing native owners, with canonical Gateway preference reads and the existing Watch saved-state format. Do we have a high-confidence way to reproduce the issue? Yes. Current-main source gives precise paths for reversed-brace health output, extreme percentages, and omitted native chat metadata; this read-only review did not execute them. Is this the best way to solve the issue? Yes. The repairs use existing decoding and projection owners, while the preference and Watch changes preserve their existing contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against bfcec878635d. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (13 earlier review cycles; latest 8 shown)
|
4724d63 to
08c0866
Compare
08c0866 to
d93d3f4
Compare
d93d3f4 to
6599f9e
Compare
What Problem This Solves
Third-pass cleanup of the macOS and iOS app targets after the earlier platform sweeps. Repeated projection, dispatch, rendering, and forwarding code made the same behavior harder to maintain.
User Impact
The refactors preserve appearance, strings, Gateway wire models, signing, entitlements, and installer behavior. Fixes found during the sweep prevent malformed health output and extreme usage values from crashing the Mac app, and preserve session model-scope/runtime metadata in native chat in the final candidate. Temporary proof wiring captured the fixed native menu and exercised expanded native suites; it is removed from the final diff.
Why This Change Was Made
The final production diff removes 1,067 net production lines. The sweep read all 212 production files over 200 lines in the original census and the smaller source files; protected generated, signing, installer, and migration contracts remain unchanged. No Periphery retain annotation or baseline entry is added.
Fixes found along the way
{and last}without checking their order. It now uses the existing JSON extraction owner. Exact original source traps on reversed braces; the fixed parser preserves clean/noisy valid JSON and rejects malformed input.Intbefore clamping. The existing projection now bounds usage before rendering; session percentages clamp before conversion. Original extreme-value probes trap, fixed probes pass, and ordinary fractional rounding is unchanged.sessions.listdefaults and droppedmodelSelectionTargetandagentRuntime. It now preserves the decoded defaults while installing the captured main-session key. A real transport regression covers the metadata round trip.Evidence
READY-TO-LAND at 6599f9e. Exact-head PR CI passed on attempt 3, including both Mac jobs, iOS smoke, both screenshot shards, screenshot evidence and the final aggregate. The PR remains unarmed. The refreshed candidate retains 94 files, +990/-2001 overall and 1,067 net Swift production lines removed.
tbx_01m3kzyp9rwn7s7p1tdh1yry7t(provider run) verified the exact source and passed frozen installation, app-scopedcheck-changed, full protocol checks, native localization verification (4,087 entries, no drift), and all 39 fs-safe/plugin-boundary assertions. Remote command time was 341.723 seconds; the lease is stopped.String+NonEmpty.swift, whose existing helper trims whitespace and returns nil when empty. No accepted/actionable finding remains.The refresh preserves main's new conversation owner from #159946 while retaining the lane's removal of unused relay storage. The merged fixture keeps both inputs, both response cases and both independent regressions. Temporary native proof wiring is absent.
The first refreshed iPad screenshot job aborted while XCTest loaded Accessibility, before the selected test, setup or app launch. Its result contained only a System Failures runner node. A targeted same-head infrastructure rerun passed; the fail-fast-cancelled iPhone row was then resumed and passed, followed by screenshot evidence and the aggregate. No source, assertion, workload or timeout changed for these recoveries.
Broader manual failures and bounded investigation
These non-native failures are outside the Apple diff. They are retained as limitations, not relabeled as passing proof or automatically called pre-existing:
EPERM. The same-head ordinary job and preceding main job passed, which is not a repair. Source inspection found an intentional regression protecting signal-denial errors even after eventual closure. XNU supplies a possible zombie-only transition, but this occurrence lacks membership/UID/state evidence. Ignoring the error would weaken the contract; no safe fix is established.tbx_01m3m4m59ajtmb6gwpnmqsj42d(provider run) had 8 CPUs/32 GB versus the failing hosted runner's 4 CPUs/16 GB. The original result is obscured by the timeout, so delayed delivery versus early skip/failure remains unresolved. This passing replay is not a fix; no limits, retries or assertions changed. The lease is stopped.Related separately proved follow-ups: iOS bootstrap-refusal preservation #160218 (ready, unarmed); native heap-test collection repair #160414 (merged after Testbox proof).
Compatibility review
No config key, default, persisted schema, migration, retention rule, entitlement, signing setting, installer, or upgrade path changes in this PR.
The removed onboarding preferred-Gateway State copy could only return the canonical persisted value. Its callers now read GatewayDiscoveryPreferences.preferredStableID directly; that owner still normalizes values, reads the same legacy key, and performs the same existing writes and clears.
Watch snapshot, approval-record, and terminal-tombstone encoding retain the same emitted CodingKeys and optional-field omission. Read-only legacy keys remain in the custom decoders; the old encoders did not emit those legacy text fields either. Existing legacy JSON/semantic encoding tests and the native Watch operation suites passed. The ClawSweeper serialized-state/truncated-file-list flags do not identify a material storage or configuration change.
Native session model menu
Inspected, synthetic-only captures from the original projection and the fixed projection. The existing scope caption becomes visible when the Mac transport preserves the Gateway metadata.