refactor: normalize capability module paths

This commit is contained in:
jxxghp
2026-08-27 22:20:38 +08:00
parent ea58c245dd
commit f134e068e7
85 changed files with 749 additions and 691 deletions
+1 -1
View File
@@ -367,7 +367,7 @@ def _activate_agent_scenario(
def _read_display_runtime() -> dict[str, object]:
"""读取 host.display 的只读状态和观测,不触发资源激活。"""
try:
from app.runtime.managed_resources import (
from app.runtime.resources import (
managed_resource_observations,
managed_resource_snapshot,
)
+2 -3
View File
@@ -14,7 +14,6 @@ from types import ModuleType, SimpleNamespace
import pytest
PERF_DIR = Path(__file__).resolve().parent
@@ -651,7 +650,7 @@ def test_sitecustomize_serializes_managed_resource_facade(monkeypatch) -> None:
error=None,
)
facade = ModuleType("app.runtime.managed_resources")
facade = ModuleType("app.runtime.resources")
def managed_resource_snapshot(capability_id: str):
assert capability_id == "host.display"
@@ -663,7 +662,7 @@ def test_sitecustomize_serializes_managed_resource_facade(monkeypatch) -> None:
facade.managed_resource_snapshot = managed_resource_snapshot
facade.managed_resource_observations = managed_resource_observations
monkeypatch.setitem(sys.modules, "app.runtime.managed_resources", facade)
monkeypatch.setitem(sys.modules, "app.runtime.resources", facade)
probe = load_module(
"moviepilot_perf_sitecustomize_observation",
PERF_DIR / "instrument" / "sitecustomize.py",