Personal Telegram developer console for GitHub
docs: record accepted Safe Approval write smoke and GitHub Advanced progress
davoodmehraban89 committed
Oct 3, 2026 at 09:22 UTC
aec8104f9ec144afb52cab511afcceff6caa099e
1 file changed
+57
-38
PROJECT_MEMORY.md
+57
-38
@@ -13,7 +13,7 @@
13
2. Prefer live evidence over chat memory.
14
3. Keep durable checkpoints here and never store secrets/tokens/private keys.
15
4. Do not call a phase production-accepted from CI alone; deployment and owner-device/runtime evidence are separate gates.
16
-5. Production WRITE actions must remain behind Safe Approval and durable one-time replay protection.
16
+5. Production WRITE / DESTRUCTIVE provider actions must remain behind Safe Approval and durable one-time replay protection.
17
18
## Current Architecture
19
- Cloudflare Worker webhook boundary in `src/index.js`.
@@ -31,6 +31,7 @@
31
- Provider mutation never executes before policy approval.
32
- Provider errors are explicit; no fabricated success or fallback data.
33
- Secrets and signed approval callback tokens must not appear in logs/docs.
34
+- Telegram callback data and rendered provider text must remain bounded.
35
36
## Production-Accepted Foundation
37
### Plugin Foundation v1
@@ -43,53 +44,71 @@
44
- Deploy run `37095129406` succeeded; production Durable Object binding verified.
45
- CI/Actions pagination subsequently landed on `main` at `074033f5a067283727a38e034a6d19436fcce475`.
46
46
-### Approval rejection UX hardening
47
-- PR #17 merged at `2c131ea5fc564faae20cd7aff1ac00831f7fe185`.
48
-- Main CI #149 / run `37098697859` succeeded.
49
-- Deploy #84 / run `37098710348` succeeded on the exact merge SHA.
50
-- Active Cloudflare version after deploy: `e7182388-ca16-4aeb-b144-6d5f0fc63043` at 100% traffic.
51
-- Expired/replayed approvals now visibly update the Telegram message instead of appearing silent.
47
+### Approval and provider-error UX hardening
48
+- PR #17 merged at `2c131ea5fc564faae20cd7aff1ac00831f7fe185`; expired/replayed approvals now visibly update Telegram.
49
+- PR #18 merged at `a2e8a65763516765d47b535e514990f8698ad2a2`; approved provider failures now visibly update Telegram.
50
+- Main CI #155 / run `37099455730` succeeded with 82/82 tests.
51
+- Deploy #90 / run `37099465363` succeeded on the exact merge SHA.
52
+- Active Cloudflare production version after deploy: `1865c8ac-5d05-40cd-8478-8d9f5473e34b` at 100% traffic.
53
53
-## Live GitHub WRITE Smoke — 2026-10-03
54
+## Production Safe Approval WRITE Acceptance — 2026-10-03
55
Target:
56
- CI run #134, Actions run ID `37094321256`.
57
57
-Observed on production version `e7182388-ca16-4aeb-b144-6d5f0fc63043`:
58
-1. Owner requested `github.workflow.run.rerun_failed`.
59
-2. Audit: `approval_required` -> `approval_issued`.
60
-3. Owner pressed Confirm.
61
-4. Audit: `approval_verified` -> approved `action_attempt`.
62
-5. Provider result: `error` with `403 Resource not accessible by personal access token`.
63
-6. Owner pressed the same approval again; Durable replay guard rejected it as `Approval token already used`.
64
-7. GitHub run #134 remains `run_attempt=1`; therefore no rerun was accepted by GitHub.
58
+Verified sequence:
59
+1. An early owner approval reached the provider but GitHub returned `403 Resource not accessible by personal access token`; the same approval token was then replayed and correctly rejected as already used.
60
+2. The owner updated the existing fine-grained GitHub token permission so Actions has write access; no token value was stored or logged.
61
+3. A fresh owner request produced `approval_required` -> `approval_issued`.
62
+4. Owner pressed Confirm; production audit recorded `approval_verified` -> approved `action_attempt` with `owner_write_approved`.
63
+5. Production audit on Worker version `1865c8ac-5d05-40cd-8478-8d9f5473e34b` recorded `action_result=success` for `github.workflow.run.rerun_failed`.
64
+6. GitHub run #134 moved from `run_attempt=1` to `run_attempt=2`, proving the provider WRITE was accepted.
65
+7. Attempt 2 itself failed only because it reran the historical PR #15 merge ref from before the later Durable Object binding/config fix; this is historical-code behavior, not a current-main regression.
66
67
Conclusion:
67
-- Owner-bound approval path in production: VERIFIED.
68
-- Durable one-time replay protection in production: VERIFIED.
69
-- GitHub WRITE provider authorization: BLOCKED by current Worker `GITHUB_TOKEN` permissions.
70
-- For a fine-grained PAT, GitHub Actions repository permission must be `write` for rerun/cancel endpoints. A classic PAT requires appropriate private-repository `repo` scope.
71
-- Do not rotate or expose `GITHUB_TOKEN` automatically. Permission/credential change requires owner action.
72
-
73
-## Current Work
74
-### PR #18 — provider WRITE error feedback
75
-- Branch: `fix/provider-write-error-feedback`.
76
-- Purpose: after a valid approval, provider failures must visibly replace the approval message rather than silently return an error.
77
-- RED CI #150 / run `37099120240`: 18 test files, 82 tests, 81 pass / 1 expected failure in the new provider-error UI regression.
78
-- Implementation commit `75c9e540192ae3b42931329035002a95819f7163` adds Telegram feedback for approved provider failures while preserving one-time approval consumption.
79
-- CI #152 proved the implementation behavior but exposed a false-positive Persian test regex (`ناموفق` contains `موفق`).
80
-- Test correction commit `354f79c6f6f0b4372d85f30cf4ad8ece3e26944d` narrowed the success assertion.
81
-- CI #153 / run `37099346636`: 18 test files, 82 tests, 82 pass, 0 fail/skip/cancelled.
82
-- This file records the live permission blocker and current recovery path.
68
+- Owner-bound production approval: VERIFIED.
69
+- No provider WRITE before approval: VERIFIED.
70
+- Durable one-time replay protection: VERIFIED.
71
+- GitHub Actions WRITE authorization and provider POST: VERIFIED.
72
+- Telegram success feedback after accepted provider WRITE: VERIFIED.
73
+
74
+## Current Work — PR #19 GitHub Advanced READ
75
+- Branch: `feat/github-advanced-read`.
76
+- Design: `docs/superpowers/specs/2026-10-03-github-advanced-read-design.md`.
77
+- Plan: `docs/superpowers/plans/2026-10-03-github-advanced-read.md`.
78
+- Scope is READ-only: workflow job detail/log tail, artifacts metadata, branches/compare, PR detail/files/checks, issues, releases and bounded pagination. No new provider mutation is added in this slice.
79
+
80
+### TDD evidence
81
+- Provider RED CI #156 / run `37100585034`: 87 tests total, 82 pass / 5 expected failures for missing Advanced provider readers.
82
+- Provider compatibility fix followed after CI #157 exposed two regressions (log clamp and page-1 PR URL compatibility).
83
+- Provider GREEN CI #158 / run `37100892060`: 19 test files, 87/87 pass, 0 fail/skip/cancelled.
84
+- Plugin RED CI #159 / run `37100960176`: 92 tests total, 87 pass / 5 expected failures for undeclared/unimplemented Advanced routes and views.
85
+- Plugin GREEN CI #161 / run `37101099153`: 20 test files, 92/92 pass, 0 fail/skip/cancelled.
86
+
87
+### Implemented in PR #19
88
+- Bounded raw workflow-job log tail with HTML escaping and visible truncation state.
89
+- Workflow job detail and per-job drill-down from run jobs.
90
+- Workflow artifact metadata view.
91
+- Branch list and compare-to-default using a validated 40-hex head SHA.
92
+- Advanced PR list/detail/files-diff/checks views.
93
+- Issues and releases views.
94
+- Pagination is clamped to page 1..100 and page size <=20 where list pagination is exposed.
95
+- New READ callbacks resolve without provider calls before central policy evaluation; callback lengths are regression-tested against Telegram limits.
96
+
97
+### Not yet production-accepted
98
+- PR #19 is not merged at this checkpoint.
99
+- Exact post-merge `main` CI and Cloudflare deploy are NOT VERIFIED.
100
+- Owner-device production smoke for the new Advanced READ paths is NOT VERIFIED until after deploy.
101
102
## Next Executable Actions
85
-1. Review PR #18, squash-merge, verify exact `main` CI/deploy and active Cloudflare version.
86
-2. Owner must update the Worker GitHub credential so `nexa-dev-bot` has GitHub Actions WRITE on the target repository; never paste the token into repository/docs/logs.
87
-3. Re-run the owner-device WRITE smoke through Telegram on run #134 (or another safe failed run).
88
-4. Acceptance requires: approval verified, provider POST accepted, `run_attempt` increases/new attempt appears, result visible in Telegram, replay still rejected.
89
-5. Only after provider WRITE smoke is green, continue the broader roadmap in verified vertical slices.
103
+1. Review PR #19 for accidental provider writes, secret leakage, callback limits, response bounds and pagination gaps.
104
+2. Run fresh final PR CI, mark ready, squash-merge the exact reviewed head.
105
+3. Verify exact post-merge `main` CI, deploy, active Cloudflare version and current-version telemetry.
106
+4. Perform owner-device READ smoke through Telegram for Branches/Compare, PR detail/files/checks, CI Run/Jobs/failed log/artifacts, Issues and Releases.
107
+5. Then implement remaining GitHub Advanced WRITE items only where useful (workflow dispatch and/or specific-job rerun) as a separate Safe Approval slice.
108
+6. Continue to the Cloudflare Ops plugin and the broader roadmap.
109
110
## Remaining Roadmap
92
-1. GitHub Advanced: logs, failed-step log view, artifacts metadata, branches/compare, PR detail/diff/checks, issues, releases, workflow dispatch where useful, bounded pagination.
111
+1. Finish GitHub Advanced production acceptance; add workflow dispatch/specific-job rerun only if operationally useful and always via Safe Approval.
112
2. Cloudflare Ops plugin: deployments, versions, bindings, health, telemetry/runtime errors and approval-gated rollback/deploy operations.
113
3. CI/CD Control Plane and release acceptance orchestration.
114
4. Monitoring + Incident Manager.