fix: require current a2a init scaffold
All checks were successful
build / build (push) Successful in 26s

This commit is contained in:
robert
2026-05-17 08:08:04 -03:00
parent 54a853b9df
commit 23cdc1e924
5 changed files with 60 additions and 28 deletions

View File

@@ -2,7 +2,10 @@ from __future__ import annotations
import unittest
from agent_builder.tools import _render_a2a_init_template
from agent_builder.tools import (
_assert_current_a2a_init_template,
_render_a2a_init_template,
)
class TemplateInitTests(unittest.TestCase):
@@ -25,3 +28,10 @@ class TemplateInitTests(unittest.TestCase):
def test_render_a2a_init_template_rejects_invalid_names(self) -> None:
with self.assertRaises(ValueError):
_render_a2a_init_template("Bad Name")
def test_stale_sdk_template_is_rejected(self) -> None:
with self.assertRaisesRegex(RuntimeError, "stale"):
_assert_current_a2a_init_template({
"agent.py": "from a2a_pack import A2AAgent",
"requirements.txt": "httpx>=0.27",
})