From d913cf1ef2323d001c5bc630107f3c75f0f94778 Mon Sep 17 00:00:00 2001 From: Edgar Arakelyan Date: Wed, 21 Oct 2026 23:19:01 -0700 Subject: [PATCH] fix(release): pin the protocol in the shipped bundles in the CodeArtifact publish too The PyPI release pins agentenv-framework-protocol in pyproject.toml and in each shipped bundle's requirements.txt. The CodeArtifact publish pinned only pyproject.toml, so its wheel shipped the bundled agents (claude-code, pi and the echo-mcp example) with only the protocol floor, and an image built from that folder installed whatever protocol was newest. It now runs the same shipped_bundles.py pin before it builds. Co-Authored-By: Claude Opus 5.5 (1M context) --- .circleci/config.yml | 2 ++ tst/unit/test_release_protocol_pins.py | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index abd832a4..6e15ef8f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -95,6 +95,8 @@ jobs: sed -i "s/\"agentenv-framework-protocol[^\"]*\"/\"agentenv-framework-protocol==${PV}\"/" pyproject.toml python -c "import tomllib; tomllib.load(open('pyproject.toml','rb'))" grep -q "\"agentenv-framework-protocol==${PV}\"" pyproject.toml + # The shipped bundles' requirements too, as the PyPI release does, or this wheel's agents install a floor. + python .github/scripts/shipped_bundles.py pin python -m build - run: diff --git a/tst/unit/test_release_protocol_pins.py b/tst/unit/test_release_protocol_pins.py index 17739f89..7306b228 100644 --- a/tst/unit/test_release_protocol_pins.py +++ b/tst/unit/test_release_protocol_pins.py @@ -72,6 +72,13 @@ def test_the_release_pins_the_shipped_bundles_with_the_script(): assert "requirements_files=$(" not in WORKFLOW +def test_the_codeartifact_release_pins_the_shipped_bundles_before_it_builds_the_wheel(): + publish = (REPO / ".circleci" / "config.yml").read_text().split("\n publish:\n", 1)[1] + build = publish.index(" python -m build\n") + + assert -1 < publish.find(".github/scripts/shipped_bundles.py pin") < build + + def test_each_shipped_requirements_file_the_release_pins_holds_one_protocol_line(): pinned = {path.relative_to(REPO).as_posix(): [line for line in path.read_text().splitlines() if line.startswith("agentenv-framework-protocol")]