Skip to content

Raise Go toolchain to 1.26.4 and refresh deps#47

Merged
KristjanPikhof merged 13 commits into
mainfrom
chore/deps-security-upgrade
Jun 16, 2026
Merged

Raise Go toolchain to 1.26.4 and refresh deps#47
KristjanPikhof merged 13 commits into
mainfrom
chore/deps-security-upgrade

Conversation

@KristjanPikhof

Copy link
Copy Markdown
Owner

Description

Security and toolchain maintenance bump for ACD. This PR raises the minimum Go
toolchain to 1.26.4, refreshes pinned dependencies (notably
modernc.org/sqlite and fsnotify), adds automated vulnerability scanning in
CI, and configures Dependabot for ongoing Go module and GitHub Actions updates.

There are no application logic changes — no edits to internal/daemon,
internal/state, CLI behavior, hooks, or schema. The diff is limited to
go.mod/go.sum, CI workflows, Dependabot config, and release-contract docs.

Type of Change

  • New feature
  • Bug fix
  • Refactoring (no functional changes)
  • Documentation update
  • Infrastructure / CI/CD
  • Performance improvement

Changes Made

Go toolchain

  • Raise module minimum from Go 1.22 to Go 1.26.4 (go.mod, all workflows).
  • Centralize workflow Go version in a shared GO_VERSION: '1.26.4' env var
    (ci.yml, codeql.yml, release.yml); remove the CI matrix that pinned
    go: ['1.22'].

Direct dependency bumps

Package Before After Role in ACD
modernc.org/sqlite v1.36.0 v1.52.0 Repo state DB (state.db)
github.com/fsnotify/fsnotify v1.7.0 v1.10.1 Worktree file watching
github.com/spf13/cobra v1.8.0 v1.10.2 CLI commands
golang.org/x/sys v0.30.0 v0.46.0 Low-level syscalls
github.com/mattn/go-isatty v0.0.20 v0.0.22 Terminal detection

Indirect deps (modernc.org/libc, modernc.org/memory, etc.) updated with
the SQLite stack.

CI hardening

  • New govulncheck job in ci.yml using the module-pinned tool:
    go tool govulncheck ./...
  • Pin golang.org/x/vuln/cmd/govulncheck as a module tool in go.mod.
  • CodeQL: run setup-go before codeql-action/init so analysis uses the
    correct toolchain.
  • Release: enable Go module cache in release.yml.

Dependabot (new)

  • .github/dependabot.yml — weekly updates for Go modules and GitHub Actions.
  • Group minor/patch vs major separately; cap open PRs at 5 per ecosystem.
  • Compatible with SHA-pinned workflow actions (# vN.M.P comment convention).

Documentation

  • CHANGELOG.md — unreleased note for Go 1.26.4 and sqlite bump.
  • README.md — "Building from source requires Go 1.26.4 or newer."
  • CLAUDE.md — agent guide version pins updated.

Scope decision

This branch is a single review/rollback unit: all 13 commits are
maintenance/CI/deps work with no user-facing feature changes. Splitting would
not improve reviewability.

Impact

End users (prebuilt binaries)

No intended behavior change. Install via brew, install.sh, or GitHub releases
is unchanged.

Developers building from source

Breaking for builders only: requires Go 1.26.4+ for go install and
make build.

Runtime subsystems (indirect, not intentional change)

Subsystem Risk Notes
SQLite (state.db) Low–medium Large driver jump; schema unchanged. Migration/WAL tests pass.
fsnotify Low Backward compatible for typical watcher use.
Cobra/pflag Very low CLI flag parsing only.

How to Test

Pre-PR gate (from AGENTS.md):

cleanenv() { env -u ACD_INTENT_MIN_PENDING -u ACD_INTENT_MAX_PENDING_AGE \
  -u ACD_INTENT_WINDOW -u ACD_INTENT_RECENT_COMMITS -u ACD_INTENT_DEFER_LIMIT \
  ACD_COMMIT_STRATEGY=event "$@"; }

cleanenv make lint
cleanenv make test
cleanenv go test ./test/integration/... -tags=integration -race -count=1 -timeout 5m
cleanenv go test ./internal/daemon/... ./internal/git/... ./internal/state/... \
  ./internal/pause/... ./internal/cli/... -race -count=3 -timeout 10m

SQLite-focused verification:

cleanenv go test ./internal/state/... -race -count=1 \
  -run 'Migrat|Schema|WAL|Concurrent|OpenExisting' -v
go tool govulncheck ./...

Local verification performed

  • make lint — pass
  • go test ./internal/state/... -race — pass (incl. v4→v10 migrations, WAL concurrency)
  • go test ./test/integration/... -tags=integration -race — pass (~192s)
  • go test ./internal/daemon/... ./internal/cli/... -race — pass
  • go tool govulncheck ./... — no vulnerabilities found
  • Live repo state.db: PRAGMA integrity_checkok, user_version=10, WAL mode
  • Running daemon on branch binary reads/writes state successfully (status, events, explain)

Checklist

  • Code follows the project's style guidelines
  • Self-reviewed the code for obvious errors
  • Added or updated tests where applicable (no new tests needed; existing suite covers sqlite/migrations)
  • Existing tests pass locally
  • Updated documentation if needed
  • No new warnings or console errors introduced

Related Issues

None.

Screenshots

N/A — infrastructure and dependency maintenance only.

- Automate weekly dependency updates for Go modules
- Group minor and patch updates separately for Go and Actions
- Align the module's Go toolchain with the newer runtime used for
  dependency and security maintenance.
- Keep the build and dependency graph compatible with the updated
  language version requirements.
- Refresh direct and indirect module versions for current tooling.
- Keep checksum data in sync with the dependency bumps.
- Align CLI, runtime, and transitive packages with newer releases.
- Standardize workflow jobs on Go 1.26.4
- Add vulnerability checks to CI on the same toolchain
- Ensure CodeQL builds and release jobs use the same Go version
- Upgrade fsnotify to the newer v1.10.1 release
- Keep module metadata and checksums in sync
- Refresh the SQLite stack to the newer resolver output.
- Keep module metadata and checksums aligned after the upgrade.
- Remove an unused indirect dep from go.mod.
- Refresh go.sum to match the current dependency graph.
- Drop stale checksum entries from older module versions.
- Raise the minimum Go version to 1.26.4.
- Refresh pinned dependency notes to `modernc.org/sqlite v1.52.0`.
- Keep release notes and contributor guidance in sync.
- Pin govulncheck to a released version for reproducible CI.
- Enable Go module cache in release builds for faster runs.
- Run setup-go before CodeQL init to align the Go toolchain.
- Add govulncheck as a module tool.
- Refresh the module sums needed by the new toolchain.
- Keep dependency metadata in sync so vulnerability checks work.
- Keep install docs aligned with the minimum supported Go version.
- Use the bundled govulncheck tool in CI to avoid a separate install.
- Centralize the workflow Go version so checks stay in sync.
- Cap Dependabot PRs for Go and GitHub Actions updates
- Allow Dependabot to open a separate major-update PR group
- Reduce noise from automated dependency churn while preserving coverage
- Centralize the Go version used by CI and release jobs
- Keep workflow setup aligned by deriving it from one env var
@KristjanPikhof KristjanPikhof marked this pull request as ready for review June 16, 2026 11:34
@KristjanPikhof KristjanPikhof self-assigned this Jun 16, 2026
@KristjanPikhof KristjanPikhof merged commit 30c4c38 into main Jun 16, 2026
6 checks passed
@KristjanPikhof KristjanPikhof deleted the chore/deps-security-upgrade branch June 16, 2026 19:32
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