feat(web): show IwoooS tenant scope in AwoooP

This commit is contained in:
Your Name
2026-05-20 19:31:18 +08:00
parent b088f77bee
commit e71a25c85d
8 changed files with 310 additions and 3 deletions

View File

@@ -61,6 +61,9 @@ def validate(root: Path) -> None:
awooop_work_items_page = (
root / "apps" / "web" / "src" / "app" / "[locale]" / "awooop" / "work-items" / "page.tsx"
).read_text(encoding="utf-8")
awooop_tenants_page = (
root / "apps" / "web" / "src" / "app" / "[locale]" / "awooop" / "tenants" / "page.tsx"
).read_text(encoding="utf-8")
awooop_approvals_page = (
root / "apps" / "web" / "src" / "app" / "[locale]" / "awooop" / "approvals" / "page.tsx"
).read_text(encoding="utf-8")
@@ -227,6 +230,7 @@ def validate(root: Path) -> None:
"s2_54_awooop_work_items_iwooos_security_mirror_candidate",
"s2_55_awooop_approvals_iwooos_owner_response_gate_candidate",
"s2_56_awooop_contracts_iwooos_security_contract_candidate",
"s2_57_awooop_tenants_iwooos_tenant_scope_candidate",
]
assert_equal(
"progress_delta_ledger.delta_ids",
@@ -276,6 +280,11 @@ def validate(root: Path) -> None:
[item["action_id"] for item in rollup["next_safe_actions"] if isinstance(item, dict)],
"show_awooop_contracts_iwooos_security_contract_candidate",
)
assert_contains(
"rollup.next_safe_actions.action_ids",
[item["action_id"] for item in rollup["next_safe_actions"] if isinstance(item, dict)],
"show_awooop_tenants_iwooos_tenant_scope_candidate",
)
assert_equal("rollout_policy.schema_version", rollout_policy["schema_version"], "security_rollout_policy_v1")
assert_equal("rollout_policy.default_mode", rollout_policy["default_mode"], "observe")
@@ -4867,6 +4876,49 @@ def validate(root: Path) -> None:
key,
)
assert_text_contains(
"awooop_tenants_page.security_tenant_scope_panel",
awooop_tenants_page,
"SecurityTenantScopeCandidatePanel",
)
assert_text_contains("awooop_tenants_page.iwooos_link", awooop_tenants_page, 'href="/iwooos"')
for text in [
"tenant_migration_mode_changed=false",
"tenant_policy_mutation_authorized=false",
"runtime_execution_authorized=false",
"action_buttons_allowed=false",
]:
assert_text_contains("awooop_tenants_page.security_tenant_boundary", awooop_tenants_page, text)
for text in [
"AWOOOI first tenant",
"IwoooS security mirror",
"Kali 112 / Dev 168 / Dev 111",
"S4.9-S4.12 owner response waiting",
]:
assert_text_contains("awooop_tenants_page.security_tenant_scope_refs", awooop_tenants_page, text)
for key in [
"title",
"subtitle",
"badge",
"scopeRefsTitle",
"boundaryLabel",
"boundaryTitle",
"boundaryDetail",
"openIwooos",
"metrics",
"scopeRefs",
]:
assert_contains(
"web_messages.zh-TW.awooop.tenants.securityTenantScopeCandidate",
list(web_messages_zh["awooop"]["tenants"]["securityTenantScopeCandidate"].keys()),
key,
)
assert_contains(
"web_messages.en.awooop.tenants.securityTenantScopeCandidate",
list(web_messages_en["awooop"]["tenants"]["securityTenantScopeCandidate"].keys()),
key,
)
assert_text_contains("awooop_approvals_page.security_owner_response_panel", awooop_approvals_page, "SecurityOwnerResponseGatePanel")
assert_text_contains("awooop_approvals_page.iwooos_link", awooop_approvals_page, 'href="/iwooos"')
for text in [