Skip to content

Fix plugins disappearing after server restart#479

Merged
yondonfu merged 1 commit intomainfrom
fix/ensure-plugins-installed-on-startup
Feb 17, 2026
Merged

Fix plugins disappearing after server restart#479
yondonfu merged 1 commit intomainfrom
fix/ensure-plugins-installed-on-startup

Conversation

@yondonfu
Copy link
Copy Markdown
Contributor

@yondonfu yondonfu commented Feb 17, 2026

Summary

  • Adds self-healing plugin re-sync on server startup that detects missing plugin packages and reinstalls them from resolved.txt
  • Fixes Plugins fix reverted? #465: plugins disappear after server restart when the venv is recreated (e.g., uv upgrade in desktop app)
  • Adds unit tests for the new _is_package_installed() and ensure_plugins_installed() methods

How it works

On every server startup, before plugin discovery runs, ensure_plugins_installed() checks whether each plugin listed in plugins.txt is actually installed in the environment. If all are present, it returns immediately (fast no-op). If any are missing (e.g., due to venv recreation from a uv upgrade), it reinstalls them from resolved.txt, which skips already-installed packages quickly.

Test plan

  • uv run pytest tests/test_plugin_manager.py::TestIsPackageInstalled tests/test_plugin_manager.py::TestEnsurePluginsInstalled — 13 tests pass
  • uv run daydream-scope --no-browser starts without errors
  • Install a plugin, then uv pip uninstall <plugin> (simulating venv loss), restart server — plugin is reinstalled from manifest
  • Restart server with all plugins present — no reinstall activity in logs (fast path)

🤖 Generated with Claude Code

@yondonfu yondonfu mentioned this pull request Feb 17, 2026
@yondonfu yondonfu merged commit d1afceb into main Feb 17, 2026
6 checks passed
@yondonfu yondonfu deleted the fix/ensure-plugins-installed-on-startup branch February 17, 2026 20:58
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 fix reverted?

1 participant