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"

When consulted, it resolves go list -deps -f '{{.Dir}}' ./cmd/api, gets back every directory cmd/api's binary actually imports (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.

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.1.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.1.0
File Size Uploaded Provenance
multicz_go_deps_plugin-0.1.0.tar.gz 69.3 kB With provenance Details

Built distribution (wheel)

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

Total release size: 75.6 kB

Release files / multicz_go_deps_plugin-0.1.0.tar.gz

Download URL multicz_go_deps_plugin-0.1.0.tar.gz
Size 69.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1d082b2c5a2da06e414803b42f383789507682d9205982beedd26664c1d5c0e1
BLAKE2b-256 checksum
How to use checksums
6c1d475b128db94c772d03afca4669898e47facea03c2cbd8ad1516a50406b78
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 2, 2026.

Transparency log

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

Download URL multicz_go_deps_plugin-0.1.0-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
84bca01347cf09c0325ecce446bd82267d0daf5fcc67ce9bcba653f3b6602a02
BLAKE2b-256 checksum
How to use checksums
9031f65527fc5a2b052c872302f5cf3357b098caeae27f89f4a041a77ba39df3
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 2, 2026.

Transparency log

Security for multicz-go-deps-plugin 0.1.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.1.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 2, 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