Declare runtime dependencies and add an OIDC release workflow - #24
Merged
Merged
Conversation
…status/doctor) accountable_surface/mcp.py: stdlib-only stdio MCP exposing accountable-surface.status and accountable-surface.doctor for Flywheel bundled-lane admission. Standalone new module (no __init__ change), ff-mergeable to main. + tests/test_mcp_stdio.py. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…roken dependencies was an empty list with a comment explaining that coherence-membrane and proof-surface were "kept off PyPI deliberately". That was true when it was written. proof-surface 0.1.0 is now published, coherence-membrane is about to be, and this package is going to PyPI, so the premise no longer holds. The consequence of leaving it was concrete, not theoretical: the wheel installs cleanly and then raises ModuleNotFoundError: No module named 'coherence_membrane' on the first import, because accountable_surface imports it in 20 places across 8 modules. A --version smoke test would not have caught it. Resolving every declared console-script entry point against a clean venv did. accountable_surface/mcp.py already names the truth in _RUNTIME_DEPS: mcp, coherence_membrane, proof_surface. The first two sibling packages are now declared as install requirements. mcp stays under the [server] extra, which is correct because only the MCP server path needs it, but it means the lane entry accountable_surface.mcp requires accountable-surface[server] rather than the bare name. The Flywheel lane registry needs to say so. Verified in a clean venv with coherence-membrane, proof-surface and the [server] extra installed: both entry points resolve to real callables and accountable_surface.mcp imports. Publish order is therefore coherence-membrane first, then this. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Publishes to PyPI with trusted publishing, so no token is stored in the repo or in GitHub secrets. Actions are pinned by commit SHA rather than by tag, because a moving tag is a supply-chain hole and this is a project about provenance. Four gates run before anything can be published: 1. The tag must equal the version declared in pyproject.toml. 2. Every artifact digest is printed to the run log, so the bytes that were published can be matched later against the bytes that were built. 3. Every declared console script is resolved to a real callable in a clean venv. This is deliberately stronger than a `--version` smoke. A package whose entry point names a function that does not exist installs cleanly and fails on first use, and that is not hypothetical: this exact check caught accountable-surface shipping with an undeclared coherence_membrane dependency. 4. The sdist must itself build a wheel, so a source install is not left broken by a missing file in MANIFEST. Publishing uses PEP 740 attestations, so the index records which workflow built the bytes and a third party can check that without trusting us. The publish job stays skipped until the repository variable PYPI_ENABLED is set to true, so tagging exercises the whole build and smoke path before the trusted publisher exists. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
pyproject.toml and accountable_surface.__version__ both read 0.1.0 through the v0.1.0, v0.2.1 and v0.3.0 tags. mcp.py reports that module value in the MCP serverInfo block, so every client was told it was talking to 0.1.0 no matter which release was running. The release workflow could not catch it: it checks the git tag against pyproject.toml and never reads the module. Both now read 0.3.1, which is the patch after the repository's highest tag. Publishing 0.1.0 would have moved the distribution backwards against that history, and re-pointing an existing tag would make it a moving tag. tests/test_version_alignment.py binds pyproject, the module constant, and the value the MCP initialize response actually returns, plus a CHANGELOG heading for the declared version. The version is parsed by regex rather than tomllib: requires-python is >=3.10 and tomllib arrived in 3.11. 469 passed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
README told the reader not to run `pip install accountable-surface` until the PyPI project existed, and said the package declares zero runtime dependencies. Both stop being true in this release: the project is published, and the same branch declares coherence-membrane and proof-surface because the module imports them. docs/RELEASE.md said the repository ships CI only and no registry-publish workflow, which the release workflow in this branch contradicts. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
HarperZ9
force-pushed
the
fix/declare-runtime-dependencies
branch
from
September 22, 2026 22:51
890b82e to
b84ef9a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of making the Flywheel lane roster actually installable. Six lanes were advertised in
harness/lanes_registry.pyas pip installs that a user cannot obtain: three because the PyPI name belongs to an unrelated project, three because nothing was ever published. This repository is one of them.Why the release workflow is shaped this way
Publishing uses OIDC trusted publishing, so no token is stored in the repository or in GitHub secrets. Actions are pinned by commit SHA rather than by tag, because a moving tag is a supply-chain hole and this is a project about provenance.
Four gates run before anything can be published:
pyproject.toml.MANIFESTentry.Gate 3 is deliberately stronger than a
--versionsmoke, and it is not hypothetical. A--versioncheck would have passed four of these seven packages while three had no--versionhandler at all, and it would have missedaccountable-surfaceshipping a wheel that installs cleanly and then raisesModuleNotFoundError: No module named 'coherence_membrane'on first import. Resolving entry points caught that.Publishing uses PEP 740 attestations, so the index records which workflow built the bytes and a third party can verify that without trusting us.
The
publishjob stays skipped until the repository variablePYPI_ENABLEDis set totrue, so tagging exercises the whole build and smoke path before the trusted publisher exists.Before this can publish
A trusted publisher must be registered on PyPI for this project, owner
HarperZ9, workflowrelease.yml, environmentpypi. For a name that does not exist yet, that is a pending publisher; the first successful run creates the project.🤖 Generated with Claude Code