[cleanup]Parallelize pure agent tests#1406
Open
stale2000 wants to merge 1 commit into
Open
Conversation
Recreated from upstream main for the v3 branch so the branch has a fresh commit object while preserving the reviewed test-only changes. Constraint: User requested a fresh SHA on a branch based directly on upstream main Rejected: Reuse 6129201 | Entire commit-history cache stayed pending for branches pointing at that SHA Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep t.Parallel only in pure tests; avoid CWD/env/global-state tests Tested: go test ./cmd/entire/cli/agent ./cmd/entire/cli/agent/geminicli ./cmd/entire/cli/agent/claudecode Not-tested: Full mise run check Entire-Checkpoint: 490d8a478629
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.
Entire logs: https://entire.io/gh/stale2000/cli/session/019eb34d-b79e-7371-b8c1-9171962a02ed
Issue
A rough scan found thousands of Go tests in the repo, with a noticeable gap between top-level tests and
t.Parallel()coverage. Some omissions are intentional because tests mutate process-global state (t.Chdir,t.Setenv, subprocess environment, hook installation), but several agent-package parser/table tests are pure and were still running serially.Fix
This PR adds
t.Parallel()only to conservative, low-risk agent tests:agentinterface/constant testsagentchunking testsagentsession helper testsgeminicliparser/session/chunking testsclaudecodetranscript helper testsTests that use process-global state or helper-hidden env/CWD mutation were left serial.
Benefit
The honest benefit is a modest focused-package improvement today, plus less serial drag as these pure tests accumulate over time.
Verification
go test ./cmd/entire/cli/agent ./cmd/entire/cli/agent/geminicli ./cmd/entire/cli/agent/claudecodemise run lint