Repository navigation
chore(cli): declare experimental access and deprecation on commands - #7698
Conversation
CLI benchmark (Lightweight Commands): no changes foundCommit
API calls: unchanged for all 9 commands. Binary size: 135.3 MB, up 4.0 KB from 135.2 MB. Details: timing ranges, API calls per command, slowest phasesTiming ranges
API calls per command
Slowest phasesNo command moved beyond noise, so there are no phase deltas. Comment |
Coly010
left a comment
There was a problem hiding this comment.
approving so you're not blocked, just one ask
the pairing test only picks up <policy>.check, so a new command that gates with the still-exported requireExperimental and skips the annotation sails through - and its docs ship without --experimental. I tried it on storage ls: the pairing test stayed green and only the hard-coded list in docs-spec.unit.test.ts caught it, which a brand new command wouldn't be in. the old source scan would have failed there
could the scanner treat a bare requireExperimental in a command or handler as unannotated, with projects create as the allowed flag-conditional case? or rename the alias to something like requireExperimentalForFlags so it isn't the obvious one to reach for. either works for me
nit, not blocking: the header comment in docs-spec.tables.ts wraps a bit oddly after the edit
otherwise looks good to me!
Generate the CLI reference from command annotations instead of maintaining separate lists of experimental and deprecated commands. Parent help and shell completion derive the
(deprecated)label from the same annotation that excludes a command from the website. Deprecated commands remain callable.For experimental access, the command annotates the policy and its handler explicitly checks that policy. This preserves which error users see first:
network-bans getvalidates the output format before checking access, whiledb schema declarative syncreads project config before checking access. CI checks that the annotation and handler reference the same policy. The annotation does not itself enforce access.