Skip to content

fix: fold pkg/config into the root module for reproducible releases#9

Merged
directedbits merged 1 commit into
mainfrom
fix/merge-pkg-config-module
Jul 12, 2026
Merged

fix: fold pkg/config into the root module for reproducible releases#9
directedbits merged 1 commit into
mainfrom
fix/merge-pkg-config-module

Conversation

@directedbits

Copy link
Copy Markdown
Owner

Summary

Follow-up to #8. pkg/config was a separate Go module (its own go.mod) imported by 10 files across the root module, but it was neither required in the root go.mod nor tagged. Local dev and CI passed only because go.work stitched it into the workspace. The workspace is ignored when a consumer runs go install github.com/directedbits/recur/...@vX.Y.Z from the proxy, so pkg/config resolved to a floating pseudo-version of the latest main commit instead of the release tree — releases were not reproducible, and a future commit to pkg/config could retroactively change what an old tag installs.

Fix: fold pkg/config into the root module so it's versioned by the root's own tags.

  • Are new tests required?
  • Does documentation need to be updated? (see Checklist below for what this covers)
  • Contains breaking changes?
  • Touches plugin contract, manifest format, or recurfile YAML schema?
  • Changes daemon config keys or plugin options?
  • Affects daemon startup/shutdown behavior?
  • Changes CLI flags or command signatures?

Changes

  • Delete pkg/config/go.modpkg/config becomes an ordinary package inside github.com/directedbits/recur.
  • Drop ./pkg/config from go.work's use list.
  • go mod tidy (root only) folds the package in and removes the floating pkg/config pseudo-version from go.mod/go.sum. pkg/config is stdlib-only, so no new dependencies enter the root module. The x/sys and go-keyring indirect→direct corrections are pre-existing drift that surfaces once the module is tidied without the workspace (both are genuine direct imports: src/infra/os/process/signal_windows.go and src/infra/secret/keyring/keyring.go).

Test plan

  • GOWORK=off go build ./src/... succeeds (consumer simulation — previously pulled an unpinned pseudo-version)
  • GOWORK=off go vet ./src/... ./pkg/config/... clean
  • Full workspace go build ./... (incl. plugins) succeeds
  • go test ./pkg/config/... ./src/domain/config/... ./src/infra/yaml/config/... pass

Checklist

  • Small, buildable commits — each compiles and passes tests, one logical change per commit, message explains why
  • No breaking changes

Breaking changes

None for consumers of the recur/recurd binaries. Note: any external project importing github.com/directedbits/recur/pkg/config as a standalone module would now pull the whole recur module instead — there are no known external consumers.

pkg/config was a separate module (own go.mod) imported by 10 files in the
root module, but was neither required in root go.mod nor tagged. Local dev
and CI worked only because go.work stitched it in; the workspace is ignored
by 'go install' from the proxy, so consumers resolved pkg/config to a
floating pseudo-version of the latest main commit rather than the release
tree — releases were not reproducible.

Delete pkg/config/go.mod and drop it from go.work so pkg/config is an
ordinary package within github.com/directedbits/recur, versioned by the
root's own tags. pkg/config is stdlib-only, so no deps move into root; the
x/sys and go-keyring indirect->direct corrections are pre-existing drift
surfaced by tidying without the workspace.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Binary Size Report

Binary Base PR Delta
recur 20MiB 20MiB -8B
recurd 17MiB 17MiB -32B
calendar 17MiB 17MiB
devicemonitor 16MiB 16MiB
mqtt 17MiB 17MiB
timer 15MiB 15MiB
webhook 17MiB 17MiB

@directedbits
directedbits merged commit 51aee1a into main Jul 12, 2026
6 checks passed
@directedbits
directedbits deleted the fix/merge-pkg-config-module branch July 12, 2026 06:39
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