refactor(config): retire RuntimeSettingsCompat host usage

This commit is contained in:
jxxghp
2026-08-26 15:55:21 +08:00
parent cdab54254d
commit 9dbe424c3d
162 changed files with 1966 additions and 1745 deletions
+9 -1
View File
@@ -365,7 +365,15 @@ async def test_query_task_returns_owner_scoped_ten_recent_runs(monkeypatch) -> N
@pytest.mark.anyio
async def test_agent_manager_records_manual_trigger_source(monkeypatch) -> None:
"""真实执行入口应把手动触发来源写入对应 run。"""
monkeypatch.setattr("app.agent.orchestrator.settings.AI_AGENT_ENABLE", True)
from app.agent import orchestrator
from app.runtime.config import settings
monkeypatch.setattr(settings, "AI_AGENT_ENABLE", True)
monkeypatch.setattr(
orchestrator,
"get_runtime_setting",
lambda key, default=None: getattr(settings, key, default),
)
task = _add_task("run-manager")
manager = AgentManager()
captured = {}