diff --git a/packages/chord/docs/next/design.md b/packages/chord/docs/next/design.md index d2a7d6037..f28fd3a87 100644 --- a/packages/chord/docs/next/design.md +++ b/packages/chord/docs/next/design.md @@ -1843,7 +1843,9 @@ type ReloadReport = { is missing) is kept old too, so a consumer edited together with a broken provider keeps working on its old code. At startup the same holds: `load` leaves a failing plugin out and resolves with `{ failed: [{ plugin, error }] }`; its consumers wait `failed { waiting }`; `load` never closes the host for a plugin (base code decides whether its core - failing is fatal). What no rule detects: a consumer relying on new behaviour of a kept provider whose contract did not + failing is fatal). A loader that kept a plugin on its loaded facet because its new code failed before staging (its + build, its evaluation) tells the host with `reload(facets, context, { failed })`: the host lists it and applies the + closure rule to it as to a plugin whose staging failed. What no rule detects: a consumer relying on new behaviour of a kept provider whose contract did not change (as in a rollout across hosts). Runtime states (registry conflicts, failed opens, migrations) stay per object after the commit (`onError` as always). - **Staging** runs every facet's setup into a staged table beside the live one (types with their factory, `linger` and diff --git a/packages/chord/docs/next/slice-7c.md b/packages/chord/docs/next/slice-7c.md index 556b59c71..7048ca1a0 100644 --- a/packages/chord/docs/next/slice-7c.md +++ b/packages/chord/docs/next/slice-7c.md @@ -105,7 +105,8 @@ Decision "Per plugin at startup and reload" changes `host.load` and `host.reload records them with their contract versions) would not bind because the plugin they need was kept old, or is missing, is kept old too (repeat until stable). The report gains `failed: [{ plugin, error }]` (the same list as `load`'s; an added plugin that fails is left out); the commit applies the rest. - **The component** builds and evaluates per plugin: a plugin whose build fails or whose evaluation throws is passed to - the host as its loaded facet (kept) at a reload, left out at startup, and reported with the host's report. + the host as its loaded facet at a reload, with `reload(facets, context, { failed })` naming it (the host applies the + closure rule to it and lists it in `failed`), left out at startup and reported with the host's report. `plugins.load(host, ctx)` and `plugins.reload(host, names, ctx)` keep, per host, the facet loaded for every plugin, so `reload` always passes the complete set (unchanged plugins as the same facet object, removed ones left out) and never restarts an unchanged plugin.