Skip to content

feat: version discipline, tagged releases, and downstream bump automation - #23

Merged
zhanghanduo merged 2 commits into
mainfrom
chore/versioning-and-release-automation
Sep 3, 2026
Merged

zhanghanduo merged 2 commits into
mainfrom
chore/versioning-and-release-automation

Conversation

@zhanghanduo

Copy link
Copy Markdown
Collaborator

Problem

[project].version never moved off the bootstrap 0.1.0 across 80 commits. Both products pin AgentCore by commit SHA, so both report apodex-agent-core 0.1.0 for different code — the installed dist-info identifies nothing, and no version constraint downstream can mean anything.

Both products currently pin a9b5272 (the #21 merge), five commits behind main.

What this does

Version becomes a real identifier

  • Bump to 0.2.0 + uv lock. 0.1.0 is retired rather than reused: it named no particular revision.
  • CI fails a PR that changes agent_core/ or pyproject.toml without moving the version. This is the gap that let 80 commits ship as 0.1.0. Escape hatch: the skip-version-bump label.

Tagged releases

  • Pushing v* verifies the tag matches the declared version, re-runs ruff/pyright/pytest against the tagged tree (a tag can point at a commit no PR ever saw), builds, and publishes a GitHub Release with the wheel, sdist, and that version's changelog section. No changelog entry ⇒ the release fails.

Downstream automation

  • The release dispatches agent-core-release to ApodexHarness and FrontierAgentInternal; each repins and opens a PR for its own CI to validate. Templates in .github/downstream/, one-time setup in docs/downstream-bump.md.

Docs

  • docs/versioning.md: the 0.MINOR.PATCH scheme; what counts as breaking given that the effective public surface is wider than agent_core.__all__ (consumers import agent_core.runtime.loop and friends directly); why 1.0 cannot be promised yet; and why a private registry is not yet worth its operating cost.

Two bugs found by testing against the real consumers

  1. The documented pin scheme was wrong. Both products declare git+ssh://git@github.com/, but the README said https:// — and its credential snippet rewrote https://github.com/, which is a no-op against an ssh:// dependency URL. Copying it into product CI fails on an SSH key the runner does not have.

  2. uv add corrupts the dependency declaration. It rewrites the standard PEP 508 direct URL into uv's proprietary [tool.uv.sources] table, which pip ignores — silently breaking any non-uv install path (a Dockerfile running pip install .). Repinning is an in-place rev substitution instead, anchored on AgentCore.git@ so the @ in git@github.com is never mistaken for the separator.

Verification

  • ruff clean, pyright 0 errors, pytest 1119 passed, uv build produces 0.2.0 artifacts.
  • uv sync --frozen succeeds, proving uv.lock tracks the bump.
  • Each gate tested in both directions: the bump check fails on real history without a bump and passes with one; the tag check rejects a mismatched tag; the changelog extractor fails on a missing entry.
  • Repinning verified end-to-end in a scratch consumer project: uv accepts a tag as rev and records ?rev=<tag>#<resolved sha> (readable tag, sha still pinned); the PEP 508 shape survives; uv.lock follows; the operation is idempotent.
  • Every run: script in all three workflows passes bash -n.

Note on merge order

This PR is itself subject to the new version-bump check and passes it (it moves the version 0.1.0 → 0.2.0).

Do not tag v0.2.0 until the secrets in docs/downstream-bump.md are in place — or do, and dispatch degrades to a warning that can be recovered with the products' workflow_dispatch trigger.

zhanghanduo and others added 2 commits September 3, 2026 12:53
…tion

Two products consume AgentCore by pinning a revision, but [project].version
never moved off the bootstrap 0.1.0 across 80 commits. Both products therefore
report the same version for different code, and the installed dist-info
identifies nothing.

Establish the version as a real identifier and automate its propagation:

- Bump to 0.2.0 and relock. 0.1.0 is retired rather than reused: it named no
  particular revision.
- CI fails a pull request that changes agent_core/ or pyproject.toml without
  moving the version, with a 'skip-version-bump' label as the escape hatch.
  This is the gap that let 80 commits ship as 0.1.0.
- Release workflow: a v* tag is verified against the declared version, the
  tagged tree is re-checked (a tag can point at a commit no pull request saw),
  built, and published as a GitHub Release carrying the wheel, sdist, and its
  changelog section. A missing changelog entry fails the release.
- Release dispatches to both products, which repin and open a bump PR for their
  own CI to validate. Templates in .github/downstream/, setup in
  docs/downstream-bump.md.
- docs/versioning.md records the scheme, what counts as breaking while the
  effective public surface is wider than agent_core.__all__, why 1.0 cannot be
  promised yet, and why a private registry is not yet worth its operating cost.

Two corrections found by testing against the real consumers:

- The documented pin scheme was https://, but both products declare
  git+ssh://git@github.com/. The credential note rewrote https://github.com/,
  which is a no-op against an ssh:// dependency URL.
- Repinning uses an in-place rev substitution, not `uv add`: uv add rewrites the
  PEP 508 direct URL into uv's proprietary [tool.uv.sources] table, which pip
  ignores, silently breaking non-uv install paths.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Neither product declares AgentCore on main: the pin exists only on each
product's in-progress migration branch (fix/ci-bwrap-soft-probe,
refactor/agent-core), and neither has an open pull request yet.

This matters for the bump automation, which repins on the default branch. Until
a migration merges, repin_agent_core.py reports 'found 0' and exits non-zero
rather than committing a half-edited pin — correct behavior, but it makes the
automation inert until then. Say so where someone setting it up will read it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@zhanghanduo
zhanghanduo merged commit 9fc8d49 into main Sep 3, 2026
2 checks passed
@zhanghanduo
zhanghanduo deleted the chore/versioning-and-release-automation branch September 3, 2026 05:15
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