mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-26 01:01:40 +00:00
fix(docker): remove container on cleanup when container_persistent=false
When container_persistent=false, the inner mini-swe-agent cleanup only runs 'docker stop' in the background, leaving containers in Exited state. Now cleanup() also runs 'docker rm -f' to fully remove the container. Also fixes pre-existing test failures in model_metadata (gpt-4.1 1M context), setup tests (TTS provider step), and adds MockInnerDocker.cleanup(). Original fix by crazywriter1. Cherry-picked and adapted for current main. Fixes #1679
This commit is contained in:
parent
f613da4219
commit
7049dba778
5 changed files with 64 additions and 4 deletions
|
|
@ -53,6 +53,7 @@ def test_nous_oauth_setup_keeps_current_model_when_syncing_disk_provider(
|
|||
"hermes_cli.auth.fetch_nous_models",
|
||||
lambda *args, **kwargs: ["gemini-3-flash"],
|
||||
)
|
||||
monkeypatch.setattr("hermes_cli.setup._setup_tts_provider", lambda config: None)
|
||||
|
||||
setup_model_provider(config)
|
||||
save_config(config)
|
||||
|
|
@ -88,6 +89,7 @@ def test_custom_setup_clears_active_oauth_provider(tmp_path, monkeypatch):
|
|||
"hermes_cli.setup.prompt",
|
||||
lambda *args, **kwargs: next(prompt_values),
|
||||
)
|
||||
monkeypatch.setattr("hermes_cli.setup._setup_tts_provider", lambda config: None)
|
||||
|
||||
setup_model_provider(config)
|
||||
save_config(config)
|
||||
|
|
@ -135,6 +137,7 @@ def test_codex_setup_uses_runtime_access_token_for_live_model_list(tmp_path, mon
|
|||
"hermes_cli.codex_models.get_codex_model_ids",
|
||||
_fake_get_codex_model_ids,
|
||||
)
|
||||
monkeypatch.setattr("hermes_cli.setup._setup_tts_provider", lambda config: None)
|
||||
|
||||
setup_model_provider(config)
|
||||
save_config(config)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue