docs: RFC 0002 — Plugin architecture with Ledger v3 as POC#154
Conversation
Proposes a plugin-based architecture for fctl where product CLI commands ship as independent binaries from product repos. Uses Ledger v3 as the concrete proof of concept with detailed user journeys covering Cloud, self-hosted, local dev, debugging, error handling, and version retirement. Key design decisions: - Plugins live in product repos at cmd/fctl-plugin/ - Plugin version = service version (enforced) - Registry derives binary URLs from convention - Built-in commands remain for Ledger v2, plugin activates for v3+ - Resolution: plugin first, built-in fallback, auto-discovery last - Rendering centralized in fctl core via display schemas - Plugin lifecycle fully driven by auto-discovery, no manual updates Relates to #126 and #153. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
61cb6ee to
c2c6780
Compare
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
One point we should clarify early: using GitHub releases as the default plugin distribution mechanism works for Ledger because the repository is public, but it may not work as a general registry/distribution model for fctl plugins. Some product repositories may be private, or may become private depending on the product / customer / deployment model. In that case, deriving plugin binary URLs from For the Ledger v3 POC this is fine, but I think the RFC should explicitly separate:
Otherwise we may validate the POC on the easiest case, but leave the harder product cases unresolved. Maybe the RFC can keep GitHub releases as the initial Ledger POC distribution backend, while making it clear that the registry abstraction must support non-public artifact sources later. |
Address review feedback: GitHub releases as default distribution backend works for public repos (Ledger POC) but not for private product repos. Registry now explicitly separates metadata (compatibleWith, deprecation) from distribution backend (github-releases, private-releases, oci, url). The format supports private and enterprise scenarios from the start. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
A lightweight Formance-hosted service (plugins.formance.cloud) serves plugin binaries using the existing membership token. Avoids GitHub token dependency for private repos and provides uniform auth, caching, and server-side version control. GitHub releases remains the default for the POC (public repo). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
laouji
left a comment
There was a problem hiding this comment.
Generally speaking this looks very good.
Having the fctl plugins bundled in the repo of the module also means we can more easily wire up end to end tests that use fctl and more easily detect if changes break compatibility with fctl.
Summary
Key design decisions
cmd/fctl-plugin/— ownership, versioning, and CI stay with the product teamcompatibleWithsemver ranges. Binary URLs derived from convention ({repo}/releases/download/v{version}/fctl-plugin-{name}-{os}-{arch})fctl plugin update— lifecycle is fully driven by auto-discovery when the service version changesUser journeys covered
/versionsdetectioncmd/fctl-plugin/in the ledger repo--debugwith[fctl]/[plugin]prefixes)Related
🤖 Generated with Claude Code