fix(approval): guard env and config overwrites

This commit is contained in:
helix4u 2026-04-23 12:35:16 -06:00 committed by Teknium
parent 1cc0bdd5f3
commit 1dfcda4e3c
4 changed files with 68 additions and 1 deletions

View file

@ -44,6 +44,14 @@ def _make_tool_defs(*names: str) -> list:
]
def test_is_destructive_command_treats_cp_as_mutating():
assert run_agent._is_destructive_command("cp .env.local .env") is True
def test_is_destructive_command_treats_install_as_mutating():
assert run_agent._is_destructive_command("install template.env .env") is True
@pytest.fixture()
def agent():
"""Minimal AIAgent with mocked OpenAI client and tool loading."""