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

@ -8,7 +8,8 @@ param(
[switch]$DenseTown,
[switch]$CaptureContention,
[switch]$SkipRuntimeCounters,
[int]$LoginTimeoutSeconds = 90
[int]$LoginTimeoutSeconds = 90,
[int]$CollisionShadowEvery = 0
)
Set-StrictMode -Version Latest
@ -67,6 +68,7 @@ $markerLog = "$prefix.markers.log"
$sampleCsv = "$prefix.samples.csv"
$reportJson = "$prefix.report.json"
$artifactDir = "$prefix.artifacts"
$collisionShadowDir = Join-Path $artifactDir 'collision-shadow'
$checkpointTimeline = Join-Path $artifactDir 'world-lifecycle.checkpoints.jsonl'
$frameHistory = Join-Path $artifactDir 'frame-history.csv'
$frameSummary = Join-Path $artifactDir 'frame-history-summary.json'
@ -440,6 +442,26 @@ function Add-CanonicalCheckpointFailures([Diagnostics.Process]$Client) {
}
}
if ($CollisionShadowEvery -gt 0) {
$shadow = $checkpoint.resources.PSObject.Properties['collisionShadow']
if ($null -eq $shadow) {
$failures.Add("canonical checkpoint '$expectedName' is missing resources.collisionShadow")
}
else {
foreach ($field in @('mismatches', 'faults')) {
$property = $shadow.Value.PSObject.Properties[$field]
if ($null -eq $property) {
$failures.Add(
"canonical checkpoint '$expectedName' is missing resources.collisionShadow.$field")
}
elseif ([long]$property.Value -ne 0) {
$failures.Add(
"canonical checkpoint '$expectedName' has resources.collisionShadow.$field=$($property.Value), expected zero")
}
}
}
}
$streamingWork =
$checkpoint.resources.PSObject.Properties['streamingWork']
if ($null -eq $streamingWork) {
@ -753,6 +775,10 @@ $env:ACDREAM_AUTOMATION_ARTIFACT_DIR = $artifactDir
$env:ACDREAM_DUMP_MOVE_TRUTH = '1'
$env:ACDREAM_NO_AUDIO = $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 }
# Machine-readable disclosure of the exact launch configuration (2026-07-24
# measurement-tooling review — the prior audit could only see
@ -781,6 +807,7 @@ $envDisclosure = [pscustomobject][ordered]@{
DenseTown = [bool]$DenseTown
CaptureContention = [bool]$CaptureContention
RuntimeCounters = -not [bool]$SkipRuntimeCounters
CollisionShadowEvery = $CollisionShadowEvery
Route = $routeFileName
EnvironmentVariables = @($acdreamEnvVars)
}
@ -897,6 +924,25 @@ try {
30
$canonicalCheckpoints = @(Read-CanonicalCheckpoints)
Add-CanonicalCheckpointFailures $process
if ($CollisionShadowEvery -gt 0 -and $canonicalCheckpoints.Count -gt 0) {
$lastShadow =
$canonicalCheckpoints[-1].resources.PSObject.Properties['collisionShadow']
$shadowSamples = if ($null -ne $lastShadow) {
$lastShadow.Value.PSObject.Properties['samples']
}
if ($null -eq $shadowSamples -or [long]$shadowSamples.Value -le 0) {
$failures.Add('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(
"collision shadow emitted $($mismatchArtifacts.Count) mismatch artifact(s)")
}
}
if (-not $DenseTown) {
Add-RelativeGateFailures
}
@ -980,6 +1026,7 @@ finally {
BinaryCommit = $binaryCommit
BinaryMatchesSource = $binaryMatchesSource
SessionName = $env:SESSIONNAME
CollisionShadowEvery = $CollisionShadowEvery
ExitCode = $exitCode
GracefulExit = $gracefulExit
Failures = @($failures)

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