From e6c6c21397fb417aa6b235a3c16ba3d397deaf7f Mon Sep 17 00:00:00 2001 From: Kevin Janssen Date: Mon, 16 Nov 2026 22:46:30 +0100 Subject: [PATCH] Install and verify corrected Windows control pair passively; preserve failed preparation evidence --- .../Install-ClosedControlSuccessor.ps1 | 22 ++++++- ...ndows-closed-control-lock-preparation.json | 63 +++++++++++++++++++ .../windows-closed-control-pair-build.json | 37 +++++++++++ .../windows-closed-control-pair-native.json | 44 +++++++++++++ docs/windows-system-s0-s2-results.md | 14 +++++ 5 files changed, 178 insertions(+), 2 deletions(-) create mode 100644 docs/evidence/windows-closed-control-lock-preparation.json create mode 100644 docs/evidence/windows-closed-control-pair-build.json create mode 100644 docs/evidence/windows-closed-control-pair-native.json diff --git a/deploy/windows/Install-ClosedControlSuccessor.ps1 b/deploy/windows/Install-ClosedControlSuccessor.ps1 index ba7ba79..e295361 100644 --- a/deploy/windows/Install-ClosedControlSuccessor.ps1 +++ b/deploy/windows/Install-ClosedControlSuccessor.ps1 @@ -102,6 +102,16 @@ function OpenFrozenState { if(!(Test-Path -LiteralPath $p)){if($p-cnotmatch '-(wal|shm)$'){throw 'Original database/lock absent.'};$proof[$p]=$null;continue} $item=Get-Item -LiteralPath $p -Force;if($item.PSIsContainer-or($item.Attributes-band[IO.FileAttributes]::ReparsePoint)){throw 'Regular original state file required.'} for($ancestor=$item.Directory;$null-ne$ancestor;$ancestor=$ancestor.Parent){if($ancestor.Attributes-band[IO.FileAttributes]::ReparsePoint){throw 'Original state reparse ancestry.'}} + if($p-ceq(Join-Path $agentState 'agent.lock')-or$p-ceq(Join-Path $helperState 'executor.lock')){ + # Actual first Prepare failed with ERROR_LOCK_VIOLATION only + # when hashing these already exclusively held lifetime locks + # through a second data handle. All four database reads passed; + # the case remained empty and no product replacement occurred. + # The original RmmStoppedPairLocks handles remain held here. + $meta=FileIdentityMetadata $p + if($meta.bytes-ne0){throw 'Original lifetime lock must remain empty.'} + $proof[$p]=[ordered]@{metadata=$meta;sha256=(BytesHash ([byte[]]@()));bytes=0};continue + } $f=[IO.File]::Open($p,'Open','Read','Read');$held.Add([pscustomobject]@{path=$p;stream=$f}) $meta=FileIdentityMetadata $p;$h=[Security.Cryptography.SHA256]::Create();try{$hash=[BitConverter]::ToString($h.ComputeHash($f)).Replace('-','').ToLowerInvariant()}finally{$h.Dispose()} $proof[$p]=[ordered]@{metadata=$meta;sha256=$hash;bytes=$f.Length} @@ -114,6 +124,10 @@ function CheckFrozenState($frozen) { foreach($p in $frozen.proof.Keys){ $before=$frozen.proof[$p] if($null-eq$before){if(Test-Path -LiteralPath $p){throw 'Original sidecar namespace changed.'};continue} + if($p-ceq(Join-Path $agentState 'agent.lock')-or$p-ceq(Join-Path $helperState 'executor.lock')){ + $current=FileIdentityMetadata $p + if($current.bytes-ne0-or$before.bytes-ne0-or$before.sha256-cne(BytesHash ([byte[]]@()))-or!(JsonEqual $before.metadata $current)){throw 'Original held empty lock identity, length or ACL changed.'};continue + } $entry=@($frozen.held|Where-Object{$_.path-ceq$p});if($entry.Count-ne1){throw 'Original held file missing.'};$f=$entry[0].stream;$f.Position=0 $h=[Security.Cryptography.SHA256]::Create();try{$hash=[BitConverter]::ToString($h.ComputeHash($f)).Replace('-','').ToLowerInvariant()}finally{$h.Dispose()} if($hash-cne$before.sha256-or$f.Length-ne$before.bytes-or!(JsonEqual $before.metadata (FileIdentityMetadata $p))){throw 'Original database/lock bytes, file identity or ACL changed.'} @@ -128,9 +142,13 @@ if($Action-ceq'Read'){ [ordered]@{id=$id;manifest_sha256=$ManifestSha256;read_only=$true;files=(CurrentFiles);device=(PreservedNativeState);agent=(Service 'agent');helper=(Service 'helper');profile=(FileIdentity $target);marks=@(Get-ChildItem -LiteralPath $work -Filter '*.json' -File -ErrorAction SilentlyContinue|Select-Object -ExpandProperty Name)}|ConvertTo-Json -Depth 18 -Compress;return } if($Action-ceq'PrepareStopped'){ - if(Test-Path -LiteralPath $work){throw 'Existing case means readback only.'} VerifyFiles (CurrentFiles) $oldHashes;if((Hash $target)-cne$profileHash){throw 'Current Profile8 changed.'} - [IO.Directory]::CreateDirectory($work)|Out-Null;CheckControl $work $true + if(Test-Path -LiteralPath $work){ + CheckControl $work $true + if(@(Get-ChildItem -LiteralPath $work -Force -ErrorAction Stop).Count-ne0){throw 'Any existing case entry means readback only; no retry.'} + }else{[IO.Directory]::CreateDirectory($work)|Out-Null;CheckControl $work $true} + # Only the independently observed empty no-effect preparation case may be + # reused. Any intent, backup, marker, hidden file or child blocks this path. WithStoppedState { param($frozen) $before=CurrentFiles;$retained=PreservedNativeState diff --git a/docs/evidence/windows-closed-control-lock-preparation.json b/docs/evidence/windows-closed-control-lock-preparation.json new file mode 100644 index 0000000..0ac6155 --- /dev/null +++ b/docs/evidence/windows-closed-control-lock-preparation.json @@ -0,0 +1,63 @@ +{ + "schema_version": 1, + "stage": "S2 bootstrap preparation lock-read defect and bounded correction only", + "case_id": "29264503-e47b-4d0c-8dbc-a7f353446ba7", + "product_source_commit": "052456f1339d23c7f705619151938801576e90b3", + "failed_preparation": { + "controller_sha256": "fe46d691c09fee30362a4a4be7639c57352c61e702b47964aad49d5327774fbc", + "result": "failed before preparation marker, intent, backup or product replacement", + "case_present": true, + "case_entries": [], + "both_original_services_stopped": true, + "original_agent_sha256": "bfbca0cd81d0ac7da99c2b5276afa4ea09405f3ebe6208ef29cffeb2b4da9590", + "original_helper_sha256": "5616ca956fa3328eae96a82dd44779eb298dadfa386e80768e12e1c7d058d082", + "original_product_replacement": false, + "private_readback_sha256": "ee7c286ddeab8a60984adec0305727506cbe759485d7b089319615166d24b54c" + }, + "actual_read_only_diagnostic": { + "all_four_database_open_metadata_and_hash_reads_passed": true, + "database_bytes": [ + 12197888, + 1445888, + 5206016, + 49152 + ], + "failed_files": [ + "agent.lock", + "executor.lock" + ], + "failed_operation": "ComputeHash through a second data handle while original full-range lifetime locks were held", + "observed_error": "ERROR_LOCK_VIOLATION", + "database_sharing_was_not_loosened": true, + "private_diagnostic_sha256": "78373afbafcfb77c0be86da3ee45fcce47717fedb4bd113a462e2b2d71d94b36" + }, + "bounded_correction": { + "controller_sha256": "792f3f7d5e44ee7f351d866532fe82634a69c3221ad0331f3d5313ae019d5545", + "original_lock_class_and_exclusive_handles_unchanged": true, + "lock_proof": "Actual length zero plus native identity and ACL before/after under the original held locks; no second data stream", + "database_proof": "Four DBs and present WAL/SHM files retain the held read-only stream hash, native identity and ACL checks", + "case_reuse": "Only exact unchanged predecessor and protected case with zero entries, including hidden files and children", + "product_binary_rebuilt": false + }, + "fixed_source_native_ast": { + "observed_at": "2026-11-16T21:44:23.5021776Z", + "powershell_version": "5.1", + "errors": 0, + "source_executed": false, + "private_result_sha256": "d86b5dcfc83276c4807e54686cf8e3d47ba12fdb350fc99583c0ff95c727ac16" + }, + "fixed_prepare_native": { + "observed_at": "2026-11-16T21:44:34.3981816Z", + "phase_completed": true, + "output": [ + "Prepared fixed stopped successor, no original target changed." + ], + "original_target_changed": false, + "private_result_sha256": "3e16ecca57dd75ad9b83cb96266cc15982917b4e09f89adeb32c7fbe3cf34f3e" + }, + "installation_success_claimed": false, + "new_normal_sync_success_claimed": false, + "system_script_success_claimed": false, + "new_job_created": false, + "approval_performed": false +} diff --git a/docs/evidence/windows-closed-control-pair-build.json b/docs/evidence/windows-closed-control-pair-build.json new file mode 100644 index 0000000..2750574 --- /dev/null +++ b/docs/evidence/windows-closed-control-pair-build.json @@ -0,0 +1,37 @@ +{ + "schema_version": 1, + "git_commit": "052456f1339d23c7f705619151938801576e90b3", + "builder": "sha256:1b2fd985d2c1fcc3545ace602405dc68fa899201bd8a73fa319ff96377203fa9", + "target": "x86_64-pc-windows-gnu", + "source_manifest_sha256": "7269e9b673e7c4f0b1667edfae4c6e78c405f158785ec3970c37bf0181e379f1", + "source_files": 864, + "working_tree_sources_used": false, + "clippy_all_targets_D_warnings": true, + "release_link": true, + "postprocess": "x86_64-w64-mingw32-strip --strip-all", + "artifacts": { + "rmm-agent-windows.exe": "437a2aa044ef2670674527b70da6f402871f1c931218557f8713a0ff0f4cc751", + "rmm-helper-windows.exe": "744dd4e6fd6027cde3f9b7c1f0bbccee9ebbd13a3dd378335e53f1e7af68817e", + "windows_script_pair_prepare.exe": "76820a286da690d45a07f3f53312ee270a2f59956694437b38dcd706cc46970f", + "windows_system_policy_prepare.exe": "e06cec4b4d6ebb57b637e3df9f7360524aa0bf08a7b9859678b8568188df3820" + }, + "artifact_bytes": { + "rmm-agent-windows.exe": 18100736, + "rmm-helper-windows.exe": 13579776, + "windows_script_pair_prepare.exe": 13813760, + "windows_system_policy_prepare.exe": 13714432 + }, + "role_source_sha256": { + "helper_system.rs": "73b54a385ccac7cdf2589c90cb8adb6a4cfdde845394fa903c97b3cc6208ca63", + "helper_ipc.rs": "155ea26e8b63095a1395342823c59d49fab9f9bb472cacd8a2cc6b9f26802d2b", + "runtime.rs": "1ae1d263ca9c2b1d9c191a3aff0cc1ffa5d8c48e80d3e86af4e17d20380d9465", + "system_script.rs": "6fb894c2dfb3f0895d0407ab80cd69e3b83fcb8349691af2c01027dcc2fcfc1b" + }, + "scope": "S2 normal signed control continuation, bounded helper precommit-clock retry; source build only", + "private_build_receipt_sha256": "704a70ad674f9b1c1ccb9649e9d76d63f55ebd1e8af9ad6cdba5cfa22f1e1b0e", + "candidate_input_sha256": "a5f9095917cb6dec1b98fdd67e1a341a67e36b2c5dae31b805b8d753353b6f49", + "witness_rebuilt": false, + "native_metadata_render": "pending", + "product_installation": "not_run", + "normal_sync_repaired_claimed": false +} diff --git a/docs/evidence/windows-closed-control-pair-native.json b/docs/evidence/windows-closed-control-pair-native.json new file mode 100644 index 0000000..e0e82ab --- /dev/null +++ b/docs/evidence/windows-closed-control-pair-native.json @@ -0,0 +1,44 @@ +{ + "schema_version": 1, + "case_id": "29264503-e47b-4d0c-8dbc-a7f353446ba7", + "source_commit": "052456f1339d23c7f705619151938801576e90b3", + "observed_at": "2026-11-16T21:44:57.9540703Z", + "native_install_completed": true, + "independent_readback": true, + "images": { + "agent": "437a2aa044ef2670674527b70da6f402871f1c931218557f8713a0ff0f4cc751", + "helper": "744dd4e6fd6027cde3f9b7c1f0bbccee9ebbd13a3dd378335e53f1e7af68817e" + }, + "files": { + "settings": "2166a3cf76b53ba1f7eb27907040c2d06ede2e49d7f76825f3ac9210d1cfcc03", + "pin": "f1c3c4fe5bfc2287e4ce8ff2a745a1a8a9e137a03abe438cafee8ab14b74299c", + "config": "d3ed4840c0f87971f752319a9e8bc5d6752edd864d11330d47faca16d1bac537" + }, + "processes": { + "agent": { + "pid": 9444, + "creation_filetime": "134393390958263474", + "owner_sid": "S-1-5-19", + "state": "Running", + "start_mode": "Auto" + }, + "helper": { + "pid": 6572, + "creation_filetime": "134393390921912078", + "owner_sid": "S-1-5-18", + "state": "Running", + "start_mode": "Auto" + } + }, + "installer_frozen_database_bytes_and_native_identities_preserved": true, + "original_identity_and_history_retained": true, + "qualification_names_absent": true, + "helper_effects_enabled": false, + "job_mode": false, + "profile9_published": false, + "fresh_normal_sync_proven": false, + "new_system_job_created": false, + "manifest_sha256": "f4a55e50b86c012bf1b21e425cf46349d80a1e8f84486e0df3f819fc3dd9bdf9", + "controller_sha256": "792f3f7d5e44ee7f351d866532fe82634a69c3221ad0331f3d5313ae019d5545", + "actual_readback_sha256": "63ac7172700a939c42c58e08c948cfc19e4ce5e06626cfe5249e52cc2ac750e4" +} diff --git a/docs/windows-system-s0-s2-results.md b/docs/windows-system-s0-s2-results.md index 3594b5c..fd372cd 100644 --- a/docs/windows-system-s0-s2-results.md +++ b/docs/windows-system-s0-s2-results.md @@ -1,3 +1,17 @@ +**21:45 UTC:** Korrigiertes Paar aus Git 052456f nativ passiv installiert +und unabhängig nachgelesen: Agent 437a2aa0…, Helper 744dd4e6…, beide +Auto/Running. Vier ursprüngliche Datenbanken einschließlich vorhandener +Sidecars sowie ursprüngliche Sperren/Identität unter den gehaltenen Sperren +erhalten. Helper bleibt ohne Wirkung, aktive Qualifikationsnamen fehlen. +Der erste Vorbereitungsversuch scheiterte ausschließlich beim zweiten +Hashzugriff auf die selbst exklusiv gesperrten leeren Lockdateien; ursprüngliche +Images und leerer Fallordner wurden unabhängig bestätigt. Enger Bootstrapfix +prüft diese beiden Lockidentitäten und Länge0 unter den bestehenden Handles; +alle Datenbankbytes bleiben separat vollständig geprüft. +[Native Paarablesung](evidence/windows-closed-control-pair-native.json), +[Vorbereitungsfehler](evidence/windows-closed-control-lock-preparation.json). +Profil9, frischer normaler Abgleich und neuer SYSTEM-Auftrag sind noch offen. + # S0–S2: tatsächliche Abschlussstrecke für Windows SYSTEM **Aktueller Befund um20:40UTC:** S0 und Fall221 sind bestanden. S2 ist noch