diff --git a/deploy/windows/Open-TimeProfileReceiptWindow.ps1 b/deploy/windows/Open-TimeProfileReceiptWindow.ps1 index e1970ff..8927924 100644 --- a/deploy/windows/Open-TimeProfileReceiptWindow.ps1 +++ b/deploy/windows/Open-TimeProfileReceiptWindow.ps1 @@ -7,7 +7,7 @@ $deadline = [DateTimeOffset]::UtcNow.AddMinutes(12) if ($deadline -gt $until) { $deadline = $until } if ($deadline -le [DateTimeOffset]::UtcNow) { throw 'Das Wartungsfenster ist abgelaufen.' } -$base = 'https://gitea.incoso.eu/kevin_janssen/rust-discovery/raw/commit/577132fb422bf854276b3afb5bafdb12d2c08427/deploy/windows' +$base = 'https://gitea.incoso.eu/kevin_janssen/rust-discovery/raw/commit/9a6599fddd6ba08ca92e5675fdfa004895603b04/deploy/windows' $bootstrap = 'C:\ProgramData\RustDiscoveryBootstrap' $caseId = 'ad9fd154-b2be-4f5d-9e17-65abb721ceaf' $case = Join-Path $bootstrap "time-profile-$caseId" @@ -24,7 +24,7 @@ $null = New-Item -ItemType Directory -Path $work $listener = $null $ssh = $null $scripts = [ordered]@{ - 'Complete-OriginalTimeProfile.ps1' = '5ad85ae7a3a513d3cc2f5f5dca3e48eb42fd863522c3384f9c64cdcf0273ef1a' + 'Complete-OriginalTimeProfile.ps1' = 'a316440d3fc79d3c9350199418ff8d4b0e2215a5c989a16e997784c7ec1c5f7c' 'Read-PassiveTimeSamples.ps1' = 'd9e2b9344c19af1296b86ec70ba754ef820f369ac5ec897979bd4233e0722d04' } try { @@ -45,21 +45,33 @@ try { $ssh = Start-Process -FilePath "$sshBin\ssh.exe" -ArgumentList $options -PassThru -NoNewWindow if ($ssh.WaitForExit(1800)) { throw "SSH Exit $($ssh.ExitCode)" } Write-Host 'Wartungsfenster aktiv. Dieses Fenster offen lassen. Strg+C beendet es.' - $receipt = [ordered]@{session=$session; case_id=$caseId; phase='preflight'; read_only_channel=$true} - $result = Join-Path $case 'result.json' + $receipt = [ordered]@{session=$session; case_id=$caseId; method='initial_create'; phase='preflight'; read_only_channel=$true} + $result = Join-Path $case 'console-initial-create-result.json' try { if (!(Test-Path -LiteralPath $result)) { - $null = & (Join-Path $work 'Complete-OriginalTimeProfile.ps1') + $null = & (Join-Path $work 'Complete-OriginalTimeProfile.ps1') -InitialCreate } $record = Get-Content -LiteralPath $result -Raw | ConvertFrom-Json $actual = Get-FileHash -LiteralPath 'C:\ProgramData\RustDiscoverySystem\time-attestation.json' if ($record.id -cne $caseId -or $record.installed -ne $true -or - $record.console_finalized -ne $true -or $record.clock_runtime_qualified -ne $false -or + $record.initial_create -ne $true -or $record.source_candidate_preserved -ne $true -or + $record.services_changed -ne $false -or $record.private_key_read -ne $false -or $record.clock_runtime_qualified -ne $false -or $actual.Hash -ne '2b4a8a7080770304b80e2a665fa5f5ee1ebbd9182e7c80b184e75b114575b42b') { throw 'Unexpected publication result' } - $marker = Get-Content -LiteralPath (Join-Path $case 'console-finalization-intent.json') -Raw | ConvertFrom-Json - if ($marker.id -cne $caseId -or $marker.config_sha256 -ne $actual.Hash) { throw 'Unexpected finalization intent' } + $marker = Get-Content -LiteralPath (Join-Path $case 'console-initial-create-intent.json') -Raw | ConvertFrom-Json + if ($marker.id -cne $caseId -or $marker.utc -cne $record.publication_since -or + $marker.config_sha256 -ne $actual.Hash -or $record.configuration.sha256 -ne $actual.Hash -or + $record.original_candidate.file_id -cne '6d990300000003000000000000000000' -or + $record.configuration.file_id -cnotmatch '^[0-9a-f]{32}$' -or $record.configuration.file_id -ceq '6d990300000003000000000000000000') { throw 'Unexpected finalization intent' } $receipt.phase = 'published' - $receipt.publication_since = $marker.utc + $receipt.publication_since = $record.publication_since + $receipt.initial_create = $record.initial_create + $receipt.source_candidate_preserved = $record.source_candidate_preserved + $receipt.services_changed = $record.services_changed + $receipt.private_key_read = $record.private_key_read + $receipt.clock_runtime_qualified = $record.clock_runtime_qualified + $receipt.source_id = $record.original_candidate.file_id + $receipt.target_id = $record.configuration.file_id + $receipt.config_sha256 = $actual.Hash.ToLowerInvariant() $receipt.result_sha256 = (Get-FileHash -LiteralPath $result).Hash } catch { $receipt.phase = 'finalization_failed' @@ -67,10 +79,10 @@ try { $receipt.line = $_.InvocationInfo.ScriptLineNumber $receipt.file = [IO.Path]::GetFileName($_.InvocationInfo.ScriptName) Write-Warning $_.Exception.Message - $failurePath = Join-Path $case 'console-finalization-error.json' + $failurePath = Join-Path $case 'console-initial-create-error.json' if (Test-Path -LiteralPath $failurePath) { $failure = Get-Content -LiteralPath $failurePath -Raw | ConvertFrom-Json - if ($failure.id -ceq $caseId -and $failure.hresult -cmatch '^0x[0-9A-Fa-f]{8}$') { $receipt.move_hresult = $failure.hresult } + if ($failure.id -ceq $caseId -and $failure.hresult -cmatch '^0x[0-9A-Fa-f]{8}$') { $receipt.hresult = $failure.hresult; if ($failure.phase -cmatch '^[A-Za-z][A-Za-z0-9_.-]{0,63}$') { $receipt.failure_phase = $failure.phase } } } } $readScript = Join-Path $work 'Read-PassiveTimeSamples.ps1' diff --git a/docs/windows-time-profile-config.md b/docs/windows-time-profile-config.md index e02a75f..f7e3060 100644 --- a/docs/windows-time-profile-config.md +++ b/docs/windows-time-profile-config.md @@ -420,3 +420,11 @@ falsche .NET-Überladung; nach Angabe des Typs bestand die Prüfung. Der Original-Kandidaten-/FileID-Vergleich und die acht bisherigen Profilfixtures bestanden ebenfalls. Dieser Stand wurde auf der Windows-VM noch nicht ausgeführt. + +Das passende Konsolenfenster ruft ausschließlich die Variante `-InitialCreate` +auf. Der neue Empfänger `time-profile-receipt-f0488aba` war vor Übergabe des +Befehls aktiv und hat die erwartete Geräte- und Gatewaybindung geprüft. Er +unterscheidet die neue Rückmeldung von der alten Move-Fehlermeldung und +speichert die Erstveröffentlichung und den signierten Rollenvergleich getrennt. +Für diesen Skriptstand liegen bei Bereitstellung ausschließlich lokale Prüfungen +vor. Die Bestätigung der VM steht aus.