Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion plugins/kbagent/agents/keboola-expert.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <version>. Missing: <commands>.
Ask user to run kbagent update, then re-invoke me."` Do not attempt
Expand Down
4 changes: 4 additions & 0 deletions tests/test_storage_swap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()


# ---------------------------------------------------------------------------
Expand Down