Skip to content

feat(cloudwire): x carries a watch's exchange through FTW Cloud - #1818

Merged
frahlg merged 4 commits into
masterfrom
claude/watch-cloud-wire
Oct 23, 2026
Merged

frahlg merged 4 commits into
masterfrom
claude/watch-cloud-wire

Conversation

@frahlg

@frahlg frahlg commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Why

The relay stopped on 17 October 2026, and with it the socket that carried a watch's exchange with its box (ADR 0009). A watch without its iPhone could then neither read its home nor charge the car. This is the wire that carries the exchange through FTW Cloud instead.

What

  • cloudwire: x. A watch's one-shot request carries x {d}. The service sends the box x {dev, id, d} and returns the box's d in message 2. It reads neither d and keeps nothing. CapX, XDataMax (2 KiB), XAnswerWithin (5 s), XInFlight (8). Downlink and OnceMessages gain x.
  • Golden vectors: testdata/cloud-once-x-vectors.json (the watch's request, the x down and up the uplink, and the answer).
  • docs/protocol-cloud.md: a new section, "Exchange".
    • FTW Cloud admits x from a device with the roster's tun and role watch, so commands work with the readable copy off.
    • What the box checks again, and its limits: two sessions per watch and eight in all, 12 handshakes a minute per watch and 60 in all, 120 requests a minute, and a tenth of the tunnel budget for x. A request the box cannot answer runs nothing.
    • A restart forgets the command log, so a cmdId sent again after one can run again.
    • A watch may send loadpoint.hold alone.
  • ADR 0009: a new section, "Through FTW Cloud" (proposed). It covers six changes:
    1. The exchange rides the one-shot request.
    2. The owner's phone adds its watch by its key, with the same step-up, so no code crosses the service. The code path is gone.
    3. A watch has tun in the roster.
    4. A watch reads FTW Cloud's copy, signed by the box.
    5. The exchange takes loadpoint.hold alone.
    6. A replayed message 1 ends no working session, and a restart forgets the command log.

Decisions for Fredrik

  • Do you accept "Through FTW Cloud" in ADR 0009? Commands now go through FTW Cloud as ciphertext the service cannot read. The phone's commands have done the same since the one-door decision of 15 October. The box still decides everything.
  • Enrolment by key instead of a watch code. feat(cloud): a watch's exchange rides FTW Cloud #1819 removes the code path.

Pairs

Merge this first, then srcfl/ftw-cloud#49 with its pin moved to the merge commit.

Proof

  • go vet ./... and go test ./... in go/protocol: all green.
  • TestFieldsMatchTheProtocolDocument holds the new x table to the code.
  • internal/cloudlink and internal/appuplink on master still pass with the new Downlink. A box without the cap is sent no x.

🤖 Generated with Claude Code

The relay stopped on 17 October 2026, and with it the socket that carried
a watch's exchange with its box (ADR 0009). This is the wire that carries
it through FTW Cloud instead: a watch's one-shot request carries x {d}, the
service sends the box x {dev, id, d}, and the box answers under the same dev
and id. The service reads neither d and keeps nothing after the answer.

- MsgX, CapX, X, AppX, XDataMax, MaxXFrame, XAnswerWithin, XInFlight.
- Downlink and OnceMessages gain x; the allowlist lists x unheaded.
- Golden vectors: testdata/cloud-once-x-vectors.json.
- protocol-cloud.md "Exchange", and ADR 0009 "Through FTW Cloud"
  (proposed): the phone adds its watch by key, and a watch has tun.

The box's half is the paired PR stacked on #1691; srcfl/ftw-cloud and
srcfl/ftw-app pin this commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T15:04:54.225407Z 657f84a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

frahlg and others added 2 commits October 23, 2026 17:04
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ch's one op

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@frahlg

frahlg commented Oct 23, 2026

Copy link
Copy Markdown
Member Author

Fredrik approved this in chat on 23 October 2026: the "Through FTW Cloud" section of ADR 0009 (all six points) and the minor bump for the watch on its own.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@frahlg
frahlg merged commit 21e3d16 into master Oct 23, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant