diff --git a/01-RESEARCH/011-the-module-graph/worked-provider.md b/01-RESEARCH/011-the-module-graph/worked-provider.md index d7da442..9bcf9ef 100644 --- a/01-RESEARCH/011-the-module-graph/worked-provider.md +++ b/01-RESEARCH/011-the-module-graph/worked-provider.md @@ -208,6 +208,30 @@ first clear instance: against itself. - **A whole class of permission modelling** that a shared store would otherwise need. +### The hardest case for it: a dashboard reading everything + +Raised immediately, and it is the right test โ€” a board showing nodes, modules, pipelines, agents +and tasks wants to read a dozen stores. Under this rule it cannot read any of them. + +**It survives, and not by luck: the board is a surface, and surfaces already may not do this.** +The skeleton puts `api/` in the control plane as *the one interface every surface speaks to*, and +tier 3 as *thin; no logic lives here*. A board reading stores directly is a surface reaching past +the context that owns the data โ€” which the tier rule forbids for reasons that have nothing to do +with databases. + +So the dashboard is not a counter-example. It is an instance the rule catches, and the two rules +turn out to be one rule seen from two sides: **exclusive ownership is the tier rule, expressed in +terms of storage.** + +**The general shape, for anything that needs to see across many things:** consume the record and +own your own view. A reporting context builds a projection from events and reads its own store. +It does not read anybody else's. + +**And the cost is not small, so it should be said plainly.** A projection is more work than a +join, and it lags. Today a board queries the mesh's own database directly โ€” that is ordinary, +it works, and this rule makes it a migration rather than a preference. The reason to pay it is +[`how-we-build`](../../00-META/how-we-build.md) ยง4's already-measured cost, not elegance. + ### What it does not answer **The mesh's own registry is read by many things.** Under this rule they cannot read its tables,