Skip to content

ci(go): enforce gofmt -l in PR pipeline#200

Merged
connor4312 merged 2 commits into
mainfrom
ci/go-gofmt-enforcement
Jun 6, 2026
Merged

ci(go): enforce gofmt -l in PR pipeline#200
connor4312 merged 2 commits into
mainfrom
ci/go-gofmt-enforcement

Conversation

@connor4312
Copy link
Copy Markdown
Member

Adds a gofmt -l enforcement step to the Go CI job so formatting drift surfaces in PRs instead of only at release-tag time.

Context

The Go 0.3.0 publish workflow (publish-go.yml) failed during the AHP 0.3.0 release because two committed Go files had drifted out of gofmt shape:

  • clients/go/ahp/client_test.go
  • clients/go/examples/reducers_demo/main.go

The publish-go.yml workflow already runs gofmt -l as a tag-time gate, but nothing equivalent ran in ci.yml, so the drift was invisible until a release tag was pushed.

Commits

  1. ci(go): enforce gofmt -l in PR pipeline — adds a Check Go formatting step to the go job in .github/workflows/ci.yml, mirroring the existing check in publish-go.yml. Re-formats the two drifted files (struct-field alignment only, no semantic change) so this PR is itself green.

  2. docs: add release-ahp skill — adds .github/skills/release-ahp/SKILL.md capturing the multi-artifact release flow (two-commit PR, six tag schemes, merge-vs-squash gotcha, GPG/pubring-lock recovery, and the delete+re-push recovery for tags whose publish workflow doesn't fire — which is exactly what bit us on the 0.3.0 release).

Both Go build, vet, and gofmt -l pass cleanly locally on the resulting tree.

Mirrors the gofmt -l check already gating publish-go.yml. Without this in CI, formatting drift only surfaces when a release tag is pushed (caught the 0.3.0 release). Re-formats the two files that had drifted since the last gofmt pass: ahp/client_test.go and examples/reducers_demo/main.go (struct-field alignment only, no semantic change).
Captures the operational counterpart to RELEASING.md: two-commit PR structure, the six tag schemes, merge-vs-squash gotcha for tag SHA preservation, GPG/pubring-lock recovery, and the delete+re-push recovery for tags whose publish workflow didn't fire.
@connor4312 connor4312 enabled auto-merge (squash) June 6, 2026 15:50
@connor4312 connor4312 merged commit db8d2cd into main Jun 6, 2026
8 checks passed
@connor4312 connor4312 deleted the ci/go-gofmt-enforcement branch June 6, 2026 16:15
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