You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A dedicated research pass (external: how Sentry, GitLab, Grafana, PostHog, Supabase, n8n, Cal.com, Ghost, Plausible, Mattermost, and Discourse each split self-host from cloud/SaaS; internal: what ORB's own Cloud Readiness epic (#4877) already concluded, and what AMS's current package boundary already buys) informs this milestone's scope and shape.
Recommended pattern
Adopt "identical core package + thin, additive control-plane wrapper" — the Supabase/Ghost/Sentry shape — for both ORB and AMS, not GitLab/n8n/Plausible's in-repo license-gated-flags model, and not Cal.com's April-2026 divergence into a private fork (which the research found had already caused core-system drift within 3 months). Concretely: packages/gittensory-engine/src/miner/* + packages/gittensory-miner stay a single, unmodified core that self-host and any future hosted AMS both consume identically. Every cloud-only concern — tenant provisioning, auth/identity, billing, fleet ops, secrets-at-scale — lives in a separate, additive layer that calls into that core through injected interfaces (the same shape driver-factory.ts and worktree-allocator.ts already use), never inline inside the CLI-glue files. Where a genuinely paid, trust-sensitive feature ever needs gating, prefer Mattermost's structural three-tier model (open core / source-visible-inert middle / closed private-peer-repo compiled in via build tag) over a bare runtime license flag — GitLab's own rule is explicit: a SaaS-only feature check must never appear in the self-host build.
AMS's head start: unlike ORB (whose Cloud Readiness Phase A is literally retrofitting a core-package boundary that grew inline for years — the same costly retrofit GitLab paid at 55-engineer/600+-MR/~1.5M-line scale), AMS was built as a separate package from day one. This milestone should skip straight to the Phase-B-equivalent work ORB's #26 already enumerates (multi-tenancy/isolation, fleet/ops, scaling/capacity, secrets-at-scale, incident/SLA), scoped to AMS's own already-real gaps — including one confirmed, already-shipped bug: packages/gittensory-miner/lib/governor-kill-switch.js resolves its kill-switch from a bare env var with no tenant key, the same class of bug ORB's own #4885-#4893 sweep is fixing for itself.
This is deliberately a small, direction-setting batch for a future milestone, not a contributor-throughput sprint — most items are maintainer-only architecture/design decisions by design (mirrors ORB Cloud Readiness's own ~100%-maintainer-only posture), with a handful of research-spike/audit/documentation items already open to contributors. Sequencing: #5215 (the control-plane spec) and #5228 (the concurrency baseline) are the two items everything else benefits from existing first, though nothing strictly blocks starting other items in parallel. Do not start any client-app (mobile/desktop) build against #5229 until that spec issue actually closes with a decision.
Unlike ORB Cloud Readiness (#26), this milestone deliberately has no billing/quota/plan-model or signup/onboarding-flow issues of its own. AMS already has a specific, named hosted product — "Rent-a-Loop" (milestone #24 / epic #4778) — whose own Billing/onboarding/legal group (#4802 self-serve signup & App-install flow, #4803 payment integration, #4804 pricing/rate card, #4805 Terms of Service) already covers this for AMS specifically. ORB has no equivalent product-specific milestone, so its own billing/onboarding work lives inside Cloud Readiness instead. If a future hosted-AMS offering beyond Rent-a-Loop ever needs its own separate billing model, file it here explicitly rather than assuming this gap is an oversight.
Context
A dedicated research pass (external: how Sentry, GitLab, Grafana, PostHog, Supabase, n8n, Cal.com, Ghost, Plausible, Mattermost, and Discourse each split self-host from cloud/SaaS; internal: what ORB's own Cloud Readiness epic (#4877) already concluded, and what AMS's current package boundary already buys) informs this milestone's scope and shape.
Recommended pattern
Adopt "identical core package + thin, additive control-plane wrapper" — the Supabase/Ghost/Sentry shape — for both ORB and AMS, not GitLab/n8n/Plausible's in-repo license-gated-flags model, and not Cal.com's April-2026 divergence into a private fork (which the research found had already caused core-system drift within 3 months). Concretely:
packages/gittensory-engine/src/miner/*+packages/gittensory-minerstay a single, unmodified core that self-host and any future hosted AMS both consume identically. Every cloud-only concern — tenant provisioning, auth/identity, billing, fleet ops, secrets-at-scale — lives in a separate, additive layer that calls into that core through injected interfaces (the same shapedriver-factory.tsandworktree-allocator.tsalready use), never inline inside the CLI-glue files. Where a genuinely paid, trust-sensitive feature ever needs gating, prefer Mattermost's structural three-tier model (open core / source-visible-inert middle / closed private-peer-repo compiled in via build tag) over a bare runtime license flag — GitLab's own rule is explicit: a SaaS-only feature check must never appear in the self-host build.AMS's head start: unlike ORB (whose Cloud Readiness Phase A is literally retrofitting a core-package boundary that grew inline for years — the same costly retrofit GitLab paid at 55-engineer/600+-MR/~1.5M-line scale), AMS was built as a separate package from day one. This milestone should skip straight to the Phase-B-equivalent work ORB's #26 already enumerates (multi-tenancy/isolation, fleet/ops, scaling/capacity, secrets-at-scale, incident/SLA), scoped to AMS's own already-real gaps — including one confirmed, already-shipped bug:
packages/gittensory-miner/lib/governor-kill-switch.jsresolves its kill-switch from a bare env var with no tenant key, the same class of bug ORB's own #4885-#4893 sweep is fixing for itself.Scope summary
How to use this issue
This is deliberately a small, direction-setting batch for a future milestone, not a contributor-throughput sprint — most items are maintainer-only architecture/design decisions by design (mirrors ORB Cloud Readiness's own ~100%-maintainer-only posture), with a handful of research-spike/audit/documentation items already open to contributors. Sequencing: #5215 (the control-plane spec) and #5228 (the concurrency baseline) are the two items everything else benefits from existing first, though nothing strictly blocks starting other items in parallel. Do not start any client-app (mobile/desktop) build against #5229 until that spec issue actually closes with a decision.
Scope clarification: billing & onboarding (added 2026-07-12)
Unlike ORB Cloud Readiness (#26), this milestone deliberately has no billing/quota/plan-model or signup/onboarding-flow issues of its own. AMS already has a specific, named hosted product — "Rent-a-Loop" (milestone #24 / epic #4778) — whose own Billing/onboarding/legal group (#4802 self-serve signup & App-install flow, #4803 payment integration, #4804 pricing/rate card, #4805 Terms of Service) already covers this for AMS specifically. ORB has no equivalent product-specific milestone, so its own billing/onboarding work lives inside Cloud Readiness instead. If a future hosted-AMS offering beyond Rent-a-Loop ever needs its own separate billing model, file it here explicitly rather than assuming this gap is an oversight.