feat(ai): add tenant-safe hierarchical expense learning

This commit is contained in:
caoxiaozhu
2026-07-16 14:30:41 +08:00
parent 6bdf65bc24
commit ee88a36baf
65 changed files with 6909 additions and 232 deletions

View File

@@ -119,8 +119,16 @@ def test_regenerate_risk_rule_endpoint_returns_updated_detail(tmp_path, monkeypa
client, session_factory = build_client()
asset_id = _create_rule(session_factory, tmp_path)
def fake_regenerate(self, target_asset_id, body, *, actor, request_id=None):
del body, request_id
def fake_regenerate(
self,
target_asset_id,
body,
*,
tenant_id=None,
actor,
request_id=None,
):
del body, request_id, tenant_id
asset = self.db.get(AgentAsset, target_asset_id)
assert asset is not None
config = dict(asset.config_json or {})