Skip to content

Guard the seam packages against t.Parallel#280

Merged
andyrewlee merged 1 commit into
mainfrom
ui-seam-parallel-guard
Jun 8, 2026
Merged

Guard the seam packages against t.Parallel#280
andyrewlee merged 1 commit into
mainfrom
ui-seam-parallel-guard

Conversation

@andyrewlee
Copy link
Copy Markdown
Owner

Close-the-loop stack — PR 9/12

Problem

internal/ui/center and internal/ui/sidebar route tmux capture/resize/reattach through mutable package-global test seams that tests override and restore via defer. A test that adds t.Parallel in these packages would race those shared seams and pass/fail spuriously — masking or faking a real reattach bug. The constraint was only a comment on the seam declarations, with nothing enforcing it.

Change

A self-contained guard test in each package scans its own *_test.go files and fails if any introduces t.Parallel(). A global forbidigo rule was avoided because t.Parallel is correct and wanted elsewhere in the repo.

Verification

Confirmed it fails on a planted t.Parallel() and passes once removed.

🤖 Generated with Claude Code

@andyrewlee andyrewlee force-pushed the ui-seam-parallel-guard branch from f5f9fa2 to fb2c231 Compare June 8, 2026 02:26
@andyrewlee andyrewlee force-pushed the tmux-enterdelay-seam branch from 44b3cec to ad8590f Compare June 8, 2026 02:30
@andyrewlee andyrewlee force-pushed the ui-seam-parallel-guard branch from fb2c231 to 814e80c Compare June 8, 2026 02:30
@andyrewlee andyrewlee force-pushed the tmux-enterdelay-seam branch from ad8590f to 91f1796 Compare June 8, 2026 02:39
@andyrewlee andyrewlee force-pushed the ui-seam-parallel-guard branch from 814e80c to 59e9412 Compare June 8, 2026 02:39
@andyrewlee andyrewlee force-pushed the tmux-enterdelay-seam branch from 91f1796 to d06b1a7 Compare June 8, 2026 02:42
@andyrewlee andyrewlee force-pushed the ui-seam-parallel-guard branch from 59e9412 to 86853f0 Compare June 8, 2026 02:42
@andyrewlee andyrewlee force-pushed the tmux-enterdelay-seam branch from d06b1a7 to b3305f7 Compare June 8, 2026 02:45
@andyrewlee andyrewlee force-pushed the ui-seam-parallel-guard branch from 86853f0 to 843e87e Compare June 8, 2026 02:45
@andyrewlee andyrewlee force-pushed the tmux-enterdelay-seam branch from b3305f7 to 16ac4c1 Compare June 8, 2026 02:50
@andyrewlee andyrewlee force-pushed the ui-seam-parallel-guard branch from 843e87e to 77dbe9b Compare June 8, 2026 02:50
@andyrewlee andyrewlee force-pushed the tmux-enterdelay-seam branch from 16ac4c1 to 035d4eb Compare June 8, 2026 02:58
@andyrewlee andyrewlee force-pushed the ui-seam-parallel-guard branch from 77dbe9b to 5c06eb1 Compare June 8, 2026 02:58
internal/ui/center and internal/ui/sidebar route tmux capture/resize/
reattach through mutable package-global test seams that tests override
and restore via defer. A test that adds t.Parallel in these packages
would race those shared seams and pass or fail spuriously — masking or
faking a real reattach bug. The constraint was only a comment on the
seam declarations, with nothing enforcing it.

Add a self-contained guard test in each package that scans its own
*_test.go files and fails if any introduces t.Parallel(), turning a
silent footgun into a build break. (A global forbidigo rule was avoided
because t.Parallel is correct and wanted elsewhere.) Verified it fails on
a planted t.Parallel and passes once removed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@andyrewlee andyrewlee force-pushed the ui-seam-parallel-guard branch from 5c06eb1 to 01a9be6 Compare June 8, 2026 03:02
@andyrewlee andyrewlee changed the base branch from tmux-enterdelay-seam to main June 8, 2026 03:02
@andyrewlee andyrewlee merged commit 318f5e4 into main Jun 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant