Open
Conversation
Entire-Checkpoint: 7a9ca45bcbe4
Contributor
There was a problem hiding this comment.
Pull request overview
Improves local and integration test reliability for the Entire CLI by making test output clearer, avoiding hangs from inherited TTY behavior, and isolating integration auth storage from the OS keyring.
Changes:
- Switch local
misetest tasks togotestsumformats for cleaner output and integration test progress visibility. - Detach integration subprocesses from the parent TTY and route auth token persistence to a file-backed store for tests.
- Stabilize a day-grouping test across time zones and reduce TUI test flakiness by ensuring the TUI is dismissed.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| mise.toml | Updates local test tasks to use gotestsum for clearer output. |
| cmd/entire/cli/setup_github.go | Routes a repository-name prompt’s output to the provided writer to reduce prompt spew/TTY coupling. |
| cmd/entire/cli/review/tui_sink_test.go | Adds a helper to finish and dismiss the Bubble Tea TUI to prevent hangs in tests. |
| cmd/entire/cli/integration_test/setup_cmd_test.go | Runs entire enable via a non-interactive subprocess to avoid inherited TTY prompts. |
| cmd/entire/cli/integration_test/login_test.go | Sets an env var so integration login stores tokens in an isolated file instead of the OS keyring. |
| cmd/entire/cli/auth/store.go | Adds optional file-backed token store (enabled via env var) for subprocess/integration tests. |
| cmd/entire/cli/auth/store_test.go | Adds coverage for the file-backed auth store behavior and file permissions. |
| cmd/entire/cli/activity_cmd_test.go | Makes commit-day grouping test stable across local time zones by using local timestamps. |
Comments suppressed due to low confidence (1)
cmd/entire/cli/auth/store.go:38
- NewStoreWithService() no longer initializes testStoreFile from ENTIRE_TEST_AUTH_STORE_FILE, so setting that env var will still route SaveToken/GetToken/DeleteToken through the OS keyring for stores created via NewStoreWithService. Consider reading the env var here as well (or refactoring into a shared constructor) so all Store instances consistently honor the file-backed test store option.
// NewStoreWithService returns a Store with a custom keyring service name (for testing).
func NewStoreWithService(service string) *Store {
return &Store{service: service}
}
Entire-Checkpoint: 556f162ba317
Contributor
Author
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit ac3c014. Configure here.
Entire-Checkpoint: 8b543a5d28eb
Splits the file-backed auth token storage out of the always-compiled production code and into a build-tagged file (//go:build authfilestore), so production CLI builds physically cannot opt into reading ENTIRE_TEST_AUTH_STORE_FILE — closing the footgun where a stray env var would silently bypass the OS keyring. - store.go: refactor to a small tokenBackend interface with keyringBackend as the always-compiled default; chooseBackend is the only seam. - store_filebackend.go: //go:build authfilestore — owns the env-var read, the file backend impl, and an init() that swaps chooseBackend. - store_filebackend_test.go: tagged unit test for the file backend. - store_invariants_test.go: untagged guard test that scans the auth package and fails if forbidden symbols (the env var name, os.WriteFile, os.ReadFile) appear outside a //go:build authfilestore file. Catches drift on every test run. - setup_test.go: build the integration-test subprocess with -tags=authfilestore so it can use the file backend. - mise.toml: pass -tags=integration,authfilestore in test:integration and test:ci, and include ./cmd/entire/cli/auth/... in test:integration so the tagged file-backend test runs. Verified: untagged "go build ./..." produces a binary with zero references to ENTIRE_TEST_AUTH_STORE_FILE / fileBackend / "test auth store" (checked via strings | grep). Tagged build retains them. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Entire-Checkpoint: ea20ee1b0608
NewTUISink constructed tea.NewProgram without tea.WithInput, so Bubble Tea defaulted to os.Stdin — and when the test binary inherits a real terminal, that means it called term.MakeRaw on the user's TTY. With three parallel TUI tests, the restore-on-quit path raced and one of them returned while the terminal was still in raw mode, leaving OPOST disabled. Subsequent gotestsum output then rendered with stair-stepped line breaks (\n moves the cursor down without returning it to col 0). Add an io.Reader parameter to NewTUISink. Production callers pass os.Stdin (unchanged behavior — the TUI path only runs when isTTY && canPrompt). Tests pass bytes.NewReader(nil); since that isn't an *os.File, Bubble Tea skips raw-mode setup entirely, so the parallel TUI tests can no longer corrupt sibling test output. Verified: go test -race -count=3 ./cmd/entire/cli/review/... stable across runs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Entire-Checkpoint: b7c4fac87aa9
Soph
approved these changes
May 9, 2026
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.
https://entire.io/gh/entireio/cli/trails/328
Summary
Test Plan
Note
Medium Risk
Moderate risk because it touches authentication token persistence logic (adding an alternate file-backed path), though it’s gated behind a test-only env var; most other changes are test/task reliability tweaks.
Overview
Improves local and integration test reliability by forcing CLI subprocesses to run detached from the parent TTY (via
execx.NonInteractive) so they can’t hang on interactive prompts.Adds an optional file-backed auth token store controlled by
ENTIRE_TEST_AUTH_STORE_FILE, letting integration login tests persist tokens across subprocesses without using the OS keyring (with secure0700/0600perms).Stabilizes and de-flakes tests and output: activity commit grouping tests now use local-time timestamps, the agent multipicker exits early on cancelled contexts, TUI sink tests actively dismiss the UI, the GitHub repo-name prompt writes to the provided output, and
misetest tasks switch togotestsumfor cleaner progress/reporting.Reviewed by Cursor Bugbot for commit ac3c014. Configure here.