feat(hang)!: unify catalog APIs - #3813
Conversation
Verdict: request changes |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 0 remain after this review. WalkthroughThe change removes companion timeline metadata from data-track schemas and replaces standalone timeline catalog sections with archive sections. Rust catalogs now support generic extension data through Priority: ➖ Normal 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
851e90e to
8098d4d
Compare
Verdict: request changes |
Co-Authored-By: GPT-5 <noreply@openai.com>
Co-Authored-By: GPT-5 <noreply@openai.com>
Co-Authored-By: OpenAI Codex <codex@openai.com>
68fe6e9 to
0b1a332
Compare
Verdict: request changes |
Verdict: request changes |
|
Merged after rebasing onto the #3816 main tip.
(written by GPT-5) |




Problem
The HANG catalog model was split between
hangandmoq-mux, with duplicate root types and constructors. Timeline metadata was also spread across a retired roottimelinesection, per-data-tracktimelinefields,archive, andclock. That made the public API harder to compose and allowed a typed extended catalog to deserialize and republish the retiredtimelineroot through its flattened extension map.Approach
hang::Catalog<E>the single flattened catalog type and carry application-defined root sections inE.archive, keep the wall-clock mapping in the rootclock, and usemoq_net::Timestampfor clock values.Hang.Container.TimelinetoHang.Timeline.timeline, both when mutating and when deserializingCatalog<Extra>.Impact
This is an intentional breaking pre-release API and catalog-schema change targeting
mainfor the final release pass.Rust public API changes:
hang::CatalogbecomesCatalog<E = ()>with a flattened publicext: E; parsing requiresE: DeserializeOwned + Default, serialization requiresE: Serialize, andmedia()produces the base media-only catalog.Timelinetype is removed.Archivedirectly ownstrack,timescale, andduration_max, while the catalog root owns the optionalClock.moq_net::Timestampinstead of untyped integer timestamp/timescale pairs.moq-muxremoves its duplicate HANG catalog model and useshang::Catalog<Extra>.Extrarejects base, MSF, and retired root names on insertion and decode.Produceris constructed from an explicit config and its catalog type is shared withhang;moq-hlsreads the segment index directly fromcatalog.archive.JavaScript public API changes:
@moq/hangremoves the catalogTimelineschema and the optionaltimelinemembers on JSON and binary tracks.Hang.Container.TimelinetoHang.Timeline.ArchiveSchemadirectly defines the segment-index fields, andClockSchemaremains at the catalog root.Catalog wire/schema changes:
timelinemember is replaced by optional rootarchiveand is now rejected by typed mux extension catalogs instead of being silently preserved.archivecarriestrack,timescale, and optionaldurationMax, plus optional replay/store/version metadata. It does not carry wall time.clockcarries the wall-clock mapping and timescale.timelinemembers are removed.Alternatives
Keeping the duplicate
moq-muxcatalog type or compatibility constructors would preserve the ownership split this change removes. Keeping the retiredtimelineroot as an extension would also let publishers emit a schema member that supported consumers no longer interpret.Follow-ups
External Rust and TypeScript consumers must migrate to the APIs and catalog shape above before the release. All in-repository consumers, documentation, and the HANG draft are updated here.
Validation
Catalog<Extra>accepted and republished a roottimelineobject.retired_timeline_section_is_rejectedand fullext::testgroup pass after the fix.nix develop --command just checknix develop --command just test(written by GPT-5)