docs(mesh): record the scopes->steps rename as an exception to the bump rule

The bump rule in protocol.ts says renaming a field earns a protocol bump, and
this branch renamed the manifest's `scopes` to `steps` at v1 without one. The
argument for that lived only in the CHANGELOG, so the rule as written read as
simply broken to anyone who found it from the code.

The exception is now stated where the rule is, with the three conditions it
rests on: mesh is alpha, every app using it is gated behind `experimental:
true`, and both peers ship out of this repo, so no deployed pair can be split
across the rename. It retires with the first mesh release that drops
`experimental`.

Two other stale pointers go with it. The bootTimeoutMs JSDoc said `0` restores
"the old behaviour of a single attempt", which now reads as restoring a boot
that failed — it is only the attempt count, and the way to make a teapot's
absence fatal is a local `@needs` on one of its tokens. And the reconnect
plan's step 4 still pointed at invalidateRemoteBindings, which this branch
deleted; it gets a dated note in the same shape as the degrade plan's D6.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
chrnx committed 2026-09-12 15:40:26 -05:00
1 parent 727987286b
commit e69f604053
3 files changed
+17 -1

No files matched your search

@@ -85,6 +85,12 @@ not a wait for `timeoutMs`.
3. **Manifest comparison.** Capture the contributed set at boot, compare per D4, reuse
`compilePattern(...).shape` for routes. Refusal logs the missing token or route by name.
4. **`invalidateRemoteBindings(link)`** per D8, called on successful reconnect.
**Note, 2026-09-06:** this no longer exists. When the mesh stopped exporting providers, the
remote app-scope binding went with it, and `invalidateRemoteBindings`, the `rebind` array and the
`onReconnect` callback went with that — there is no cached value left to invalidate, so a
reconnected link is simply usable again on the next RPC. The rest of this plan shipped as
written; only this step has no counterpart in the code.
5. **Config**: `mesh: { reconnect?: boolean | { initialDelayMs?, maxDelayMs? }, onManifestChange?: 'refuse' }`.
Reconnect defaults **on**. Validate at boot like the other mesh options.
6. **Tests.** Reconnect after the teapot returns; refuse when a token disappears, with the message
+3 -1
View File
@@ -145,7 +145,9 @@ export interface MeshConfig {
* one of its tokens still fails the boot, naming it. A permanent refusal — a wrong secret, a
* protocol mismatch — fails at once without spending the grace.
*
* `0` restores the old behaviour of a single attempt.
* `0` means one attempt and no grace. That is the attempt count boot used to have, and nothing
* more: exhausting it no longer fails the boot, so a single unreachable teapot still warns and
* starts. To make a teapot's absence fatal, have something local `@needs` one of its tokens.
*/
bootTimeoutMs?: number;
}
+8
View File
@@ -18,6 +18,14 @@
*
* Bumping per change would make the number mean "work happened" rather than "we are
* incompatible", which is the one thing it is here to say.
*
* **One exception has been taken, and its terms are the point.** The manifest's `scopes` field was
* renamed to `steps` at v1 — a rename, which the first rule above would otherwise cover — without a
* bump. It was allowed because there is no deployed pair the rename could split: mesh is alpha,
* every app using it is gated behind `experimental: true`, and both peers ship out of this one
* repo, so a teacup and a teapot are always on the same version. Each of those three has to hold
* for the exception to; the first mesh release that drops `experimental` retires it, and a rename
* after that earns a bump like any other.
*/
export const MESH_PROTOCOL_VERSION = 1;