feat(streaming): shadow-publish flat collision assets

Carry one immutable prepared collision closure with each accepted near-tier generation and install graph plus flat views through the same retained publication receipt. Apply the same strict package-only rule to live entities, add exact sampled graph-authoritative comparison artifacts and lifecycle counters, and prove cancellation, demotion, rehydrate, revisit, teardown, reconnect, and the nine-stop route with 14,064 zero-mismatch samples.

Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-25 16:38:54 +02:00
parent f7ff9f4eea
commit d9446030e6
32 changed files with 2777 additions and 92 deletions

View file

@ -5,7 +5,8 @@ param(
[string]$Password = $env:ACDREAM_TEST_PASS,
[string]$AceLogPath = 'C:\ACE\Server\ACE_Log.txt',
[switch]$SkipBuild,
[int]$SessionTimeoutSeconds = 420
[int]$SessionTimeoutSeconds = 420,
[int]$CollisionShadowEvery = 0
)
Set-StrictMode -Version Latest
@ -178,6 +179,24 @@ function Validate-Checkpoint([string]$SessionLabel, [object]$Checkpoint) {
if ($null -eq $resources.lastFrameProfile) {
$failures.Add("${SessionLabel}/${name}: no frame-profiler sample was available")
}
if ($CollisionShadowEvery -gt 0) {
$shadow = $resources.PSObject.Properties['collisionShadow']
if ($null -eq $shadow) {
$failures.Add("${SessionLabel}/${name}: collision shadow counters are missing")
}
else {
foreach ($field in @('mismatches', 'faults')) {
$property = $shadow.Value.PSObject.Properties[$field]
if ($null -eq $property) {
$failures.Add("${SessionLabel}/${name}: collisionShadow.$field is missing")
}
elseif ([long]$property.Value -ne 0) {
$failures.Add(
"${SessionLabel}/${name}: collisionShadow.$field=$($property.Value), expected zero")
}
}
}
}
}
function Invoke-Session(
@ -193,6 +212,7 @@ function Invoke-Session(
$stdout = Join-Path $sessionDir 'stdout.log'
$stderr = Join-Path $sessionDir 'stderr.log'
$timeline = Join-Path $artifactDir 'world-lifecycle.checkpoints.jsonl'
$collisionShadowDir = Join-Path $artifactDir 'collision-shadow'
$client = $null
$clientPort = $null
$graceful = $false
@ -215,6 +235,10 @@ function Invoke-Session(
$env:ACDREAM_AUTOMATION_ARTIFACT_DIR = $artifactDir
$env:ACDREAM_DUMP_MOVE_TRUTH = $null
$env:ACDREAM_WB_DIAG = $null
$env:ACDREAM_COLLISION_SHADOW_EVERY =
if ($CollisionShadowEvery -gt 0) { "$CollisionShadowEvery" } else { $null }
$env:ACDREAM_COLLISION_SHADOW_DIR =
if ($CollisionShadowEvery -gt 0) { $collisionShadowDir } else { $null }
try {
$client = Start-Process -FilePath $exe -WorkingDirectory $Repository `
@ -248,6 +272,24 @@ function Invoke-Session(
}
}
foreach ($checkpoint in $checkpoints) { Validate-Checkpoint $Label $checkpoint }
if ($CollisionShadowEvery -gt 0 -and $checkpoints.Count -gt 0) {
$lastShadow = $checkpoints[-1].resources.PSObject.Properties['collisionShadow']
$samples = if ($null -ne $lastShadow) {
$lastShadow.Value.PSObject.Properties['samples']
}
if ($null -eq $samples -or [long]$samples.Value -le 0) {
$failures.Add("${Label}: collision shadow did not sample any query")
}
$mismatchArtifacts = @(
Get-ChildItem -LiteralPath $collisionShadowDir `
-Filter 'collision-shadow-*.json' `
-File `
-ErrorAction SilentlyContinue)
if ($mismatchArtifacts.Count -ne 0) {
$failures.Add(
"${Label}: collision shadow emitted $($mismatchArtifacts.Count) mismatch artifact(s)")
}
}
foreach ($name in $ExpectedScreenshots) {
$png = Join-Path $artifactDir "screenshots\$name.png"
@ -373,6 +415,7 @@ $report = [pscustomobject][ordered]@{
Commit = (& git -C $Repository rev-parse HEAD).Trim()
SourceStatus = @(& git -C $Repository status --short)
SessionName = $env:SESSIONNAME
CollisionShadowEvery = $CollisionShadowEvery
VideoControllers = @(Get-CimInstance Win32_VideoController -ErrorAction SilentlyContinue |
ForEach-Object { [pscustomobject]@{
Name = $_.Name