feat(web): add IwoooS decision draft review

This commit is contained in:
Your Name
2026-05-19 23:49:26 +08:00
parent 451c7c0088
commit c845963fa2
11 changed files with 532 additions and 6 deletions

View File

@@ -1801,6 +1801,49 @@
"metadata": "runtime gate pointer; active gates=0"
}
}
},
"hostOwnerDecisionRecordDraftReview": {
"title": "Host Owner Decision Record Draft Review Checklist",
"subtitle": "Decision record draft packets still require read-only review. This only shows whether drafts have the metadata needed for human decision and does not create formal decision records.",
"checkLabel": "Draft review",
"guardLabel": "No upgrade",
"items": {
"scopeStatementComplete": {
"title": "Scope statement complete",
"body": "Confirm the scope draft includes host, network, service, exclusions, and observation intent so decision record scope is not ambiguous.",
"guard": "draft review only; record created=false"
},
"scanModeStillNotApproval": {
"title": "Scan mode still not approval",
"body": "Confirm scan mode remains a candidate description and is not read as active scan or credentialed scan authorization.",
"guard": "scan authorized=false"
},
"credentialBoundaryMetadataOnly": {
"title": "Credential boundary metadata only",
"body": "Confirm credential boundary stays metadata-only and does not request or store sensitive material.",
"guard": "secret collection=false"
},
"maintenanceConstraintsReadable": {
"title": "Maintenance constraints readable",
"body": "Confirm maintenance window, constraints, and impact boundary are readable without becoming host update approval.",
"guard": "host update=false"
},
"rollbackOwnerReadable": {
"title": "Rollback owner readable",
"body": "Confirm rollback owner, recovery path, and human contact are readable while no approval record is created.",
"guard": "approval record=false"
},
"validationMetricsLinked": {
"title": "Validation metrics linked",
"body": "Confirm post-check metrics, baseline, and evidence pointer are linked to the draft for later human review.",
"guard": "accepted=0"
},
"runtimeGateStillClosed": {
"title": "Runtime gate still closed",
"body": "Confirm decision record draft review does not open runtime gates. Later execution still requires a separate gate.",
"guard": "active runtime gates=0; action buttons=false"
}
}
}
},
"tickets": {

View File

@@ -1802,6 +1802,49 @@
"metadata": "runtime gate pointeractive gates=0"
}
}
},
"hostOwnerDecisionRecordDraftReview": {
"title": "主機 Owner Decision Record Draft Review Checklist",
"subtitle": "Decision record 草稿包後仍需只讀核對。這裡只顯示草稿是否具備人工決策所需 metadata不會建立正式 decision record。",
"checkLabel": "Draft review",
"guardLabel": "不可升級",
"items": {
"scopeStatementComplete": {
"title": "Scope statement complete",
"body": "確認 scope 草稿已包含主機、網段、服務、排除範圍與觀察目的,避免決策紀錄範圍不清。",
"guard": "只核對草稿record created=false"
},
"scanModeStillNotApproval": {
"title": "Scan mode still not approval",
"body": "確認 scan mode 仍只是候選描述,不被解讀成 active scan 或 credentialed scan 授權。",
"guard": "scan authorized=false"
},
"credentialBoundaryMetadataOnly": {
"title": "Credential boundary metadata only",
"body": "確認 credential boundary 仍維持 metadata-only沒有要求或保存敏感素材。",
"guard": "secret collection=false"
},
"maintenanceConstraintsReadable": {
"title": "Maintenance constraints readable",
"body": "確認維護窗口、限制條件與不可影響範圍可讀,但不代表可以更新或調校主機。",
"guard": "host update=false"
},
"rollbackOwnerReadable": {
"title": "Rollback owner readable",
"body": "確認 rollback owner、復原路徑與人工聯絡點可讀但尚未建立 approval record。",
"guard": "approval record=false"
},
"validationMetricsLinked": {
"title": "Validation metrics linked",
"body": "確認 post-check metrics、baseline 與 evidence pointer 已連到草稿,供後續人審使用。",
"guard": "accepted=0"
},
"runtimeGateStillClosed": {
"title": "Runtime gate still closed",
"body": "確認 decision record 草稿審查不會開 runtime gate後續執行仍需獨立 gate。",
"guard": "active runtime gates=0action buttons=false"
}
}
}
},
"tickets": {

View File

@@ -165,6 +165,13 @@ type HostOwnerDecisionRecordDraftPacket = {
tone: 'steady' | 'warn' | 'locked'
}
type HostOwnerDecisionRecordDraftReviewItem = {
key: string
check: string
icon: typeof ShieldCheck
tone: 'steady' | 'warn' | 'locked'
}
const postureMetrics: PostureMetric[] = [
{ key: 'overall', value: '58%', tone: 'warn' },
{ key: 'framework', value: '80-85%', tone: 'steady' },
@@ -386,6 +393,16 @@ const hostOwnerDecisionRecordDraftPackets: HostOwnerDecisionRecordDraftPacket[]
{ key: 'runtimeGateDraft', packet: 'DR7', icon: ShieldCheck, tone: 'locked' },
]
const hostOwnerDecisionRecordDraftReviewItems: HostOwnerDecisionRecordDraftReviewItem[] = [
{ key: 'scopeStatementComplete', check: 'RV1', icon: Radar, tone: 'warn' },
{ key: 'scanModeStillNotApproval', check: 'RV2', icon: Activity, tone: 'locked' },
{ key: 'credentialBoundaryMetadataOnly', check: 'RV3', icon: Lock, tone: 'locked' },
{ key: 'maintenanceConstraintsReadable', check: 'RV4', icon: Clock3, tone: 'warn' },
{ key: 'rollbackOwnerReadable', check: 'RV5', icon: FileWarning, tone: 'warn' },
{ key: 'validationMetricsLinked', check: 'RV6', icon: CheckCircle2, tone: 'warn' },
{ key: 'runtimeGateStillClosed', check: 'RV7', icon: ShieldCheck, tone: 'locked' },
]
const evidenceItems = [
'iwooos-posture-projection.snapshot.json',
'security-rollout-policy.snapshot.json',
@@ -996,6 +1013,34 @@ function HostOwnerDecisionRecordDraftCard({ item }: { item: HostOwnerDecisionRec
)
}
function HostOwnerDecisionRecordDraftReviewCard({ item }: { item: HostOwnerDecisionRecordDraftReviewItem }) {
const t = useTranslations('iwooos.hostOwnerDecisionRecordDraftReview')
const Icon = item.icon
return (
<div style={{ ...band, minHeight: 190, padding: 16 }}>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 12 }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 9 }}>
<Icon size={18} color={toneColors[item.tone]} />
<span style={{ fontSize: 11, color: '#87867f' }}>{t('checkLabel')}</span>
</div>
<span style={{ fontSize: 11, color: '#9b978b' }}>{item.check}</span>
</div>
<h2 style={{ fontSize: 14, margin: '12px 0 6px', color: '#141413' }}>
{t(`items.${item.key}.title` as never)}
</h2>
<p style={{ fontSize: 12, lineHeight: 1.55, color: '#6f6d66', margin: 0 }}>
{t(`items.${item.key}.body` as never)}
</p>
<div style={{ marginTop: 10, display: 'grid', gap: 5 }}>
<div style={{ fontSize: 11, color: '#87867f' }}>{t('guardLabel')}</div>
<div style={{ fontSize: 11, color: toneColors[item.tone], lineHeight: 1.45 }}>
{t(`items.${item.key}.guard` as never)}
</div>
</div>
</div>
)
}
export default function IwoooSPage({ params }: { params: { locale: string } }) {
const t = useTranslations('iwooos')
@@ -1328,6 +1373,26 @@ export default function IwoooSPage({ params }: { params: { locale: string } }) {
</div>
</section>
<section style={{ marginBottom: 14 }}>
<div style={{ marginBottom: 14 }}>
<h2 style={{ fontSize: 16, margin: 0 }}>{t('hostOwnerDecisionRecordDraftReview.title')}</h2>
<p style={{ fontSize: 12, color: '#6f6d66', margin: '6px 0 0', lineHeight: 1.55 }}>
{t('hostOwnerDecisionRecordDraftReview.subtitle')}
</p>
</div>
<div
style={{
display: 'grid',
gridTemplateColumns: 'repeat(auto-fit, minmax(210px, 1fr))',
gap: 12,
}}
>
{hostOwnerDecisionRecordDraftReviewItems.map(item => (
<HostOwnerDecisionRecordDraftReviewCard key={item.key} item={item} />
))}
</div>
</section>
<section
style={{
display: 'grid',