From d17495eca980446b0da2bee1cbe21111dee20893 Mon Sep 17 00:00:00 2001 From: Gary Jennings Date: Wed, 18 Nov 2026 11:33:10 -0800 Subject: [PATCH] chore: bump the bundled kas node runtime to 22.23.4 Republish the 0.66.117 engine build with Node 22.23.4 under a new kas/0.66.117-node22.23.4/ key and pin it. The engine tarballs are byte-identical to 0.66.117; only the bundled Node changes. The pin's version may now carry a -node suffix, and KAS_PIN_ENGINE_RELEASE is the engine release before it, for anything comparing engine versions. --- docs/system-specs/modules/acp-client.md | 7 ++++++- src/kiro_crew/acp/kas_pin.py | 14 ++++++++++--- test/test_kas_pin.py | 26 +++++++++++++++++++++---- test/test_real_adapter_fixture_pins.py | 14 ++++++------- 4 files changed, 46 insertions(+), 15 deletions(-) diff --git a/docs/system-specs/modules/acp-client.md b/docs/system-specs/modules/acp-client.md index 287a2358e2d9..fc265d71df3b 100644 --- a/docs/system-specs/modules/acp-client.md +++ b/docs/system-specs/modules/acp-client.md @@ -5455,7 +5455,12 @@ the refusal names its cause on an offline host too and a spawn that asks again m no network round trip. Which version runs is the release's pin, not a file on disk: `acp/kas_pin.py` holds `KAS_PIN_VERSION` and `KAS_PIN_MANIFEST_SHA256` (the sha256 of that version's -published `manifest.json`, which in turn pins every artifact), `kirocrew kas +published `manifest.json`, which in turn pins every artifact). The version is +an engine release, optionally followed by `-node` when the same engine build +is republished with a different bundled Node runtime (a Node security fix is +never an overwrite of a published `kas//` key); `KAS_PIN_ENGINE_RELEASE` +is the part before the suffix, and anything comparing engine versions reads that, +never the directory name. `kirocrew kas install` installs exactly that and refuses a manifest whose bytes do not hash to the pin, and `installed_bundle()` looks up exactly that version's directory -- under the data home's `engines/kas` first, then under the desktop app's staged diff --git a/src/kiro_crew/acp/kas_pin.py b/src/kiro_crew/acp/kas_pin.py index c94a81c0116a..aeeec25cdba7 100644 --- a/src/kiro_crew/acp/kas_pin.py +++ b/src/kiro_crew/acp/kas_pin.py @@ -37,6 +37,7 @@ import os __all__ = [ + "KAS_PIN_ENGINE_RELEASE", "KAS_PIN_MANIFEST_SHA256", "KAS_PIN_VERSION", "KAS_SPEC_PERMISSIONS_MIN_ENGINE_VERSION", @@ -45,11 +46,18 @@ "pinned_version", ] -#: Engine version this release runs. -KAS_PIN_VERSION = "0.66.117" +#: Engine version this release runs. A ``-node`` suffix names a republish of +#: the same engine build with a different bundled Node runtime; the engine release +#: is the part before it. +KAS_PIN_VERSION = "0.66.117-node22.23.4" + +#: The engine release the pin runs: :data:`KAS_PIN_VERSION` without its +#: ``-node`` suffix. This is the version the engine reports about itself, so +#: anything comparing engine versions reads this, never the directory name. +KAS_PIN_ENGINE_RELEASE = KAS_PIN_VERSION.split("-node", 1)[0] #: sha256 of ``/kas//manifest.json`` as published. -KAS_PIN_MANIFEST_SHA256 = "76957b7dbc1acbc6669f59e67bd43a0f92810f9ac8fc6d71981f8d842485b08a" +KAS_PIN_MANIFEST_SHA256 = "58600c49bdd758709982051b11043f0f91194b9fe0dfa1cfd34d086ea341d95e" #: The engine and Node build keys the pinned manifest publishes, the matrix #: ``scripts/kas_bundle_publish.py`` builds. Read without the network, so a host diff --git a/test/test_kas_pin.py b/test/test_kas_pin.py index 8de0b4aa7688..3dfc7007bfc7 100644 --- a/test/test_kas_pin.py +++ b/test/test_kas_pin.py @@ -15,15 +15,27 @@ from kiro_crew.acp import kas_pin -_SEMVER = re.compile(r"^\d+\.\d+\.\d+$") +#: An engine release, optionally followed by the Node runtime a republish of that +#: same engine build bundles (``0.66.117-node22.23.4``). +_PIN_VERSION = re.compile(r"^\d+\.\d+\.\d+(?:-node\d+\.\d+\.\d+)?$") _SHA256_HEX = re.compile(r"^[0-9a-f]{64}$") -def test_the_pinned_version_is_a_plain_semver() -> None: +def test_the_pinned_version_is_a_release_with_an_optional_node_suffix() -> None: # The version is a directory name under ``/kas/`` and under the data - # home's ``engines/kas/``; a prerelease suffix or a stray character there is a + # home's ``engines/kas/``; any other suffix or a stray character there is a # path, not a release. - assert _SEMVER.match(kas_pin.KAS_PIN_VERSION), kas_pin.KAS_PIN_VERSION + assert _PIN_VERSION.match(kas_pin.KAS_PIN_VERSION), kas_pin.KAS_PIN_VERSION + + +@pytest.mark.parametrize("version", ["0.66.117", "0.66.117-node22.23.4"]) +def test_the_pin_version_shape_accepts_a_release_and_a_node_republish(version: str) -> None: + assert _PIN_VERSION.match(version) + + +@pytest.mark.parametrize("version", ["0.66.117-rc.1", "0.66.117-node22", "v0.66.117", "0.66"]) +def test_the_pin_version_shape_refuses_anything_else(version: str) -> None: + assert not _PIN_VERSION.match(version) def test_the_manifest_digest_is_a_lowercase_sha256() -> None: @@ -43,8 +55,14 @@ def test_pinned_version_is_the_pin_unless_the_gateway_env_overrides_it( assert kas_pin.pinned_version() == "0.70.1" +def test_the_engine_release_is_the_pin_without_its_node_suffix() -> None: + assert re.fullmatch(r"\d+\.\d+\.\d+", kas_pin.KAS_PIN_ENGINE_RELEASE) + assert kas_pin.KAS_PIN_VERSION.startswith(kas_pin.KAS_PIN_ENGINE_RELEASE) + + def test_the_public_surface_is_exactly_the_pin_and_the_engine_gate() -> None: assert sorted(kas_pin.__all__) == [ + "KAS_PIN_ENGINE_RELEASE", "KAS_PIN_MANIFEST_SHA256", "KAS_PIN_VERSION", "KAS_SPEC_PERMISSIONS_MIN_ENGINE_VERSION", diff --git a/test/test_real_adapter_fixture_pins.py b/test/test_real_adapter_fixture_pins.py index ffc842d6200f..3cde611058c6 100644 --- a/test/test_real_adapter_fixture_pins.py +++ b/test/test_real_adapter_fixture_pins.py @@ -47,7 +47,7 @@ ) from kiro_crew.acp.client_turn_control import KIRO_CLI_TESTED_RANGE -from kiro_crew.acp.kas_pin import KAS_PIN_VERSION +from kiro_crew.acp.kas_pin import KAS_PIN_ENGINE_RELEASE from kiro_crew.agent_sdk.backends_launch import COPILOT_VERIFIED_VERSION from kiro_crew.kiro_cli import ( MANDATORY_MCPS_DROP_MIN_VERSION, @@ -254,7 +254,7 @@ def _release(version: str) -> tuple[int, ...] | None: #: name the kiro-cli they ran under are held to the kiro-cli floor too. #: #: A KAS capture marked ``route: kas-bundle`` ran Crew's own pinned engine, so it is -#: held to ``KAS_PIN_VERSION`` (``_KAS_BUNDLE_ROUTE``). Every other KAS capture ran +#: held to ``KAS_PIN_ENGINE_RELEASE`` (``_KAS_BUNDLE_ROUTE``). Every other KAS capture ran #: through kiro-cli's relay, which runs the engine kiro-cli ships rather than the #: pin, so a pin bump cannot move it; it is held to ``_KAS_RELAY_ENGINE_FLOOR``, #: which rises only by re-capturing on a newer kiro-cli. @@ -270,7 +270,7 @@ def _release(version: str) -> tuple[int, ...] | None: def _floor_for(directory: str, meta: dict, header: str, floor: str) -> str: """*floor*, or the bundle pin for a KAS capture made off Crew's own engine.""" if directory == "kas" and header == "agent_version" and meta.get("route") == _KAS_BUNDLE_ROUTE: - return KAS_PIN_VERSION + return KAS_PIN_ENGINE_RELEASE return floor @@ -372,7 +372,7 @@ def test_the_floor_reds_on_each_drift(version, allowed, expected) -> None: def test_a_kas_capture_under_an_old_kiro_cli_reds(tmp_path) -> None: """A KAS header's ``kiro_cli_version`` is held to the kiro-cli floor, not only the engine.""" (tmp_path / "kas").mkdir() - meta = {"backend": "kas", "recorded": "live", "agent_version": KAS_PIN_VERSION} + meta = {"backend": "kas", "recorded": "live", "agent_version": KAS_PIN_ENGINE_RELEASE} (tmp_path / "kas" / "a-live.jsonl").write_text( json.dumps({"_meta": dict(meta, kiro_cli_version="2.20.0")}) + "\n" ) @@ -384,7 +384,7 @@ def test_a_kas_capture_under_an_old_kiro_cli_reds(tmp_path) -> None: @pytest.mark.parametrize( ("route", "version", "floor"), [ - (_KAS_BUNDLE_ROUTE, "0.66.33", KAS_PIN_VERSION), + (_KAS_BUNDLE_ROUTE, "0.66.33", KAS_PIN_ENGINE_RELEASE), (None, "0.66.32", _KAS_RELAY_ENGINE_FLOOR), ], ids=["bundle-held-to-pin", "relay-held-to-relay-floor"], @@ -449,7 +449,7 @@ def test_a_capture_on_the_next_kiro_cli_major_reds(tmp_path) -> None: def test_the_relay_floor_never_passes_the_pin() -> None: """The relay floor is a floor for engines older than the pin, never above it.""" - assert _release(_KAS_RELAY_ENGINE_FLOOR) <= _release(KAS_PIN_VERSION) + assert _release(_KAS_RELAY_ENGINE_FLOOR) <= _release(KAS_PIN_ENGINE_RELEASE) def test_another_adapters_capture_in_copilot_reds(monkeypatch, tmp_path) -> None: @@ -657,7 +657,7 @@ def test_a_new_stale_synthesized_fixture_reds(tmp_path) -> None: def test_a_kas_note_is_held_on_both_headers(tmp_path) -> None: """A KAS note naming an old kiro-cli reds on that header even with a current engine.""" - note = f"KAS {KAS_PIN_VERSION} under kiro-cli 2.20.0" + note = f"KAS {KAS_PIN_ENGINE_RELEASE} under kiro-cli 2.20.0" _write_synthesized(tmp_path, "kas", "a.jsonl", agent_version="unmeasured", note=note) problems = synthesized_behind(_synthesized_versions(tmp_path), {}) assert [p.split(" ", 1)[0] for p in problems] == ["kas/a.jsonl:kiro_cli_version"]