Merge pull request #1703 from entireio/experimental-command-gating · Entire

Merge pull request #1703 from entireio/experimental-command-gating

279520a→main·

gtrrz-victor·3d ago·11 files·+405 added/-53 removed

feat: gate experimental commands behind build-time visibility flag

Changes

11

25 unmodified lines

26
27
28
29
30
31
32
33
34
35
36

25 unmodified lines

- -X github.com/entireio/cli/cmd/entire/cli/versioninfo.Commit={{.ShortCommit}}
      - -X github.com/entireio/cli/cmd/entire/cli/telemetry.PostHogAPIKey={{.Env.POSTHOG_API_KEY}}
      - -X github.com/entireio/cli/cmd/entire/cli/telemetry.PostHogEndpoint={{.Env.POSTHOG_ENDPOINT}}
      # Experimental-command visibility: hide in stable releases, keep visible
      # in nightly (prerelease) builds. .Prerelease is empty for a stable tag
      # (vX.Y.Z) and non-empty for a nightly tag (vX.Y.Z-nightly.*). Local
      # builds carry no stamp and use the package default ("true" = visible).
      - -X github.com/entireio/cli/cmd/entire/cli/experimental.Visible={{ if .Prerelease }}true{{ else }}false{{ end }}

# git-remote-entire is the git remote helper for entire:// URLs (see
  # cmd/git-remote-entire). A small, dedicated binary shipped alongside

Experimental Commands

Experimental commands are gated by a build-time visibility flag (the cmd/entire/cli/experimental package): they are shown — grouped under an "Experimental commands:" help section — in developer and nightly builds, and hidden in stable release builds. Visibility is toggled by experimental.Visible (default "true"), which GoReleaser stamps "false" only on stable tags (.Prerelease empty); nightly (vX.Y.Z-nightly.*) and local builds leave it at the default.

Register a command as experimental with experimental.Register(parent, child) instead of parent.AddCommand(child). Gating only controls visibility — the commands are always runnable in every build.

Experimental command families advertised through entire labs:

Experimental commands (gated by the build-time visibility flag above — visible and grouped under "Experimental commands:" in developer/nightly builds, hidden in stable releases, always runnable): tokens, import, review, investigate, blame, why, the top-level search shortcut, experts, runner, and checkpoint policy. tokens is also advertised through entire labs. The canonical checkpoint search is not gated and stays visible.

Top-level lifecycle and standalone commands

Experimental command visibility

Gated as experimental: visible and grouped in developer builds (the default test build), hidden in shipped releases.