Skip to main content

multicz-go-deps-plugin

CI Codecov PyPI License: MIT Python uv

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

  • affects is a fallback, not a replacement. It's only ever consulted once paths matching has already missed - a change inside a component's own paths never reaches the plugin at all.
  • One go list call 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". If go isn't on PATH, or the package doesn't build, the plugin returns False - the bump still proceeds on whatever paths alone could determine.
  • A shared dependency fans out to every importer. affects is evaluated independently per component by multicz - a change to a package imported by both cmd/api and cmd/worker claims both. This is unaffected by overlap_policy, which only governs plain paths matching.
  • 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 as Import `internal/transport` changed (`7cf9773`) to the component's changelog, under Dependencies next to multicz's own Track ... cascade lines. Set changelog_section in [plugins.go-deps] to use another heading, or to "" to turn it off.

Requirements

  • Python 3.12+
  • uv for environment management
  • A go toolchain on PATH at the time multicz changed/plan/bump runs (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.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for multicz-go-deps-plugin 0.3.0
File Size Uploaded Provenance
multicz_go_deps_plugin-0.3.0.tar.gz 71.9 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for multicz-go-deps-plugin 0.3.0
File Interpreter ABI Platform
multicz_go_deps_plugin-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 79.4 kB

Release files / multicz_go_deps_plugin-0.3.0.tar.gz

Download URL multicz_go_deps_plugin-0.3.0.tar.gz
Size 71.9 kB
Tags Source
SHA-256 checksum
How to use checksums
81df38b6cd7b9c4c9127136ff0294b118a76e2b6ec01cc3c8451d1a5534efc8b
BLAKE2b-256 checksum
How to use checksums
b8eec6f123b1cb5a6ee98ab395af2bd56dac8862dfcdcb1b00b2b4580ed1afa5
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 6, 2026.

Transparency log

Release files / multicz_go_deps_plugin-0.3.0-py3-none-any.whl

Download URL multicz_go_deps_plugin-0.3.0-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f52e934b3ba7b0103ca7944215df5c5b802169c1375ba4076ea8435c5fe6b1cd
BLAKE2b-256 checksum
How to use checksums
863ecf661933e31190737992f8effad71090a45087701b965ba254e0029c01ac
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 6, 2026.

Transparency log

Security for multicz-go-deps-plugin 0.3.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.

Select from 2 files

Attestation for multicz_go_deps_plugin-0.3.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 6, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page