#2563

feat(cli): global read-only mode (ASC_READ_ONLY / --read-only) that refuses all mutations

Openrudrankriyamopened 1mo ago

Summary

A global read-only mode that refuses every POST/PATCH/PUT/DELETE at the transport layer across all outbound clients (public API, web session, Apple Ads, StoreKit).

Motivation

Three independent MCP servers built on asc re-implemented "never mutate" (Heimdall --read-only, zelentsov asc-mcp read-only, abd3lraouf risk tiers). Agents drive ~48% of invocations; per-command --confirm cannot guarantee a session never writes.

Contract

  • ASC_READ_ONLY=1 env var; a global --read-only flag only if the root global-flag mechanism makes it non-invasive.
  • Enforced before the request is sent; one stderr line naming the refused method and path; distinct documented exit code.
  • GET/HEAD, local-only operations, and JWT minting stay allowed; --confirm commands fail fast at validation.

Acceptance criteria

  • httptest asserting no mutating request leaves any client
  • cmdtest for one public-API mutation and one web mutation (stderr + exit code)
  • GET still works under the mode
  • docs: concepts section, automation guide, docs/design/read-only-mode.md

Partial work: worktree ~/Developer/CLIs/asc-read-only-mode (branch claude/read-only-mode-20260913).

Activity

0

No activity yet.