Conversation
Add //go:build dev to tui.go, tui_url.go, and their tests so the full workspace TUI is only compiled into dev-tagged builds. A stub tui_stub.go (//go:build !dev) provides an identical command surface (Use, Args, --trace flag) that returns a dev-only usage error. The devBuild constant (dev_tag.go / dev_tag_stub.go) gives the rest of the commands package a compile-time boolean for gating features without importing version or adding runtime checks.
CommandInfo gains a DevOnly bool so the commands listing can badge dev-gated commands with [dev] instead of [experimental]. DevOnly subsumes experimental for display purposes — a command that is both shows only [dev]. Catalog entries: tui is now DevOnly (was Experimental); bonfire is DevOnly + Experimental (dev gate checked before experimental config). requireBonfireExperimental checks devBuild first, returning a clear "only available in development builds" error in release binaries before ever consulting the experimental config flag.
With TUI files gated behind //go:build dev, all dev-time go invocations must include the tag. Add BUILD_TAGS := -tags dev to the Makefile and thread it through every target that calls go build, test, vet, or fuzz. golangci-lint uses --build-tags dev (its own flag form). govulncheck and gosec get the tag too. CI workflows (test.yml, release.yml, security.yml) receive the same treatment on their direct go invocations. GoReleaser intentionally does not get the tag — release binaries compile the stub TUI.
Sensitive Change Detection (shadow mode)This PR modifies control-plane files:
|
Review carefully before merging. Consider a major version bump. |
There was a problem hiding this comment.
1 issue found across 13 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="internal/commands/tui_stub.go">
<violation number="1" location="internal/commands/tui_stub.go:15">
P2: Stub `Short` text doesn't match the real command's `Short`. The real TUI command uses `"Launch the Basecamp workspace [experimental]"` while this stub uses `[dev]`. If surface snapshots are generated from dev builds, the mismatch won't break them, but `--help` output and completions will differ between build types, contradicting the stated consistency goal.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
Pull request overview
This PR makes the full-screen TUI workspace (and related tooling) available only in development builds by gating the real implementation behind the dev build tag and providing release-build stubs, while also surfacing “dev-only” status in the command catalog and ensuring CI/dev tooling builds with -tags dev.
Changes:
- Add
//go:build devto TUI command + URL parsing code/tests, and introduce a!devstubtuicommand for release builds. - Introduce a compile-time
devBuildconstant (dev_tag.go/dev_tag_stub.go) and use it to gate bonfire behavior. - Add
DevOnlyto the command catalog and render a[dev]badge; thread-tags devthrough Makefile and CI workflows for dev builds.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/commands/tui_url_test.go | Gate TUI URL parsing tests behind dev build tag. |
| internal/commands/tui_url.go | Gate TUI URL parsing implementation behind dev build tag. |
| internal/commands/tui_test.go | Gate TUI command tests behind dev build tag. |
| internal/commands/tui_stub.go | Add release-build (!dev) stub tui command that errors out. |
| internal/commands/tui.go | Gate real TUI command behind dev build tag. |
| internal/commands/dev_tag.go | Define devBuild = true for dev builds. |
| internal/commands/dev_tag_stub.go | Define devBuild = false for non-dev builds. |
| internal/commands/commands.go | Add DevOnly to catalog + render [dev] badge in basecamp commands. |
| internal/commands/bonfire.go | Gate bonfire via devBuild before experimental-config gating. |
| Makefile | Pass -tags dev through build/test/vet/lint/fuzz/vuln tooling. |
| .github/workflows/test.yml | Run tests/build with -tags dev and pass build tags to golangci-lint. |
| .github/workflows/security.yml | Build/analyze with -tags dev for gosec/CodeQL steps. |
| .github/workflows/release.yml | Run race/govulncheck with dev tags in the release quality gate. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The real command still said [experimental] while the stub said [dev]. Now both say [dev], matching the reclassification from experimental to dev-only.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 50dfd2d0c2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Add tui_stub_test.go (//go:build !dev) to validate the stub command
surface: accepts --trace, accepts URL arg, returns dev-only error.
- Add "Validate release build" CI step that compiles without the dev
tag and runs stub tests, catching stub regressions on every PR.
- Switch tui stub and bonfire dev gate from ErrUsage to ErrUsageHint,
guiding users toward `make build` or `go build -tags dev`.
- Replace tui.go Annotations {"experimental": "true"} with
{"dev_only": "true"} to match the reclassification.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The function, message text, and sentinel filename all still said
"experimental" after the reclassification to dev-only. Rename to
printDevNotice, update the notice to "development preview", and
change the sentinel from experimental-tui-{v} to dev-tui-{v}.
Summary
//go:build devso release binaries get a stub that prints a dev-only notice and exits non-zerodevBuildcompile-time constant (dev_tag.go/dev_tag_stub.go) as the single source of truth for TUI availabilitydevBuildcheck (before the existing experimental config check)DevOnlyfield to the command catalog, rendered as[dev]badge inbasecamp commands-tags devthrough every Makefile target and CI workflow that invokesgo build/test/vet; GoReleaser intentionally omits the tag so release binaries compile the stubDesign
make build(the documented dev path) always passes-tags dev→ full TUI. GoReleaser (the release path) passes no tag → stub TUI. Plaingo build ./cmd/basecampis intentionally release-shaped;make buildis the documented way.The stub
NewTUICmd()matches the real command's surface (Use,Args,--traceflag) so help text, completions, and surface snapshots are consistent across build types.Test plan
make build && ./bin/basecamp tui --helpshows full TUI helpgo build -o /tmp/rel ./cmd/basecamp && /tmp/rel tuiprints dev-only error, exits 1/tmp/rel tui --tracesame error (not "unknown flag")/tmp/rel bonfire split fooprints dev-only error./bin/basecamp commandsshows[dev]badge on tui and bonfire (styled output)bin/cipasses