Files
ARCADIA-Studio/harness/experiments/scenario-comparators-gui-b10b28c-20260913/details/adaptation.diff
T

208 lines
22 KiB
Diff

--- old/build.ps1
+++ b10/build.ps1
@@ -3,18 +3,20 @@
param(
[Parameter(Mandatory=$true)][ValidatePattern('^[0-9a-f]{40}$')][string]$SourcePin,
[Parameter(Mandatory=$true)][string]$ReferenceReceipt,
+ [Parameter(Mandatory=$true)][ValidatePattern('^[0-9a-f]{64}$')][string]$ReferenceReceiptSha256,
[Parameter(Mandatory=$true)][string]$DesktopFingerprint,
[Parameter(Mandatory=$true)][string]$CoreRlib,
[Parameter(Mandatory=$true)][string]$SerdeJsonRlib,
[Parameter(Mandatory=$true)][string]$Output,
[Parameter(Mandatory=$true)][string]$WindowsImportLibDirectory,
- [string]$NativeVerifier=(Join-Path $PSScriptRoot '../scenario-details-native-8bf7607-20260913/verify.ps1'),
- [string]$RuntimeDll='C:/Users/User/Documents/Git/ARCADIA-Studio/.local/navigation-rename-native-a49b0ec-20260913/package/libunwind.dll'
+ [Parameter(Mandatory=$true)][string]$NativeVerifier,
+ [Parameter(Mandatory=$true)][ValidatePattern('^[0-9a-f]{64}$')][string]$NativeVerifierSha256,
+ [Parameter(Mandatory=$true)][string]$RuntimeDll
)
Set-StrictMode -Version Latest
$ErrorActionPreference='Stop'
-$pin='8bf7607a3f3b53db0c36364f54f57674c64ea2f1'
-if($SourcePin -cne $pin){throw 'Exact reviewed8bf source required'}
+$pin='b10b28cefd1d0794073ba241a0c8de9a83e85f68'
+if($SourcePin -cne $pin){throw 'Exact reviewedb10 source required'}
$workspace=(Resolve-Path (Join-Path $PSScriptRoot '../scenario-spacing-ytr83r-20260913')).Path
$root=(Resolve-Path (Join-Path $PSScriptRoot '../..')).Path
$deps=[IO.Path]::GetFullPath((Join-Path $root 'target/debug/deps'))
@@ -27,25 +29,42 @@
$stream=[IO.File]::Open($path,[IO.FileMode]::CreateNew,[IO.FileAccess]::Write,[IO.FileShare]::Read)
try{$bytes=[Text.UTF8Encoding]::new($false).GetBytes(($Value|ConvertTo-Json -Depth 20)+"`n");$stream.Write($bytes,0,$bytes.Length)}finally{$stream.Dispose()}
}
+function Assert-ReviewedHash([string]$Actual,[string]$Expected) {
+ if($Expected -cnotmatch '^[0-9a-f]{64}$' -or $Actual -cne $Expected){throw 'Explicit reviewed artifact hash differs'}
+}
+function Assert-ListPreparation($Reference,$Selection,$ExpectedInputs) {
+ if($Reference.base -cne 'b10b28cefd1d0794073ba241a0c8de9a83e85f68' -or $Reference.stage -cne 'list' -or $Reference.cargoExitCode -ne 0 -or -not $Reference.selectionValid -or -not $Reference.inputsUnchanged -or -not $Reference.testBinaryBindingValid -or $null -ne $Reference.postflightFailure){throw 'Closed successful exactb10 LIST required'}
+ if($Selection.source_commit -cne $Reference.base -or $Selection.expected_desktop_count -ne 1095 -or $Selection.expected_count -ne 301 -or $ExpectedInputs.base -cne $Reference.base -or $ExpectedInputs.count -ne 612 -or @($ExpectedInputs.files).Count -ne 612){throw 'Wrong1095/301/612 list preparation'}
+ if(($Reference.listSummaries|Measure-Object tests -Sum).Sum -ne 1095 -or ($Reference.listSummaries|Measure-Object benchmarks -Sum).Sum -ne 0){throw 'Actual list totals differ'}
+}
+function Select-SourceRecords($Inputs,$Paths) {
+ if(@($Paths).Count -ne @($Paths|Sort-Object -Unique).Count){throw 'Duplicate expected source path'}
+ @(foreach($path in $Paths){
+ if([IO.Path]::GetFullPath($path) -cne $path){throw 'Noncanonical expected source path'}
+ $rows=@($Inputs|Where-Object {$_.path -ceq $path});if($rows.Count -ne 1){throw 'Missing or duplicate build source record'};$rows[0]
+ })
+}
function Assert-Source {
Push-Location -LiteralPath $workspace
try{if((git rev-parse HEAD) -cne $pin -or $LASTEXITCODE -ne 0){throw 'Wrong core reference source pin'};if(@(git status --porcelain).Count -or $LASTEXITCODE -ne 0){throw 'Reference source must be clean'}}finally{Pop-Location}
}
Assert-Source
$ReferenceReceipt=(Resolve-Path -LiteralPath $ReferenceReceipt).Path
+Assert-ReviewedHash (Hash $ReferenceReceipt) $ReferenceReceiptSha256
$reference=Json $ReferenceReceipt
-if($reference.base -cne $pin -or $reference.stage -cne 'list' -or $reference.workspace -ine $workspace -or [IO.Path]::GetFullPath($reference.target) -ine [IO.Path]::GetFullPath((Join-Path $root 'target'))){throw 'Reference must be the exact8bf LIST in the original spacing workspace/target'}
+if($reference.base -cne $pin -or $reference.stage -cne 'list' -or $reference.workspace -ine $workspace -or [IO.Path]::GetFullPath($reference.target) -ine [IO.Path]::GetFullPath((Join-Path $root 'target'))){throw 'Reference must be the exactb10 LIST in the original spacing workspace/target'}
if($reference.cargoExitCode -ne 0 -or -not $reference.selectionValid -or -not $reference.inputsUnchanged -or -not $reference.testBinaryBindingValid -or $null -ne $reference.postflightFailure){throw 'A closed successful desktop receipt with executable binding is required'}
$evidence=Split-Path $ReferenceReceipt
# Reuse read-only source/name helpers only. Do not require the five native stages here.
+$NativeVerifier=(Resolve-Path -LiteralPath $NativeVerifier).Path
+Assert-ReviewedHash (Hash $NativeVerifier) $NativeVerifierSha256
. $NativeVerifier
-$nativePin=$pin;$nativeInputCount=611
+$nativePin=$pin;$nativeInputCount=612
Assert-CurrentNativeSource $evidence
$selection=Json (Join-Path $evidence 'expected-tests.json')
-$final=Json (Join-Path $evidence 'finalization.json')
-if($selection.source_commit -cne $pin -or $selection.expected_desktop_count -ne 1089 -or $selection.expected_count -ne 295 -or $final.base -cne $pin -or $final.sourceCount -ne 611){throw 'Wrong1089/295/611 list preparation'}
+$expectedInputs=Json (Join-Path $evidence 'expected-inputs.json')
+Assert-ListPreparation $reference $selection $expectedInputs
Assert-NativeNames $selection.desktop_tests $reference.listedTests
-if(($reference.listSummaries|Measure-Object tests -Sum).Sum -ne 1089 -or ($reference.listSummaries|Measure-Object benchmarks -Sum).Sum -ne 0){throw 'Actual list totals differ'}
foreach($binding in $reference.boundScriptAndInputHashes.PSObject.Properties){if((Hash (Join-Path $evidence $binding.Name)) -cne $binding.Value){throw 'Bound listing recipe changed'}}
if((Hash (Join-Path $evidence 'list.log')) -cne $reference.rawLogSha256){throw 'Actual listing log changed'}
@@ -92,7 +111,7 @@
$coreSerdeEdge=@($coreJson.deps|Where-Object {$_[1] -ceq 'serde_json'})
if($coreSerdeEdge.Count -ne 1 -or [UInt64]$coreSerdeEdge[0][3] -ne [UInt64]$serdeEdge[0][3]){throw 'Core serde_json linkage differs from selected desktop dependency'}
$coreInputs=@((Json $capturePath).files)
-if($coreInputs.Count -ne 611){throw 'Closed receipt does not enumerate core source inputs'}
+if($coreInputs.Count -ne 612){throw 'Closed receipt does not enumerate core source inputs'}
foreach($inputFile in $coreInputs){if((Hash (Join-Path $workspace $inputFile.path)) -cne $inputFile.sha256){throw ('Core source differs from compiled reference: '+$inputFile.path)}}
if(Test-Path -LiteralPath $Output){throw 'Output must be a new evidence directory'}
$Output=[IO.Path]::GetFullPath($Output)
@@ -106,10 +125,11 @@
$sysroot=Join-Path $toolchain 'lib/rustlib/x86_64-pc-windows-gnullvm/lib'
$wrapper=Join-Path $PSScriptRoot 'main.rs'
$sourceManifest=Json (Join-Path $PSScriptRoot 'source-inputs.json')
-$sources=@(foreach($f in $sourceManifest.files){$p=Join-Path $PSScriptRoot $f.path;if((Get-Item -LiteralPath $p).Length -ne $f.bytes -or (Hash $p) -cne $f.sha256){throw 'Prepared comparator source changed'};$p})
+$sources=@(foreach($f in $sourceManifest.files){$p=(Resolve-Path -LiteralPath (Join-Path $PSScriptRoot $f.path)).Path;if((Get-Item -LiteralPath $p).Length -ne $f.bytes -or (Hash $p) -cne $f.sha256){throw 'Prepared comparator source changed'};$p})
$runtimeSourcePaths=@(($sources+@($PSCommandPath,$NativeVerifier,(Join-Path $PSScriptRoot 'source-inputs.json'))+@($coreInputs|ForEach-Object {Join-Path $workspace $_.path}))|ForEach-Object {(Resolve-Path -LiteralPath $_).Path}|Sort-Object -Unique)
$runtimeHash='aa282fa47bb2c4e210cea5e470cdbdca58568f0be0bc73e404d86ab9cd95ef6a'
-if((Hash $RuntimeDll) -cne $runtimeHash){throw 'Wrong pinned runtime DLL'}
+$RuntimeDll=(Resolve-Path -LiteralPath $RuntimeDll).Path
+if((Get-Item -LiteralPath $RuntimeDll).Length -ne 190464 -or (Hash $RuntimeDll) -cne $runtimeHash){throw 'Wrong pinned runtime DLL'}
function Inputs {
$paths=@((Join-Path $PSScriptRoot 'source-inputs.json'),$NativeVerifier,$PSCommandPath,$ReferenceReceipt,$DesktopFingerprint,$versionPath,$capturePath,$testExe,$environment,$rustc,$clang,$RuntimeDll,(Join-Path $toolchain 'bin/rustc.exe'),(Join-Path $workspace 'Cargo.lock'),(Join-Path $workspace 'Cargo.toml'),(Join-Path $workspace 'crates/oa-core/Cargo.toml'))+$sources+$selectedRecords+@($coreInputs|ForEach-Object {Join-Path $workspace $_.path})
$paths+=@($reference.boundScriptAndInputHashes.PSObject.Properties|ForEach-Object {Join-Path $evidence $_.Name})+@((Join-Path $evidence 'list.log'),$beforeCapture)
@@ -117,7 +137,7 @@
@($paths|ForEach-Object {(Resolve-Path -LiteralPath $_).Path}|Sort-Object -Unique|ForEach-Object {$item=Get-Item -LiteralPath $_;[ordered]@{path=$item.FullName;bytes=$item.Length;sha256=(Hash $item.FullName)}})
}
[void][IO.Directory]::CreateDirectory($Output)
-$before=@(Inputs);Save 'inputs-before.json' $before
+$before=@(Inputs);$sourceRecords=@(Select-SourceRecords $before $runtimeSourcePaths);Save 'inputs-before.json' $before
$PSNativeCommandUseErrorActionPreference=$false
$rustcVersion=@(& $rustc --version --verbose 2>&1|ForEach-Object ToString);$rustcExit=$LASTEXITCODE
$clangVersion=@(& $clang --version 2>&1|ForEach-Object ToString);$clangExit=$LASTEXITCODE
@@ -131,7 +151,7 @@
$end=[DateTime]::UtcNow.ToString('o')
$unchanged=$false;$failure=$null
try{
- $after=@(Inputs);Save 'inputs-after.json' $after
+ $after=@(Inputs);[void](Select-SourceRecords $after $runtimeSourcePaths);Save 'inputs-after.json' $after
if(($before|ConvertTo-Json -Depth 6 -Compress) -cne ($after|ConvertTo-Json -Depth 6 -Compress)){throw 'A source/link input changed'}
Assert-Source
Assert-CurrentNativeSource $evidence
@@ -145,6 +165,6 @@
if($runtimeInput.Count -ne 1 -or (Hash (Join-Path $Output 'libunwind.dll')) -cne $runtimeInput[0].sha256){throw 'Staged runtime differs from bound input'}
}catch{$unchanged=$false;$failure=$_.Exception.Message}
}
-Save 'build-receipt.json' @{source_commit=$pin;reference_receipt=$ReferenceReceipt;reference_receipt_sha256=(Hash $ReferenceReceipt);command=@($rustc)+$argsForRustc;start_utc=$start;end_utc=$end;exit_code=$exit;inputs_unchanged=$unchanged;postflight_failure=$failure;binary=$binary;source_files=@($before|Where-Object {$_.path -cin $runtimeSourcePaths});runtime_path=(Join-Path $Output 'libunwind.dll');runtime_bytes=(Get-Item -LiteralPath $RuntimeDll).Length;runtime_sha256=(Hash $RuntimeDll);before_manifest_sha256=(Hash (Join-Path $Output 'inputs-before.json'));after_manifest_sha256=if(Test-Path (Join-Path $Output 'inputs-after.json')){Hash (Join-Path $Output 'inputs-after.json')}else{$null};toolchain_sha256=(Hash (Join-Path $Output 'toolchain.json'));compile_log_sha256=(Hash (Join-Path $Output 'compile.log'));tests_executed=$false;scope='Core-only comparator compilation bound to the exact successful8bf desktop LIST, not a GUI/native gate. Source/cache link inputs are unchanged; execution remains separate.'}
+Save 'build-receipt.json' @{source_commit=$pin;native_verifier=@{path=$NativeVerifier;sha256=$NativeVerifierSha256};reference_receipt=$ReferenceReceipt;reference_receipt_sha256=(Hash $ReferenceReceipt);command=@($rustc)+$argsForRustc;start_utc=$start;end_utc=$end;exit_code=$exit;inputs_unchanged=$unchanged;postflight_failure=$failure;binary=$binary;source_files=$sourceRecords;runtime_path=(Join-Path $Output 'libunwind.dll');runtime_bytes=(Get-Item -LiteralPath $RuntimeDll).Length;runtime_sha256=(Hash $RuntimeDll);before_manifest_sha256=(Hash (Join-Path $Output 'inputs-before.json'));after_manifest_sha256=if(Test-Path (Join-Path $Output 'inputs-after.json')){Hash (Join-Path $Output 'inputs-after.json')}else{$null};toolchain_sha256=(Hash (Join-Path $Output 'toolchain.json'));compile_log_sha256=(Hash (Join-Path $Output 'compile.log'));tests_executed=$false;scope='Core-only comparator compilation bound to the exact successfulb10 desktop LIST, not a GUI/native gate. Source/cache link inputs are unchanged; execution remains separate.'}
if($exit -ne 0 -or -not $unchanged -or $null -eq $binary -or $binary.bytes -le 0){throw 'Isolated compilation or input provenance failed; preserve evidence'}
Write-Output 'Details comparator compiled only; self-check and saved-source comparison remain separate. No GUI/native acceptance.'
--- old/check.ps1
+++ b10/check.ps1
@@ -27,12 +27,12 @@
$build=Read-Json $BuildReceipt
$exe=(Resolve-Path -LiteralPath $OracleExe).Path
$buildDir=Split-Path -Parent ((Resolve-Path -LiteralPath $BuildReceipt).Path)
-if($build.source_commit -cne '8bf7607a3f3b53db0c36364f54f57674c64ea2f1' -or $build.exit_code -ne 0 -or -not $build.inputs_unchanged -or $null -ne $build.postflight_failure -or $build.binary.path -ine $exe -or $build.binary.sha256 -cne $OracleSha256 -or (Get-Item -LiteralPath $exe).Length -ne $build.binary.bytes){throw 'Successful exact8bf comparator build required'}
+if($build.source_commit -cne 'b10b28cefd1d0794073ba241a0c8de9a83e85f68' -or $build.exit_code -ne 0 -or -not $build.inputs_unchanged -or $null -ne $build.postflight_failure -or $build.binary.path -ine $exe -or $build.binary.sha256 -cne $OracleSha256 -or (Get-Item -LiteralPath $exe).Length -ne $build.binary.bytes){throw 'Successful exactb10 comparator build required'}
$proofFiles=@([ordered]@{name='inputs-before.json';sha=$build.before_manifest_sha256},[ordered]@{name='inputs-after.json';sha=$build.after_manifest_sha256},[ordered]@{name='toolchain.json';sha=$build.toolchain_sha256},[ordered]@{name='compile.log';sha=$build.compile_log_sha256})
foreach($f in $proofFiles){if((Hash (Join-Path $buildDir $f.name)) -cne $f.sha){throw 'Build evidence changed'}}
$buildBefore=@(Read-Json (Join-Path $buildDir 'inputs-before.json'));$buildAfter=@(Read-Json (Join-Path $buildDir 'inputs-after.json'))
if(($buildBefore|ConvertTo-Json -Depth 8 -Compress) -cne ($buildAfter|ConvertTo-Json -Depth 8 -Compress)){throw 'Build input manifests differ'}
-if(@($build.source_files).Count -lt 611){throw 'Complete source input binding missing'}
+if(@($build.source_files).Count -lt 612){throw 'Complete source input binding missing'}
$buildPaths=@{};foreach($f in $buildBefore){if($buildPaths.ContainsKey($f.path)){throw 'Duplicate build input'};$buildPaths[$f.path]=$f}
foreach($f in $build.source_files){if(-not $buildPaths.ContainsKey($f.path) -or $buildPaths[$f.path].bytes -ne $f.bytes -or $buildPaths[$f.path].sha256 -cne $f.sha256){throw 'Source record not bound by build manifest'}}
if((Hash $build.reference_receipt) -cne $build.reference_receipt_sha256){throw 'Closed list reference changed'}
@@ -40,11 +40,11 @@
$referenceCapture=Join-Path (Split-Path -Parent $build.reference_receipt) 'inputs-complete-list-after.json'
if($reference.base -cne $build.source_commit -or $reference.stage -cne 'list' -or $reference.cargoExitCode -ne 0 -or -not $reference.inputsUnchanged -or -not $reference.selectionValid -or (Hash $referenceCapture) -cne $reference.afterCaptureSha256){throw 'Exact successful list/source capture missing'}
$compiledSources=Read-Json $referenceCapture
-if($compiledSources.count -ne 611 -or @($compiledSources.files).Count -ne 611){throw 'Expected all611 compiled source inputs'}
+if($compiledSources.count -ne 612 -or @($compiledSources.files).Count -ne 612){throw 'Expected all612 compiled source inputs'}
foreach($f in $compiledSources.files){$path=(Resolve-Path -LiteralPath (Join-Path $reference.workspace $f.path)).Path;$match=@($build.source_files|Where-Object {$_.path -ieq $path});if($match.Count -ne 1 -or $match[0].bytes -ne $f.bytes -or $match[0].sha256 -cne $f.sha256){throw 'A compiled source file is missing from the build/runtime source binding'}}
Assert-Records $build.source_files
$runtime=Join-Path (Split-Path -Parent $exe) 'libunwind.dll'
-if($build.runtime_path -ine $runtime -or $build.runtime_sha256 -cne 'aa282fa47bb2c4e210cea5e470cdbdca58568f0be0bc73e404d86ab9cd95ef6a' -or (Hash $runtime) -cne $build.runtime_sha256 -or (Get-Item -LiteralPath $runtime).Length -ne $build.runtime_bytes){throw 'Actual adjacent runtime DLL differs from build binding'}
+if($build.runtime_bytes -ne 190464 -or $build.runtime_path -ine $runtime -or $build.runtime_sha256 -cne 'aa282fa47bb2c4e210cea5e470cdbdca58568f0be0bc73e404d86ab9cd95ef6a' -or (Hash $runtime) -cne $build.runtime_sha256 -or (Get-Item -LiteralPath $runtime).Length -ne $build.runtime_bytes){throw 'Actual adjacent runtime DLL differs from build binding'}
$catalog=Read-Json (Join-Path $PSScriptRoot 'expected-catalog.json')
$sourceManifest=Read-Json (Join-Path $PSScriptRoot 'source-inputs.json')
foreach($f in $sourceManifest.files){$path=(Resolve-Path -LiteralPath (Join-Path $PSScriptRoot $f.path)).Path;$matching=@($build.source_files|Where-Object {$_.path -ieq $path});if($matching.Count -ne 1 -or $matching[0].bytes -ne $f.bytes -or $matching[0].sha256 -cne $f.sha256){throw 'Current comparator source is not the compiled source'}}
--- old/validate-scripts.ps1
+++ b10/validate-scripts.ps1
@@ -6,4 +6,48 @@
if(@($errors).Count){throw ($errors|Out-String)}
[ordered]@{path=$name;bytes=(Get-Item -LiteralPath $path).Length;sha256=(Get-FileHash -LiteralPath $path -Algorithm SHA256).Hash.ToLowerInvariant()}
})
-[ordered]@{status='parsed';scripts=$records;compiler_executed=$false;oracle_executed=$false;scope='PowerShell syntax only. Rust self-checks prepared but unexecuted.'}|ConvertTo-Json -Depth 5
+# Load only the three pure guard definitions from the actual builder AST.
+$tokens=$null;$errors=$null
+$ast=[Management.Automation.Language.Parser]::ParseFile((Join-Path $PSScriptRoot 'build.ps1'),[ref]$tokens,[ref]$errors)
+foreach($name in @('Assert-ReviewedHash','Assert-ListPreparation','Select-SourceRecords')){
+ $nodes=@($ast.FindAll({param($n)$n -is [Management.Automation.Language.FunctionDefinitionAst] -and $n.Name -ceq $name},$true))
+ if($nodes.Count -ne 1){throw 'Pure guard definition missing/ambiguous'}
+ . ([scriptblock]::Create($nodes[0].Extent.Text))
+}
+$pin='b10b28cefd1d0794073ba241a0c8de9a83e85f68'
+$expectedPath=(Resolve-Path -LiteralPath (Join-Path $PSScriptRoot '../scenario-validation-gates-b10b28c-20260913/expected-inputs.json')).Path
+$actualExpected=Get-Content -Raw -LiteralPath $expectedPath|ConvertFrom-Json
+$expectedHash=(Get-FileHash -LiteralPath $expectedPath -Algorithm SHA256).Hash.ToLowerInvariant()
+$actualList=Get-Content -Raw -LiteralPath (Join-Path (Split-Path -Parent $expectedPath) 'list-receipt.json')|ConvertFrom-Json
+if($actualList.boundScriptAndInputHashes.'expected-inputs.json' -cne $expectedHash){throw 'Actual expected-inputs schema example is not LIST-bound'}
+$good=[ordered]@{reference=@{base=$pin;stage='list';cargoExitCode=0;selectionValid=$true;inputsUnchanged=$true;testBinaryBindingValid=$true;postflightFailure=$null;listSummaries=@(@{tests=1095;benchmarks=0})};selection=@{source_commit=$pin;expected_desktop_count=1095;expected_count=301};expected=$actualExpected}
+$json=$good|ConvertTo-Json -Depth 8
+Assert-ListPreparation $good.reference $good.selection $good.expected
+Assert-ReviewedHash ('a'*64) ('a'*64)
+$sourcePaths=@('C:\probe\main.rs','C:\probe\fixtures\incident.arcadia')
+$sourceRecords=@($sourcePaths|ForEach-Object {[pscustomobject]@{path=$_;bytes=1;sha256=('0'*64)}})
+if(@(Select-SourceRecords $sourceRecords $sourcePaths).Count -ne 2){throw 'Canonical source selection failed'}
+$cases=@(
+ @{name='old_source';mutate={param($v)$v.reference.base='8bf7607a3f3b53db0c36364f54f57674c64ea2f1'}},
+ @{name='not_list';mutate={param($v)$v.reference.stage='clippy'}},
+ @{name='failed_list';mutate={param($v)$v.reference.cargoExitCode=1}},
+ @{name='changed_inputs';mutate={param($v)$v.reference.inputsUnchanged=$false}},
+ @{name='missing_binary_binding';mutate={param($v)$v.reference.testBinaryBindingValid=$false}},
+ @{name='postflight_failure';mutate={param($v)$v.reference.postflightFailure='changed'}},
+ @{name='old_desktop_count';mutate={param($v)$v.selection.expected_desktop_count=1089}},
+ @{name='old_focused_count';mutate={param($v)$v.selection.expected_count=295}},
+ @{name='old_source_count';mutate={param($v)$v.expected.count=611}},
+ @{name='missing_source_record';mutate={param($v)$v.expected.files=@($v.expected.files|Select-Object -First 611)}},
+ @{name='extra_source_record';mutate={param($v)$v.expected.files=@($v.expected.files)+@($v.expected.files[0])}},
+ @{name='wrong_expected_source';mutate={param($v)$v.expected.base=('0'*40)}},
+ @{name='wrong_actual_listing';mutate={param($v)$v.reference.listSummaries[0].tests=1094}}
+)
+$rejections=@();foreach($case in $cases){$v=$json|ConvertFrom-Json;& $case.mutate $v;$rejected=$false;try{Assert-ListPreparation $v.reference $v.selection $v.expected}catch{$rejected=$true};if(-not $rejected){throw ('Admitted '+$case.name)};$rejections+=@($case.name)}
+foreach($hashes in @(@{actual=('b'*64);expected=('a'*64)},@{actual=('a'*64);expected=''})){
+ $rejected=$false;try{Assert-ReviewedHash $hashes.actual $hashes.expected}catch{$rejected=$true};if(-not $rejected){throw 'Unreviewed artifact hash admitted'};$rejections+=@('wrong_or_missing_reviewed_hash')
+}
+$badRecords=@([pscustomobject]@{path='C:\probe\main.rs';bytes=1;sha256=('0'*64)},[pscustomobject]@{path='C:\probe\oracle\..\fixtures\incident.arcadia';bytes=1;sha256=('0'*64)})
+foreach($case in @(@{name='missing_fixture';rows=@($sourceRecords[0])},@{name='uncanonical_fixture';rows=$badRecords},@{name='duplicate_fixture';rows=(@($sourceRecords)+@($sourceRecords[1]))})){
+ $rejected=$false;try{Select-SourceRecords $case.rows $sourcePaths|Out-Null}catch{$rejected=$true};if(-not $rejected){throw ('Admitted '+$case.name)};$rejections+=@($case.name)
+}
+[ordered]@{status='passed';scripts=$records;positive_cases=3;negative_cases=$rejections;actual_expected_inputs=@{path=$expectedPath;sha256=$expectedHash;base=$actualExpected.base;count=$actualExpected.count;file_count=@($actualExpected.files).Count};compiler_executed=$false;oracle_executed=$false;gate_admitted=$false;scope='AST and actual pure builder guards only, with synthetic metadata. Actual LIST-bound expected-inputs schema read; no full gate/fingerprint selection or source admission executed.'}|ConvertTo-Json -Depth 8