Personal Telegram developer console for GitHub

feat/studio-g0-foundation
audit/commit-drilldown audit/finalize-workspace-menu-security audit/ops-actionability audit/pr-menu-consolidation audit/status-menu-consolidation audit/telegram-menu-e2e audit/telegram-menu-e2e-wave2 chore/actions-node24-runtime cleanup/remove-diag design/cloudflare-ops-read docs/control-plane-2-7-design docs/guide-v2-1-sync docs/menu-audit-final-sync docs/phase2-acceptance-closeout docs/phase2-multifile-design feat/bootstrap-worker feat/cloudflare-ops-read feat/cp2-multifile-final feat/cp2-multifile-workspace feat/cp3-github-write-final feat/cp4-cloudflare-ops-final feat/cp5-cicd-control-plane feat/cp6-incident-manager feat/cp7-automation-engine feat/deep-file-browser feat/final-delivery-16-20 feat/github-advanced-read feat/in-app-guide-v2 feat/navigation-recovery-ux-v2 feat/ops-console-v2-1 feat/persistent-menu-code-input feat/phase2-multifile-workspace feat/phase2-multifile-workspace-v2 feat/plugin-foundation-v1 feat/safe-github-ops feat/self-register-webhook feat/studio-g0-foundation feat/telegram-main-inline-menu feat/telegram-pr-merge feat/ux-platform-8-12 feat/v3a-readonly-copilot feat/workspace-file-upload feature/mobile-repo-browser feature/multi-file-change-set fix/approval-expiry-feedback fix/callback-resilience-and-docs fix/ci-actions-pagination fix/cloudflare-fetch-binding fix/editor-request-body-cap fix/editor-safe-file-options fix/issues-permission-release-empty-ux fix/main-menu-callback-fallback fix/phase2-file-editor-selection fix/phase2-final-ux fix/phase2-workspace-ref-persistence fix/production-auto-deploy fix/provider-write-error-feedback fix/repository-id-navigation-fallback fix/repository-pr-navigation fix/telegram-callback-updates fix/telegram-runtime-diagnostics fix/workspace-editor-flow-v2 fix/workspace-recovery-validation hardening/ci-zero-test-telegram-token hardening/pr1-destructive-totp hardening/pr2-kill-switch main multifile-workspace nexa/edit-BwJEIIY3PW nexa/edit-IPHT8irO7b nexa/edit-b4Od3BIMYd p2-multifile phase2-20261005 phase2-20261005-a phase2-20261005-b phase2-20261005-c phase2-20261005-d phase2-20261005-e phase2-20261005-f phase2-20261005-g phase2-20261005-h phase2-20261005-i phase2-20261005-j phase2-20261005-k phase2-20261005-l phase2-20261005-m phase2-20261005-n phase2-20261005-o phase2-20261005-p phase2-20261005-q phase2-20261005-r phase2-20261005-s phase2-20261005-t phase2-20261005-u phase2-20261005-v phase2-20261005-w phase2-20261005-x phase2-20261005-y phase2-20261005-z phase2-acceptance-closeout phase2-add-file-hotfix phase2-change-set phase2-design-20261005 phase2-design-final phase2-implementation phase2-multifile-implementation phase2-multifile-spec phase2-spec-final phase2-workspace phase2/multifile-workspace plan/nexa-studio-v2-reviewed security/remove-telegram-setup spec/repository-workspace-editor v3a/multifile work/multifile
md 5 KB

Nexa Studio G0 foundation and handoff plan

For agentic workers: Use the existing project skills for implementation and verification. Check off work only with recorded evidence.

Goal: Make the existing owner-only bot maintainable and implement G0's demonstrated baseline corrections before handing routine work to another chat.

Architecture: Keep the existing Worker, Durable Objects, approval and branch-only publication. Use the existing Replay Guard namespace with a distinct webhook identity domain for 24-hour update deduplication; add no infrastructure. Keep staging/deployment and real-device acceptance separate from local tests.

Tech Stack: JavaScript ESM, Node 22, Cloudflare Workers/DO, Prettier, ESLint.

Spec: docs/contract/NEXA_STUDIO_V3.md and its unchanged source DOCX.

Global constraints

  • No rewrite, direct default-branch writes, force pushes, secret/source logging or fabricated evidence.
  • Existing owner boundary, immutable intent, Safe Approval, replay guard, TOTP and Kill Switch must remain effective.
  • G0 scope: R-10 through R-13, R-26 and R-27. Do not claim G1 or cross its acceptance gate.
  • Preserve existing behavior unless a regression test demonstrates the intended correction.
  • Keep formatting in a separate commit, with no logic changes.
  • User requested autonomous progress plus a concise, reusable handoff; no repeated design interviews.

Review focus

  • Concurrent duplicate Telegram deliveries: exactly one processing attempt, separate from approval keys.
  • Durable storage failure: retryable non-2xx and no bot/provider execution.
  • Handler/provider failures: log fixed metadata only and acknowledge an already claimed update without replaying effects.
  • Editor limits: one server reference drives API, page, upload instructions and boundary behavior.
  • Formatting: executable ASTs and template literal bytes unchanged.

Tasks

  1. Read every R-27 module and test, record exact file inventory, findings and future-phase gaps.
  2. Integrate pending tested editor safety PRs locally, preserve original v3 booklet and record baseline tests.
  3. R-10: pin formatter/linter and lockfile; format JS/config/workflows in a dedicated commit. Compare pre/post executable ASTs, including template literals; run existing tests. Configure lint to catch real undefined references, not enforce a new product design.
  4. R-11: write failing tests for page policy consumption and upload guidance; derive all current editor ceilings from workspace-policy.js. Preserve 20,000 code points / 65,536 bytes / 8 files / 131,072 aggregate bytes; mark older specs as historical.
  5. R-12: write failing /health and version tests; make /health return only ok and derive product release version from package.json. Keep /status shape compatible.
  6. R-13: write failing worker/DO tests for duplicate/concurrent updates, 24-hour expiry, storage failure, malformed/unauthorized updates, handled errors and log redaction. Deduplicate before effects through existing Replay Guard, using a bot-specific separate domain. No update bodies stored. Document at-most-once processing and crash recovery limits.
  7. Fix only confirmed baseline operational bugs with RED/GREEN tests if found during R-27.
  8. Run Node 22 full tests, lint, format check and pinned Wrangler dry-run. Review changes independently. Push a draft PR with exact test/SHA/CI evidence; no automatic main merge or deployment.
  9. Record R-26 historical evidence and pending fresh owner-device/runtime proof; G0 acceptance remains pending required evidence/owner approval.
  10. Create docs/handoff/START_HERE.md and a copyable Persian prompt with branch/PR, commands, requirement status, next safe tasks and triggers for security review. A chat without execution tools must produce patches/checklists rather than claim implementation.

Implementation interfaces

  • WORKSPACE_EDITOR_LIMITS: existing immutable policy object remains the reference.
  • consumeTelegramUpdate({ namespace, botId, updateId, now }): Promise<boolean>; false only for a known duplicate, throws on missing/unhealthy storage.
  • Worker retains fetch(request, env). Public /health contains no version or diagnostics; /status obtains version from package metadata.
  • Webhook dedupe contains update ID and expiry only, never source, token or Telegram body. A server-side bot identifier is derived without storing the token.

Scope limits

G1 connection wizard, D1, sessions, CodeMirror and multi-user access are not built in this pass. Staging, exact-SHA GitHub CI and device/runtime acceptance must not be inferred from local verification. A 24-hour at-most-once marker prevents repeated side effects but is not a durable queue or exactly-once execution guarantee.

Checkpoint

Local verification: 311/311 tests, zero lint errors (13 legacy warnings), format and bundle pass. Code head abf760e5d2631c8c4ef48a7738b33a9eae34ab4d passed GitHub CI run 40121709579. PR #65 remains draft; tasks8/9 retain final-head CI/device/runtime/gate acceptance work. See docs/roadmap/G0_IMPLEMENTATION_REPORT.md.