Compare Windows maintenance state structurally and reject colliding object keys
Rust development slice / linux (push) Failing after 6s
Rust development slice / linux (push) Failing after 6s
This commit is contained in:
@@ -70,6 +70,19 @@ def controller():
|
||||
# calibration/public-time-pin file or changes the six-field passive config.
|
||||
marker = 'function State([bool]$new){\n'
|
||||
prefix = replace_once(prefix, marker, marker + " if(Test-Path -LiteralPath (Join-Path $helperRoot 'time-attestation.json')){throw 'Separate time-pin provisioning required; passive bootstrap does not adopt it'}\n")
|
||||
# Compare JSON objects by their contents; serialized member order is not
|
||||
# identity. Arrays retain exact order and empty/null values stay distinct.
|
||||
prefix = replace_once(prefix,
|
||||
"function JsonEqual($a,$b){return(($a|ConvertTo-Json -Depth 40 -Compress)-ceq($b|ConvertTo-Json -Depth 40 -Compress))}",
|
||||
r'''function CanonicalStateValue($value,[int]$depth=0){
|
||||
if($depth-gt40){throw 'Bounded state comparison depth'}
|
||||
if($null-eq$value){return $null}
|
||||
if($value-is[Collections.IDictionary]){$result=[ordered]@{};foreach($key in @($value.Keys|Sort-Object -CaseSensitive)){if($key-isnot[string]-or$result.Contains($key)){throw 'Nonunique state object key'};$result[$key]=CanonicalStateValue $value[$key] ($depth+1)};return $result}
|
||||
if($value-is[pscustomobject]){$result=[ordered]@{};foreach($property in @($value.PSObject.Properties|Sort-Object -Property Name -CaseSensitive)){if($property.Name-isnot[string]-or$result.Contains($property.Name)){throw 'Nonunique state object key'};$result[$property.Name]=CanonicalStateValue $property.Value ($depth+1)};return $result}
|
||||
if($value-is[Collections.IEnumerable]-and$value-isnot[string]){$result=New-Object 'Collections.Generic.List[object]';foreach($item in $value){$result.Add((CanonicalStateValue $item ($depth+1)))};return ,$result.ToArray()}
|
||||
return $value
|
||||
}
|
||||
function JsonEqual($a,$b){return((ConvertTo-Json -InputObject (CanonicalStateValue $a) -Depth 40 -Compress)-ceq(ConvertTo-Json -InputObject (CanonicalStateValue $b) -Depth 40 -Compress))}''')
|
||||
native = prior.NATIVE.replace('RmmPipeNative', 'RmmSignedClockPairNative')
|
||||
phases = prior.PHASES.replace('SystemPipeUpgrade.ps1', 'SignedClockPairUpgrade.ps1').replace('RmmPipeNative', 'RmmSignedClockPairNative')
|
||||
# No implicit fallthrough may become an effect, even if a future caller
|
||||
|
||||
@@ -208,3 +208,24 @@ Root qualifiziert zuerst das notwendige neue Agentimage; Helper5967 bleibt
|
||||
unverändert. Danach neue feste Image-/Controllerbindung und neue Baseline vor
|
||||
**einem** tatsächlichen Paarwechsel. Der fehlgeschlagene5c-Versuch wird dabei
|
||||
weder wiederholt noch als Erfolg ausgegeben.
|
||||
|
||||
## JsonEqual-Korrektur eng geprüft und nativ belegt
|
||||
|
||||
Der unabhängige Quellenreview fand im ersten Normalisierer einen zusätzlichen
|
||||
Randfehler: ein case-sensitives IDictionary mit `A` und `a` hätte beim Kopieren
|
||||
in eine case-insensitive OrderedDictionary einen Wert verlieren können. Beide
|
||||
Objektzweige verweigern nun vor dem Einfügen Nichtstringkeys oder bereits
|
||||
vorhandene kollidierende Namen. Bestehende feste Native-State-DTOs erzeugen
|
||||
solche Kollisionen nicht; der zusätzliche Pfad ist trotzdem geschlossen.
|
||||
|
||||
Unabhängiger enger Re-review der Quelle
|
||||
`4ef8c6787fd3defdd8416401b3b40dd63be0e3afffc195736eed0ce350286201`
|
||||
ohne weiteren konkreten Befund. Nativ anschließend sechs feste In-Memory-Guards
|
||||
bestanden: ursprüngliche fünf Fälle plus case-kollidierendes
|
||||
`Dictionary(StringComparer.Ordinal)` wird verweigert. ResultSHA
|
||||
`2429b869792854ac799c403422e26561df2b2c5310b408e6a7287751129c2a94`
|
||||
im erhaltenen5c-Fall, `comparison-collision-guard-result.json`.
|
||||
Pythoncompile und bestehende Quellguards ebenfalls PASS. Kein Service-/Datei-/
|
||||
Jobeffekt und weiterhin keine26dc-Installation. Der folgende Agentkandidat wird
|
||||
separat durch Root qualifiziert; Controller-/Payloadbindung und neuer echter
|
||||
Baselinebeleg werden erst mit dessen endgültigem Artefakt erzeugt.
|
||||
|
||||
Reference in New Issue
Block a user