A region that lives somewhere else
A shell is a fragment tree whose leaves are regions, and a region is a fragment that happens to render on another deployment.
REGION carries the name the shell asked for, the contract it believes it serves, and the revision serving it — which is what makes the splice checkable.
The refusal names the authority it would have borrowed, and that region degrades to its fallback.
In plain terms
A region is a slot whose renderer might live somewhere else. The shell names it, a registry says what is serving it right now, and what comes back is the same Warp frames every render here already produces. Rolling a region is a registry write, not a redeploy.
Micro-frontend orchestration is a product category with its own runtime, its own registry and its own failure modes. It should not be. A shell is a fragment tree whose leaves are regions, and a region is a fragment that happens to render on another deployment.
A region, and nothing in it about being remote
examples/remoteThere is nothing to add. What crosses the boundary is a warp frame — the protocol every render already produces — so the composite does not learn a second runtime.
- Olive oil, 2L
- Olive oil, 5L
app/fragments/examples/remote.tsximport { fragment } from '@weftjs/core'
interface Hit {
sku: string
name: string
}
/**
* A region: a fragment that happens to render on another deployment.
*
* There is nothing in this file about being remote, and there is nothing to add. What crosses the
* boundary is a warp frame — the same protocol every render already produces — so the composite
* embedding it does not learn a second runtime, and a failure over there degrades this one hole
* rather than the page.
*/
export default fragment(({ query, hits }: { query: string; hits: Hit[] }) => (
<section class="region" data-region="search">
<p class="meta">
Results for <strong>{query}</strong>, from the search deployment
</p>
<ul class="hits">
{hits.map((hit) => (
<li data-sku={hit.sku}>{hit.name}</li>
))}
</ul>
</section>
))
What the compiler knows
Holes
| Binding | Hole | Escape |
|---|---|---|
query | text | escape |
hits | list | trusted-raw |
What the client wires on adoption
No wiring: nothing on this template changes after it is painted, so the client attaches nothing to it.
- Sealed templates
- 2
- Version
848311be085c69637f7df64cf0323779
Three things that already existed
| Already there | What it does for a region |
|---|---|
ExecutorPort, and that it is a crash domain | binding: and svc: reach another deployment; a failure there degrades one region. |
| A registry, which is a port | Resolves the name search to whatever is serving search right now. |
| Warp frames, which every render already produces | What comes back over the boundary is the protocol the composite already speaks downward. |
| New: the region check | Frames arriving from elsewhere are somebody else’s, and a length prefix does not say whose. |
So composition is not a second runtime beside this one. It is the pieces already in the framework pointed at each other, plus the one check that a boundary needs and a local call does not.
A contract, and what happens when it breaks
A region declares what it composes and what it needs, and weft verify asks every registry entry what it is serving right now. A remote whose contract has moved is a build-time or deploy-time failure with both sides named, rather than an empty hole at 3am.
weft verify # what this deployment's registry says about every region a route composes
weft verify --probe # ask each remote what it is serving right nowFailure is declared, not discovered
Every region says what the page does without it, and the two available answers are different promises. optional() means the failure is invisible and nobody is paged — right for recommendations. A declared placeholder means the page says one part of it is missing — right for a search box. A region marked critical that cannot be served is a refusal, because a checkout that silently loses its payment panel is worse than a 500.