feat(web): add IwoooS review preparation packets

This commit is contained in:
Your Name
2026-05-20 12:15:47 +08:00
parent 35c56cecab
commit 0a7ea52c65
11 changed files with 782 additions and 8 deletions

View File

@@ -195,6 +195,7 @@ def validate(root: Path) -> None:
"s2_41_iwooos_host_owner_decision_record_human_record_owner_review_candidate_packets",
"s2_42_iwooos_host_owner_decision_record_human_record_owner_review_candidate_checklist",
"s2_43_iwooos_host_owner_decision_record_human_record_owner_review_candidate_outcome_lanes",
"s2_44_iwooos_host_owner_decision_record_human_record_owner_review_preparation_packets",
]
assert_equal(
"progress_delta_ledger.delta_ids",
@@ -642,6 +643,17 @@ def validate(root: Path) -> None:
"host_decision_record_human_record_owner_review_candidate_maintenance_rollback_incomplete_outcome_lane",
"host_decision_record_human_record_owner_review_candidate_runtime_gate_required_outcome_lane",
]
expected_iwooos_host_owner_decision_record_human_record_owner_review_preparation_packet_ids = [
"host_decision_record_human_record_owner_review_preparation_identity_trace_packet",
"host_decision_record_human_record_owner_review_preparation_owner_boundary_packet",
"host_decision_record_human_record_owner_review_preparation_decision_summary_packet",
"host_decision_record_human_record_owner_review_preparation_scope_expiry_packet",
"host_decision_record_human_record_owner_review_preparation_scan_limits_packet",
"host_decision_record_human_record_owner_review_preparation_credential_boundary_packet",
"host_decision_record_human_record_owner_review_preparation_maintenance_rollback_packet",
"host_decision_record_human_record_owner_review_preparation_validation_runtime_gate_packet",
"host_decision_record_human_record_owner_review_preparation_no_execution_attestation_packet",
]
assert_equal(
"iwooos_projection.summary.frontend_surface_coverage_group_count",
iwooos_projection["summary"]["frontend_surface_coverage_group_count"],
@@ -816,6 +828,11 @@ def validate(root: Path) -> None:
],
len(expected_iwooos_host_owner_decision_record_human_record_owner_review_candidate_outcome_lane_ids),
)
assert_equal(
"iwooos_projection.summary.host_owner_decision_record_human_record_owner_review_preparation_packet_count",
iwooos_projection["summary"]["host_owner_decision_record_human_record_owner_review_preparation_packet_count"],
len(expected_iwooos_host_owner_decision_record_human_record_owner_review_preparation_packet_ids),
)
iwooos_progress = iwooos_projection["progress"]
assert_equal("iwooos_projection.progress.overall_percent", iwooos_progress["overall_percent"], progress["overall_percent"])
assert_equal(
@@ -3473,6 +3490,147 @@ def validate(root: Path) -> None:
f"iwooos_projection.host_owner_decision_record_human_record_owner_review_candidate_outcome_lanes.{item['lane_id']}.not_authorization",
item["not_authorization"],
)
iwooos_host_owner_decision_record_human_record_owner_review_preparation_packets = iwooos_projection[
"host_owner_decision_record_human_record_owner_review_preparation_packets"
]
assert_equal(
"iwooos_projection.host_owner_decision_record_human_record_owner_review_preparation_packets.ids",
[
item["packet_id"]
for item in iwooos_host_owner_decision_record_human_record_owner_review_preparation_packets
],
expected_iwooos_host_owner_decision_record_human_record_owner_review_preparation_packet_ids,
)
assert_equal(
"iwooos_projection.host_owner_decision_record_human_record_owner_review_preparation_packets.display_order",
[
item["display_order"]
for item in iwooos_host_owner_decision_record_human_record_owner_review_preparation_packets
],
list(
range(
1,
len(expected_iwooos_host_owner_decision_record_human_record_owner_review_preparation_packet_ids) + 1,
)
),
)
expected_iwooos_host_owner_decision_record_human_record_owner_review_preparation_fields = [
"preparation_identity_trace",
"preparation_owner_boundary",
"preparation_decision_summary",
"preparation_scope_expiry",
"preparation_scan_limits",
"preparation_credential_boundary",
"preparation_maintenance_rollback",
"preparation_validation_runtime_gate",
"preparation_no_execution_attestation",
]
assert_equal(
"iwooos_projection.host_owner_decision_record_human_record_owner_review_preparation_packets.preparation_fields",
[
item["preparation_field"]
for item in iwooos_host_owner_decision_record_human_record_owner_review_preparation_packets
],
expected_iwooos_host_owner_decision_record_human_record_owner_review_preparation_fields,
)
for item in iwooos_host_owner_decision_record_human_record_owner_review_preparation_packets:
assert_equal(
f"iwooos_projection.host_owner_decision_record_human_record_owner_review_preparation_packets.{item['packet_id']}.source_outcome_lane_id",
item["source_outcome_lane_id"],
"host_decision_record_human_record_owner_review_candidate_ready_for_human_record_owner_review_preparation_outcome_lane",
)
assert_equal(
f"iwooos_projection.host_owner_decision_record_human_record_owner_review_preparation_packets.{item['packet_id']}.display_mode",
item["display_mode"],
"owner_decision_record_human_record_owner_review_preparation_packet_only",
)
assert_equal(
f"iwooos_projection.host_owner_decision_record_human_record_owner_review_preparation_packets.{item['packet_id']}.human_record_owner_review_prepared_count",
item["human_record_owner_review_prepared_count"],
0,
)
assert_equal(
f"iwooos_projection.host_owner_decision_record_human_record_owner_review_preparation_packets.{item['packet_id']}.human_record_owner_review_check_passed_count",
item["human_record_owner_review_check_passed_count"],
0,
)
assert_equal(
f"iwooos_projection.host_owner_decision_record_human_record_owner_review_preparation_packets.{item['packet_id']}.human_record_owner_review_started_count",
item["human_record_owner_review_started_count"],
0,
)
assert_equal(
f"iwooos_projection.host_owner_decision_record_human_record_owner_review_preparation_packets.{item['packet_id']}.human_record_owner_review_ready_count",
item["human_record_owner_review_ready_count"],
0,
)
assert_equal(
f"iwooos_projection.host_owner_decision_record_human_record_owner_review_preparation_packets.{item['packet_id']}.human_record_owner_handoff_review_passed_count",
item["human_record_owner_handoff_review_passed_count"],
0,
)
assert_equal(
f"iwooos_projection.host_owner_decision_record_human_record_owner_review_preparation_packets.{item['packet_id']}.human_record_owner_handoff_started_count",
item["human_record_owner_handoff_started_count"],
0,
)
assert_equal(
f"iwooos_projection.host_owner_decision_record_human_record_owner_review_preparation_packets.{item['packet_id']}.human_record_owner_handoff_ready_count",
item["human_record_owner_handoff_ready_count"],
0,
)
assert_equal(
f"iwooos_projection.host_owner_decision_record_human_record_owner_review_preparation_packets.{item['packet_id']}.formal_record_queue_review_passed_count",
item["formal_record_queue_review_passed_count"],
0,
)
assert_equal(
f"iwooos_projection.host_owner_decision_record_human_record_owner_review_preparation_packets.{item['packet_id']}.formal_record_queue_enqueued_count",
item["formal_record_queue_enqueued_count"],
0,
)
assert_false(
f"iwooos_projection.host_owner_decision_record_human_record_owner_review_preparation_packets.{item['packet_id']}.decision_record_created",
item["decision_record_created"],
)
assert_equal(
f"iwooos_projection.host_owner_decision_record_human_record_owner_review_preparation_packets.{item['packet_id']}.owner_decision_received_count",
item["owner_decision_received_count"],
0,
)
assert_equal(
f"iwooos_projection.host_owner_decision_record_human_record_owner_review_preparation_packets.{item['packet_id']}.owner_decision_accepted_count",
item["owner_decision_accepted_count"],
0,
)
assert_false(
f"iwooos_projection.host_owner_decision_record_human_record_owner_review_preparation_packets.{item['packet_id']}.owner_approval_record_created",
item["owner_approval_record_created"],
)
assert_false(
f"iwooos_projection.host_owner_decision_record_human_record_owner_review_preparation_packets.{item['packet_id']}.runtime_gate_opened",
item["runtime_gate_opened"],
)
assert_false(
f"iwooos_projection.host_owner_decision_record_human_record_owner_review_preparation_packets.{item['packet_id']}.raw_payload_allowed",
item["raw_payload_allowed"],
)
assert_false(
f"iwooos_projection.host_owner_decision_record_human_record_owner_review_preparation_packets.{item['packet_id']}.secret_value_collection_allowed",
item["secret_value_collection_allowed"],
)
assert_false(
f"iwooos_projection.host_owner_decision_record_human_record_owner_review_preparation_packets.{item['packet_id']}.runtime_execution_authorized",
item["runtime_execution_authorized"],
)
assert_false(
f"iwooos_projection.host_owner_decision_record_human_record_owner_review_preparation_packets.{item['packet_id']}.action_buttons_allowed",
item["action_buttons_allowed"],
)
assert_true(
f"iwooos_projection.host_owner_decision_record_human_record_owner_review_preparation_packets.{item['packet_id']}.not_authorization",
item["not_authorization"],
)
assert_equal(
"iwooos_projection.non_blocking_lane_ids",
iwooos_projection["non_blocking_lane_ids"],
@@ -3525,6 +3683,7 @@ def validate(root: Path) -> None:
"display_host_owner_decision_record_human_record_owner_review_candidate_packets",
"display_host_owner_decision_record_human_record_owner_review_candidate_checklist",
"display_host_owner_decision_record_human_record_owner_review_candidate_outcome_lanes",
"display_host_owner_decision_record_human_record_owner_review_preparation_packets",
"display_evidence_refs",
"display_forbidden_actions",
]:
@@ -3665,6 +3824,13 @@ def validate(root: Path) -> None:
"collect_owner_decision_from_human_record_owner_review_candidate_outcome",
"create_host_owner_decision_record_from_human_record_owner_review_candidate_outcome",
"open_runtime_gate_from_human_record_owner_review_candidate_outcome",
"treat_host_owner_decision_record_human_record_owner_review_preparation_packet_as_approval",
"mark_human_record_owner_review_preparation_completed",
"start_human_record_owner_review_from_preparation_packet",
"mark_human_record_owner_review_ready_from_preparation_packet",
"collect_owner_decision_from_human_record_owner_review_preparation_packet",
"create_host_owner_decision_record_from_human_record_owner_review_preparation_packet",
"open_runtime_gate_from_human_record_owner_review_preparation_packet",
"apply_runtime_blocking_control",
"switch_github_primary",
"production_deploy",