multicz-go-deps-plugin
A multicz plugin that claims a Go
component by its compiler-verified import graph (go list -deps)
instead of a hand-maintained paths glob.
The problem
A Go monorepo's multicz.toml typically declares each binary's own
cmd/ directory:
[components.api]
paths = ["cmd/api/**"]
[components.worker]
paths = ["cmd/worker/**"]
That's the realistic state most configs end up in: cmd/ is easy to
remember, internal/ is not. A change to internal/auth/auth.go -
which cmd/api/main.go imports - doesn't match cmd/api/**, so plain
path matching says api is unaffected. It's wrong: go build ./cmd/api picks up that file every time, and the drift only gets
worse as the import graph grows.
The fix
This plugin implements multicz's Plugin.affects hook - consulted
only as a fallback, once plain paths matching has already failed
to attribute a changed file to a component:
[plugins.go-deps]
[plugins.go-deps.packages]
api = "./cmd/api"
worker = "./cmd/worker"
# A component that ships more than one binary (a daemon plus a
# sidecar it spawns, say) lists every import path instead:
agent = ["./cmd/agent", "./cmd/agent-sidecar"]
When consulted, it resolves go list -deps -f '{{.Dir}}' ./cmd/api
(all of a component's configured packages in one call), gets back
every directory they actually import (including internal/auth), and
checks whether the changed path lives under one of them.
Install
pip install multicz-go-deps-plugin
Then declare [plugins.go-deps] in your multicz.toml (see above) and
confirm:
$ multicz plugins
┃ Plugin ┃ Status ┃ Module ┃ Config section
│ go-deps │ active │ multicz_go_deps │ [plugins.go-deps] packages={…}
If you see go-deps: inactive, you forgot to declare the section. A
component missing from [plugins.go-deps.packages] gets no second
look from this plugin - plain paths matching is all it has.
Behaviour notes
-
affectsis a fallback, not a replacement. It's only ever consulted oncepathsmatching has already missed - a change inside a component's ownpathsnever reaches the plugin at all. -
One
go listcall per (repo, package) per run. Resolved dependency directories are cached on the plugin instance for the lifetime of the process. -
A broken toolchain degrades to "no opinion", and says so. If
goisn't onPATH, or a package doesn't load (it doesn't build, ago.sumchecksum is wrong),affectsreturnsFalse- the bump still proceeds on whateverpathsalone could determine.multicz validatereports it as aplugin:go-depswarning naming the component andgo's own error, somulticz validate --strictin CI fails instead of releasing without the component. -
strict = truemakes that failure an error. With it in[plugins.go-deps], plainmulticz validatefails too, andmulticz bumpaborts before writing anything:[plugins.go-deps] strict = true
-
A shared dependency fans out to every importer.
affectsis evaluated independently per component by multicz - a change to a package imported by bothcmd/apiandcmd/workerclaims both. This is unaffected byoverlap_policy, which only governs plainpathsmatching. -
The changelog names the package behind an import-only bump. When a component is bumped by a commit none of whose files match its
paths, the plugin adds a line such asImport `internal/transport` changed (`7cf9773`)to the component's changelog, underDependenciesnext to multicz's ownTrack ...cascade lines. Setchangelog_sectionin[plugins.go-deps]to use another heading, or to""to turn it off.
Requirements
- Python 3.12+
- uv for environment management
- A
gotoolchain onPATHat the timemulticz validate/changed/plan/bumpruns (not required to install or import this package)
Getting started (development)
git clone https://github.com/goabonga/multicz-go-deps-plugin.git
cd multicz-go-deps-plugin
uv sync
uv run pre-commit install
uv run ruff check src tests
uv run mypy src
uv run pytest
Versioning and release
Versions are bumped from
Conventional Commits by
multicz (dogfooding its own
tool). On every push to main, CI computes the bump, writes the
changelog, tags, and publishes to PyPI. Maintainers do not bump
versions or edit the changelog by hand.
Contributing
See CONTRIBUTING.md for the workflow, the commit-message convention, and the test/lint expectations. By participating you agree to the Code of Conduct.
Security issues: please follow the disclosure process in SECURITY.md.
License
Distributed under the MIT License.
Metadata
Release files for multicz-go-deps-plugin 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| multicz_go_deps_plugin-0.4.0.tar.gz | 73.5 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| multicz_go_deps_plugin-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 82.0 kB
Release files / multicz_go_deps_plugin-0.4.0.tar.gz
| Download URL | multicz_go_deps_plugin-0.4.0.tar.gz |
|---|---|
| Size | 73.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
36c14526a4cbb4bf50c1f52d47e2f3e03b8ebdfb79f6d8eaa1c27f1dacaa0ec4
|
|
BLAKE2b-256 checksum How to use checksums |
541b393dca7e74346513248f2669f902ed2b8509ebea2ea81695bfe00a13fba8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.
Transparency logRelease files / multicz_go_deps_plugin-0.4.0-py3-none-any.whl
| Download URL | multicz_go_deps_plugin-0.4.0-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
22fa982d521cbb854ac0b9cbbef335eea36c0e7d89a6e7e640b1d2f949787336
|
|
BLAKE2b-256 checksum How to use checksums |
564c651cc5fd4fe526ea25ec93160429bd669fcec0e365fdc9356bcd8bfcc273
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.
Transparency logSecurity for multicz-go-deps-plugin 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for multicz_go_deps_plugin-0.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.