diff --git a/apps/web/messages/en.json b/apps/web/messages/en.json index 555c773f8..15c4174a2 100644 --- a/apps/web/messages/en.json +++ b/apps/web/messages/en.json @@ -2016,6 +2016,49 @@ "next": "active runtime gates=0; action buttons=false" } } + }, + "hostOwnerDecisionRecordFormalCandidates": { + "title": "Host Owner Decision Record Formal Candidate Packets", + "subtitle": "Formal record candidate only organizes the fields that may later be written into a formal record. This does not create decision records, mark finalized or accepted, create approval records, or open runtime gates.", + "packetLabel": "Candidate packet", + "fieldLabel": "Candidate field", + "items": { + "recordIdentityCandidate": { + "title": "Record identity candidate", + "body": "Organizes candidate record id, version, owner, review scope, and trace source so a future formal record has a readable identity.", + "field": "identity / version; record created=false" + }, + "decisionSummaryCandidate": { + "title": "Decision summary candidate", + "body": "Organizes human owner decision summary, risk acceptance boundary, and no-execution statement without writing it as an accepted decision.", + "field": "decision summary; finalized=0" + }, + "approvedScopeCandidate": { + "title": "Approved scope candidate", + "body": "Organizes host, network, service, exclusion, observation intent, and expiry so scope remains readable.", + "field": "scope / expiry; accepted=0" + }, + "scanModeLimitsCandidate": { + "title": "Scan mode limits candidate", + "body": "Organizes observe-only, future active scan, and credentialed scan limits so they cannot be mistaken for scan authorization.", + "field": "scan limits; scan authorized=false" + }, + "credentialBoundaryCandidate": { + "title": "Credential boundary candidate", + "body": "Organizes metadata-only credential owner, retention boundary, masking requirement, and forbidden collection content.", + "field": "metadata-only boundary; secret collection=false" + }, + "maintenanceRollbackCandidate": { + "title": "Maintenance and rollback candidate", + "body": "Organizes maintenance window, constraints, rollback owner, recovery path, and human contact.", + "field": "window / rollback; host update=false" + }, + "validationRuntimeGateCandidate": { + "title": "Validation and runtime gate candidate", + "body": "Organizes validation evidence, post-check metrics, baseline pointer, and the statement that a separate follow-up runtime gate is still required.", + "field": "validation / runtime pointer; active gates=0" + } + } } }, "tickets": { diff --git a/apps/web/messages/zh-TW.json b/apps/web/messages/zh-TW.json index 61be4265c..c5e021f62 100644 --- a/apps/web/messages/zh-TW.json +++ b/apps/web/messages/zh-TW.json @@ -2017,6 +2017,49 @@ "next": "active runtime gates=0;action buttons=false" } } + }, + "hostOwnerDecisionRecordFormalCandidates": { + "title": "主機 Owner Decision Record Formal Candidate Packets", + "subtitle": "Formal record candidate 只把未來可能寫入正式紀錄的欄位整理出來。這裡不建立 decision record、不標記 finalized / accepted、不產生 approval record、不開 runtime gate。", + "packetLabel": "Candidate packet", + "fieldLabel": "候選欄位", + "items": { + "recordIdentityCandidate": { + "title": "Record identity candidate", + "body": "整理候選 record id、版本、owner、review scope 與追蹤來源,避免正式紀錄沒有可追溯身份。", + "field": "identity / version;record created=false" + }, + "decisionSummaryCandidate": { + "title": "Decision summary candidate", + "body": "整理人工 owner decision summary、風險接受邊界與不執行聲明,但不把它寫成已接受決策。", + "field": "decision summary;finalized=0" + }, + "approvedScopeCandidate": { + "title": "Approved scope candidate", + "body": "整理 host、network、service、exclusion、觀察目的與到期時間,保留 scope 可讀性。", + "field": "scope / expiry;accepted=0" + }, + "scanModeLimitsCandidate": { + "title": "Scan mode limits candidate", + "body": "整理 observe-only、未來 active scan 與 credentialed scan 的限制,避免被誤讀成掃描授權。", + "field": "scan limits;scan authorized=false" + }, + "credentialBoundaryCandidate": { + "title": "Credential boundary candidate", + "body": "整理 metadata-only credential owner、保存邊界、遮蔽要求與不可收集內容。", + "field": "metadata-only boundary;secret collection=false" + }, + "maintenanceRollbackCandidate": { + "title": "Maintenance and rollback candidate", + "body": "整理維護窗口、限制條件、rollback owner、復原路徑與人工聯絡點。", + "field": "window / rollback;host update=false" + }, + "validationRuntimeGateCandidate": { + "title": "Validation and runtime gate candidate", + "body": "整理 validation evidence、post-check metrics、baseline pointer 與仍需獨立 follow-up runtime gate 的聲明。", + "field": "validation / runtime pointer;active gates=0" + } + } } }, "tickets": { diff --git a/apps/web/src/app/[locale]/iwooos/page.tsx b/apps/web/src/app/[locale]/iwooos/page.tsx index d664799a3..3865633bc 100644 --- a/apps/web/src/app/[locale]/iwooos/page.tsx +++ b/apps/web/src/app/[locale]/iwooos/page.tsx @@ -12,6 +12,7 @@ import { CheckCircle2, ClipboardCheck, Clock3, + FileText, FileWarning, GitBranch, ListChecks, @@ -200,6 +201,13 @@ type HostOwnerDecisionRecordWriteupReviewOutcomeLane = { tone: 'steady' | 'warn' | 'locked' } +type HostOwnerDecisionRecordFormalCandidatePacket = { + key: string + packet: string + icon: typeof ShieldCheck + tone: 'steady' | 'warn' | 'locked' +} + const postureMetrics: PostureMetric[] = [ { key: 'overall', value: '58%', tone: 'warn' }, { key: 'framework', value: '80-85%', tone: 'steady' }, @@ -471,6 +479,16 @@ const hostOwnerDecisionRecordWriteupReviewOutcomeLanes: HostOwnerDecisionRecordW { key: 'runtimeGateStillRequired', lane: 'WV7', icon: ShieldCheck, tone: 'locked' }, ] +const hostOwnerDecisionRecordFormalCandidatePackets: HostOwnerDecisionRecordFormalCandidatePacket[] = [ + { key: 'recordIdentityCandidate', packet: 'FC1', icon: FileText, tone: 'warn' }, + { key: 'decisionSummaryCandidate', packet: 'FC2', icon: ClipboardCheck, tone: 'warn' }, + { key: 'approvedScopeCandidate', packet: 'FC3', icon: Radar, tone: 'warn' }, + { key: 'scanModeLimitsCandidate', packet: 'FC4', icon: Activity, tone: 'locked' }, + { key: 'credentialBoundaryCandidate', packet: 'FC5', icon: Lock, tone: 'locked' }, + { key: 'maintenanceRollbackCandidate', packet: 'FC6', icon: Clock3, tone: 'warn' }, + { key: 'validationRuntimeGateCandidate', packet: 'FC7', icon: ShieldCheck, tone: 'locked' }, +] + const evidenceItems = [ 'iwooos-posture-projection.snapshot.json', 'security-rollout-policy.snapshot.json', @@ -1229,6 +1247,38 @@ function HostOwnerDecisionRecordWriteupReviewOutcomeCard({ ) } +function HostOwnerDecisionRecordFormalCandidateCard({ + item, +}: { + item: HostOwnerDecisionRecordFormalCandidatePacket +}) { + const t = useTranslations('iwooos.hostOwnerDecisionRecordFormalCandidates') + const Icon = item.icon + return ( +
+
+
+ + {t('packetLabel')} +
+ {item.packet} +
+

+ {t(`items.${item.key}.title` as never)} +

+

+ {t(`items.${item.key}.body` as never)} +

+
+
{t('fieldLabel')}
+
+ {t(`items.${item.key}.field` as never)} +
+
+
+ ) +} + export default function IwoooSPage({ params }: { params: { locale: string } }) { const t = useTranslations('iwooos') @@ -1661,6 +1711,26 @@ export default function IwoooSPage({ params }: { params: { locale: string } }) { +
+
+

{t('hostOwnerDecisionRecordFormalCandidates.title')}

+

+ {t('hostOwnerDecisionRecordFormalCandidates.subtitle')} +

+
+
+ {hostOwnerDecisionRecordFormalCandidatePackets.map(item => ( + + ))} +
+
+
None: "s2_29_iwooos_host_owner_decision_record_writeup_packets", "s2_30_iwooos_host_owner_decision_record_writeup_review_checklist", "s2_31_iwooos_host_owner_decision_record_writeup_review_outcome_lanes", + "s2_32_iwooos_host_owner_decision_record_formal_candidate_packets", ] assert_equal( "progress_delta_ledger.delta_ids", @@ -508,6 +509,15 @@ def validate(root: Path) -> None: "host_decision_record_writeup_maintenance_rollback_incomplete_outcome_lane", "host_decision_record_writeup_runtime_gate_required_outcome_lane", ] + expected_iwooos_host_owner_decision_record_formal_candidate_packet_ids = [ + "host_decision_record_formal_candidate_identity_packet", + "host_decision_record_formal_candidate_decision_summary_packet", + "host_decision_record_formal_candidate_approved_scope_packet", + "host_decision_record_formal_candidate_scan_mode_limits_packet", + "host_decision_record_formal_candidate_credential_boundary_packet", + "host_decision_record_formal_candidate_maintenance_rollback_packet", + "host_decision_record_formal_candidate_validation_runtime_gate_packet", + ] assert_equal( "iwooos_projection.summary.frontend_surface_coverage_group_count", iwooos_projection["summary"]["frontend_surface_coverage_group_count"], @@ -618,6 +628,11 @@ def validate(root: Path) -> None: iwooos_projection["summary"]["host_owner_decision_record_writeup_review_outcome_lane_count"], len(expected_iwooos_host_owner_decision_record_writeup_review_outcome_lane_ids), ) + assert_equal( + "iwooos_projection.summary.host_owner_decision_record_formal_candidate_packet_count", + iwooos_projection["summary"]["host_owner_decision_record_formal_candidate_packet_count"], + len(expected_iwooos_host_owner_decision_record_formal_candidate_packet_ids), + ) iwooos_progress = iwooos_projection["progress"] assert_equal("iwooos_projection.progress.overall_percent", iwooos_progress["overall_percent"], progress["overall_percent"]) assert_equal( @@ -2047,6 +2062,91 @@ def validate(root: Path) -> None: f"iwooos_projection.host_owner_decision_record_writeup_review_outcome_lanes.{item['lane_id']}.not_authorization", item["not_authorization"], ) + iwooos_host_owner_decision_record_formal_candidate_packets = iwooos_projection[ + "host_owner_decision_record_formal_candidate_packets" + ] + assert_equal( + "iwooos_projection.host_owner_decision_record_formal_candidate_packets.ids", + [item["packet_id"] for item in iwooos_host_owner_decision_record_formal_candidate_packets], + expected_iwooos_host_owner_decision_record_formal_candidate_packet_ids, + ) + assert_equal( + "iwooos_projection.host_owner_decision_record_formal_candidate_packets.display_order", + [item["display_order"] for item in iwooos_host_owner_decision_record_formal_candidate_packets], + list(range(1, len(expected_iwooos_host_owner_decision_record_formal_candidate_packet_ids) + 1)), + ) + expected_iwooos_host_owner_decision_record_formal_candidate_fields = [ + "record_identity_and_version", + "decision_summary", + "approved_scope_statement", + "scan_mode_limits_statement", + "credential_boundary_statement", + "maintenance_and_rollback_statement", + "validation_and_runtime_gate_statement", + ] + assert_equal( + "iwooos_projection.host_owner_decision_record_formal_candidate_packets.candidate_fields", + [item["candidate_field"] for item in iwooos_host_owner_decision_record_formal_candidate_packets], + expected_iwooos_host_owner_decision_record_formal_candidate_fields, + ) + for item in iwooos_host_owner_decision_record_formal_candidate_packets: + assert_equal( + f"iwooos_projection.host_owner_decision_record_formal_candidate_packets.{item['packet_id']}.source_lane_id", + item["source_lane_id"], + "host_decision_record_writeup_review_ready_for_formal_record_outcome_lane", + ) + assert_equal( + f"iwooos_projection.host_owner_decision_record_formal_candidate_packets.{item['packet_id']}.display_mode", + item["display_mode"], + "owner_decision_record_formal_candidate_only", + ) + assert_equal( + f"iwooos_projection.host_owner_decision_record_formal_candidate_packets.{item['packet_id']}.formal_record_candidate_finalized_count", + item["formal_record_candidate_finalized_count"], + 0, + ) + assert_false( + f"iwooos_projection.host_owner_decision_record_formal_candidate_packets.{item['packet_id']}.decision_record_created", + item["decision_record_created"], + ) + assert_equal( + f"iwooos_projection.host_owner_decision_record_formal_candidate_packets.{item['packet_id']}.owner_decision_received_count", + item["owner_decision_received_count"], + 0, + ) + assert_equal( + f"iwooos_projection.host_owner_decision_record_formal_candidate_packets.{item['packet_id']}.owner_decision_accepted_count", + item["owner_decision_accepted_count"], + 0, + ) + assert_false( + f"iwooos_projection.host_owner_decision_record_formal_candidate_packets.{item['packet_id']}.owner_approval_record_created", + item["owner_approval_record_created"], + ) + assert_false( + f"iwooos_projection.host_owner_decision_record_formal_candidate_packets.{item['packet_id']}.runtime_gate_opened", + item["runtime_gate_opened"], + ) + assert_false( + f"iwooos_projection.host_owner_decision_record_formal_candidate_packets.{item['packet_id']}.raw_payload_allowed", + item["raw_payload_allowed"], + ) + assert_false( + f"iwooos_projection.host_owner_decision_record_formal_candidate_packets.{item['packet_id']}.secret_value_collection_allowed", + item["secret_value_collection_allowed"], + ) + assert_false( + f"iwooos_projection.host_owner_decision_record_formal_candidate_packets.{item['packet_id']}.runtime_execution_authorized", + item["runtime_execution_authorized"], + ) + assert_false( + f"iwooos_projection.host_owner_decision_record_formal_candidate_packets.{item['packet_id']}.action_buttons_allowed", + item["action_buttons_allowed"], + ) + assert_true( + f"iwooos_projection.host_owner_decision_record_formal_candidate_packets.{item['packet_id']}.not_authorization", + item["not_authorization"], + ) assert_equal( "iwooos_projection.non_blocking_lane_ids", iwooos_projection["non_blocking_lane_ids"], @@ -2087,6 +2187,7 @@ def validate(root: Path) -> None: "display_host_owner_decision_record_writeup_packets", "display_host_owner_decision_record_writeup_review_checklist", "display_host_owner_decision_record_writeup_review_outcome_lanes", + "display_host_owner_decision_record_formal_candidate_packets", "display_evidence_refs", "display_forbidden_actions", ]: @@ -2162,6 +2263,11 @@ def validate(root: Path) -> None: "mark_host_owner_decision_record_writeup_review_outcome_completed", "create_host_owner_decision_record_from_writeup_review_outcome", "open_runtime_gate_from_owner_decision_record_writeup_review_outcome", + "treat_host_owner_decision_record_formal_candidate_as_approval", + "mark_host_owner_decision_record_formal_candidate_finalized", + "create_host_owner_decision_record_from_formal_candidate", + "accept_host_owner_decision_record_from_formal_candidate", + "open_runtime_gate_from_owner_decision_record_formal_candidate", "apply_runtime_blocking_control", "switch_github_primary", "production_deploy",