Replace the oversized header and reference rail with stable editor slots and a retained supporting drawer. Bind diagnostic, result and menu actions to their original publication and visit; preserve effective selections on navigation and dismiss Actions, Find and the drawer one surface per Escape. Retain exact Windows source captures, eight final gates (871 desktop passes), independent reviews, native selection/rename/recovery trials and the original failures. All 526 tested inputs and staged evidence were byte-checked before commit. Combined preview integration and packaging remain with issue 27; Linux remains paused.
35 lines
3.1 KiB
PowerShell
35 lines
3.1 KiB
PowerShell
$ErrorActionPreference = 'Stop'
|
|
$taskRoot = 'C:/Users/User/Documents/Git/ARCADIA-Studio'
|
|
$taskPairs = @(
|
|
@{ name='arcadia-studio.exe'; retained="$taskRoot/.local/source-rename-integration-20260912/attempt-8/arcadia-studio.exe"; sha='819965abf5e70cc72f4fbd8acced15de6a54a2103b025366e2c7d5c8ef6d69d1' },
|
|
@{ name='arcadia-server.exe'; retained="$taskRoot/.local/source-rename-server-build-20260912/attempt-1/arcadia-server.exe"; sha='b92a4d7f8b5bf868fef8cfe154cea1d7d8ab50367da8458ab9cb593b074aefcf' }
|
|
)
|
|
$taskRecords = @()
|
|
foreach ($taskProducer in @('C:/arcadia-rename-package-1','C:/arcadia-rename-package-2')) {
|
|
$taskReceipt = Get-Content -LiteralPath "$taskProducer/adapter-result.json" -Raw | ConvertFrom-Json
|
|
foreach ($taskPair in $taskPairs) {
|
|
$taskTarget = (Get-Item -LiteralPath "$taskProducer/bin/$($taskPair.name)").FullName
|
|
$taskExpected = [IO.Path]::GetFullPath("$taskProducer/bin/$($taskPair.name)")
|
|
if ($taskTarget -ne $taskExpected) { throw 'Resolved path mismatch' }
|
|
$taskOriginal = Get-FileHash -LiteralPath $taskPair.retained -Algorithm SHA256
|
|
$taskDuplicate = Get-FileHash -LiteralPath $taskTarget -Algorithm SHA256
|
|
if ($taskOriginal.Hash.ToLowerInvariant() -ne $taskPair.sha -or $taskDuplicate.Hash -ne $taskOriginal.Hash) { throw 'Duplicate identity mismatch' }
|
|
$taskRecords += @{ path=$taskTarget; retained=$taskPair.retained; sha256=$taskPair.sha; bytes=(Get-Item -LiteralPath $taskTarget).Length; producerReceipt="$taskProducer/adapter-result.json"; producerReceiptSha256=(Get-FileHash -LiteralPath "$taskProducer/adapter-result.json" -Algorithm SHA256).Hash.ToLowerInvariant() }
|
|
}
|
|
}
|
|
$taskProcesses = @(Get-CimInstance Win32_Process -Filter "Name='arcadia-studio.exe' OR Name='arcadia-server.exe'" | Where-Object { $_.ExecutablePath -in $taskRecords.path })
|
|
if ($taskProcesses.Count) { throw 'A staging executable is still running' }
|
|
$taskOutput = "$taskRoot/.local/text-workspace-native-20260912/closed-duplicate-disposal.json"
|
|
if (Test-Path -LiteralPath $taskOutput) { throw 'Disposal receipt already exists' }
|
|
$taskDisposal = @{ atUtc=[DateTime]::UtcNow.ToString('o'); reason='Completed root-owned package adapter staging copies; exact retained build artifacts and published package remain available. Preserve all original receipts and unique evidence.'; beforeFree=(Get-PSDrive C).Free; files=$taskRecords; completed=$false }
|
|
$taskDisposal | ConvertTo-Json -Depth 6 | Set-Content -LiteralPath $taskOutput -Encoding utf8
|
|
foreach ($taskRecord in $taskRecords) { Remove-Item -LiteralPath $taskRecord.path }
|
|
foreach ($taskRecord in $taskRecords) {
|
|
if (Test-Path -LiteralPath $taskRecord.path) { throw 'Duplicate remains' }
|
|
if ((Get-FileHash -LiteralPath $taskRecord.retained -Algorithm SHA256).Hash.ToLowerInvariant() -ne $taskRecord.sha256) { throw 'Retained original changed' }
|
|
}
|
|
$taskDisposal.completed=$true
|
|
$taskDisposal.afterFree=(Get-PSDrive C).Free
|
|
$taskDisposal | ConvertTo-Json -Depth 6 | Set-Content -LiteralPath $taskOutput -Encoding utf8
|
|
@{ completed=$true; reclaimedBytes=($taskRecords | Measure-Object -Property bytes -Sum).Sum; free=$taskDisposal.afterFree; receipt=$taskOutput } | ConvertTo-Json
|