fix: install git for durable state recovery
This commit is contained in:
@@ -20,6 +20,7 @@ from hf_discovery import HuggingFaceDiscovery, parse_model_card_front_matter #
|
||||
from official_capabilities import OfficialCapabilityRegistry # noqa: E402
|
||||
from routing_engine import SuccessFirstRoutingEngine # noqa: E402
|
||||
from state_sync import StateGitSync # noqa: E402
|
||||
from state_sync import StateSyncError # noqa: E402
|
||||
|
||||
|
||||
class OfficialClient:
|
||||
@@ -207,6 +208,19 @@ class SuperAgentTests(unittest.TestCase):
|
||||
)
|
||||
)
|
||||
|
||||
def test_missing_git_has_actionable_state_sync_error(self) -> None:
|
||||
with tempfile.TemporaryDirectory() as temporary_dir:
|
||||
manager = StateGitSync(
|
||||
project_root=Path(temporary_dir),
|
||||
credentials={"username": "u", "email": "e@example.com", "password": "p"},
|
||||
remote="unused",
|
||||
log_fn=lambda _: None,
|
||||
)
|
||||
with patch("state_sync.subprocess.run", side_effect=FileNotFoundError("git")):
|
||||
with self.assertRaisesRegex(StateSyncError, "rebuild the service image"):
|
||||
manager._git("version")
|
||||
manager.close()
|
||||
|
||||
def test_config_patch_requires_repeated_cross_model_success(self) -> None:
|
||||
with tempfile.TemporaryDirectory() as temporary_dir:
|
||||
root = Path(temporary_dir)
|
||||
|
||||
Reference in New Issue
Block a user