Skip to content

fix(config): inject the gh token resolver seam — kills the 5s exec-timeout flakes (#262) - #272

Merged
linhdmn merged 1 commit into
mainfrom
fix/issue-262-seam
Sep 9, 2026
Merged

fix(config): inject the gh token resolver seam — kills the 5s exec-timeout flakes (#262)#272
linhdmn merged 1 commit into
mainfrom
fix/issue-262-seam

Conversation

@linhdmn

@linhdmn linhdmn commented Sep 9, 2026

Copy link
Copy Markdown
Member

What

  • ghAuthToken becomes a package-level seam (var ghAuthToken = ghAuthTokenExec); tests stub it instead of shimming PATH with a fake gh binary, so the 5s exec.CommandContext timeout can no longer fire under machine load (full-suite package parallelism delayed fake-gh startup past 5s → TestResolveGithubToken* flaked — exactly issue test(config): fake-gh token tests hit the 5s exec timeout under load — harden or inject the resolver #262's report).
  • Trimming moves into resolveGithubToken (TrimSpace on the seam result); real-exec coverage retained for gh-absent and non-zero-exit paths.
  • PRD footer + §12 credentials note updated.

Evidence

  • go test ./internal/config/ ./internal/cli/ -count=1 green in the worktree (also green under load).
  • Worker-authored during loop 199-201 salvage; lander verified.

Closes #262

…meout flakes (#262)

ghAuthToken becomes a package-level seam (var ghAuthToken = ghAuthTokenExec);
tests stub it instead of shimming PATH with a fake gh binary, so the 5s
exec.CommandContext timeout can no longer fire under machine load (full-suite
package parallelism was spawning the fake gh late). Trimming moves into
resolveGithubToken; real-exec coverage retained for gh-absent and non-zero
exit paths.
@linhdmn
linhdmn merged commit be52526 into main Sep 9, 2026
7 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.

test(config): fake-gh token tests hit the 5s exec timeout under load — harden or inject the resolver

1 participant