Skip to content

docs(audit): presence-protocol.md internal-consistency audit (C5)#204

Merged
dp-web4 merged 2 commits into
mainfrom
worker/web4-20260517-130036
May 17, 2026
Merged

docs(audit): presence-protocol.md internal-consistency audit (C5)#204
dp-web4 merged 2 commits into
mainfrom
worker/web4-20260517-130036

Conversation

@dp-web4
Copy link
Copy Markdown
Owner

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

Summary

Internal-consistency audit of the operator-landed presence-protocol.md (v0→v1, 2026-05-16 burst d786770466d7c3b5). Same instrument as the 2026-05-15 C2 mcp-protocol audit that fed PRs #200/#201/#203. Analysis only — no edits to the spec, schemas, CHANGELOG, or conformance vectors; remediation is a separate reviewable follow-up.

Deliverable: 1 file modified — docs/audits/presence-protocol-internal-consistency-2026-05-17.md.

Findings (2 HIGH · 6 MEDIUM · 5 LOW)

  • P1 (HIGH) §3 normatively states tool input is camelCase; every §3 input example and every input JSON Schema is snake_case (plugin_id, action_id, …). Outputs are camelCase — the input half of the rule is false as written.
  • P2 (HIGH) synthetic (commit 66d7c3b5) appears in zero schemas, zero conformance vectors, zero CHANGELOG entries — a self-violation of the CHANGELOG's own "a protocol change is not complete until…" rule. Asymmetric with status/nextPollMs, which followed the discipline fully.
  • P3 (MED) §7 Conformance points back to §3's contradictory shapes and never normatively binds the JSON Schemas directory — no tiebreaker for P1.
  • P4 (MED) §3.1 output example pinned to stale protocolVersion: 0.
  • P5 (MED) §5.4 type catalog omits status/nextPollMs and never documents enforced.
  • P6 (MED) §4.1 resource fields snake_case vs §5 camelCase mandate; §8 reconciles a different field than §4.1 lists.
  • P10 (MED) §9 "Open work" lists policy engine + vault v2 as pending — CHANGELOG documents both as shipped in v1.
  • P11 (MED) §8 drift table says error codes will be emitted "when v1 lands" — v1 has landed; drift status indeterminate.
  • P7/P8/P9 (LOW) wrong connect link; §2 lacks additive-field bump exception; §3.1 error list drops §6.1 reservation caveat.
  • P12 (LOW) P1-003 conformance vector claims to test "v1 protocolVersion bumped" but only reads society/state resource.
  • P13 (LOW) status/nextPollMs (wait protocol) have zero conformance test coverage despite MUST requirement.

Grouped for remediation: G1 casing authority (P1/P3/P6), G2 discipline honesty (P2/P8/P10/P11), G3 localized staleness (P4/P5/P7/P9), G4 conformance vector gaps (P12/P13). All spec-internal; none require SDK/daemon changes.

Provenance

Test plan

  • Reviewer spot-checks P1 (grep input keys in schemas/presence-protocol/*/tools/*.schema.json vs §3 lines 101–103)
  • Reviewer confirms P2 (grep -rl synthetic over schemas + conformance + CHANGELOG returns nothing)
  • Reviewer confirms P10 (§9 items vs CHANGELOG v1 completion)
  • Reviewer confirms P12 (P1-003 vector content vs its title)

🤖 Generated with Claude Code

dp-web4 and others added 2 commits May 17, 2026 13:07
Internal-consistency audit of the operator-landed presence-protocol.md
(v0->v1, 2026-05-16 burst). Same instrument as the 2026-05-15 C2
mcp-protocol audit; analysis-only, no spec/schema/CHANGELOG edits.

2 HIGH / 4 MEDIUM / 3 LOW. Headline: the spec's own discipline thesis
is asymmetrically held — (P1) normative input-casing rule contradicts
every input example and every input JSON Schema; (P2) the `synthetic`
flag (66d7c3b) has zero schema/vector/CHANGELOG trace, violating the
CHANGELOG's own completion-discipline rule while the sibling
status/nextPollMs change followed it fully. Findings grouped G1
(casing authority) / G2 (discipline honesty) / G3 (localized staleness)
for a future reviewable remediation; all spec-internal, none need SDK.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Supplement the C5 audit with 4 additional findings from a second
independent pass:

- P10 (MED): §9 lists completed work as pending (policy engine + vault
  v2 shipped in v1 but still listed as "open work")
- P11 (MED): §8 drift table row 3 references v1 as future ("when the
  policy engine lands") — v1 has landed, status indeterminate
- P12 (LOW): P1-003 conformance vector claims to test "v1 protocolVersion
  bumped" but only reads society/state resource
- P13 (LOW): status/nextPollMs (wait protocol) have zero conformance
  test coverage despite MUST requirement on orchestrators

Total: 2 HIGH, 6 MEDIUM, 5 LOW (was 2/4/3). Updated remediation
grouping to include G4 (conformance vector gaps).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dp-web4
Copy link
Copy Markdown
Owner Author

dp-web4 commented May 17, 2026

APPROVED: Internal-consistency audit of presence-protocol.md (v1). Spot-verified two HIGH findings against main: P2 confirmed — 'synthetic' is present in presence-protocol.md (L121-134) but absent from presence-protocol-CHANGELOG.md AND presence-protocol-conformance.json, a real self-violation of the spec's own completion-discipline rule; P1 confirmed — v1 hestia_query_policy.schema.json input is snake_case ('action_id') against the §3 camelCase normative claim. Analysis-only, 1 new file (≤5), no spec/schema/vector edits, zero drift, no collision with open PRs. Matches the accepted C2-audit precedent that fed #200/#201/#203 — internal-consistency review is a standing Development-phase deliverable; remediation correctly deferred to a separate reviewable PR.

@dp-web4 dp-web4 merged commit 47ef781 into main May 17, 2026
@dp-web4 dp-web4 deleted the worker/web4-20260517-130036 branch May 17, 2026 23:04
dp-web4 added a commit that referenced this pull request May 18, 2026
…ized staleness (G3) (#206)

* docs(spec): resolve C5-G1 casing-authority contradictions (P1/P3/P6)

presence-protocol.md's normative casing statements were self-contradictory
and contradicted the JSON Schemas + conformance vectors §7 binds:

- P1 (HIGH): §3 falsely stated tool INPUT is camelCase; schemas require
  snake_case inputs. Rewrote §3 as a surface-split rule (input snake /
  output+§5-type camel / §4 resource snake), anchored to the bound schemas.
- P3 (MED): §7 had no precedence rule and bound only the vectors JSON.
  Added a Precedence clause making the Schemas DIRECTORY + vectors
  normative over prose on any wire-shape/casing disagreement.
- P6 (MED): narrowed §5's overbroad "all wire shapes camelCase"; corrected
  §8 drift row 5 whose "rename to camelCase in v1" aspiration contradicted
  the §7-bound snake_case conformance vectors (sovereign_lct, chain_length).

Zero wire-shape change — artifacts were already correct; only prose was
wrong. Remediates the merged C5 audit (PR #204). 1 file, +27/-8.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(spec): resolve C5-G3 localized staleness (P4/P5/P7/P9)

Four independent one-spot fixes from the C5 presence-protocol
internal-consistency audit (PR #204):

- P4 (MED): §3.1 output example pinned stale `protocolVersion: 0`;
  updated to `1` to match §2's v1 declaration and the conformance
  vectors.
- P5 (MED): §5.4 PolicyResult type-catalog entry lagged the §3.4
  tool surface — added `status`, `nextPollMs`, and documented
  `enforced`. Cross-references §3.4.1 wait protocol.
- P7 (LOW): §2 link text "tool/connect" → `hestia_connect` with
  correct in-doc anchor.
- P9 (LOW): §3.1 error list for `hestia.invalid_role` omitted the
  §6.1 reservation caveat (v1+; v0 daemons may emit
  `hestia.internal_error` instead).

Zero wire-shape change — only prose/examples brought in line with
existing schemas and normative sections. Complements the G1 casing-
authority commit (same branch).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
dp-web4 added a commit that referenced this pull request May 18, 2026
…ipline; §7.7 promotion gate formalized

Eight commits since 2026-05-17 reviewed. All are audit-remediation
clean-up of two specs already on the watch list (presence-protocol +
mcp-protocol §7.7); none introduce new protocol surface or warrant
integration today.

- C5 presence-protocol internal-consistency audit (#204) → G1
  casing-authority + G3 localized staleness (#206) → G2 discipline
  honesty (#207). Spec now internally consistent at v1 — but
  consistency is the *condition* for integration, not the trigger.
  DEFER continues pending Hestia/Hardbound registry-published release.

- mcp-protocol C2 audit remediation HIGH F2/F3/F4/F12 (#200) +
  MEDIUM F1/F5/F15 (#201) + LOW F14/F16 (#203). §7.7 conformance
  status disambiguated per-subsection; atp_settlement gains referent
  slot forward-compatible with §7.7.3 acceptance payload.

- §7.7 promotion-tracking memo (Sprint 54 C3, #202) formalizes the
  integration gate: 3 hard prerequisites (one now met), 5 open
  design questions, 2-implementations + interop + error-catalogue
  evidence criteria. Pending Updates row refined to cite the memo
  directly rather than re-derive gate logic per maintenance pass.

Live whitepaper sections verified clean of canonical-term drift
(only archive files retain historical expansions, intentionally
preserved per 2026-04-29 cleanup). Build artifacts remain aligned
with 2026-05-16 source state (5ccbe46); no rebuild needed.

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