Skip to content

Second round SDK CI/CD sync + exceed#167

Merged
jeremy merged 5 commits intomainfrom
ci/sdk-sync-round2
Feb 28, 2026
Merged

Second round SDK CI/CD sync + exceed#167
jeremy merged 5 commits intomainfrom
ci/sdk-sync-round2

Conversation

@jeremy
Copy link
Member

@jeremy jeremy commented Feb 28, 2026

Summary

Port substantive SDK CI/CD improvements and close CLI gaps identified by thorough cross-repo comparison.

  • Fix dependabot auto-merge policy — CI is the safety gate; auto-merging action updates is circular. Invert to auto-merge patch+minor for all ecosystems except github_actions
  • Pin dependabot schedule — 06:00 America/Chicago for predictable timing, open-pull-requests-limit: 10
  • Add pre-commit hooksgo-mod-tidy on commit, go-test-short on push. Uses files pattern (not types: [go]) so go.mod/go.sum-only changes trigger hooks. default_install_hook_types ensures pre-push is installed automatically
  • Harden golangci-lint configerrorlint relaxations (asserts/comparison), issues block to prevent silent truncation
  • Add non-mutating tidy-check to CI gate — new Makefile target + test.yml step, backs up go.mod/go.sum and restores on failure so make check never leaves the working tree dirty. Fix pre-existing untidy go.mod (pflag was indirect but directly imported)
  • Strengthen make check — now includes provenance-check and tidy-check

Test plan

  • golangci-lint run ./... — 0 issues
  • make check — full gate passes (includes new provenance-check + tidy-check)
  • golangci-lint config verify — config schema valid

Copilot AI review requested due to automatic review settings February 28, 2026 10:48
@github-actions github-actions bot added ci CI/CD workflows enhancement New feature or request labels Feb 28, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1387bd40fd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR syncs CI/CD and developer tooling improvements from the SDK repo into this CLI repo, tightening dependency hygiene and adjusting Dependabot automation to avoid circular “actions update” auto-merges.

Changes:

  • Adds a tidy-check gate (Makefile + CI) and updates make check to include it and provenance-check.
  • Adds local pre-commit hooks for go mod tidy (commit) and go test -short (pre-push).
  • Updates Dependabot scheduling and auto-merge policy; hardens golangci-lint config and tidies go.mod.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
go.mod Promotes github.com/spf13/pflag to a direct dependency to reflect actual imports.
Makefile Adds tidy-check and includes it in check; updates help text accordingly.
.pre-commit-config.yaml Introduces local hooks to enforce module tidiness and run short tests on pre-push.
.golangci.yml Tweaks linter settings (errorlint relaxations, gosec exclusion, issue limits).
.github/workflows/test.yml Adds a CI step to run make tidy-check.
.github/workflows/dependabot-auto-merge.yml Changes auto-merge behavior to approve/enable auto-merge for patch+minor updates excluding GitHub Actions.
.github/dependabot.yml Pins Dependabot schedule time/timezone and sets PR limits for predictability.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Feb 28, 2026
Copilot AI review requested due to automatic review settings February 28, 2026 10:55
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Feb 28, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

CI is the safety gate — auto-merging action updates is circular since
a broken update approves itself. Invert the policy to auto-merge
patch+minor for all ecosystems except github_actions.

The ecosystem name uses underscore (github_actions) because
fetch-metadata derives it from the branch name, not dependabot.yml.
Pin schedule to 06:00 America/Chicago for predictable update timing.
Set open-pull-requests-limit to 10 for both gomod and github-actions.
go-mod-tidy runs on commit to catch untidy modules before CI.
go-test-short runs on push only to avoid slowing down commits.

Uses files pattern instead of types: [go] so go.mod/go.sum-only
changes also trigger the hooks. Adds default_install_hook_types
so pre-commit install sets up both pre-commit and pre-push hooks.
Disable errorlint asserts/comparison checks — the CLI uses sentinel
errors and type assertions like the SDK. Set max-issues-per-linter
and max-same-issues to 0 so lint output is never silently truncated.
@jeremy jeremy force-pushed the ci/sdk-sync-round2 branch from b9a1fd2 to 4fd1a63 Compare February 28, 2026 10:59
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Feb 28, 2026
@jeremy jeremy force-pushed the ci/sdk-sync-round2 branch from 4fd1a63 to fa9d231 Compare February 28, 2026 11:01
Copilot AI review requested due to automatic review settings February 28, 2026 11:01
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Feb 28, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Add non-mutating tidy-check Makefile target that backs up go.mod/go.sum,
runs go mod tidy, then verifies no diff — restoring originals on failure
so make check never leaves the working tree dirty.

Add both provenance-check and tidy-check to the check gate. Add
tidy-check step to test.yml before unit tests. Fix pre-existing untidy
go.mod (pflag was indirect but is directly imported).
@jeremy jeremy force-pushed the ci/sdk-sync-round2 branch from fa9d231 to 0d31901 Compare February 28, 2026 11:09
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Feb 28, 2026
@jeremy jeremy merged commit 2a76697 into main Feb 28, 2026
22 checks passed
@jeremy jeremy deleted the ci/sdk-sync-round2 branch February 28, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI/CD workflows enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants