feat(onprem): APP_ENV=onprem for a customer's own node #142

Closed
sharang wants to merge 2 commits from feat/onprem-mode into main
pull from: feat/onprem-mode
2 Commits
Author SHA1 Message Date
Sharang ParnerkarandClaude Opus 5.5 3e42b1ceb8 feat(onprem): refuse unknown product keys, no trials in the catalog, tighter tests
ci / shared (pull_request) Successful in 12s
ci / test (pull_request) Failing after 1m54s
ci / image (pull_request) Skipped
- Start fails when PRODUCTS or a URL override names no catalog product.
- The on-prem catalog sets supports_trial=false (the portal hides the button).
- Test that seeded cloud provision URLs are never called on-prem, with a
  cloud control; the outbox test gets its cloud control too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 17:39:22 +01:00
Sharang ParnerkarandClaude Opus 5.5 2f6fa5f3e8 feat(onprem): APP_ENV=onprem for a customer's own node
ci / shared (pull_request) Successful in 11s
ci / test (pull_request) Failing after 38s
ci / image (pull_request) Skipped
The registry on a customer's node must never reach a Breakpilot host and
must not run the cloud's commercial machinery.

- APP_ENV=onprem: no ERP (nothing queued, webhook off), no trial (new
  workspaces start active, the ladder never escalates by time), and the
  trial-offer, trial-terms, catalog/trial request and admin trial routes
  answer 404 not_available.
- PRODUCTS, PRODUCT_LAUNCH_URLS, PRODUCT_PROVISION_URLS: one store
  decorator applies the product list and URLs to every catalog read
  (catalog, activation, provisioning, entitlement checks). On-prem has no
  seeded URLs, so provisioning goes only to the local products. Checked at
  start ({id} in provision URLs, absolute http(s)).
- On-prem start fails when the values leave something to a cloud or dev
  default (auth off, no authz rules, ephemeral licence key, portal, invite,
  sender, LLM gateway) or set an ERP or contract documents.
- SMTP_TLS=starttls|tls|none: a plain relay inside the customer's network;
  no AUTH without encryption.
- Migration 0032: the Werkpilot text no longer names our LLM host.

Cloud behaviour is unchanged without the new variables (tested).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 17:35:53 +01:00