Repository navigation
feat(cloud): include statistics in Cloud terms and ask local owners - #1700
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 18fca8c67d
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if(status.link==="ending") {say(panel,"Cloud is stopping and deleting its stored copy. Refresh after the box receives the deletion receipt.");return;} | ||
| if(cloud) { | ||
| if(status.cloudTermsAccepted) say(panel,"The current Cloud terms include statistics for this box."); | ||
| else button(actions,"Accept Cloud terms",function(){return write("POST","/api/cloud/grant",{scopes:policy.cloud_scopes,policy:policy.cloud_policy});},true); |
There was a problem hiding this comment.
Preserve existing scopes when renewing Cloud terms
When an existing Cloud grant has a narrower scope set, accepting the updated terms posts every entry in policy.cloud_scopes; Link.Grant then replaces the stored scopes with that list. This silently enables additional readable classes such as events, history, plan, and health during what is presented only as a terms renewal. Send status.scopes for an existing grant and reserve the full default list for first-time activation.
AGENTS.md reference: AGENTS.md:L79-L82
Useful? React with 👍 / 👎.
Statistics now come with the current FTW Cloud terms. Local owners get a Yes/No question with Yes suggested, and no new report starts before an answer. This implements Fredrik's 17 October decision and replaces the separate Cloud statistics switch.
The current Cloud grant saves the exact terms, statistics scope, random id and start time in one write. Local sharing instead uses a signed statistics-only uplink with no phone, pairing, Noise, live-cache or assistant access. Leaving Cloud requests home deletion and saves a durable off choice; paired phones and restarts cannot auto-link it. The anonymous daily report also requires the current project answer. An unset clock starts the reporting window only after time is known; earlier hours never upload.
Core and Cloud still need the exact approved policy before any hourly report leaves. The signed C8 review and lawful basis for mandatory Cloud statistics remain open; accepting terms does not settle that review. No real household choice has changed. This PR has a minor changeset because it adds a visible capability and asks owners to act.
Validation: full
GOFLAGS=-p=2 make verifyand all 764 web tests pass. Core cloudlink/API race tests and protocol golden vectors pass. Rendered local Yes/No and Cloud-terms views were checked in a browser using the real component with a local API fixture, including declining and saving. Fredrik inspected the two rendered Core views and confirmed them on 17 October. This is not hardware or production-consent evidence.Paired PRs: #1700, srcfl/ftw-cloud#32, srcfl/ftw-app#87 and srcfl/ftw-web#23. Stats dashboard: srcfl/ftw-webapp#50. No stable release or collection activation belongs to this PR.