Skip to content

fix(plugins): bound requests and release locks on cancellation - #304

Merged
kingsword09 merged 1 commit into
mainfrom
fix/issue-301-marketplace-add
Nov 25, 2026
Merged

kingsword09 merged 1 commit into
mainfrom
fix/issue-301-marketplace-add

Conversation

@kingsword09

Copy link
Copy Markdown
Owner

plugins marketplace add --yes could stay silent during a stalled source download, and cancellation left installed_plugins.json.lock owned by a dead app-server process.

Bound launcher plugin requests to 60 seconds by default, configurable with ZCODE_PLUGIN_REQUEST_TIMEOUT_MS, and report when marketplace addition starts. Give cancellable plugin mutations an operation ID and close their input on cancellation so the runtime receives client-disconnect cancellation even when its serial request handler cannot process the queued cancel message. This lets the runtime unwind downloads and release its lock, with bounded process termination as a fallback.

Fixes #301.

Validation:

  • bun run build
  • bun run typecheck
  • bun run test (294 tests passed)
  • bun run check
  • git diff --check
  • Native runtime tests verify that signal cancellation and timeout remove the lock directory and allow the next marketplace add in the same home.
  • Replayed DietrichGebert/ponytail with a 5-second timeout: the command returned a timeout error and left no lock directory or owner file.

@kingsword09
kingsword09 merged commit 2cd8efe into main Nov 25, 2026
4 checks passed
@kingsword09
kingsword09 deleted the fix/issue-301-marketplace-add branch November 25, 2026 09: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.

plugins marketplace add --yes hangs after validation and leaves installed_plugins.json.lock (4.0.0-49)

1 participant