From 85b85f1c848b3837a855d05189499622100c8905 Mon Sep 17 00:00:00 2001 From: claude Date: Sun, 19 Jul 2026 16:56:11 +0000 Subject: [PATCH] fix(infra-artifact): include pyproject.toml in rootfs version digest Dockerfile.gateway COPYs pyproject.toml into /src and runs pip install /src, so it is a real input to the baked rootfs. A dependency-only change previously reused stale artifact versions, potentially booting a rootfs whose installed packages differed from the current checkout. Also adds _fake_repo fixture support and a regression test so this input can't silently drop out of the hash again. Co-Authored-By: Claude Sonnet 4.6 --- tests/unit/test_infra_artifact.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/unit/test_infra_artifact.py b/tests/unit/test_infra_artifact.py index 7c5483d..6b6ee85 100644 --- a/tests/unit/test_infra_artifact.py +++ b/tests/unit/test_infra_artifact.py @@ -134,6 +134,16 @@ class TestVersionInputs(unittest.TestCase): after = ia.infra_artifact_version("init", repo_root=root) self.assertNotEqual(before, after) + def test_pyproject_toml_change_bumps_version(self) -> None: + with tempfile.TemporaryDirectory() as d: + root = Path(d) + self._fake_repo(root) + before = ia.infra_artifact_version("init", repo_root=root) + (root / "pyproject.toml").write_text( + "[project]\nname = 'bot-bottle'\ndependencies = ['httpx']\n") + after = ia.infra_artifact_version("init", repo_root=root) + self.assertNotEqual(before, after) + def test_pyc_and_pycache_ignored(self) -> None: with tempfile.TemporaryDirectory() as d: root = Path(d)