Repository navigation
Conversation
There was a problem hiding this comment.
ℹ️ No critical issues — one scope question inline.
Approach: sound — the resolved-bytes preflight runs before any initRef clone, which closes the amplification at its cause in a non-breaking way that fits 0.5.x, since #7949's Arc<str> fix can't be backported.
Reviewed changes — the full single-commit diff to rs/moq-msf/src/lib.rs, plus its only consumer (moq-mux's MSF catalog consumer) and the existing hang rendition cap.
- Raw-input cap —
Catalog::from_strrejects input aboveMAX_CATALOG_BYTESbefore parsing. - Bounded sequences —
tracksandinitDataListdeserialize through a visitor that errors on the 65th element without parsing it. - Resolved-bytes preflight — the init bytes each track resolves to are summed with
checked_subagainst 32 MiB before resolution, so a sharedinitDataListentry referenced by many tracks can no longer expand without bound. - Tests — cover both the
from_strandserde_json::from_valuepaths, including exact-limit acceptance.
claude-opus-5-5 | 𝕏
Keep the serialized and resolved init data byte limits. Restore ordinary Serde sequence deserialization so the patch release does not add a separate track or init data entry count limit. The 65-entry compatibility test failed with the old count limit and now passes through both public parsing paths. All 36 moq-msf nextest cases pass, and scoped formatting and Clippy checks pass. Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — the single commit since the prior review, which drops the entry-count cap and keeps only the two byte bounds.
- Removed
MAX_TRACKS— deleted the constant, the customdeserialize_bounded_entries/deserialize_bounded_init_data_listvisitors, and their attributes onWire, sotracksandinitDataListgo back to stock serde sequence parsing. The only new public API is nowMAX_CATALOG_BYTES. - Replaced the count-limit tests — swapped the 65th-entry rejection tests for one that checks a 65-track, 65-entry catalog passes through both
from_strandfrom_value. The exact-limit byte test now uses a localTRACKSconstant.
The memory bound still holds without the count cap. The 32 MiB check on raw input and the resolved-bytes preflight both stay in place, and serde's cautious size hint keeps the stock Vec visitor from over-reserving on the Value path.
claude-opus-5-5 | 𝕏

Problem
On the
releaseline, catalog deserialization copies referenced initialization data into each track. The newerArc<str>model onmain(#7949) changes a public field type, so this PR keeps the 0.5.x API intact.Approach
Catalog::from_strbefore JSON parsing.Impact
moq_msf::MAX_CATALOG_BYTES.Alternatives
Backporting #7949 would change the public field type. A separate entry-count cap would reject valid catalogs without being needed for the reference expansion bound.
Verification and follow-ups
The 65-entry compatibility test failed under the earlier count cap and passes now through both parsing paths.
cargo nextest run --locked -p moq-msf: 36 passed. Scoped formatting and Clippy checks passed. Restream will check the published release against its own regressions before removing its vendor patch.(Written by GPT-6.2 Sol)