Skip to content

fix: managed install archive extraction path mismatch + e2e MCP tests#136

Merged
patchloom-release[bot] merged 2 commits into
mainfrom
fix/managed-install-e2e
Jun 18, 2026
Merged

fix: managed install archive extraction path mismatch + e2e MCP tests#136
patchloom-release[bot] merged 2 commits into
mainfrom
fix/managed-install-e2e

Conversation

@SebTardif

Copy link
Copy Markdown
Contributor

Bug fix

cargo-dist archives extract to patchloom-<triple>/patchloom, but
promoteManagedInstallBinary expected the binary at
managed-bin/patchloom. The rename failed with ENOENT on every real
managed install attempt. This means the "Install Patchloom" command
in the extension has never worked for users who rely on managed install.

Fix: after extraction, detect the cargo-dist subdirectory and move
the binary to the expected staged path before promotion.

New end-to-end tests (4 tests)

Added a managed install end-to-end MCP describe block that:

  1. Calls performManagedInstall with real downloads from GitHub
    (no mocks, no injected I/O)
  2. Verifies the installed binary runs (--version)
  3. Starts the MCP server and sends a JSON-RPC initialize request
  4. Sends tools/list and validates every tool has a name and
    inputSchema

These tests prove the full pipeline works on a clean machine with no
pre-installed binary: download, checksum verify, extract, promote,
launch MCP, and interact via JSON-RPC.

If network is unavailable, the tests skip gracefully.

Results

  • 256 tests, 0 failures, 0 skipped
  • 91.52% line coverage (above 80% threshold)
  • managed.ts coverage increased from 88.61% to 91.39%

cargo-dist archives extract to patchloom-<triple>/patchloom, but the
promotion step expected the binary at managed-bin/patchloom. The rename
failed with ENOENT on every real managed install attempt.

Fix: after extraction, detect the cargo-dist subdirectory and move the
binary to the expected staged path before promotion.

Also add end-to-end tests that perform a real managed install (download
from GitHub, verify checksum, extract, promote) then start the MCP
server and validate JSON-RPC initialize and tools/list responses. These
tests would have caught this bug on day one.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
@patchloom-release patchloom-release Bot enabled auto-merge (squash) June 18, 2026 05:19
@patchloom-release patchloom-release Bot merged commit 1e946a0 into main Jun 18, 2026
20 checks passed
@patchloom-release patchloom-release Bot deleted the fix/managed-install-e2e branch June 18, 2026 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant