openova/core
e3mrah ffb79aab12
fix(billing): consume catalyst.usage.recorded from CATALYST_SME stream (was creating overlapping CATALYST_USAGE) (#1683)
t20 (2026-05-18) caught the bug: billing crashed at startup with NATS
error code 10065 "subjects overlap with an existing stream" because
CATALYST_SME (subjects `catalyst.>`, created by the tenant /
provisioning MultiSubscribers) had already claimed `catalyst.usage.recorded`
by the time billing tried to create CATALYST_USAGE
(subject `catalyst.usage.recorded`). JetStream forbids two Streams from
owning overlapping subject filters.

Option B per the matrix: have billing share CATALYST_SME and scope its
metering reads via a consumer-side FilterSubject instead of owning a
separate Stream. This matches the architecture every other SME service
(tenant, notification, provisioning) already uses for catalyst.* events.

Changes:
- core/services/shared/events/nats.go: add EnsureCatalystSMEStream
  (public wrapper around the existing package-private ensureSMEStream
  helper used by NewMultiSubscriber) + SubscribeUsageRecordedOnSME
  (durable consumer on CATALYST_SME with FilterSubject scoped to
  catalyst.usage.recorded). The original EnsureUsageStream and
  SubscribeUsageRecorded are retained but marked Deprecated for
  back-compat with any Catalyst-Zero / dev loop wired before t20.
- core/services/billing/main.go: replace the EnsureUsageStream call
  with EnsureCatalystSMEStream and the SubscribeUsageRecorded call
  with SubscribeUsageRecordedOnSME. Comment captures the t20 root
  cause + the bootstrap-order rationale so the next reader doesn't
  re-introduce the dedicated Stream.

The consumer-side FilterSubject (`catalyst.usage.recorded`) lives in
core/services/shared/events/nats.go inside SubscribeUsageRecordedOnSME.

go build + go test clean for core/services/billing and
core/services/shared.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 14:53:25 +04:00
..
admin fix(admin,billing): drop unsafe state-write in snippet — spinner stays forever (#1000) (#1001) 2026-05-05 23:36:50 +04:00
cmd feat(epic-4): K+P+X1+G — k8s-ws-proxy + projector + WebSocket logs + Guacamole chart (#1099) (#1164) 2026-05-09 09:27:39 +04:00
console feat(consolidation): Phase 1 — move Catalyst-Zero apps + CI + manifests into public monorepo 2026-04-28 12:08:09 +02:00
controllers feat(sandbox): Prometheus emitters for Wave 14 Grafana panels (#1674) (#1679) 2026-05-18 14:34:50 +04:00
marketplace test(marketplace): codified customer-journey regression (17 steps) (#1655) 2026-05-18 12:02:39 +04:00
marketplace-api feat(consolidation): Phase 1 — move Catalyst-Zero apps + CI + manifests into public monorepo 2026-04-28 12:08:09 +02:00
pkg/dynadot-client fix(pdm/dynadot): remove fictional ResponseHeader wrapper from api3.json adapter (#939) (#948) 2026-05-05 15:11:39 +04:00
pool-domain-manager fix(pdm/dynadot): auto-register NS glue records before set_ns (#1496) 2026-05-15 13:32:49 +04:00
services fix(billing): consume catalyst.usage.recorded from CATALYST_SME stream (was creating overlapping CATALYST_USAGE) (#1683) 2026-05-18 14:53:25 +04:00
README.md feat(consolidation): Phase 1 — move Catalyst-Zero apps + CI + manifests into public monorepo 2026-04-28 12:08:09 +02:00

Catalyst Control Plane (core/)

The user-facing Catalyst control plane modules. Status: Consolidated and deployed on Catalyst-Zero (Contabo k3s) as of Pass 105 (2026-04-28).

Read first: docs/PROVISIONING-PLAN.md, docs/GLOSSARY.md, docs/ARCHITECTURE.md, docs/IMPLEMENTATION-STATUS.md.


What this is

The four modules that constitute the Catalyst control plane's user-facing surface, plus the Go backend they share. Each is its own Containerfile-built workload, deployed on every Catalyst Sovereign (starting with Catalyst-Zero on Contabo, and on every franchised Sovereign provisioned thereafter).

Module Stack Purpose Deployed image
console/ Astro + Svelte Primary user-facing UI. Form / Advanced / IaC editor depths. The Sovereign-provisioning wizard at /sovereign (Phase 3) lives here. ghcr.io/openova-io/openova/console:<sha>
admin/ Astro + Svelte Sovereign-admin operations UI. Includes the canonical voucher / billing / catalog / orders / tenants admin surface that sovereign-admin uses to issue vouchers to franchised tenants. ghcr.io/openova-io/openova/admin:<sha>
marketplace/ Astro + Svelte Public-facing Blueprint card grid (the "App Store"). 5-step Plan → Apps → Addons → Checkout → Review flow. ghcr.io/openova-io/openova/marketplace:<sha>
marketplace-api/ Go Backend API for marketplace and console. Handlers (handlers/), provisioner (provisioner/), store (store/). Phase 4 extends this with full Hetzner provisioning. ghcr.io/openova-io/openova/marketplace-api:<sha>

The Helm chart that deploys all four (plus catalyst-ui, catalyst-api, and the legacy SME backend services) lives at products/catalyst/chart/.


CI / Build

Each module has a corresponding GitHub Actions workflow:

Each workflow watches its module path, builds the Containerfile, pushes to GHCR with a SHA tag, and pins the SHA into the corresponding manifest in products/catalyst/chart/templates/ (so Flux on Catalyst-Zero picks up the new image on the next reconciliation).


Migration history

  • Pass 105 (2026-04-28): console/, admin/, marketplace/ consolidated from openova-private/apps/{console,admin,marketplace}/ into this directory. marketplace-api/ consolidated from openova-private/website/marketplace-api/. Six CI workflows migrated to .github/workflows/ of the public repo. Catalyst-Zero K8s manifests migrated from openova-private/clusters/contabo-mkt/apps/{catalyst,sme/services,marketplace-api}/ into products/catalyst/chart/templates/. Image references updated from ghcr.io/openova-io/openova-private/sme-{admin,console,marketplace} to ghcr.io/openova-io/openova/{admin,console,marketplace}. The 8 legacy SME backend services (auth, billing, catalog, domain, gateway, notification, provisioning, tenant) keep their openova-private/sme-* image refs until their source code migrates in a follow-up phase.

Part of OpenOva