Repository navigation
refactor!: one compressed track per name - #7046
Conversation
Quest-Claim: 7e9616fbcd4a039d
Every first-party compressed track is now one name with compress: true: catalog.json, the moq-stats tracks, HLS records, and the CLI's reports. catalog.json.z, the stats .z siblings, hang's catalog compression field, hangz, moq-flate, @moq/flate, moq-mux::binary, moq-json's Config::compression, and the bindings' flate namespace are deleted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… API reports Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: d7e43b4.
No actionable bugs found in the inspected changes. Moving compression into track metadata is a sound simplification: it removes duplicate codec state and sibling tracks while preserving catalog retention/priority, stream single-group failure semantics, and stats demand/refresh handling. Keeping merge-patch deltas and leaving MSF uncompressed are justified distinctions rather than unnecessary parallel implementations.
Verification limits: static review of the changed Rust/JS runtime paths, relevant surrounding code, tests, and C/FFI/wrapper API wiring, including an independent Rust pass. I did not run builds, tests, wrapper suites, or network interoperability checks; this is not a claim that those pass.
Resolve conflicts with the binding publication wrapper (go README, carla runtime test) and keep both Unreleased MIGRATE entries in moq-c and moq-mux. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged
(Written by Claude Opus 5.5) |
moq-dev#7046 removed moq_json_stream_config, moq_binary_config and the binary track functions, and slimmed moq_json_snapshot_config to `deltas`. The data-track bitrate this branch added to them is dropped with them; the audio and video hints stay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main removed per-record compression (#7046), which most of this branch's change was about, so the conflicted files take main's side and the remaining change is redone on top.
Adopt #7046: the window track is compressed like the other moq-c JSON tracks, `moq_json_window_config` keeps only `checkpoint_records`, and `moq_consume_json_window` drops its `config` argument. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Implements
quest/m1/compress/migrate.md, and deletes that quest.Problem
moq-net now compresses tracks marked
compress: true. Even so, first-party compressed data still went out as an uncompressed track plus an application-compressed.zsibling (catalog.json.z, the moq-stats.ztracks). That meant duplicate tracks, duplicate codec state, and a flate library (moq-flate,@moq/flate, and the bindings'flatenamespaces) in every stack.Approach
One compressed track per name.
catalog.json(moq-mux andjs/publish), each moq-stats.jsontrack, the<track>.hlsrecord tracks, the CLI'sstats.jsonand feedback report tracks, and the moq-c JSON tracks are created withcompress: true.hang::Catalog::default_track_info()sets it.Consumers read a compressed track like a plain one: the hang/moq-mux catalog consumers,
js/watch, the moq-json and@moq/jsondecoders, and every binding's JSON consumer lose their compression options.moq-stats:
TrackPairbecame oneOutputper track and keeps merge-patch deltas withrefresh(8). Measured over 600 ticks with moq-net's codec (raw DEFLATE level 6, sync flush per frame, fresh window per group), deltas save 35–82% over compressed snapshots:Drafts:
draft-lcurley-moq-hangdrops thecompressionfield andcatalog.json.z, and its Compression section now calls compression a track property that the transport carries.draft-lcurley-moq-e2eedrops the.zsibling but keeps compress-before-AEAD.Quests:
quest/m1/compress/README.mdis sized[S]for its remaining end-to-end proof and guide.Choices made without asking:
catalogtrack stays uncompressed, because third-party moq-transport readers consume it.#[non_exhaustive]config structs stay where the Rust API takes one (moq_json::stream::Config,window::ConsumerConfig,moq_stats::consume::Config). Empty FFI records, Go option structs, and C structs are removed instead, along withstream::Decoder::reset.binarycatalog section stays. Only moq-mux'sbinary_*producer helpers go.catalog::msf::Consumerdoesn't reuse hang's escape check. MSF namespaces are absolute, so the check could never fire there.Impact
All breaking; each package's
MIGRATE.mdhas the migration.catalog.json.zand the moq-stats.ztracks are gone. Readers subscribe tocatalog.jsonand the.jsonstats tracks, which moq-net compresses. hang's catalogcompressionfield is removed (Rust, JS schema, draft).Catalog::COMPRESSED_NAME,TRACK_COMPRESSED, and thecompressionfield are removed.default_track_info()setscompress: true.CatalogFormat::HangZ, themoq_mux::binarymodule, andcatalog::Producer::binary_*are removed.@moq/json:Config::compression,Compression,Desync, andstream::Decoder::resetare removed.@moq/jsonnow depends on@moq/signals.EncodingandTrackPairare removed.totals_track,presence_track, andprefix_tracktake no encoding.consume::Configis empty, andaggregate::Configlosesencoding.@moq/flate: deleted.@moq/watch: thehangzcatalog format is removed.MoqFlate*objects andMoqJsonStreamConfigare removed.moq_binary_configandmoq_publish_binary_*are removed.flatenamespace and the JSON compression options are removed. The Dart bindings and the JS API reports are regenerated.Alternatives
catalogtoo. Rejected because third-party readers consume it.Checks
cargo check --workspace --all-targets --all-features,cargo clippy -D warnings, andcargo test --all-featureson the touched crates pass. JS biome, build with API reports, tests for the changed packages, andtscfor@moq/jsonpass.sh/dart/generate.sh,just drafts check, andquest check --base origin/mainpass.Follow-ups
flate::ENCODER_HEAP) while the group is open. HLS record and stats tracks keep groups open, so each rendition's few-byte record track now costs 256 KiB. Options: a smaller window ormemLevelfor small groups, or drop the encoder between writes and re-prime it.default_track_info()now compressescatalog.json, so an encrypted catalog would be compressed as ciphertext, which the e2ee draft forbids. The m2 e2ee quests (quest/m2/net-wrap/e2ee.md,quest/m2/e2ee/rust-publish.md) must compress before AEAD.🤖 Generated with Claude Code
(Written by Claude Opus 5.5)