Skip to content

feat: Add lazy plugin loading and version validation - #265

Open
finxo wants to merge 1 commit into
masterfrom
feat/plugins_version
Open

feat: Add lazy plugin loading and version validation#265
finxo wants to merge 1 commit into
masterfrom
feat/plugins_version

Conversation

@finxo

@finxo finxo commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Pull Request

📝 Summary

Defers plugin initialization until first use, preventing startup and screen refreshes from paying for plugin I/O that may never be needed. Adds plugin/core version compatibility validation and makes official plugin versions explicit and test-enforced.
Breaking changes: None.

🔧 Changes Made

  • Split metadata discovery, loading, and thread-safe first-use initialization; disabled plugins remain unloaded unless explicitly viewed.
  • Update TUI, workflow, and config call sites to initialize only required plugins; plugin management still loads all plugins for accurate status.
  • Add titan_requires compatibility checks, package-level plugin versions, and repository tests to prevent version-contract drift.
  • Replace GitHub’s networked gh auth status initialization check with local gh auth token.

🧪 Testing

  • Unit tests added/updated (poetry run pytest)
  • All tests passing (make test)
  • Manual testing with titan-dev

Added coverage for lazy initialization, dependency ordering, failure retries, thread safety, metadata-only discovery, on-demand disabled-plugin loading, import-failure logging, and official plugin version/requirement synchronization.

📊 Logs

  • No new log events
  • plugin_registry_not_prepared (DEBUG) — plugin name when initialization is requested before registry preparation.
  • plugin_incompatible (WARNING) — plugin name and compatibility reason when its Titan CLI requirement is unmet.

✅ Checklist

  • Self-review done
  • Follows the project's logging rules (no secrets, no content in logs)
  • New and existing tests pass
  • Documentation updated if needed
  • Plugin documentation updated when plugin functions or parameters changed (Plugins > Git Plugin, GitHub Plugin, Jira Plugin)

@finxo finxo added the feature New feature or functionality label Aug 28, 2026
@finxo finxo self-assigned this Aug 28, 2026
@finxo
finxo marked this pull request as ready for review August 31, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant