Skip to content

fix(cli): add testify to Go template to stop build-cli failures - #1311

Merged
Franca Winter (francawinter) merged 2 commits into
mainfrom
claude/fix-cli-go-sum
Oct 5, 2026
Merged

Franca Winter (francawinter) merged 2 commits into
mainfrom
claude/fix-cli-go-sum

Conversation

@francawinter

Copy link
Copy Markdown
Contributor

Summary

  • The go Makefile target runs cd clients/go && go mod tidy after generating phrase-go; since clients/go/test/ has committed test files that import testify, tidy adds testify v1.12.1 to go.mod
  • The verification build then compares the CLI's go.mod (testify v1.9.0) against the local phrase-go (testify v1.12.1) and fails with go: updates to go.mod needed
  • Adds testify v1.12.1 and go.yaml.in/yaml/v3 v3.0.5 to go.mod.mustache so that tidy is a no-op for testify after generation
  • Bumps testify in clients/cli/go.mod from v1.9.0 to v1.12.1 and updates go.sum accordingly

Steps to verify

  • CI build-cli job should pass

🤖 Generated with Claude Code

The go Makefile target runs `cd clients/go && go mod tidy` after
generating phrase-go. Since clients/go/test/ contains committed test
files that import testify, tidy adds testify v1.12.1 to go.mod. The
verification build then compares the CLI's go.mod (testify v1.9.0)
against the local phrase-go (testify v1.12.1) and fails with
"go: updates to go.mod needed".

Fix:
- Add testify v1.12.1 and go.yaml.in/yaml/v3 v3.0.5 to go.mod.mustache
  so that `go mod tidy` in clients/go is a no-op for testify
- Update the template go.sum with testify v1.12.1 and go.yaml.in checksums
- Bump testify in clients/cli/go.mod from v1.9.0 to v1.12.1 so the
  verification build's module graph is already satisfied
- Run `go mod tidy` to update clients/cli/go.sum

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

API changelog (oasdiff)

Doc-only edits (descriptions, examples) do not appear here.

No changes detected

…tive

Go 1.21+ normalizes two-part go directives (go 1.23) to three-part
(go 1.23.0) when running go mod tidy, causing a persistent diff in
the generated phrase-go go.mod on every CI run.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@francawinter
Franca Winter (francawinter) marked this pull request as ready for review October 5, 2026 09:35
@jablan

jablan commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

🤞

@francawinter
Franca Winter (francawinter) merged commit 715f835 into main Oct 5, 2026
13 checks passed
@francawinter
Franca Winter (francawinter) deleted the claude/fix-cli-go-sum branch October 5, 2026 11:37
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.

2 participants