mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
feat(spec): the runtime entry declares the action encoding it serializes
@sanderling/spec 0.0.3 and earlier put an authored Scroll's container point on the wire as both endpoints. A host that reads pre-computed endpoints as authoritative executes that as a 250ms press and hold travelling zero distance, and neither half fails. ACTION_WIRE_CONTRACT lets the host refuse the pairing rather than run it.
This commit is contained in:
1 parent
83d988afda
commit
912ad71804
2 files changed
+22
No files matched your search
@@ -83,6 +83,14 @@ test("installRuntime defined the host-invoked globals", () => {
|
||||
assert.equal(typeof g.__sanderling__, "object");
|
||||
});
|
||||
|
||||
// The host refuses to run a bundle whose declaration is not the encoding it
|
||||
// decodes (ActionWireContract, internal/verifier/marshal.go). The literal is
|
||||
// asserted on both sides so neither half can move to a new encoding alone.
|
||||
test("installRuntime declares the action wire contract to the host", () => {
|
||||
const g = globalThis as Record<string, unknown>;
|
||||
assert.equal(g.__sanderlingActionEncoding__, "action-wire/2");
|
||||
});
|
||||
|
||||
const { fakeElement, withFakeDocument } = await import("./web-dom-harness.ts");
|
||||
type FakeElementSpec = Parameters<typeof fakeElement>[0];
|
||||
|
||||
|
||||
Reference in new issue
Block a user