Skip to content

Attach an attested zipapp to releases and propose a Homebrew formula - #10

Open
oxff644 wants to merge 1 commit into
trailofbits:mainfrom
oxff644:zipapp-distribution
Open

Attach an attested zipapp to releases and propose a Homebrew formula#10
oxff644 wants to merge 1 commit into
trailofbits:mainfrom
oxff644:zipapp-distribution

Conversation

@oxff644

@oxff644 oxff644 commented Aug 24, 2026

Copy link
Copy Markdown

Motivation

agentcov has zero runtime dependencies, which makes it a perfect candidate
for a single-file distribution: the wheel repacks into a ~58 KB zipapp that
runs anywhere Python 3.11+ exists, with no installer at all.

Changes

  • .github/scripts/build_zipapp.py (stdlib only, same uv-script style as the
    existing release script) unpacks the wheel uv build produced and emits
    dist/agentcov.pyz, keeping .dist-info so importlib.metadata works
    inside the archive.

  • The release build job builds the zipapp into dist/, so it is covered by
    the existing provenance attestation (subject-path: dist/*) and
    attached to the GitHub release with the wheel and sdist. Users get:

    curl -LO https://github.com/trailofbits/agentcov/releases/latest/download/agentcov.pyz
    gh attestation verify agentcov.pyz --repo trailofbits/agentcov
    python3 agentcov.pyz --help
  • The PyPI publish step now downloads release assets with
    --pattern '*.whl' --pattern '*.tar.gz', because it previously took every
    release asset and would have handed the .pyz to the index.

  • CI builds and smoke-runs the zipapp, following the existing rationale that
    packaging breaks should fail in CI rather than mid-release.

  • packaging/homebrew/ carries a proposed tap formula (installing the
    pure-Python wheel, since building the sdist would require the uv_build
    backend that Homebrew's isolated builds don't provide) plus notes on
    automating version bumps. Nothing in the repo consumes it; whether and
    where to host a tap is a maintainer decision. A curl | sh installer was
    considered and deliberately not proposed.

  • README documents uvx, pipx, and the verified zipapp flow.

Test plan

make check passes. The zipapp was built locally and smoke-tested both as an
executable (./dist/agentcov.pyz --help) and via python3 agentcov.pyz summary against a real repository; both workflow files parse as YAML and the
formula passes ruby -c.

🤖 Generated with Claude Code

agentcov has no runtime dependencies, so the wheel repacks into a
~58KB zipapp that runs on any Python 3.11+. The release build places
dist/agentcov.pyz next to the wheel and sdist, so it is covered by the
existing provenance attestation and release upload; the PyPI publish
step now filters release assets to the wheel and sdist so the zipapp
never reaches the index. CI builds and smoke-runs the zipapp so a
packaging break fails before a release.

packaging/homebrew/ carries a proposed tap formula (installing the
pure-Python wheel, since building the sdist needs the uv_build backend)
for maintainers to adopt if they want a brew channel.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@CLAassistant

CLAassistant commented Aug 24, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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.

2 participants