feat(cloud-connection): open-ended, plan-agnostic runtime feature seam (cloud ADR-0012)#1847
Merged
Merged
Conversation
…m (cloud ADR-0012) The RuntimeConfigPlugin owns the mechanism (serve a per-request `features` map to the SPA) but must not own the catalog or pricing policy. Previously the plugin enumerated a closed feature set (`aiStudio`/`autoPublishAiBuilds`) and used billing vocabulary (`resolvePlanFeatures` / `RuntimeConfigPlanFeatures`), so a distribution couldn't add a commercial feature (custom domain, SSO, …) without editing the open framework. Now the feature map is open-ended: the policy hook's returned flags are merged verbatim into `features`, so a host (e.g. the cloud control plane) injects arbitrary keys without any framework change. Renames the seam plan-agnostic: `resolveFeatures` / `RuntimeFeatureOverrides`, with `resolvePlanFeatures` / `RuntimeConfigPlanFeatures` kept as deprecated, still-honoured aliases. Adds runtime-config-plugin.test.ts covering base flags, arbitrary-key passthrough, the deprecated alias, and the static default. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
RuntimeConfigPluginis the open mechanism that serves the SPA's per-requestfeaturesmap. But it enumerated a closed feature set and used billing vocabulary (resolvePlanFeatures/RuntimeConfigPlanFeatures), so a distribution couldn't add a commercial feature (custom domain, SSO, …) without editing the open framework — commercial/pricing policy bleeding into open-core.What
featuresmap is now open-ended: the policy hook's returned flags are merged verbatim, so a host injects arbitrary keys (e.g. the cloud control plane returnscustomDomain/ssofrom its plan entitlements) with no framework change.resolveFeatures/RuntimeFeatureOverrides.resolvePlanFeatures/RuntimeConfigPlanFeaturesstay as deprecated, still-honoured aliases (no breakage).aiStudio/autoPublishAiBuildsremain the framework's own non-commercial mechanism defaults (ADR-0005: AI authoring is all-plan, cost-gated — not a paid tier).Tests
New
runtime-config-plugin.test.ts: base flags, arbitrary-key passthrough, deprecated-alias compatibility, static default. cloud-connection 48/48.Establishes the boundary recorded in cloud ADR-0012 (companion cloud PR wires
customDomain/ssothrough this seam).🤖 Generated with Claude Code