Skip to content

fix: share one --version probe on activation - #240

Merged
SebTardif merged 2 commits into
mainfrom
fix/239-share-version-probe
Aug 28, 2026
Merged

fix: share one --version probe on activation#240
SebTardif merged 2 commits into
mainfrom
fix/239-share-version-probe

Conversation

@SebTardif

Copy link
Copy Markdown
Contributor

Summary

Activate no longer runs patchloom --version three times. Concurrent resolvePatchloomStatus() callers share one in-flight probe. Settings, trust, and managed-install refreshes drop that probe first so they do not reuse a stale result.

Why

refreshStatusBar(), checkForUpdates(), and registerMcpServerProviderWithBinary() each resolved status on activate. A cold managed binary paid that cost three times.

The change

  • resolvePatchloomStatusWithSharedInflight coalesces concurrent probes
  • No TTL cache; the next call after the probe finishes re-resolves
  • Config, workspace-folder, and trust listeners clear in-flight before refresh
  • Managed install/update/reinstall clear in-flight before status and MCP refresh
  • Unit tests: coalesce, sequential re-probe, failure retry, clear-while-pending

Verification

  • npm run check (372 passed, 6 skipped)
  • Branch reviewer: 0 bugs; suggestion (clear in-flight on input change) landed in the follow-up commit

Closes #239

Checklist

  • All commits in this pull request are signed off with git commit -s
  • I ran npm run check and it passes
  • I updated docs if user-facing behavior changed
  • I am contributing this work under the repository license (MIT)

Activate starts status bar, auto-update, and native MCP register
together. Coalesce concurrent resolvePatchloomStatus() calls so a
cold CLI is only exec'd once. No TTL cache, so later settings and
install changes still re-probe.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
A long cold --version probe must not pin stale path or trust results
when the user changes settings or a managed install finishes.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
@SebTardif
SebTardif marked this pull request as ready for review August 28, 2026 01:42
@SebTardif
SebTardif enabled auto-merge (squash) August 28, 2026 01:42
@SebTardif
SebTardif merged commit 91a3b0b into main Aug 28, 2026
22 checks passed
@SebTardif
SebTardif deleted the fix/239-share-version-probe branch August 28, 2026 01:46
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.

perf: share one --version probe on activation

1 participant