CLI version: @anna-ai/cli@0.1.30
Symptom
Once an app is published, releasing a new version with anna-app apps release <version> fails with a self-contradictory error:
✗ app status is published; release not permitted — app must be APPROVED or PUBLISHED to release
It reports the status is published, yet demands it be PUBLISHED.
Root cause
The server returns the app status in lowercase (published / approved / draft / pending_review …), but the release guard compares against uppercase literals:
if (app.status === "APPROVED" || app.status === "PUBLISHED") return; // "published" !== "PUBLISHED", never true
The check never matches, so it falls through to the catch-all error.
Impact
Once an app reaches published, you can no longer release any new version via the CLI.
Fix
Normalize the case before comparing, e.g. String(app.status).toUpperCase().
Reproduction
# First release succeeds, app becomes `published`
anna-app apps push
anna-app apps cut 0.1.2 # cut a new version after the app is already published
anna-app apps release 0.1.2 # → exit code 6, reproduced
