Skip to content

Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.

fix(guards): stage a fresh portable pair for the immediate-reinstall check

Martin Vogel82f36713bb7e
diff --git a/tests/windows/test_windows_launcher.py b/tests/windows/test_windows_launcher.py
index 9183f5afb..1a1d346c0 100644
--- a/tests/windows/test_windows_launcher.py
+++ b/tests/windows/test_windows_launcher.py
@@ -1566,8 +1566,18 @@ def main():
source_launcher, source_payload, launcher, env, cache, work
)
assert_failed_uninstall_restores_state(launcher, managed_dir, env)
+ # Stage a FRESH portable pair: the earlier managed installs consume the
+ # launcher sitting beside work/portable-install's payload, and a managed
+ # install legitimately refuses a payload with no verified adjacent
+ # launcher ("managed install requires a verified adjacent
+ # 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_payload = copy_portable_pair(
+ source_launcher, source_payload, work / "portable-reinstall"
+ )
assert_uninstall_immediate_reinstall_safe(
- launcher, managed_dir, portable_payload, env
+ launcher, managed_dir, reinstall_payload, env
)
print("\nGREEN: permanent Windows launcher contract honored.")
return 0