feat(experimental): gate experimental commands behind OBSERVE_CLI_EXPERIMENTAL#13
Draft
obs-gh-abhinavpappu wants to merge 1 commit into
Draft
feat(experimental): gate experimental commands behind OBSERVE_CLI_EXPERIMENTAL#13obs-gh-abhinavpappu wants to merge 1 commit into
obs-gh-abhinavpappu wants to merge 1 commit into
Conversation
395ffd7 to
26f12f1
Compare
…ERIMENTAL Add experimental command gating. A command marked experimental is hidden from help and refuses to run unless OBSERVE_CLI_EXPERIMENTAL=1, and carries an [experimental] badge when visible. SemVer covers only the default surface. - add src/lib/experimental.ts: isExperimentalEnabled, withExperimentalBadge, hideExperimentalRoutes, gateExperimental, experimentalDisabledMessage - mark the content, data-connection, ingest-token, and datasource groups experimental: badge the group and every subcommand, gate each leaf loader, and hide the group in app.ts - document the workflow in AGENTS.md; omit experimental commands from the README command table and features Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
26f12f1 to
1db908c
Compare
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.
Summary
Adds experimental command gating to the CLI (OB-61541). A command marked experimental is:
OBSERVE_CLI_EXPERIMENTAL=1,[experimental]in help when visible.SemVer covers only the default (non-experimental) surface; opting in carries no stability guarantees.
What's here
New
src/lib/experimental.tswith the toolkit:isExperimentalEnabled(env?)— readsOBSERVE_CLI_EXPERIMENTAL(1/true)withExperimentalBadge(brief)— prefixes the[experimental]badgehideExperimentalRoutes([names], env?)— builds adocs.hideRoutemap that hides routes until the flag is setgateExperimental(handler, env?)— wraps a command loader to block executionexperimentalDisabledMessage()— the friendly message shown when a gated command is run without the flagDemonstrated on real commands
To make the change obvious, two existing commands are marked experimental:
data-connection generate-stack-url— the single-command case: gate the loader, badge the brief, add the name to the parent map'shideRoute.contentgroup — the whole-group case: badge the group brief, hidecontentinapp.ts, and (because hiding does not block execution) wrap each of the 6 leaf loaders withgateExperimental.Marking a command experimental (and un-marking at GA)
Three touches, all from
src/lib/experimental.ts:gateExperimentalon the loader,withExperimentalBadgeon the brief, and the route name in the parent'shideRoute. Promoting to GA = deleting those three markers. Full guide inAGENTS.md.Notes for reviewers
content). That per-leaf friction motivates a possible follow-up (a single declarativeexperimental: true).generate-stack-urlandcontentare removed from the README command table while experimental (experimental commands are intentionally undocumented for users).Verification
bun run typecheck,bun run lint,bun run format— cleanbun test— 263 passOBSERVE_CLI_EXPERIMENTAL=1they appear with the[experimental]badge and execute.🤖 Generated with Claude Code