1818 :class:`CanonicalProjectionReference` carrying ``kind``,
1919 ``asset_source``, and ``slots_override[]``. Highest priority on
2020 the v1→v2 path. Registry-published ``parameters`` for a matching
21- glob still fill in anything the seller didn't restate.
21+ glob still fill neutral parameters the seller didn't restate, but
22+ registry slot and pixel-density defaults never merge into the
23+ seller-authored declaration.
22242. **Registry glob match** (registry step 3). Look up
2325 ``v1_format.format_id.id`` in the bundled registry's
2426 ``format_id_glob`` entries. The bundled 3.1.10 registry includes
6567
6668FormatId = LegacyFormatId
6769
70+ _SELLER_AUTHORITATIVE_PARAM_KEYS = {
71+ "pixel_ratios" ,
72+ "required_pixel_ratios" ,
73+ "slots" ,
74+ }
75+
6876
6977@dataclass
7078class V1ToV2Projection :
@@ -267,10 +275,10 @@ def project_v1_format_to_declaration(
267275 # seller annotations can still pick up registry-published default
268276 # ``parameters`` without forcing the seller to restate them on the v1
269277 # file. Step 1 (seller annotation) overrides ``kind`` /
270- # ``slots_override`` / ``asset_source`` but does NOT clobber the
271- # registry's parametric defaults — that would lose every parameter
272- # a registry glob carries (e.g., ``vast_version``, dimensions) when
273- # a seller annotates only ``{kind: video_vast}`` .
278+ # ``slots_override`` / ``asset_source``. Neutral registry parameters
279+ # such as dimensions still fill omitted values, but seller-authored
280+ # declarations must not inherit registry slot or pixel-density
281+ # contracts .
274282 registry_params : dict [str , Any ] = {}
275283 registry_kind : CanonicalFormatKind | None = None
276284 for mapping in registry .mappings :
@@ -283,15 +291,21 @@ def project_v1_format_to_declaration(
283291
284292 # --- Step 1 (registry resolution-order step 2): seller-asserted
285293 # ``canonical`` annotation on the v1 file. Annotation wins on
286- # ``kind`` + ``asset_source`` + ``slots_override``; registry
287- # parameters fill in anything the seller didn't restate.
294+ # ``kind`` + ``asset_source`` + ``slots_override``; neutral registry
295+ # parameters fill omitted values without importing registry slot or
296+ # pixel-density contracts.
288297 annotation = _v1_canonical_annotation (v1_format )
289298 if annotation is not None :
299+ seller_params = {
300+ key : value
301+ for key , value in registry_params .items ()
302+ if key not in _SELLER_AUTHORITATIVE_PARAM_KEYS
303+ }
290304 return V1ToV2Projection (
291305 declaration = _build_declaration (
292306 kind = annotation .kind ,
293307 v1_format_id = fid ,
294- params = registry_params ,
308+ params = seller_params ,
295309 canonical_ref = annotation ,
296310 )
297311 )
0 commit comments