改为自动采集并移除手动运行入口

This commit is contained in:
Codex
2026-07-08 22:43:57 +08:00
parent da5e007324
commit 3ece2327c8
6 changed files with 25 additions and 178 deletions
+14
View File
@@ -28,3 +28,17 @@ def test_home_page_returns_dashboard_shell(monkeypatch) -> None:
assert response.status_code == 200
assert "SignalScout" in response.text
assert "今日 AI 情报" in response.text
assert "采集今日情报" not in response.text
def test_manual_agent_run_endpoint_is_not_exposed(monkeypatch) -> None:
# Agent只通过后台调度器自动运行,HTTP API不提供手动启动入口。
monkeypatch.setenv("SIGNALSCOUT_ENV", "test")
get_settings.cache_clear()
with TestClient(create_app()) as client:
response = client.post("/agent/runs/daily")
stream_response = client.post("/agent/runs/daily/stream")
get_settings.cache_clear()
assert response.status_code == 404
assert stream_response.status_code == 404