feat(platform): 擴充 Tenants 全域產品資產台帳
All checks were successful
Code Review / ai-code-review (push) Successful in 14s
CD Pipeline / tests (push) Successful in 1m29s
CD Pipeline / build-and-deploy (push) Successful in 4m26s
CD Pipeline / post-deploy-checks (push) Successful in 1m37s

This commit is contained in:
Your Name
2026-06-14 15:50:57 +08:00
parent ffc5556994
commit fef94df877
5 changed files with 251 additions and 12 deletions

View File

@@ -21,8 +21,8 @@ def test_tenant_asset_inventory_merges_products_routes_and_repos() -> None:
assert inventory["schema_version"] == "awooop_tenant_asset_inventory_v1"
assert summary["tenant_table_count"] == 1
assert summary["product_surface_count"] >= 10
assert summary["public_route_count"] >= 17
assert summary["product_surface_count"] >= 16
assert summary["public_route_count"] >= 31
assert summary["source_candidate_repo_count"] == 10
assert summary["source_in_scope_repo_count"] == 9
assert summary["source_primary_ready_count"] == 0
@@ -36,9 +36,15 @@ def test_tenant_asset_inventory_merges_products_routes_and_repos() -> None:
"ewoooc",
"vibework",
"agent-bounty-protocol",
"2026-fifa-world-cup",
"stockplatform",
"bitan-pharmacy",
"tsenyang-website",
"wooo-open-design",
"workflow-automation",
"data-workspace",
"security-secrets-platform",
"ai-model-gateway",
}.issubset(product_ids)
route_domains = {item["domain"] for item in inventory["public_routes"]}
@@ -49,14 +55,23 @@ def test_tenant_asset_inventory_merges_products_routes_and_repos() -> None:
"mo.wooo.work",
"vibework.wooo.work",
"agent.wooo.work",
"2026fifa.wooo.work",
"design.wooo.work",
"n8n.wooo.work",
"grist.wooo.work",
"vault.wooo.work",
"ollama.wooo.work",
"tsenyang.com",
"tsenyang.wooo.work",
}.issubset(route_domains)
source_repos = {item["github_repo"] for item in inventory["source_repos"]}
assert "owenhytsai/VibeWork" in source_repos
assert "owenhytsai/agent-bounty-protocol" in source_repos
assert "nexu-io/open-design" in source_repos
assert all(item["runtime_gate_count"] == 0 for item in inventory["source_repos"])
assert all(item["action_button_count"] == 0 for item in inventory["public_routes"])
assert all(item["runtime_gate_count"] == 0 for item in inventory["products"])
def test_tenant_response_model_keeps_asset_inventory_contract() -> None:
@@ -78,6 +93,6 @@ def test_tenant_response_model_keeps_asset_inventory_contract() -> None:
}
)
assert response.asset_inventory.summary.product_surface_count >= 10
assert response.asset_inventory.summary.product_surface_count >= 16
assert response.asset_inventory.summary.runtime_gate_count == 0
assert response.asset_inventory.products[0].runtime_gate_count == 0