
multicz-go-deps-plugin
Claim Go components by their import graph in multicz.
A multicz plugin that claims a Go
component by its compiler-verified import graph (go list -deps)
instead of a hand-maintained paths glob.
Requirements
- Python 3.12+
- multicz 1.8+
- A
gotoolchain onPATHat the timemulticz validate/changed/plan/bumpruns (not required to install or import this package)
Installation
pip install multicz-go-deps-plugin
Or, with uv:
uv tool install multicz --with multicz-go-deps-plugin
Usage
Declare [plugins.go-deps] in your multicz.toml (see below) 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.
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.
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.
Development
git clone https://github.com/goabonga/multicz-go-deps-plugin.git
cd multicz-go-deps-plugin
uv sync
# Quality gates (mirrored in CI).
uv run ruff check src tests
uv run ruff format --check src tests
uv run mypy src
uv run pyright
uv run pytest --cov=multicz_go_deps
# Install the pre-commit + commit-msg hooks.
uv run pre-commit install
A go toolchain on PATH is required to run the test suite.
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.
# Preview the next release against the current branch.
uv run multicz status
Contributing
See CONTRIBUTING.md for the workflow, the branch and commit-message conventions, 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.1
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 | Actions |
|---|---|---|---|---|
| multicz_go_deps_plugin-0.4.1.tar.gz | 115.1 kB | With provenance | Details for multicz_go_deps_plugin-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| multicz_go_deps_plugin-0.4.1-py3-none-any.whl | Python 3 | none | any | Details for multicz_go_deps_plugin-0.4.1-py3-none-any.whl |
Total release size: 123.7 kB
Release files / multicz_go_deps_plugin-0.4.1.tar.gz
| Download URL | multicz_go_deps_plugin-0.4.1.tar.gz |
|---|---|
| Size | 115.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe3660507fab22d504f45c959a3cc690428637a7a09c47dfac2705aa70e55c7d
|
|
BLAKE2b-256 checksum How to use checksums |
5a443373ad852dbd195824ce03d9cb628dd4f1d6e3ad18e09a0474b45c18eb01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 2, 2026.
Transparency logRelease files / multicz_go_deps_plugin-0.4.1-py3-none-any.whl
| Download URL | multicz_go_deps_plugin-0.4.1-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e5ab9dc7df65d998850e7ec0001d8cb82b5dbe7c56d119b948954a01d29a885
|
|
BLAKE2b-256 checksum How to use checksums |
34fab9623880c8f1fa0693f7e2f9bf5740699a928cbeeffa185f1dfab82b8aa7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 2, 2026.
Transparency logSecurity for multicz-go-deps-plugin 0.4.1
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.1.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 Nov 2, 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.