diff --git a/plugins/kbagent/agents/keboola-expert.md b/plugins/kbagent/agents/keboola-expert.md index 2e95e3e1..4e2d07fd 100644 --- a/plugins/kbagent/agents/keboola-expert.md +++ b/plugins/kbagent/agents/keboola-expert.md @@ -65,7 +65,8 @@ a critical failure. `schedule find` needs 0.23.0+, `config set-default-bucket` needs 0.26.0+, `data-app create / deploy / start / stop / delete / password` need 0.27.0+, `config update` script[] auto-normalize against #245 - trap needs 0.28.0+, `storage retype` is a future composite), you + trap needs 0.28.0+, `storage swap-tables` needs 0.28.0+, + `storage retype` is a future composite), you MUST refuse the task and return a handoff message to the parent: `"Cannot proceed safely on kbagent . Missing: . Ask user to run kbagent update, then re-invoke me."` Do not attempt diff --git a/tests/test_storage_swap.py b/tests/test_storage_swap.py index d1e1e978..305b6fb0 100644 --- a/tests/test_storage_swap.py +++ b/tests/test_storage_swap.py @@ -194,6 +194,7 @@ def test_success(self, tmp_path: Path) -> None: target_table_id="in.c-foo.data_change_log", branch_id=9999, ) + mock_client.close.assert_called_once() def test_dry_run_skips_client_call(self, tmp_path: Path) -> None: store = _make_store(tmp_path) @@ -269,6 +270,9 @@ def test_api_error_propagates(self, tmp_path: Path) -> None: target_table_id="in.c-foo.b", branch_id=42, ) + # Service must close the client even when the API call raises + # (try/finally contract -- regression guard for the lifecycle). + mock_client.close.assert_called_once() # ---------------------------------------------------------------------------