From 57b22ae6449750937f8c26077b3d416db8291757 Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Sun, 22 Nov 2026 17:32:27 -0600 Subject: [PATCH] =?UTF-8?q?fix(id):=20shell=20contract=20=E2=80=94=20join.?= =?UTF-8?q?device=5Finput=20is=20nullable,=20as=20the=20host=20has=20alway?= =?UTF-8?q?s=20accepted?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The contract declaration for join.device_input (added in da4617d03eb, hours after the field itself landed in #12281) said nullable: false, copied from the neighboring bool fields. But the host field is Option with serde(default): explicit null deserializes to None, exactly like an absent field, and every consumer treats the two alike (descriptive session metadata, not an authority grant). Every other Option-typed field in the contract is declared nullable (resume_token, screen_subscribe region/event_classes, the u64? shorthand). The declaration was the wrong side; the host behavior is the standing truth since #12281 and does not change. The contract document is corrected to describe it. No revision bump: declaring/correcting a field to match the host did not bump in da4617d03eb either, and the wire protocol itself is unchanged. Fixes #12703. The named test shell_contract::tests::the_contracts_required_fields_are_exactly_what_the_host_requires failed on pristine main with "join.device_input: the contract and the host disagree about null (left: true, right: false)"; with this change the full id-worlds lib suite passes 911/911 and the web contract tests (world-contract, screen-codec, world-program) pass 33/33. --- pkgs/id/contract/shell-contract.v1.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/id/contract/shell-contract.v1.json b/pkgs/id/contract/shell-contract.v1.json index e6f5fa7182..521f8650bc 100644 --- a/pkgs/id/contract/shell-contract.v1.json +++ b/pkgs/id/contract/shell-contract.v1.json @@ -46,7 +46,7 @@ "after": "u64?", "screen_patches": { "type": "bool", "optional": true, "nullable": false }, "screen_msgpack": { "type": "bool", "optional": true, "nullable": false }, - "device_input": { "type": "object", "optional": true, "nullable": false }, + "device_input": { "type": "object", "optional": true, "nullable": true }, "agent_profile": { "type": "bool", "optional": true, "nullable": false }, "resume_token": { "type": "string", "optional": true, "nullable": true, "max_bytes": 64 } }