From e547de5d0654d46cb8a2809a34a39cf8446aa149 Mon Sep 17 00:00:00 2001 From: Martin Vogel Date: Sun, 26 Jul 2026 07:08:51 +0200 Subject: [PATCH] fix(guards): stamp the staged reinstall pair with current-user ownership The adjacent launcher was present but refused as unverified: copied files inherit Administrators ownership on runner images, and the launcher's exact-owner validators require the current user, which is what stamp_fixture_owner_current exists to simulate. Without it the guard failed on the product's ownership check rather than on the immediate-reinstall contract. Signed-off-by: Martin Vogel --- tests/windows/test_windows_launcher.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/windows/test_windows_launcher.py b/tests/windows/test_windows_launcher.py index 1a1d346c0..4c499bd64 100644 --- a/tests/windows/test_windows_launcher.py +++ b/tests/windows/test_windows_launcher.py @@ -1573,9 +1573,15 @@ def main(): # codebase-memory-mcp.exe launcher"). Reusing the consumed pair made this # guard fail on the product's correct behaviour rather than on the # immediate-reinstall contract it exists to protect. + reinstall_dir = work / "portable-reinstall" _, reinstall_payload = copy_portable_pair( - source_launcher, source_payload, work / "portable-reinstall" + source_launcher, source_payload, reinstall_dir ) + # Copied files inherit Administrators ownership on runner images, and the + # launcher's exact-owner validators (correctly) require the current user + # -- so an unstamped pair is refused as unverified, which is the same + # error as having no adjacent launcher at all. + stamp_fixture_owner_current(reinstall_dir, env) assert_uninstall_immediate_reinstall_safe( launcher, managed_dir, reinstall_payload, env )