34 lines
4.6 KiB
PowerShell
34 lines
4.6 KiB
PowerShell
$ErrorActionPreference='Stop'
|
|
$root=(Resolve-Path (Join-Path $PSScriptRoot '../../..')).Path
|
|
Set-Location $root
|
|
& "$PSScriptRoot/VerifyBoundary.ps1"
|
|
if($LASTEXITCODE -ne 0){throw 'Boundary verification failed'}
|
|
$paths=[Collections.Generic.HashSet[string]]::new([StringComparer]::Ordinal)
|
|
$original=Get-Content 'CodexOutput/upserver/阶段4B2方案受审基线-修订2-2026-09-23.json' -Raw | ConvertFrom-Json
|
|
foreach($f in $original.files){[void]$paths.Add($f.path)}
|
|
foreach($file in Get-ChildItem 'Client/Assets/Scripts/Services/PlayerData/PlayerKV*' -File){[void]$paths.Add($file.FullName.Substring($root.Length+1).Replace('\','/'))}
|
|
foreach($path in @('Client/Assets/Scripts/Services/UserService.KVLoad.cs','Client/Assets/Editor/KVGameLoadValidation.cs','Client/Assets/Scripts/EventPartnerGather/PartnerInfoManager.cs')){
|
|
[void]$paths.Add($path);if(Test-Path -LiteralPath ($path+'.meta')){[void]$paths.Add($path+'.meta')}
|
|
}
|
|
foreach($file in Get-ChildItem $PSScriptRoot -Recurse -File){
|
|
$relative=$file.FullName.Substring($root.Length+1).Replace('\','/')
|
|
if($relative -notmatch '/(bin|obj|runs|unity-cache|\.appdata)/' -and $file.Extension -in @('.cs','.csproj','.targets','.ps1')){[void]$paths.Add($relative)}
|
|
}
|
|
$logs=@('checkpoint4-release-offline.log','checkpoint4-release-full.log','checkpoint4-final-unity-cases.log','checkpoint4-final4-compile.log','checkpoint4-cleanup-final-prepare.log','checkpoint4-cleanup-final-schema.log','checkpoint4-cleanup-final-apply.log','checkpoint4-service-release-false.log','checkpoint4-service-release-true.log','checkpoint4-noneditor-factories.log','checkpoint4-regression-KVLoginContextTests.log','checkpoint4-regression-KVGameBridgeTests.log','checkpoint4-regression-KVContractTests.log','checkpoint4-regression-KVSyncTests.log','checkpoint4-regression-KVSyncTests-serial.log','checkpoint4-regression-KVSyncCoordinatorTests.log','checkpoint4-regression-KVSyncCoordinatorReviewTests.log','checkpoint4-regression-KVStage3CTests.log','checkpoint4-regression-KVLiveTests.log','checkpoint4-network-build-final.log','checkpoint3-network-regression.log','checkpoint3-minimal-login-regression.log','checkpoint3-exit-final-regression.log','checkpoint2-D4-unity-real.log','checkpoint2-D4-unity-hot-real.log','checkpoint2-D5-rounding-real.log','checkpoint2-D4-imported-dependencies-final.log')
|
|
$privacyFlags=@()
|
|
foreach($name in $logs){
|
|
$path="CodexOutput/upserver/KVGameLoadTests/$name";[void]$paths.Add($path)
|
|
$text=Get-Content -LiteralPath $path -Raw
|
|
if($text -match '(?i)sid=|Authorization:\s*Bearer\s+\S+|Cookie:\s*\S+|C:\\Users\\LB'){$privacyFlags+=$path}
|
|
}
|
|
foreach($name in @('checkpoint4-boundary-and-evidence.json','checkpoint2-D4-precompiled-audit.json','checkpoint2-D4-dependency-conclusion.json','checkpoint2-D4-source-references.txt','baseline/ClubService.cs.txt','runs/20260923144334_75379546c3404789b03c7a27ddea7784/result.json')){[void]$paths.Add("CodexOutput/upserver/KVGameLoadTests/$name")}
|
|
foreach($name in @('阶段4B2交付与验收矩阵-2026-09-23.md','阶段4B2限定代码自审-2026-09-23.md','其他AI审查提示词-4B2实施-2026-09-23.md','阶段4B2实施记录送审快照-2026-09-23.md','阶段4B2当前TodoItem-2026-09-23.json','阶段4B2字段与模块加载合同-正式版3-2026-09-23.md','阶段4B2检查点2配置与派生审查裁决-2026-09-23.md','阶段4B2检查点2配置隔离与鱼数据派生独立审查-2026-09-23.md','阶段4B2方案受审基线-修订2-2026-09-23.json','阶段4B2检查点2配置与派生差异受审基线-2026-09-23.json')){[void]$paths.Add("CodexOutput/upserver/$name")}
|
|
$files=@(foreach($path in ($paths|Sort-Object)){
|
|
if(!(Test-Path -LiteralPath $path -PathType Leaf)){throw "Missing artifact: $path"}
|
|
[ordered]@{path=$path;sha256=(Get-FileHash -LiteralPath $path -Algorithm SHA256).Hash}
|
|
})
|
|
if($privacyFlags.Count){$privacyFlags;throw 'Review log privacy scan requires inspection'}
|
|
$head=git rev-parse HEAD
|
|
[ordered]@{schemaVersion=1;phase='4B2-implementation';status='awaiting-independent-implementation-review';generatedAt=(Get-Date).ToString('o');gitHead=$head;gitCommitCreated=$false;formalRequests=0;stageClosed=$false;B3Started=$false;privacy=@{reviewLogs=$logs.Count;credentialOrUserPathFlags=$privacyFlags.Count;scope='bounded pattern scan of selected review logs; synthetic fixtures, no real account data'};note='Shared entry/status/TODO/live logs are excluded; immutable review snapshot included. Author verification is not independent approval.';files=$files} | ConvertTo-Json -Depth 7 | Set-Content "$PSScriptRoot/checkpoint4-delivery-hashes.json"
|
|
Write-Output "Sealed $($files.Count) files; review-log privacy flags=$($privacyFlags.Count)."
|