fix: stop saying plugin registration order never matters
It does when two plugins provide the same token: the one registered last wins. The card keeps only what holds in general, that execution order comes from what each node needs and provides. Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
1 file changed
+6
-2
@@ -7,7 +7,11 @@
|
|||||||
// plugin node that
|
// plugin node that
|
||||||
// provides a token an app step already provides wins in `topoSort`/`subgraphFor` (src/graph.ts,
|
// 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.
|
// `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. Ordering is the claim.
|
// Verified 2026-09-24. Only duplicate node *names* are a boot error.
|
||||||
|
//
|
||||||
|
// The claim is execution order derived from needs/provides, and nothing more. Registration order
|
||||||
|
// is NOT irrelevant: with two producers of one token, the one registered last wins, so never
|
||||||
|
// write "no need to register X first".
|
||||||
const points = [
|
const points = [
|
||||||
{
|
{
|
||||||
title: 'One object',
|
title: 'One object',
|
||||||
@@ -19,7 +23,7 @@ const points = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'The graph picks the order',
|
title: 'The graph picks the order',
|
||||||
body: 'Say what your plugin needs and what it provides, and green-tea works out where it runs. There’s no middleware order to document and no “register this one first” in your README.',
|
body: 'Say what your plugin needs and what it provides, and green-tea works out where it runs.',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
---
|
---
|
||||||
|
|||||||
Reference in new issue
Block a user