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

Decisions Needed Before 1.0

Some surfaces in 0.1.0-draft are not “likely to change additively” or “likely to tighten” — they are unresolved design questions where the protocol intentionally has not committed to a primitive. They are distinct from the additive enum and shape-evolution surfaces below: those describe directions a stable shape will move, while these describe holes the stable line cannot ship with. Implementers building against the draft will each invent their own answer, and that is where interoperability will silently break.

PermissionGrant transport, proof, and revocation propagation

The canonical schema defines record shape only. An implementer reading 0.1.0-draft end-to-end does not learn how grants move between systems. Four sub-decisions remain open:

Candidate primitives are under evaluation. None are endorsed in 0.1.0-draft:

Until a primitive is selected, compatible servers MUST treat grant_id as a lookup key into trusted authorization state, MUST fail closed when issuer authority, requester identity, subject pet, purpose, scopes, facility boundary, service window, expiration, or revocation state cannot be verified, and SHOULD assume that cross-organization grant portability depends on out-of-band trust between issuer and consumer. A future draft may add a grantor_verification_method (or equivalent) once proof-of-possession lands. Facility Truth v1 does not require a PermissionGrant, so this decision does not gate Facility Truth adoption, but it must resolve before Commerce Context, Care Facility Context (boarding-preparation and pickup-verification), or Care Network Lookup can interoperate across organizations.

Tracked in GitHub issue #6.

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:

Subject identifier change in this draft: pet_id was moved out of the base AuthorizationDecision required array to accommodate Facility Truth, which uses facility_id as its subject identifier instead. Each pet-bound profile’s response wrapper now re-requires pet_id via its own allOf overlay; the per-profile contract is unchanged. Implementers validating against the bare AuthorizationDecision $def (rather than against a profile response wrapper) will see this as a loosening — bare-base validators that previously rejected an AuthorizationDecision lacking pet_id now accept it. Validate against profile response wrappers, not the bare $def.

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.

Grant transport, proof-of-possession, and revocation propagation are intentionally not standardized in 0.1.0-draft. They are covered separately under ## Decisions Needed Before 1.0 above, because they are an unresolved design question rather than a forward-compatible shape evolution.

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.

Facility-public rule

Every field in a returned facility_truth_context MUST include facility_public and MUST NOT include staff_only, restricted_sensitive, commerce_safe, facility_shareable, care_network_visible, contact_shareable, action_authorization_visible, owner_visible, caregiver_visible, vet_shareable, or agent_summary_only (Facility Truth fields are facility-subject, not pet- or owner-subject, so pet-centric or summary-only classes are semantically incoherent and rejected by the canonical schema). Every Facility Truth field’s provenance MUST carry verified_at, which MUST be a real past UTC timestamp recorded by the facility — not the request time or a future placeholder. The Facility Truth response must not include pet_id anywhere; the canonical schema rejects pet_id on facility_truth_context and on authorization_decision, and the conformance runner additionally scans the full response for any stray pet_id key. Facility Truth endpoints must be independently access-controlled — facility_public does not imply commerce safety, care-network access, or facility-shareable status. v1 covers public-fact scopes only and does not require a PermissionGrant; partner-only scopes are deferred and will need their own grant shape.

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.

The Facility Truth profile’s exclusions (pet-specific context of any kind, owner or household records, care-network records, staff identities or schedules or credentials, internal capacity models or live availability counts, billing data, payment authority, identity-document data, medical or wellness history, diagnosis history, treatment history, sensitive relationship narratives, and free-text denial details that reveal restricted source content) are intentional. The profile answers only whether the requested facility’s public-fact context (profile, hours, services, contacts, service area, acceptance criteria, booking methods, policy summaries) is current and visible for the declared facility_truth_lookup purpose.

Facility Truth v1 covers public-fact scopes only. Adding higher-scrutiny scopes (e.g., facility.certifications.read) will require introducing a facility_partner_visible class and a partner-only grant shape — most likely an additive subject_facility_id on PermissionGrant. Implementers should not assume the v1 no-grant semantics generalize to those future scopes.

Cross-profile inference

Cross-profile inference is a residual risk rather than a profile-boundary tightening, and it is covered in THREAT_MODEL.md §Cross-Profile Inference. The short version: the canonical schemas cannot detect cross-call correlation, so combined profile access is a server-side policy decision. SPEC.md Conformance Requirements state that servers MUST NOT rely on per-profile narrowness alone; the open sub-decisions (correlation identifier, rate-limit envelope, minimization guidance, profile-combination policy) and candidate primitives under ongoing research are catalogued in THREAT_MODEL.md §Cross-Profile Inference, and docs/implementers/cross-profile-inference.md carries a worked attack-and-defense example. None of the candidate primitives are endorsed in 0.1.0-draft, and the stable line is not expected to close this residual risk.

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