Skip to content

fix(tui): avoid retrying broken plugin setup - #43441

Merged
nexxeln merged 1 commit into
v2from
plugin-reload-test
Aug 19, 2026
Merged

nexxeln merged 1 commit into
v2from
plugin-reload-test

Conversation

@opencode-agent

Copy link
Copy Markdown
Contributor

Summary

  • remember local plugin source versions whose setup failed
  • keep the restored last-good generation untouched across duplicate watcher reconciles
  • retry setup only after the source version or options change
  • make the regression test trigger a later reconcile deterministically

Diagnosis

A single broken save can emit multiple filesystem events. Each reconcile imported the same broken source, tore down the restored plugin, failed setup, and restored it again. The regression test reproduced four extra cleanup/setup cycles before the fix.

Validation

  • bun test --timeout 30000 test/plugin-hot-reload.test.tsx
  • 20/20 repeated targeted regression runs
  • GOMAXPROCS=2 bun typecheck

Requested by: @nexxeln (nexxel via Slack)

@nexxeln
nexxeln merged commit 728053b into v2 Aug 19, 2026
10 checks passed
@nexxeln
nexxeln deleted the plugin-reload-test branch August 19, 2026 15:11
jinhuang712 pushed a commit to jinhuang712/opencode that referenced this pull request Sep 26, 2026
Co-authored-by: nexxeln <95541290+nexxeln@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant