Pular para o conteúdo
GitHub

Schema Rules and Open Questions

Unaudited

Este conteúdo não está disponível em sua língua ainda.

Fields live in their owner docs; this doc fixes how they may evolve.

Core Principles — Postel's Law (asymmetric):

  • Requests: unknown fields inside a known schema are preserved verbatim. Unknown top-level fields are rejected. An undeclared sidecar_schema or crypto_suite_id is rejected outright.
  • Responses: unknown fields are preserved verbatim, so a newer server never breaks an older client.
  • Bounded sizes: every field has a schema-declared maximum, and oversize is rejected.

Every enum in a signed or validated structure is closed per protocol_version: an unknown value is a structural error, never a future value to ignore. Adding a value requires a new protocol_version (Versioning — Album Protocol Version Pinning). Both the server (invariant 16) and client decode enforce it (Validation Invariants). Value sets live in their owner docs: actions in Authorization — The Closed Action Set, metadata enums in Metadata — Closed Enum Value Sets, derivatives in Signed Manifests and Provenance — Derivative Provenance, stacks in Asset Organization — Stack Membership Schema.

timestamp/ts fields are RFC 3339, self-asserted and audit-only, never used for authorization or ordering (Key Management — Write Authorization). The server records its own received_at for time-based policy. A write-only drift bound (default ±30 days) surfaces broken clocks and is not a security control.

An index of negated owner-doc rules. Receivers reject the consequence structurally regardless.

A correct client never… Owner
Re-signs under a lower crypto_suite_id Cryptographic Primitives — Versioning Identifiers
Signs for an epoch whose write-tier key it lacks Key Management — Write Authorization
Removes an OR-set add_id it never observed Metadata — Add-id Binding
Strips _unknown or superseded_captions on write-back Metadata — Collaborative Metadata
Overwrites or truncates a provenance chain Signed Manifests and Provenance — Chained, Append-Only Structure
Sends revoke_all_sessions without master-key proof Authentication — Explicit Revocation
Decodes non-home-peer bytes outside the sandbox Clients — Sandboxed Decoder
Promotes an AI tag to a user tag except by a signed op Metadata — Tag Provenance and Namespacing
Retries 429/409/426 with the same payload Validation Invariants — Protocol and Capability Negotiation
Orders a merge or authorizes a write by a self-asserted ts or timestamp Metadata — Collaborative Metadata
Sizes an allocation from a length a server or peer states Network Resilience — HTTP Transport
Hashes, seals, derives a key or encodes a signed record with its own re-implementation instead of the shared core Implementation Risk Register
  1. Announce at /.well-known/capsule/deprecation at least the announcement window (default 90 days) before cutoff, naming the date and the minimum surviving protocol_version.
  2. Warn: until cutoff, responses carry X-Capsule-Min-Client-Build and a Warning: header.
  3. Cut off: the version leaves [Min, Max]. Its writes get 426; reads still succeed.
  4. No stranded data: every recovery path (Backup and Recovery — Recovery Paths) still works. Only the old binary is stranded.

The policy is never retroactive: albums pinned to a dropped version stay readable forever, just not writable.