mirror of
https://github.com/SK8-ENGINE/skate-3-rust-engine.git
synced 2026-10-26 19:47:44 +00:00
Isolate Windows test builds and verify dependency source provenance
This commit is contained in:
1 parent
f96be1dd10
commit
b02ae97fde
3 files changed
+86
No files matched your search
@@ -12,6 +12,33 @@ Coverage limits: a Windows unhandled-exception filter attempts a fixed, allocati
|
||||
|
||||
For manual UI validation, run the executable with `--crash-report-preview`. This generates a clearly synthetic report and opens the popup without initializing the game, setup, Steam or assets. Check Copy report, clipboard text, Open folder, saved UTF-8 text and Close. Static tests do not validate desktop presentation.
|
||||
|
||||
## Mixed-worktree dependency in f96be1d (2026-09-09)
|
||||
|
||||
The DownTown report at tick1020 repeats the nonfinite walking result before
|
||||
the swept-line rejection. The full local stderr retains the finite GroundJob
|
||||
and tiny surface components omitted from the bounded report.
|
||||
|
||||
The matching shipped PDB establishes that `movement_velocity/math.rs` was
|
||||
compiled from worktree `8186`, with SHA-256
|
||||
`4652072df4a51a6bf8eb2dd837e61d4fb6e01710d984334af8073deb4c4449ac`.
|
||||
That source lacks the earlier subnormal refinement fix. The intended source
|
||||
in this worktree has SHA-256
|
||||
`76de0780adb5ea015c57fa4118105669f1897ef01eafb611eed14cc829c5eda1`.
|
||||
The game build ID identified the game crate, but did not establish the identity
|
||||
of reused path dependencies. Matching EXE/PDB GUIDs alone did not catch this.
|
||||
|
||||
`tools/build_verified_windows.ps1` now builds into a private
|
||||
`target/verified-windows` under the current worktree. Its verification step
|
||||
reads PDB source checksums and requires both current-worktree paths and matching
|
||||
SHA-256 for referenced project crates and vendored Bevy sources. It fails closed
|
||||
when required game/core/data source records are missing. The old shipped PDB
|
||||
fails this check (619 mismatched path/checksum entries).
|
||||
|
||||
Use this build script for subsequent crash-test builds and retain its
|
||||
`source-checks.json` with the staged EXE/PDB and existing import/hash manifest.
|
||||
Do not share Cargo artifact directories between independently edited worktrees.
|
||||
This repair changes build provenance, not gameplay rules or collision validation.
|
||||
|
||||
## Walking velocity convergence (2026-09-09)
|
||||
|
||||
Observed user failure: clean revision `dff672a`, build timestamp
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
param([Parameter(Mandatory=$true)][string]$OutputDirectory)
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$sourceRoot = Split-Path -Parent $PSScriptRoot
|
||||
$outputPath = [IO.Path]::GetFullPath($OutputDirectory)
|
||||
if (Test-Path -LiteralPath $outputPath) { throw "Build output already exists: $outputPath" }
|
||||
New-Item -ItemType Directory -Path $outputPath | Out-Null
|
||||
# Never share path-dependency artifacts between concurrently edited worktrees.
|
||||
$targetPath = Join-Path $sourceRoot 'target/verified-windows'
|
||||
$previousFlags = $env:CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_RUSTFLAGS
|
||||
Push-Location $sourceRoot
|
||||
try {
|
||||
$env:CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_RUSTFLAGS = '-C target-feature=+crt-static'
|
||||
cargo rustc --release --locked --target x86_64-pc-windows-msvc --target-dir $targetPath -p skate-game --bin skate3rust --no-default-features -- -C extra-filename= -o "$outputPath/skate3rust.exe" -C "link-arg=/PDB:$outputPath/skate3rust.pdb" *> "$outputPath/compile.log"
|
||||
if ($LASTEXITCODE -ne 0) { Get-Content "$outputPath/compile.log" -Tail 40; throw 'Game build failed' }
|
||||
& "$PSScriptRoot/verify_windows_build_sources.ps1" -Pdb "$outputPath/skate3rust.pdb" -SourceRoot $sourceRoot -ReportPath "$outputPath/source-checks.json"
|
||||
} finally {
|
||||
$env:CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_RUSTFLAGS = $previousFlags
|
||||
Pop-Location
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
param(
|
||||
[Parameter(Mandatory=$true)][string]$Pdb,
|
||||
[string]$SourceRoot = (Split-Path -Parent $PSScriptRoot),
|
||||
[string]$ReportPath
|
||||
)
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$sourcePrefix = [IO.Path]::GetFullPath($SourceRoot).TrimEnd('\', '/') + '\'
|
||||
$pdbutil = Join-Path $env:ProgramFiles 'LLVM/bin/llvm-pdbutil.exe'
|
||||
$dump = & $pdbutil dump --files $Pdb
|
||||
if ($LASTEXITCODE -ne 0) { throw 'PDB source inspection failed' }
|
||||
$checked = @{}
|
||||
$failures = [Collections.Generic.List[string]]::new()
|
||||
foreach ($line in $dump) {
|
||||
if ($line -notmatch '^- \(SHA-256: ([0-9A-Fa-f]{64})\) (.+)$') { continue }
|
||||
$compiledHash = $Matches[1]
|
||||
$compiledPath = $Matches[2].Replace('/', '\')
|
||||
if ($compiledPath -notmatch '\\((?:crates\\skate-[^\\]+|vendor\\bevy_[^\\]+)\\.+)$') { continue }
|
||||
$relative = $Matches[1]
|
||||
$key = "$compiledPath|$compiledHash"
|
||||
if ($checked.ContainsKey($key)) { continue }
|
||||
$expectedPath = Join-Path $sourcePrefix $relative
|
||||
$sourceHash = if (Test-Path -LiteralPath $expectedPath -PathType Leaf) {
|
||||
(Get-FileHash -LiteralPath $expectedPath -Algorithm SHA256).Hash
|
||||
} else { $null }
|
||||
$matchesRoot = $compiledPath.StartsWith($sourcePrefix, [StringComparison]::OrdinalIgnoreCase)
|
||||
$matchesHash = $sourceHash -eq $compiledHash
|
||||
$checked[$key] = [ordered]@{ file=$relative; compiledPath=$compiledPath; compiledSha256=$compiledHash; sourceSha256=$sourceHash; matchesRoot=$matchesRoot; matchesHash=$matchesHash }
|
||||
if (-not $matchesRoot -or -not $matchesHash) { $failures.Add($relative) }
|
||||
}
|
||||
foreach ($crate in @('skate-core', 'skate-data', 'skate-game')) {
|
||||
if (-not ($checked.Values | Where-Object { $_.file.StartsWith("crates\$crate\") })) {
|
||||
$failures.Add("No source checksums found for $crate")
|
||||
}
|
||||
}
|
||||
if ($ReportPath) {
|
||||
[ordered]@{ pdb=[IO.Path]::GetFullPath($Pdb); sourceRoot=$sourcePrefix; passed=($failures.Count -eq 0); files=@($checked.Values | Sort-Object file,compiledPath) } |
|
||||
ConvertTo-Json -Depth 5 | Set-Content -LiteralPath $ReportPath -Encoding utf8
|
||||
}
|
||||
if ($failures.Count) { throw "PDB source provenance failed for $($failures.Count) entries: $(($failures | Select-Object -First 8) -join ', ')" }
|
||||
Write-Output "Verified $($checked.Count) workspace source checksums and paths in $Pdb"
|
||||
Reference in new issue
Block a user