{
  "id": 8591268,
  "title": "Your plugin system couldn't replace plugins. So here's the transaction that you're missing.",
  "url": "https://urgent.news/2026/09/20/your-plugin-system-couldnt-replace-plugins-so-heres-the-transaction",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-20T02:32:36.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/luke_gree_fc8780a9e7/your-plugin-system-couldnt-replace-plugins-so-heres-the-transaction-that-youre-missing-21lm"
  },
  "original_language": "en",
  "account": "In the world of software plugins, upgrading a plugin can often be a tricky process. The source material explains that in most plugin systems, an upgrade failure during activation results in no running plugins at all. However, this lack of robustness can lead to major issues, especially in long-running systems such as CLI daemons, editors, and AI-agent extension hosts where downtime is unacceptable.\n\nThe article introduces Moult, a system that treats plugin replacement as a transaction, rather than a simple assignment. Moult ensures that a plugin is a versioned capability provider with an owned resource scope. When replacing a plugin, Moult runs a protocol, not an assignment. The setup runs in a private scope, allowing the candidate plugin to build itself while the old plugin continues to serve. After verification, the new plugin is committed, swapping the active generation in a single atomic step.\n\nIf any failure occurs before the commit, the candidate scope is disposed, and the previous generation remains active and usable. This process ensures that there is no downtime, even in the event of a failed upgrade. Moult also manages resource cleanup in a reverse acquisition order (LIFO), ensuring that no resources are left unaccounted for.\n\nThe source also highlights how Moult's approach to plugin replacement includes a semver version system and consumer declared semver ranges, ensuring that only compatible plugins are used. Resolution of capabilities runs during preparation, so any version mismatches will fail before setup, preventing any visible issues.\n\nMoult's versioned capability provider guarantee has been thoroughly tested, with nine replacement transaction tests covering various failure scenarios, including failed setup, validation, disposal ordering, and resource cleanup. The test suite includes property-based and stress suites, totaling 145 tests running under both Node and a DOM environment, achieving 290 runs with all tests passing. The tests are documented in guarantees.md, and comparison results are visible in demo/comparison/RESULTS.md, demonstrating the robustness and reliability of Moult's plugin replacement system.",
  "summary": "What if an upgrade fails halfway through activating? The question would be: what is still running? In most plugin systems, the answer is: none. And in registries, the common bug could be as follows: // the old plugin is already gone before the new one exists registry . set ( ' storage ' , await next . setup ()); If setup() throws, the old working value is destroyed, and the new one never arrives.…",
  "key_points": [
    "Moult treats plugin replacement as a transaction, not a simple assignment.",
    "System ensures no downtime during upgrade failures with atomic swap.",
    "Moult's tests cover nine replacement scenarios with 145 total tests."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}