Skip to content

feat(contract): add the FTW Cloud names - #81

Closed
frahlg wants to merge 2 commits into
mainfrom
claude/cloud-c2-registry
Closed

frahlg wants to merge 2 commits into
mainfrom
claude/cloud-c2-registry

Conversation

@frahlg

@frahlg frahlg commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

The names FTW Cloud shares between the box, this app and the iPhone app, added here first because this repository holds the source of the contract (srcfl/ftw ADR 0008, #1589).

Contract-pair: srcfl/ftw@claude/cloud-c2-a453be

Paired pull requests: srcfl/ftw srcfl/ftw#1595 (copy and Go constants), srcfl/ftw-app srcfl/ftw-app#15 (copy and Swift names), srcfl/ftw-cloud (not opened yet: the public repository srcfl/ftw-cloud waits for the owner's go-ahead) (the service).

contract/registry.yaml

  • scope ftw.events.read, for the events behind notifications;
  • cloud_scopes: [ftw.live.read, ftw.history.read, ftw.plan.read, ftw.health.read, ftw.events.read], which bounds what an owner can let the box share. ftw.assets.read stays out: the box sends no inventory;
  • cloud_purposes: [serve, stats];
  • capability cloud.link;
  • carrier state cloud, between relay and cache;
  • the header now names the file the box actually generates (go/protocol/contract_gen.go).

contract/push-catalogue.yaml

cloud.granted ("FTW Cloud is on") and cloud.revoked ("FTW Cloud is off"), sent to every owner when the grant changes. They are the only rules the box seeds on.

App code

  • SCOPES, the push KINDS with their switch labels, and CarrierState follow the registry, so the registry and push tests still read both directions.
  • The simulated box seeds the two new rules on, as the box does. The notification test now counts eight switches.
  • A box that does not list the two kinds shows no new switch, and #writeRules already sends only kinds the box lists.

Checks

  • npm run check: 0 errors. npx vitest run: 1069 passed, 1 skipped.
  • node scripts/check-contract-drift.mjs against the srcfl/ftw branch: both files byte for byte the same.
  • Needs a person: the Box → Notifications switches. The review browser had notifications blocked, so the list did not render there; the component test checks that the eight switches render and that the two new ones start on.

🤖 Generated with Claude Code

frahlg and others added 2 commits October 12, 2026 20:19
FTW Cloud (srcfl/ftw ADR 0008) needs names shared by the box, this
app and the phone app:

- scope ftw.events.read, for the events behind notifications;
- cloud_scopes and cloud_purposes, which bound what an owner can let
  the box share with FTW Cloud, and what for;
- capability cloud.link and carrier state cloud;
- push kinds cloud.granted and cloud.revoked, sent to every owner when
  the grant changes.

contract.ts, the push kinds and the carrier type follow, so the
registry tests still read both directions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The box seeds cloud.granted and cloud.revoked on, unlike its other
rules, so the simulated box does too and the notification test counts
eight switches with those two on. A changeset names the change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ftw-webapp f603879 Commit Preview URL

Branch Preview URL
Oct 12 2026, 07:04 PM

@frahlg

frahlg commented Oct 13, 2026

Copy link
Copy Markdown
Member Author

Included in #82, squash-merged to main with the push catalogue.

@frahlg frahlg closed this Oct 13, 2026
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