From a68ac09e4cfcc9c6bbc7e936242960f6493b2df1 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Thu, 24 Sep 2026 10:23:00 -0500 Subject: [PATCH] fix: drop the claim that a plugin cannot replace an app's step It can. A plugin node that provides a token an app step already provides wins when the graph is built, and the app's step drops out with no error. The card now says only what mountPlugin guarantees: a plugin gets bus.on, scope.add and onShutdown, and never the app itself. Signed-off-by: Diego Resendez --- src/components/sections/WhatIsAPlugin.astro | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/sections/WhatIsAPlugin.astro b/src/components/sections/WhatIsAPlugin.astro index 146ed89..c3202c8 100644 --- a/src/components/sections/WhatIsAPlugin.astro +++ b/src/components/sections/WhatIsAPlugin.astro @@ -1,8 +1,11 @@ --- // Every claim here is checked against core: the shape and the three-method API are -// `Plugin`/`PluginApi` in src/plugin.ts, and `mountPlugin` hands over nothing else, which is why a -// plugin cannot reorder or remove the app's steps. That guarantee covers registration only: a -// plugin's step still sees the live request context (see the comment in mountPlugin). +// `Plugin`/`PluginApi` in src/plugin.ts, and `mountPlugin` hands over nothing else. +// +// Do NOT claim a plugin cannot replace or remove an app's step. It can: a plugin node that +// provides a token an app step already provides wins in `topoSort`/`subgraphFor` (src/graph.ts, +// `producedBy.set`, last one in), and the app's step drops out of the graph with no error. +// Verified 2026-09-24. Only duplicate node *names* are a boot error. const points = [ { title: 'One object', @@ -14,7 +17,7 @@ const points = [ }, { title: 'The graph picks the order', - body: 'Say what your plugin needs and what it provides, and green-tea decides where it runs. A plugin can only add nodes to the graph. It has no way to reorder or remove the app’s own steps.', + body: 'Say what your plugin needs and what it provides, and green-tea decides where it runs. The plugin never gets your app: no container, no modules, no emit. Only the three functions above.', }, ]; ---