Repository navigation
Conversation
A phone runs Noise IK to the service's Noise key with the home id in the prologue. The service admits it only through store.For with the key the handshake proved, so only a phone in the box's signed roster that no owner has suspended gets in. Message 2 carries the snapshot from memory; after it each new box envelope the device may read follows on the same socket, unchanged. A roster change, a suspension, an expired roster or a purge closes the sessions it touches at once. While a phone looks, the service asks the box for one-second updates and renews the ask every 50 s. Limits per home: 16 sessions, one per device, a queue of 256 per phone and a small message rate. Owners' suspensions live in the registry and end when the roster drops the device or its epoch moves. go/protocol moves to srcfl/ftw claude/cloud-c3-core (7490c64c) for the app session wire, the Noise initiator and RemoteStatic. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
/v1/app answers 501 until a Noise key is installed, so deploying this before the deploy files learn the second secret cannot stop the service. The deploy files stay as they are: #3 owns them, and the Noise key goes in beside the service key once it lands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 13, 2026
Closed
Member
Author
|
Included in #7 (C3 and C4 joined), squash-merged to main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FTW Cloud C3, the service's part: phones read their home at
/v1/app. Draft.This is the second half of a wire pair. The first is srcfl/ftw srcfl/ftw#1603, and
go.modmovesgo/protocolto that branch atc6301a0b. The app is srcfl/ftw-app srcfl/ftw-app#19.What changes
internal/appsession,/v1/app.wss://…/v1/app?home=<id>and runs Noise IK as initiator to the service's Noise key, withftw.cloud.v1:<home>as prologue.store.Forwith the key the handshake proved. A phone gets in only if the box listed it in a signed roster and no owner has suspended it.now {hz}. Message 2 carries the snapshot from memory: the newest envelope of each class the device may read, the newestlivewith sources, and the newesthb, in rising seq.Watch. While at least one phone looks, the service sends the box
watch {hz: 1}at once and again every 50 s, inside the box's 60 s. When nobody looks it stops. A box that reconnects while a phone looks is asked at once.Owner pause. An owner may send
suspendorunsuspendfor a device in the roster. It only narrows access:Roster changes close sessions. The service closes a session at once when:
Limits per home.
Optional Noise key.
ftwcloudd keygen -noise -out noise.keyprints the public key for the app;-noise-keyloads it. Without the key file, the service still serves boxes and/v1/appanswers 501. A deploy before the deploy files learn the second secret therefore cannot stop the service. The deploy files are unchanged here because #3 owns them. The Noise key goes beside the service key once it lands.Tests
go vet ./... && go test -race ./...,go test -tags ftwclouddev ./...andbash scripts/check-imports.shall pass. Onlygo/protocolis imported from srcfl/ftw.internal/appsessiondrives a Go phone over real TLS 1.3 and WebSocket. It covers:FuzzPhoneMessageandFuzzNowran 20 s and 10 s locally.TestTheSnapshotArrivesFastmeasures TCP, TLS 1.3, the upgrade, Noise IK and a five-envelope snapshot on loopback. Over 20 runs: p50 1.7 ms, p95 3.0 ms, max 3.0 ms.BenchmarkSnapshot: about 225 µs per phone for both Noise ends, the store and the payload, with no network. Message 2 is 2,514 B.End to end, locally
The setup was a Core from srcfl/ftw#1603, this
ftwcloudd, a simulated house and the app from srcfl/ftw-app#19. The laptop was on a phone's hotspot and the relay was production. Each measurement ran five times on new sockets.cloud.ftw.energyrunsmain(C2) without/v1/app, and C3 is not deployed, so the C3 test did not run against it.cloud.ftw.energyanswered TLS in 70–132 ms and/healthzin 107–168 ms. That puts layer 2 near 150 ms over mobile data.downand the fieldsdownorstale.DELETE /api/app-link/devices/{id}on the box closed that phone's cloud stream 3 and 12 ms after the request, with 4403.ftwclouddunder a running home moved the carrier torelaywithin 11 ms. It came back in 11.8 s, because the phone was refused once while the box reconnected and then asked again.Follow-ups, not in this PR
claude/cloud-c4-eb03d7) planspush.registerandpush.unregisteron this socket.phoneConn.applyis the place: two more cases.🤖 Generated with Claude Code