Make agent validation self-correcting
This commit is contained in:
@@ -35,6 +35,7 @@ def settings(**overrides) -> Settings:
|
||||
"poll_seconds": 60,
|
||||
"max_changed_files": 12,
|
||||
"max_changed_lines": 800,
|
||||
"max_agent_attempts": 2,
|
||||
"stale_claim_minutes": 90,
|
||||
"dry_run": True,
|
||||
}
|
||||
@@ -61,5 +62,12 @@ def test_default_commands_initialize_disposable_laravel_schema(monkeypatch) -> N
|
||||
|
||||
config = Settings.from_env()
|
||||
|
||||
assert "npm ci" in config.test_commands
|
||||
assert "npm run build" in config.test_commands
|
||||
assert "php artisan migrate:fresh --force" in config.test_commands
|
||||
assert config.test_commands[-1] == "php artisan test"
|
||||
|
||||
|
||||
def test_agent_attempts_are_bounded() -> None:
|
||||
with pytest.raises(ValueError, match="MAX_AGENT_ATTEMPTS"):
|
||||
settings(max_agent_attempts=4).validate()
|
||||
|
||||
Reference in New Issue
Block a user