From 67896e9ec9435b67635d7d35ef9c1c7d36b2ebd3 Mon Sep 17 00:00:00 2001 From: dp-web4 Date: Mon, 18 May 2026 06:04:35 -0700 Subject: [PATCH] =?UTF-8?q?docs(conformance):=20resolve=20C5=20audit=20G4?= =?UTF-8?q?=20=E2=80=94=20fix=20P1-003=20+=20add=20P1-004=20(P12/P13)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit P12: P1-003 ("v1 protocolVersion bumped on connect") previously only read hestia://society/state and checked sovereign_lct — it never verified protocolVersion. Now does a fresh hestia_connect with protocol_version: 1 and asserts protocolVersion == 1 in the response. P13: New P1-004 vector verifies wait-protocol default values per §3.4.1: status == "decided" and nextPollMs == null on a v1 query_policy response. Completes C5 audit remediation (G1+G3 merged #206, G2 merged #207, G4 this commit). 14 conformance scenarios (was 13), 1 file modified. Co-Authored-By: Claude Opus 4.6 --- .../presence-protocol-conformance.json | 52 +++++++++++++++++-- 1 file changed, 48 insertions(+), 4 deletions(-) diff --git a/web4-standard/testing/conformance/presence-protocol-conformance.json b/web4-standard/testing/conformance/presence-protocol-conformance.json index aad3ae2..6e7a965 100644 --- a/web4-standard/testing/conformance/presence-protocol-conformance.json +++ b/web4-standard/testing/conformance/presence-protocol-conformance.json @@ -4,7 +4,7 @@ "description": "Test scenarios that a conforming presence-layer implementation MUST pass. The conformance harness at web4-standard/testing/conformance/ runs these against a live daemon and verifies shapes against the JSON Schemas in schemas/presence-protocol/{v0,v1}/. v0 scenarios (P0-*) still pass on v1+ daemons by design; v1 scenarios (P1-*) test the new fields and the engine semantics.", "specVersion": "presence-protocol v1", "protocolVersion": 1, - "lastUpdated": "2026-05-16", + "lastUpdated": "2026-05-18", "scenarios": [ { "id": "P0-001", @@ -338,14 +338,58 @@ { "id": "P1-003", "name": "v1 protocolVersion bumped on connect", - "description": "A v1 daemon advertises protocolVersion: 1 in its hestia_connect response. (P0-001 already ran on connect; this scenario re-checks the captured field.)", + "description": "A v1 daemon advertises protocolVersion: 1 in its hestia_connect response. Connects with protocol_version: 1 and verifies the returned protocolVersion field.", + "steps": [ + { + "tool": "hestia_connect", + "input": { + "plugin_id": "conformance-v1-check", + "plugin_version": "0.0.1", + "host_agent": "conformance-runner", + "host_agent_version": "0.0.1", + "requested_role": "citizen", + "protocol_version": 1 + }, + "expect": { + "fieldChecks": [ + { "path": "protocolVersion", "equals": 1 }, + { "path": "sessionId", "matchesPattern": "^[0-9a-f-]{36}$" }, + { "path": "softLct", "startsWith": "lct:" }, + { "path": "assignedRole", "equals": "citizen" } + ] + } + } + ] + }, + { + "id": "P1-004", + "name": "v1 query_policy returns wait-protocol default values", + "description": "§3.4.1 mandates orchestrators MUST support both branches of the wait protocol today. v1 daemons currently return status='decided' and nextPollMs=null (the defaults per the v1 schema). This vector verifies those default values are present.", "preconditions": ["P0-001"], + "setup": [ + { + "tool": "hestia_begin_action", + "input": { + "tool_name": "Read", + "target": "/tmp/p1-004-wait-check", + "session_id": "{{P0-001.sessionId}}" + }, + "capture": { "actionId": "$.actionId" } + } + ], "steps": [ { - "resource": "hestia://society/state", + "tool": "hestia_query_policy", + "input": { + "action_id": "{{P1-004.actionId}}", + "session_id": "{{P0-001.sessionId}}" + }, "expect": { + "shapeMatchesSchema": "https://web4.io/schemas/presence-protocol/v1/tools/hestia_query_policy.schema.json#/$defs/output", "fieldChecks": [ - { "path": "sovereign_lct", "startsWith": "lct:" } + { "path": "decision", "isIn": ["allow", "deny", "warn"] }, + { "path": "status", "equals": "decided" }, + { "path": "nextPollMs", "equals": null } ] } }