Lexicon evolution and catalog export
Media Discussions expects its schemas and supported media types to evolve. This policy applies to the published television Lexicons and to future shared media contracts. A tagged app or SDK release identifies its implementation. The Lexicon NSID identifies the wire contract. Each published schema record’s CID identifies one exact revision of that contract. The integer lexicon: 1 identifies the schema language. AT Protocol Lexicon evolution
Persistent references
- Address a public subject by its full, case-sensitive
at://<publisher-did>/<collection>/<rkey>. Treat the key as an opaque string. Read the title, parent, and numbering from validated record fields. Issuing a new subject key is a catalog decision. An importer can reuse a persisted identifier or an independently stable provider ID. Store provider identifiers and their scope as evidence for reconciliation. AT URI scheme · Record key specification - Keep each existing DID, collection, and key through metadata corrections and account hosting changes. A reference to the current record uses its AT URI. An operation tied to a particular value can use the URI and CID together. Never assign a previously published address to a different work, installment, or edition. Preserve old reference behavior through a replacement or present the old subject as unavailable when its source is removed. AT Protocol account migration
- Treat public share URLs and attributed provider mappings as separate evidence. Keep established first-party episode aliases bound to their original AT URIs. The pilot freezes ordinal aliases and preserves them when imported numbering or parent relationships change. Reserve missing records’ paths so a later import cannot reuse them. Verify that browser redirects, resolution, and discussion attachment agree. A provider correction may change an external mapping claim. Retain the original link and treat competing trusted claims as ambiguous. Alias compatibility issue
- Discourage deriving identifiers from mutable titles or display positions. The existing pilot keeps
widows-bay-s01e02anddoctor-who-2024-73-yardsas published. A future writer can mint opaque keys under the existingkey: "any"rule. AT record readers must accept every key valid under the applicable Lexicon. Web route slugs use their own allocation and syntax. - For a BBC production, prefer an independently verified BBC Programme Identifier as the catalog’s external ID for the exact programme subject it describes. One BBC production can have an overarching brand PID, distinct season and episode PIDs, and version PIDs. Treat the last as evidence about a particular edition or encoding. Preserve their separate kinds, original links, and source evidence. A catalog’s AT URI and its author remain the portable discussion reference. BBC programme and version identifiers
Compatibility rules
An evolution within one published NSID must accept valid older values and preserve the older meaning of known fields. Current writers must also produce values an older validator can accept. A compatible addition can define optional descriptive metadata whose absence retains the previous behavior. Let readers ignore unfamiliar optional fields for projection and retain them when round-tripping a record they are authorized to write.
Use a new NSID for an incompatible change. Examples include changing required fields, a field’s type or meaning, a key rule, a size limit, or a closed union. Turning mapping.episodeUri into a reference to arbitrary media would change its meaning. Add a distinct subject mapping contract when there are independently addressable target kinds. Keep the older NSID resolvable and keep its record addresses usable. Give experimental contracts separate names or explicit candidate status so implementers can identify them before adoption. Upstream compatibility rules
Choosing a migration for a change
Expect frequent changes during the pilot. Put each change through the smallest rollout its scope requires.
| Change | Example | Rollout |
|---|---|---|
| Correct an existing value | Fix an episode’s title, air date, or sourced numbering | Update the existing record at its DID, collection, and key. Preserve the old share URL binding. On the publisher’s repo, verify the read and guard the update by its expected CID or repository commit. |
| Add compatible metadata | Add an optional original title to an episode | Keep the NSID and addresses. Check that an old record passes the new validator and a new record passes the old validator. Readers that edit records should preserve fields they do not recognize. Backfill only where there is verified evidence for the new field. |
| Add a subject or relationship | Publish a mapping from a provider’s show ID to a series | Add a contract with its own NSID and an explicit series target. Teach the resolver to read it alongside the existing episode claims. The same provider may publish distinct show and episode links. Use each at its recorded subject level. |
| Change the meaning of a published contract | Require a different target type or key rule | Introduce a new NSID. Deploy readers for both forms before enabling new writes. For replacement records, use an attributed crosswalk only where the old and new addresses identify the same subject. |
Rehearse a breaking migration on one show and a special first. The dry run should name the pinned source and target schemas, the source AT URI and expected CID, the proposed target address and operation, and any conflict or loss. Re-read the result, exercise the old episode URL and a post that links to it, and rerun the same plan. A second run should have zero remaining changes. A concurrent edit should surface a conflict for review. Expand to larger batches after those checks. AT Protocol record writes · Publisher verification
Run compatibility checks for any contract change. A data rewrite is needed only for records whose stored value must change. Keep old references usable in the reader and resolver. Migrating a catalog record leaves discussions and private Space records in their owning accounts. A separately authorized private migration can use an exact crosswalk when the owner asks to change a stored reference. Spaces data and permissions
Media and export scope
Primary television parentage and curated membership answer different questions. The published series, season, and episode records remain the source for their television relations. Numbering evidence belongs to the provider and its convention. Curated membership can point at a series, season, installment, work, edition, or another collection once those kinds have defined addresses. Independently authored collections carry their own provenance and ordering.
| Case | Preserve during export or migration |
|---|---|
| Doctor Who runs and specials | Keep repeated Season 1 labels scoped to their respective runs. Carry alternative numbering with its source. A seasonless special can join an anniversary group without gaining a primary season. |
| Classic serials and editions | Preserve distinct addresses for the story, separately broadcast parts, and presentations that combine those parts. A restored or reconstructed Shada release and a new adaptation have different relations to the original work. A shared provider page can describe the aggregate. |
| Star Trek shorts and combined broadcasts | Keep Short Treks and very Short Treks as separate series. The Children of Mars Blu-ray appearance is a package relationship. A combined Encounter at Farpoint offering and each individual installment can require different subjects. |
| Franchise, phase, and viewing order | A season can appear in one MCU phase and several viewing lists. An ordering belongs to the list. A franchise can include multiple shows, films, and audio works without changing those subjects’ primary identity or format. |
| Distinct formats and their editions | Distinguish the 1996 Doctor Who television film’s existing address, standalone Star Trek films, scripted audio, and an album with standard and deluxe releases. Preserve first-release dates, regions, delivery links, and edition relations only at the granularity the source supports. |
| Reboots and revivals | Give distinct productions such as the original and reimagined Battlestar Galactica separate series identities under one franchise. Carry a sourced relationship between them. A continuation can retain its earlier series identity and numbering, or have its own production identity within the same continuity. A title match or numbering reset is insufficient evidence. |
Before publishing a collection contract, define owner or collection-scoped delegated authority, compatible member types, and behavior for duplicate edges, ordering ties, cycles, and unavailable members. Define how an index handles record edits, deletes, or deactivation at a verified repository revision. A public media edge cannot extend access to a discussion or reveal protected evidence. Episode and discussion identity decisions
An export targets a named schema profile. Archive its exact schema inputs with each supported profile. Pin network schemas by NSID and CID, or use a recorded source revision and digest for an offline input. Each mapping documents its supported source types, field changes, target prerequisites, and known omissions. Report whether each source record translated successfully, translated with stated loss, or was unsupported. Preserve the input AT URI, its publisher, and source evidence with the export report. Where the output uses different record addresses, record the exact crosswalk and its relation. An edition-of or part-of association does not authorize replacing a related subject’s address. Retain unsupported public source values with the original profile so later readers can retry a translation.
The standalone TitleGraph adapter reads the pinned 0.1.16 TV hierarchy. Its episode contract needs both parents and an integer ordinal. A future write translation would also need valid TID keys and required core metadata such as productionStatus. A seasonless special has no direct translation under that pin. A day-only date can stay in source evidence when the target expects a timestamp. Preserve distinct provider claims, original URLs, and territorial release evidence. Record unsupported records or omitted fields explicitly. The pilot’s /api/catalog serves its own candidate publication manifest. Pinned TitleGraph analysis
Forward migration procedure
The Doctor Who rehearsal records the two proposed writes, expected CIDs, legacy paths, and the no-op second run. Worked migration rehearsal
- Inventory the contract. Pin the current and target schemas, supported record types, key rules, and adapter revisions. Capture a representative export of existing public records and stable route bindings. Include valid older data and records already emitted by independent implementations.
- Prepare both readers. Validate by the full NSID and record address. Teach new readers to accept existing and new records concurrently. Verify that old readers continue to accept compatible values and ignore explicitly additional types. Report unsupported values without changing them. Preserve actual source availability and show current visibility on every public surface.
- Plan public changes. Produce a dry run with exact source and target keys, counts, expected field losses, and conflict findings. Record source CIDs or repository revisions as appropriate. When a new subject or collection requires a new address, publish an attributed crosswalk. Scope its relationship precisely and keep the original records and references. Separate changes by publisher and by storage boundary.
- Publish and verify in order. Establish the target contract and test independent DNS-backed schema resolution when publishing a new NSID. Start new writes once old and new readers pass their fixtures. Make backfills resumable and idempotent. Verify the final records and crosswalk at their owning PDS. Keep the previous reader and exporter usable during rollout. Rollback can stop new writes and disable the new projection. Already published references stay resolvable.
- Handle user-owned data with its owner. Preserve the subject address and source authorship on public posts. Keep watch history and its URI-derived keys in the owner’s Space unless the owner chooses a supported, private migration. For a host move, verify the repository contents and the Space’s policy and data under the same DID, then reauthorize clients against the new host. Keep references, logs, and aggregate outputs about private activity inside that perimeter. Use the authorized Space for private state throughout the migration. AT Protocol account migration · Spaces migration proposal
Every schema release should show which old and new readers and writers were checked, what exports were tested, and what was unavailable or lossy. Use independent fixtures for reused season numbers, seasonless specials, story and part separation, competing curators, same-key records from different publishers, alternate editions, and unknown optional fields. Exercise retries, deleted sources, stale repository revisions, aliases after a numbering correction, and changes in source visibility. Use the same cases for a target schema upgrade even when the Media Discussions schema itself has not changed. Independent implementation guide · SDK specification
Four additional television cases cover a reboot, a remade special, a cross-franchise adaptation, and a seasonal anthology with standalone crossover shorts. Use those cases to test what would justify changing a contract. Television fixtures and expected outcomes · Where television may need new Lexicons