Skip to content

feat(contract): charging.goal_at_risk in the push catalogue - #82

Merged
frahlg merged 3 commits into
mainfrom
claude/cloud-c4-catalogue
Oct 13, 2026
Merged

frahlg merged 3 commits into
mainfrom
claude/cloud-c4-catalogue

Conversation

@frahlg

@frahlg frahlg commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Adds charging.goal_at_risk to the push catalogue, the source of the copy in srcfl/ftw. FTW Cloud C4 raises it once per plug-in when the box knows the car's level and the plan cannot reach the goal by the ready time:

The car may not be ready — It will not reach {target} % by {by} at this pace.

The toggles list and the simulated box's rule types gain the kind. It is opt-in like the other charging kinds. Stacked on #81 (claude/cloud-c2-registry), which adds the FTW Cloud names.

Contract-pair: srcfl/ftw@claude/cloud-c4-core

Paired pull requests

Tests

npx vitest run      106 files, 1069 passed, 1 skipped
FTW_BOX_REGISTRY=…/ftw/contract/registry.yaml node scripts/check-contract-drift.mjs
  contract/registry.yaml matches … byte for byte
  contract/push-catalogue.yaml matches … byte for byte

🤖 Generated with Claude Code

frahlg and others added 3 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>
FTW Cloud C4 (srcfl/ftw claude/cloud-c4-core) raises it once per plug-in
when the box knows the car's level and the plan cannot reach the goal by
the ready time. The catalogue, the toggles and the simulated box gain the
kind; it is opt-in like the other charging kinds.

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 1b8d529 Commit Preview URL

Branch Preview URL
Oct 13 2026, 06:16 AM

@frahlg
frahlg changed the base branch from claude/cloud-c2-registry to main October 13, 2026 08:25
@frahlg
frahlg marked this pull request as ready for review October 13, 2026 08:26
@frahlg
frahlg merged commit 479514f into main Oct 13, 2026
4 of 5 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 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-13T08:28:14.394338Z 1b8d529 Draft marked ready
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1b8d5294b5

ℹ️ 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".

"ftw-webapp": patch
---

Know the two FTW Cloud notices, "FTW Cloud is on" and "FTW Cloud is off". A box that sends them shows two more notification switches, on by default, and an older box shows none. The shared contract also names the FTW Cloud scope, capability and carrier state the box and the iPhone app use.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Document the new charging notice in the changeset

When Changesets publishes this commit, the generated release notes will describe only the FTW Cloud additions and omit the headline charging.goal_at_risk notification and toggle. Add that user-visible behavior to this changeset or provide a separate changeset so consumers can tell that the new charging warning shipped.

Useful? React with 👍 / 👎.

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