Personal Telegram developer console for GitHub
docs: add 2026-10-05-cp4-cloudflare-ops implementation plan
davoodmehraban89 committed
Oct 5, 2026 at 05:29 UTC
a3e9182040f2b1e5e9b14bc849675c159a713e33
1 file changed
+52
docs/superpowers/plans/2026-10-05-cp4-cloudflare-ops.md
new
+52
@@ -0,0 +1,52 @@
1
+# CP4 Cloudflare Ops Completion Implementation Plan
2
+
3
+> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
4
+
5
+**Goal:** Turn the Cloudflare READ foundation into a safe operational plugin with verified rollback/redeploy.
6
+
7
+**Architecture:** Keep Cloudflare API mechanics in the existing service, expose source-backed bounded views in the plugin, and route rollback/redeploy through central DESTRUCTIVE approval bound to an exact known version/deployment. Secret values are never read into UI/audit.
8
+
9
+**Tech Stack:** Cloudflare Workers REST API, Node.js ESM, Telegram, Safe Approval, node:test.
10
+
11
+**Spec:** docs/superpowers/specs/2026-10-05-control-plane-completion-design.md
12
+
13
+## Global Constraints
14
+- Production/Preview must be visibly distinguished.
15
+- Never expose secret values; bindings show name/type only.
16
+- Deployment-changing actions are DESTRUCTIVE.
17
+- Post-action verification must independently re-read active deployment/version.
18
+
19
+## Review Focus
20
+- Unknown version cannot be targeted.
21
+- Traffic split must be shown accurately rather than assumed 100%.
22
+- Provider API failure cannot produce success text.
23
+- Preview state never verifies Production.
24
+- Runtime error summaries redact query/token/source material.
25
+
26
+---
27
+
28
+### Task 1: Complete Cloudflare READ service
29
+**Files:** `src/plugins/cloudflare/service.js`, tests under `test/cloudflare*.test.js`
30
+
31
+- [ ] RED tests for deployments, versions, binding metadata, observability and bounded runtime error summaries.
32
+- [ ] Implement only documented API reads and redaction.
33
+- [ ] GREEN and commit.
34
+
35
+### Task 2: Ops views and navigation
36
+**Files:** `src/plugins/cloudflare/plugin.js`, `src/plugins/cloudflare/manifest.js`, `src/cloudflare-menu.js`, `src/ops-menu.js`
37
+
38
+- [ ] RED source-backed/recovery/callback-limit tests.
39
+- [ ] Implement deployments/versions/bindings/health/errors drill-down.
40
+- [ ] GREEN and commit.
41
+
42
+### Task 3: Exact-target rollback/redeploy approval
43
+**Files:** service/plugin/manifest, `src/core/approval.js`, `src/bot.js`
44
+
45
+- [ ] RED tests for DESTRUCTIVE classification, exact version binding, stale/unknown version, replay and no pre-approval mutation.
46
+- [ ] Implement provider deployment mutation and approval route.
47
+- [ ] GREEN and commit.
48
+
49
+### Task 4: Independent verification
50
+- [ ] RED/GREEN tests requiring post-mutation re-read to match target version/traffic.
51
+- [ ] Full `npm test`, docs, PR, CI, merge, deploy.
52
+- [ ] Verify active version/deployment/bindings directly through Cloudflare API.