Skip to content

fix: Subscription registration fails silently when CREDENTIAL_ENCRYPTION_KEY is not set (#148) - #168

Merged
vybe merged 2 commits into
Abilityai:mainfrom
AndriiPasternak31:feature/148-silent-subscription-fail
Mar 25, 2026
Merged

vybe merged 2 commits into
Abilityai:mainfrom
AndriiPasternak31:feature/148-silent-subscription-fail

Conversation

@AndriiPasternak31

@AndriiPasternak31 AndriiPasternak31 commented Mar 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Auto-generate CREDENTIAL_ENCRYPTION_KEY in start.sh so new deployments work out of the box
  • Add GET /api/subscriptions/encryption-status endpoint; return HTTP 503 with actionable instructions instead of generic 500
  • Frontend checks encryption status on page load, shows yellow warning banner with setup steps, disables Register button

Changes

  • scripts/deploy/start.sh — auto-generate key if empty in .env
  • src/backend/routers/subscriptions.py — new endpoint + early validation
  • src/frontend/src/views/Settings.vue — encryption status check, warning banner, disabled button
  • docs/memory/changelog.md — changelog entry

Test Plan

  • Remove CREDENTIAL_ENCRYPTION_KEY from .env, run ./scripts/deploy/start.sh — key auto-generated
  • GET /api/subscriptions/encryption-status returns {"configured": true/false}
  • With key unset: Settings shows yellow warning, Register button disabled
  • With key set: register subscription works normally
  • With key unset but POST forced: returns 503 with clear error message

Closes #148

Generated with Claude Code

AndriiPasternak31 and others added 2 commits March 25, 2026 15:16
…ION_KEY is not set (Abilityai#148)

Fresh deployments had no encryption key, causing subscription registration
to fail with an unhelpful 500 error. Now: start.sh auto-generates the key,
backend returns 503 with clear instructions if missing, and frontend shows
a warning banner with setup steps.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…bilityai#148

Add encryption-status endpoint and early validation documentation to
subscription-management.md. Add entry to feature-flows.md index.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@AndriiPasternak31
AndriiPasternak31 force-pushed the feature/148-silent-subscription-fail branch from 951f0d4 to 2a95a20 Compare March 25, 2026 15:16
@vybe
vybe merged commit 96ef61a into Abilityai:main Mar 25, 2026
@AndriiPasternak31
AndriiPasternak31 deleted the feature/148-silent-subscription-fail branch April 25, 2026 17:59
vybe pushed a commit that referenced this pull request Jul 21, 2026
#1716)

The enterprise submodule pointer on dev (and main) was 7 commits stale, so five
merged enterprise commits were stranded — never reachable from a mounted
enterprise install:

- c2e9059 activate the ephemeral_agents module (+ serialize first-boot DDL,
  #147/#148) — WITHOUT this the module is never register_module()'d, so ghost
  (ephemeral) agents 403 on every install. This is the headline fix.
- 7f40361 retention: mirror OSS defaults so the panel reports the window in
  force (#168) — the enterprise companion to P0 #1638.
- ce68594 retention: manage operator_queue + agent_reports windows (#145).
- a85154e / 78fe782 / 9f43772 — client-portal briefing + STT key + test repair.

Fast-forward only (f5d69be6 is a linear ancestor of 7f40361), so this is a pure
pointer move — no enterprise code review re-opens here; those commits were
already reviewed and merged in trinity-enterprise. Inert for OSS-only builds
(the submodule is `update = none`; CI never inits it — the "backend boots
without enterprise submodule" job is unaffected). main picks this up via the
dev → main release cut.

Related to ent#185
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Subscription registration fails silently when CREDENTIAL_ENCRYPTION_KEY is not set

2 participants