Skip to content

refactor(watch): share legacy status decoding - #139941

Merged
steipete merged 1 commit into
mainfrom
codex/reduce-watch-status-01a0750a
Sep 6, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/reduce-watch-status-01a0750a

Conversation

@steipete

@steipete steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Watch app and shared iPhone/Watch snapshot type each maintained the same legacy gateway, Talk, and chat status decoders. Compatibility changes had to keep both copies aligned.

Why This Change Was Made

The existing shared status type now owns the three unchanged decoders, and all twelve callers use that owner. This removes 52 production code lines (55 physical lines), with no test changes or new package/project wiring.

User Impact

No intended behavior change. Semantic status precedence, unknown verbatim text, Watch-local localization, persisted snapshot shape, and the legacy wire fields needed for staggered iPhone/Watch upgrades remain unchanged.

Evidence

  • All 14 selected repository checks passed, including 1,125 macOS tooling/process tests across 21 files and SwiftLint over 768 files.
  • Fourteen existing Swift behavior tests passed for snapshot compatibility, persistence decoding and localization. They compiled byte-identical real sources in an isolated Swift package with separate shared and Watch-consumer modules; no mocks or rewritten source.
  • Pinned SwiftFormat, diff checks and independent P2 review passed. Source hashes remained unchanged through verification.
  • The local Swift proof is not a full iOS/watchOS app build or device test; exact-head hosted platform checks remain part of landing.

Give the shared Watch status type one legacy decoder implementation. Preserve snapshot wire and persistence shapes, semantic status precedence, localized fallback text, and staggered iPhone/Watch compatibility.
@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added app: ios App: ios size: S maintainer Maintainer-authored PR labels Sep 6, 2026
@steipete
steipete marked this pull request as ready for review September 6, 2026 08:36
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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. labels Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 4:41 AM ET / 08:41 UTC.

ClawSweeper review

What this changes

Moves legacy gateway, Talk, and chat status decoding into the shared Swift status type so the iPhone and Watch snapshot implementations use one implementation.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored refactor remains useful because current main retains the duplicated decoders. The introduced patch preserves their behavior, and no actionable correctness defect was found.

Priority: P3
Reviewed head: 1029567df8ad02012deab7485b54ba00b7d5e6f5

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused consolidation with unchanged decoder semantics, existing compatibility coverage, and no identified merge-blocking defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored cleanup is exempt from external-contributor proof requirements. Reported Swift tests exercise shared and Watch snapshot decoding and localization; they do not establish a full native app or device run, and this review executed no target code.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored cleanup is exempt from external-contributor proof requirements. Reported Swift tests exercise shared and Watch snapshot decoding and localization; they do not establish a full native app or device run, and this review executed no target code.
Evidence reviewed 7 items Verified introduced change: The complete merge-base-to-head diff moves the three decoder bodies unchanged, redirects twelve calls, and leaves encoding, stored fields, and status precedence unchanged.
Current main still contains duplication: Both snapshot implementations retain private legacy gateway decoders on fetched main. A separate diff confirmed both affected files match the PR merge base.
Latest release retains separate decoders: The supplied latest release also contains the two private gateway decoder implementations; this consolidation is not already shipped there.
Findings None None.
Security None None.

How this fits together

The iPhone sends application snapshots to its paired Watch, which also restores saved snapshots. Status decoding turns older text and flags into structured statuses for Watch-local presentation.

flowchart TD
  A[iPhone snapshot] --> C[Snapshot decoding]
  B[Saved Watch snapshot] --> C
  C --> D{Structured status available?}
  D -->|Yes| F[Structured status]
  D -->|No| E[Shared legacy decoder]
  E --> F
  F --> G[Watch localized presentation]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Other -55. Total -55 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 67 122 -55
Total 2 67 122 -55

Review metrics

None.

Technical review

Best possible solution:

Keep one shared legacy decoder implementation while retaining the existing snapshot formats, fallback precedence, and Watch-local localization.

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

Not applicable: this PR removes duplicated implementation rather than fixing a reported runtime defect; source inspection confirms the duplication on current main.

Is this the best way to solve the issue?

Yes: moving identical helpers onto the existing shared status type removes competing implementations without changing their inputs, outputs, or callers' precedence rules.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against fe33b727b9fd.

Labels

Label changes:

  • add P3: This is a bounded, behavior-preserving native-code cleanup with no reported user-facing failure.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored cleanup is exempt from external-contributor proof requirements. Reported Swift tests exercise shared and Watch snapshot decoding and localization; they do not establish a full native app or device run, and this review executed no target code.

Label justifications:

  • P3: This is a bounded, behavior-preserving native-code cleanup with no reported user-facing failure.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored cleanup is exempt from external-contributor proof requirements. Reported Swift tests exercise shared and Watch snapshot decoding and localization; they do not establish a full native app or device run, and this review executed no target code.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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.

@steipete
steipete merged commit 61057b5 into main Sep 6, 2026
122 of 123 checks passed
@steipete
steipete deleted the codex/reduce-watch-status-01a0750a branch September 6, 2026 09:35
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 7, 2026
Give the shared Watch status type one legacy decoder implementation. Preserve snapshot wire and persistence shapes, semantic status precedence, localized fallback text, and staggered iPhone/Watch compatibility.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: ios App: ios maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant