feat(web): show IwoooS owner response gate in approvals

This commit is contained in:
Your Name
2026-05-20 16:00:13 +08:00
parent 2a1f10aa89
commit cb3928c47c
8 changed files with 271 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_approvals_page = (
root / "apps" / "web" / "src" / "app" / "[locale]" / "awooop" / "approvals" / "page.tsx"
).read_text(encoding="utf-8")
web_messages_zh = load_json(root / "apps" / "web" / "messages" / "zh-TW.json")
web_messages_en = load_json(root / "apps" / "web" / "messages" / "en.json")
@@ -219,6 +222,7 @@ def validate(root: Path) -> None:
"s2_52_iwooos_awooop_cross_session_handoff_packets",
"s2_53_awooop_home_iwooos_security_mirror_candidate",
"s2_54_awooop_work_items_iwooos_security_mirror_candidate",
"s2_55_awooop_approvals_iwooos_owner_response_gate_candidate",
]
assert_equal(
"progress_delta_ledger.delta_ids",
@@ -258,6 +262,11 @@ def validate(root: Path) -> None:
[item["action_id"] for item in rollup["next_safe_actions"] if isinstance(item, dict)],
"show_awooop_work_items_iwooos_security_mirror_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_approvals_iwooos_owner_response_gate_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")
@@ -4849,6 +4858,38 @@ def validate(root: Path) -> None:
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 [
"approval_record_created=false",
"owner_response_accepted_count=0",
"runtime_execution_authorized=false",
"action_buttons_allowed=false",
]:
assert_text_contains("awooop_approvals_page.security_owner_response_boundary", awooop_approvals_page, text)
for key in [
"title",
"subtitle",
"badge",
"ownerChecksTitle",
"boundaryLabel",
"boundaryTitle",
"boundaryDetail",
"openIwooos",
"metrics",
"checks",
]:
assert_contains(
"web_messages.zh-TW.awooop.approvals.securityOwnerResponseGate",
list(web_messages_zh["awooop"]["approvals"]["securityOwnerResponseGate"].keys()),
key,
)
assert_contains(
"web_messages.en.awooop.approvals.securityOwnerResponseGate",
list(web_messages_en["awooop"]["approvals"]["securityOwnerResponseGate"].keys()),
key,
)
owner_summary = owner_rollup["summary"]
assert_equal("owner_rollup.total_received_response_count", owner_summary["total_received_response_count"], 0)
assert_equal("owner_rollup.total_accepted_response_count", owner_summary["total_accepted_response_count"], 0)