fix: stabilize V3.4 hybrid FLF continuation

This commit is contained in:
ukr8b3g-cmyk
2026-08-21 13:18:17 +09:00
parent a03b496d4f
commit d3dab7bcb0
9 changed files with 495 additions and 18 deletions
+37
View File
@@ -0,0 +1,37 @@
param(
[string]$Source = (Split-Path -Parent $PSScriptRoot),
[string]$SnapshotRoot = 'D:\Codex\_snapshots\ComfyUI-H3-Continuum',
[string]$Label = 'pre-change'
)
$ErrorActionPreference = 'Stop'
$sourcePath = (Resolve-Path -LiteralPath $Source).Path
$stamp = Get-Date -Format 'yyyyMMdd_HHmmss'
$safeLabel = $Label -replace '[^A-Za-z0-9._-]', '-'
$destination = Join-Path $SnapshotRoot "$safeLabel-$stamp"
$rootFull = [IO.Path]::GetFullPath($SnapshotRoot)
$destinationFull = [IO.Path]::GetFullPath($destination)
if (-not $destinationFull.StartsWith($rootFull, [StringComparison]::OrdinalIgnoreCase)) {
throw 'Snapshot destination escaped the configured snapshot root.'
}
New-Item -ItemType Directory -Path $destination -Force | Out-Null
Get-ChildItem -LiteralPath $sourcePath -Force |
Where-Object { $_.Name -ne '.git' } |
ForEach-Object { Copy-Item -LiteralPath $_.FullName -Destination $destination -Recurse -Force }
$sourceCount = (Get-ChildItem -LiteralPath $sourcePath -Recurse -Force -File |
Where-Object { $_.FullName -notmatch '[\\/]\.git[\\/]' } |
Measure-Object).Count
$destinationCount = (Get-ChildItem -LiteralPath $destination -Recurse -Force -File | Measure-Object).Count
if ($sourceCount -ne $destinationCount) {
throw "Snapshot verification failed: source=$sourceCount destination=$destinationCount"
}
[pscustomobject]@{
Source = $sourcePath
Snapshot = $destination
Files = $destinationCount
}
+29
View File
@@ -0,0 +1,29 @@
param(
[string]$Python = 'python',
[string]$ComfyRoot = '',
[switch]$SkipTests,
[switch]$SkipRuntime
)
$ErrorActionPreference = 'Stop'
$repository = Split-Path -Parent $PSScriptRoot
Push-Location $repository
try {
& $Python -m compileall -q .
if ($LASTEXITCODE -ne 0) { throw 'compileall failed' }
if (-not $SkipTests) {
& $Python -m pytest -q
if ($LASTEXITCODE -ne 0) { throw 'pytest failed' }
}
if (-not $SkipRuntime) {
$arguments = @('tools/verify_runtime.py')
if ($ComfyRoot) { $arguments += @('--comfy-root', $ComfyRoot) }
& $Python @arguments
if ($LASTEXITCODE -ne 0) { throw 'runtime verification failed' }
}
}
finally {
Pop-Location
}