Skip to content

SP-1383: gate early-access commands behind feature flag, replace beta#393

Open
A. Jashari (admirjashari) wants to merge 1 commit into
mainfrom
SP-1383-early-access-feature-flag
Open

SP-1383: gate early-access commands behind feature flag, replace beta#393
A. Jashari (admirjashari) wants to merge 1 commit into
mainfrom
SP-1383-early-access-feature-flag

Conversation

@admirjashari

Copy link
Copy Markdown
Contributor

Description

Gate early-access (non-GA) commands behind a backend feature flag. If a team runs a gated command that isn't enabled for them, they get a clear "not enabled — contact support" message instead of a generic 403.

Also consolidates the old beta marker into a single earlyAccess:

  • earlyAccess(featureKey?) replaces beta()/betaOption() — with a key it's gated at run time, without one it's just an internal marker.
  • No (beta) label anymore; early-access status is internal (nothing shown in --help).
  • Check uses the existing /api/team/features endpoint with the profile token (flag enabled = key present).
  • No profile → normal "no profile" error; check failure → fail-closed "could not verify".
  • deployment commands migrated to .earlyAccess() (ungated, behavior unchanged).

Relevant links

Checklist

  • I have self-reviewed this PR
  • I have tested the change and proved that it works in different scenarios
  • Docs — N/A, tracked in a separate ticket

@admirjashari
A. Jashari (admirjashari) requested review from a team as code owners July 9, 2026 08:14
Comment thread src/core/command/module-handler.ts Outdated
Comment thread src/core/command/module-handler.ts Outdated
Comment thread src/core/feature-flag/early-access-features.ts Outdated
Comment thread src/commands/deployment/module.ts Outdated

public register(context: Context, configurator: Configurator): void {
const deploymentCommand = configurator.command("deployment").beta()
const deploymentCommand = configurator.command("deployment").earlyAccess()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, the deployment feature is GA, so this beta() marker was already a leftover, and moving it off here is the right cleanup. One thing still hanging around: docs/user-guide/deployment-commands.md is titled "Deployment Commands (beta)", so the docs and the CLI now disagree. We know fully removing the beta tag isn't the point of this PR, so feel free to leave it for a followup PR if it's too much hassle to fold in here.

Comment thread src/core/command/module-handler.ts Outdated
Comment thread src/core/command/module-handler.ts Outdated
Comment thread src/core/command/module-handler.ts Outdated
Comment thread src/core/command/module-handler.ts Outdated
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
3 New Major Issues (required ≤ 0)

See analysis details on SonarQube Cloud

💡 Need a hand with PR review? Try Gitar by Sonar!

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.

4 participants