65 lines
3.0 KiB
Diff
65 lines
3.0 KiB
Diff
--- .local\native-repair-union-33e30c1\preflight.py
|
|
+++ .local\native-repair-union-33e30c1-r2\preflight.py
|
|
@@ -5,6 +5,7 @@
|
|
import hashlib
|
|
import json
|
|
import os
|
|
+import re
|
|
import subprocess
|
|
import tomllib
|
|
|
|
@@ -33,6 +34,20 @@
|
|
|
|
def digest(data):
|
|
return hashlib.sha256(data).hexdigest()
|
|
+
|
|
+
|
|
+def canonical_gate_status(status):
|
|
+ """Normalize only UTC timestamp spelling, preserving all seven 100 ns digits."""
|
|
+ normalized = dict(status)
|
|
+ for field in ('started_utc', 'completed_utc'):
|
|
+ value = status.get(field)
|
|
+ require(isinstance(value, str), f'Missing/string-invalid gate timestamp: {field}')
|
|
+ match = re.fullmatch(r'([0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2})(?:\.([0-9]{1,7}))?Z', value)
|
|
+ require(match is not None, f'Gate timestamp requires strict UTC Z format: {field}')
|
|
+ # Validate calendar/time without parsing (or truncating) the fractional digits.
|
|
+ datetime.datetime.strptime(match.group(1), '%Y-%m-%dT%H:%M:%S')
|
|
+ normalized[field] = match.group(1) + '.' + (match.group(2) or '').ljust(7, '0') + 'Z'
|
|
+ return normalized
|
|
|
|
|
|
def ordinary(path):
|
|
@@ -137,7 +152,9 @@
|
|
and manifest['input_manifest_sha256'].lower() == FREEZE
|
|
and manifest['verified_inputs'] == 530 and manifest['verified_input_bytes'] == 9727025,
|
|
'Binary manifest is not the matching freeze')
|
|
- require(manifest['gate_statuses'] == statuses, 'Preserved gate records differ from terminal statuses')
|
|
+ require({name: canonical_gate_status(status) for name, status in manifest['gate_statuses'].items()}
|
|
+ == {name: canonical_gate_status(status) for name, status in statuses.items()},
|
|
+ 'Preserved gate records differ from terminal statuses (UTC precision canonicalized)')
|
|
verified = read_json(GATES / 'verify-after-build.json')
|
|
require(verified.get('pass') is True and verified['mode'] == 'verify-head'
|
|
and verified['files'] == 530 and verified['bytes'] == 9727025
|
|
--- .local\package-preview-repair-union.ps1
|
|
+++ .local\package-preview-repair-union-r2.ps1
|
|
@@ -6,7 +6,7 @@
|
|
$ErrorActionPreference = 'Stop'
|
|
$packageMain = [IO.Path]::GetFullPath((Join-Path $PSScriptRoot '..'))
|
|
$packageRepo = Join-Path $PSScriptRoot 'canvas-union-ytr83r-20260911'
|
|
-$packageRoot = Join-Path $PSScriptRoot 'native-repair-union-33e30c1'
|
|
+$packageRoot = Join-Path $PSScriptRoot 'native-repair-union-33e30c1-r2'
|
|
$packagePython = 'C:/Users/User/.cache/codex-runtimes/codex-primary-runtime/dependencies/python/python.exe'
|
|
$packageVersion = '0.2.0-preview.canvas-repair.20260912'
|
|
$packageTarget = 'x86_64-pc-windows-gnullvm'
|
|
--- .local\extract-preview-repair-union.py
|
|
+++ .local\extract-preview-repair-union-r2.py
|
|
@@ -7,7 +7,7 @@
|
|
import shutil
|
|
import zipfile
|
|
|
|
-ROOT = Path(__file__).resolve().parent / 'native-repair-union-33e30c1'
|
|
+ROOT = Path(__file__).resolve().parent / 'native-repair-union-33e30c1-r2'
|
|
NAME = 'ArcadiaStudio-0.2.0-preview.canvas-repair.20260912-x86_64-pc-windows-gnullvm'
|
|
SOURCE = '33e30c1cd7a6c99513a0ebd02ba68fccbad8f58d'
|
|
|