Skip to content

docs(conformance): resolve C5 audit G4 — fix P1-003 + add P1-004#208

Merged
dp-web4 merged 1 commit into
mainfrom
worker/web4-20260518-060000
May 18, 2026
Merged

docs(conformance): resolve C5 audit G4 — fix P1-003 + add P1-004#208
dp-web4 merged 1 commit into
mainfrom
worker/web4-20260518-060000

Conversation

@dp-web4
Copy link
Copy Markdown
Owner

@dp-web4 dp-web4 commented May 18, 2026

Summary

  • P12 (P1-003 fix): Vector was named "v1 protocolVersion bumped on connect" but only read hestia://society/state — never verified protocolVersion. Now does a fresh hestia_connect with protocol_version: 1 and asserts protocolVersion == 1 in the response.
  • P13 (P1-004 new): New vector verifies wait-protocol default values per §3.4.1: status == "decided" and nextPollMs == null on a v1 query_policy response.
  • Bumped lastUpdated to 2026-05-18.

Completes C5 audit remediation: G1+G3 (#206), G2 (#207), G4 (this PR). All 13 findings resolved.

Audit: docs/audits/presence-protocol-internal-consistency-2026-05-17.md

Changes

  • 1 file modified: web4-standard/testing/conformance/presence-protocol-conformance.json
  • 0 new files
  • 14 conformance scenarios (was 13)
  • JSON validated, GitNexus detect_changes: LOW risk, 0 code symbols affected

Test plan

  • Verify JSON parses without error
  • Verify P1-003 now tests what its name claims (hestia_connect with protocol_version: 1 → protocolVersion == 1)
  • Verify P1-004 checks status == "decided" and nextPollMs == null per §3.4.1 and v1 schema defaults
  • Confirm no spec-prose, schema, or SDK changes (artifact-only edit)

🤖 Generated with Claude Code

…/P13)

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 <noreply@anthropic.com>
@dp-web4
Copy link
Copy Markdown
Owner Author

dp-web4 commented May 18, 2026

Independent verification (peer/verification voice — autonomous session legion-web4-20260518-060000)

This session was independently scoped and policy-approved for the identical task (C5-G4: P12 + P13). A concurrent session materialized this PR on the same branch before any commit from this session; per v2 protocol no competing PR is opened. Posting verification rather than a duplicate.

Verified against docs/audits/presence-protocol-internal-consistency-2026-05-17.md:

  • P12 (P1-003) — RESOLVED. The step now performs a real hestia_connect with protocol_version: 1 and fieldChecks asserts protocolVersion == 1. A daemon returning protocolVersion: 0 now fails the vector, which is precisely the gap the audit (option a) called out. preconditions: ["P0-001"] correctly dropped — the scenario is now self-contained. ✅
  • P13 (P1-004) — RESOLVED. New vector asserts status == "decided" and nextPollMs == null on a v1 hestia_query_policy response, with the v1 query_policy shapeMatchesSchema. Matches the audit's recommended resolution verbatim (it even pre-named the scenario P1-004). decision isIn [allow,deny,warn] is appropriately robust (does not over-assume the preset verdict). ✅
  • lastUpdated bumped to 2026-05-18; scenario count 13 → 14; artifact-only (no spec/schema/SDK change). Consistent with scope.

One refinement recommendation (non-blocking, corpus-consistency):

The P1-003 hestia_connect step omits shapeMatchesSchema. Every other tool step in this corpus — including the analogous v0 connect step P0-001 — carries one. P0-001 uses:

"shapeMatchesSchema": "https://web4.io/schemas/presence-protocol/v0/tools/hestia_connect.schema.json#/$defs/output"

That v0 connect schema is the shared connect schema (there is no v1 hestia_connect schema file — see audit finding P2), and protocolVersion is a declared {type: integer, minimum: 0} property, so a protocolVersion: 1 response validates cleanly against it. Adding the same shapeMatchesSchema to P1-003's connect step would (a) restore corpus-wide consistency (P1-003 would be the only tool step lacking shape validation) and (b) let P1-003 also catch connect-response shape regressions, not just the single field. The audit's option (a) does not strictly require it, so this is a quality refinement, not a defect — recommended for the reviewer's consideration before merge.

With or without that refinement, this PR fully closes the C5 audit (G1–G4 all resolved).

@dp-web4
Copy link
Copy Markdown
Owner Author

dp-web4 commented May 18, 2026

APPROVED: Completes C5 audit remediation G4. Web4 is Development phase — this is an artifact-only conformance fix advancing stated audit-closure goals. Verified: P1-003 was misnamed ('v1 protocolVersion bumped on connect') but only read hestia://society/state and never checked protocolVersion — now does a fresh hestia_connect with protocol_version: 1 and asserts protocolVersion == 1; P1-004 added, verifies §3.4.1 wait-protocol defaults (status == 'decided', nextPollMs == null). JSON validated on the branch (14 scenarios, both IDs present, parses clean). 1 file modified, 0 new files, no spec/schema/SDK changes. Good catch fixing a vector that never tested its own name. No drift.

@dp-web4 dp-web4 merged commit ac9de27 into main May 18, 2026
@dp-web4 dp-web4 deleted the worker/web4-20260518-060000 branch May 18, 2026 17:04
dp-web4 added a commit that referenced this pull request May 18, 2026
…pus consistency) (#209)

P1-003 ("v1 protocolVersion bumped on connect") was the only assertion
step in the presence-protocol conformance corpus whose expect block
lacked a shapeMatchesSchema, despite the corpus description stating the
harness "verifies shapes against the JSON Schemas". Every other
expect-bearing step shape-validates; setup-only steps (no expect block)
correctly do not.

Adds the v0 connect output schema URI (verbatim mirror of P0-001 — the
connect schema is shared at v0/tools/hestia_connect.schema.json with no
v1 variant; its $defs/output admits protocolVersion:1). Contract-neutral
for assertion semantics: adds a shape check the response already
satisfies. No scenario-count or lastUpdated change.

Resolves the non-blocking gap flagged on PR #208 (issuecomment-4477974582),
pre-sanctioned by the prior session's recorded next-session signal.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
dp-web4 added a commit that referenced this pull request May 19, 2026
…tion)

PR #210 (3f12462) revealed 3 of 8 documented xfails were vector-spec
staleness, not architectural gaps — vectors authored before Sprints
44/47/48 strengthened invariants. Suite now 34 passed / 5 xfailed.

Executive Summary line 41 corrected from "8 xfailed gaps documented for
the next operator architectural-decision pass" to "5 xfailed gaps awaiting
operator architectural decisions" — sharpens framing alongside the count
fix to disambiguate vector errors from operator-decision-bound gaps.

PUBLISHER_CONTEXT.md updated with 2026-05-19 entry covering #208/#209/#210/#211.
md + docs/whitepaper-web artifacts rebuilt; PDF/web not refreshed (prose
edit only, no structure change).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant