Skip to content

Declare runtime dependencies and add an OIDC release workflow - #24

Merged
HarperZ9 merged 5 commits into
mainfrom
fix/declare-runtime-dependencies
Sep 23, 2026
Merged

HarperZ9 merged 5 commits into
mainfrom
fix/declare-runtime-dependencies

Conversation

@HarperZ9

Copy link
Copy Markdown
Owner

Part of making the Flywheel lane roster actually installable. Six lanes were advertised in harness/lanes_registry.py as 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:

  1. The tag must equal the version declared in pyproject.toml.
  2. Every artifact digest is printed to the run log, so published bytes can be matched later against built bytes.
  3. Every declared console script is resolved to a real callable in a clean venv.
  4. The sdist must itself build a wheel, so a source install is not left broken by a missing MANIFEST entry.

Gate 3 is deliberately stronger than a --version smoke, and it is not hypothetical. A --version check would have passed four of these seven packages while three had no --version handler at all, and it would have missed accountable-surface shipping a wheel that installs cleanly and then raises ModuleNotFoundError: 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 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.

Before this can publish

A trusted publisher must be registered on PyPI for this project, owner HarperZ9, workflow release.yml, environment pypi. For a name that does not exist yet, that is a pending publisher; the first successful run creates the project.

🤖 Generated with Claude Code

HarperZ9 and others added 5 commits September 22, 2026 15:50
…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
HarperZ9 force-pushed the fix/declare-runtime-dependencies branch from 890b82e to b84ef9a Compare September 22, 2026 22:51
@HarperZ9
HarperZ9 merged commit d5a7c10 into main Sep 23, 2026
1 check passed
@HarperZ9
HarperZ9 deleted the fix/declare-runtime-dependencies branch September 23, 2026 02:47
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.

1 participant