companion-context-protocol

Known Compatibility Risks

Status: Draft, pre-1.0

CCP is 0.1.0-draft. Draft versions may change incompatibly while the current profile slices, schema contract, and conformance expectations are refined. This document lists the known surfaces where implementers should expect change before a stable 1.0 release, and how to insulate an implementation against those changes.

The canonical contract is JSON Schema. When in doubt, validate against the schemas shipped in schemas/ rather than against any prose, adapter sketch, or package type.

Versioning Signals

Schema Surfaces Likely To Change

The conformance runner enforces today’s invariants. The following surfaces are the most likely to expand or tighten before 1.0:

Enum sets (additive)

These enums are expected to grow as new profiles land. Implementers should treat unknown values as forward-compatible signals rather than errors when reading, and should never hard-code the full set in production code:

Field envelope

The { value, visibility, provenance } envelope shape is stable for the Commerce Context Profile. Identifiers like pet_id remain plain strings. Risks:

Provenance

Authorization decision

authorization_decision shape may evolve. Likely additions:

Response status / decision / context consistency

The current invariant set (ok / partial / denied consistency, denied requires null context plus omissions, partial requires non-null context plus omissions) is load-bearing and will not be relaxed. Future drafts may add new status values for asynchronous flows.

Permission grant lifecycle

status: active is incompatible with revoked_at; expired grants must carry expires_at; revoked grants must carry revoked_at. These constraints will not be loosened. Future drafts may add states (e.g., pending, suspended) for multi-party consent.

The current PermissionGrant schema defines record shape only. It does not standardize issuance, storage, token format, signing, proof-of-possession, introspection, or revocation propagation. Implementers should treat grant_id as a lookup key into trusted authorization state, not as a bearer secret, and should expect this area to change before 1.0. The grant carries grantor_actor_type and grantee_actor_type but no field for recording how the issuer’s authentication was verified — the verification MUST happen per SPEC.md Conformance Requirements but is currently unserialized. A future draft may add a grantor_verification_method (or equivalent) once proof-of-possession lands; cross-system grant portability before that field exists relies on out-of-band trust between issuer and consumer.

Commerce-safe rule

Every field in a returned commerce_context must include commerce_safe and must not include staff_only or restricted_sensitive. This is load-bearing for the Commerce Context Profile and will not be relaxed. Other profiles will define their own equivalent rules.

Facility-shareable rule

Every field in a returned care_facility_context or pickup_verification_context must include facility_shareable and must not include staff_only or restricted_sensitive. The boarding-preparation slice and the pickup-verification slice each preserve their own facility, service-window, purpose, scope, provenance, and omission boundaries. FacilityStringField and FacilityStringArrayField value content is filtered through SensitiveKeywordPattern so that array entries cannot smuggle banned keywords (billing, payment, household, medical, diagnosis, treatment, staff-only / staff-note, relationship-dispute, custody, identity-document) past the visibility check.

Care-network visibility rule

Every field in a returned care_network_context must include at least one of care_network_visible, contact_shareable, or action_authorization_visible, and must not include staff_only or restricted_sensitive. Care-network and commerce-context endpoints must be independently access-controlled — care-network visibility classes do not imply commerce safety, and commerce visibility does not imply care-network access.

Profile Boundary

The Commerce Context Profile’s exclusions (staff notes, full wellness timelines, diagnosis or treatment history, billing data, household data, sensitive facility operations data, raw agent_summary_only observations) are intentional. Broadening them requires a new profile with its own scopes, purpose rules, visibility behavior, and conformance fixtures. Implementers should not expect these exclusions to soften within Commerce Context.

The boarding-preparation Care Facility Context slice’s exclusions (medication administration, facility observation writeback, full wellness timelines, diagnosis or treatment history, billing data, payment authority, identity document copies, unrelated household data, and staff-only records) are intentional. Broadening them requires additional scopes, purpose rules, visibility behavior, and conformance fixtures.

The Care Facility Pickup Verification slice’s exclusions (feeding instructions, medication administration, billing, payment authority, household context, identity-document copies and numbers, broader care history, wellness timeline, diagnosis history, treatment history, vaccination records unless separately requested, unrelated emergency contacts, unrelated Care Network contacts, staff-only notes, internal facility notes from other providers, raw behavioral incident records, and free-text denial details that reveal restricted source content) are intentional. The slice answers only whether release to the requested actor is allowed for the requested pickup context.

The Care Network Lookup slice’s exclusions (household data, staff-only records, sensitive provenance references, unrelated contacts outside the requested subject actor, billing, payment authority, medical or treatment context, and free-text denial details that reveal restricted source content) are intentional. The slice answers only whether the requested subject actor’s relationship, contact channels, action authorizations, or revocation status are visible for the declared purpose.

Facility Truth remains a design candidate, not a schema-backed profile. If it becomes the first public review wedge, it should still land as a small separate profile with its own schemas, examples, omissions, freshness rules, adapters, and tests rather than widening existing pet-specific profiles.

Cross-profile inference

The current conformance rules prevent many single-response leaks, but they do not fully prevent inference across multiple authorized profile calls. A requester with access to more than one profile may compare omissions, partial responses, timestamps, or summaries to infer restricted context. Implementers should treat combined profile access as a policy decision and apply rate limits, logging, minimization, and abuse review outside schema validation. Future drafts may add stricter cross-profile guidance.

Adapter Compatibility

Adapter sketches are illustrative. They preserve canonical CCP semantics but their surface shapes are not normative.

OpenAPI

MCP

Package Compatibility

The packages in packages/typescript/ and packages/python/ are draft helpers, not normative artifacts.

TypeScript

Python

URL And Identifier Surfaces

Security And Privacy Surfaces

These are not “compatibility risks” in the schema sense, but they affect what an implementation can safely upgrade through:

How To Insulate An Implementation