Schema Rules and Open Questions
Unaudited此内容尚不支持你的语言。
Fields live in their owner docs; this doc fixes how they may evolve.
Schema Evolution and Field Grammar
Section titled “Schema Evolution and Field Grammar”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_schemaorcrypto_suite_idis 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.
Closed Enums
Section titled “Closed Enums”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 Grammar
Section titled “Timestamp Grammar”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.
Forbidden Client Behaviors
Section titled “Forbidden Client Behaviors”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 |
Min-Supported-Client Deprecation Policy
Section titled “Min-Supported-Client Deprecation Policy”- Announce at
/.well-known/capsule/deprecationat least the announcement window (default 90 days) before cutoff, naming the date and the minimum survivingprotocol_version. - Warn: until cutoff, responses carry
X-Capsule-Min-Client-Buildand aWarning:header. - Cut off: the version leaves
[Min, Max]. Its writes get426; reads still succeed. - 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.
Open Questions
Section titled “Open Questions”- Cross-server album replication (deferred to v2). v1 pins each album to one home server. The interim answer is the aggregated album (Federation — Federated Shared Albums (Aggregated Albums)).