Revert G's mesh-sdk merge (#189): G merged half, and today's validator refuses G's delivery parts
mesh/delivery merged: source.main moved to novox/mesh-sdk@27da949140c6
mesh/check being carried to 8afc3ebdf371 on 93e0a7b50d90 | from 27da949140c6

The group feat/47-G-join11 merged 3 of 17 members on 2026-11-13; G's mesh-sdk alone on main breaks 25 trunk
modules. The operator chose to put the order right: a reader release first, then G whole. This restores main
to 8fbba810 exactly.

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
2026-11-13 11:12:48 +01:00
parent b9915abf51
commit 8afc3ebdf3
212 changed files with 2436 additions and 32088 deletions
+2 -15
View File
@@ -122,17 +122,6 @@ function refusedUnannounced(name: string): void {
}
}
/** The size of one chunk of the Go side's put and get sessions, the most a call carries (design 47 G §518, A-21). */
export const CHUNK_BYTES = 512 * 1024;
/** A TypeScript bundle runs no put or get session in G (design 47 G §643): a value over one call's limit fails at once, naming it. */
function withinOneCall(key: string, value: unknown): void {
const size = Buffer.byteLength(JSON.stringify(value) ?? "");
if (size > CHUNK_BYTES) {
throw new Error(`the value of "${key}" is ${size} bytes, over the ${CHUNK_BYTES} bytes (512 KiB) one call carries: a TypeScript bundle puts no value larger than that`);
}
}
/** A state this module keeps (by its local name) or reads (`<module>.<name>`). */
export function state<T = unknown>(name: string): State<T> {
const bound = (): StateChannel => {
@@ -141,10 +130,8 @@ export function state<T = unknown>(name: string): State<T> {
};
return {
get: async (key) => (await bound().ask("mesh/state.get", { state: name, key })) as StateEntry<T> | null,
put: async (key, value) => {
withinOneCall(key, value);
return ((await bound().ask("mesh/state.put", { state: name, key, value })) as { revision: number }).revision;
},
put: async (key, value) =>
((await bound().ask("mesh/state.put", { state: name, key, value })) as { revision: number }).revision,
delete: async (key) => {
await bound().ask("mesh/state.delete", { state: name, key });
},