You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
server/lib/mediaModels.js now carries at least six registry upgraders that all
share one shape — (id, shippedRepo, priorShippedValue) -> newValue, applied to
a persisted entry only when it still matches what PortOS itself shipped:
upgradeMiniMaxH3OutputControls (and its nested upgradeMiniMaxH3DenoisingCount)
The ordering is load-bearing in places (an upgrader must run before applyVideoDisclosures, which only fills an ABSENT disclosure) but that
constraint is invisible in the expression — it reads as arbitrary nesting.
Work
Introduce an ordered REGISTRY_UPGRADES array reduced in one place, so adding
the seventh upgrader is appending a row rather than adding a paren level. Keep
each upgrader's own guard logic where it is; this is about the composition, not
the rules.
Where an upgrader is a pure (id, shippedRepo, oldValue) -> newValue profile
rewrite (FastMetal and the LTX-2.5 audio backfill both are), consider expressing
it as data plus one shared applier rather than a bespoke function.
Acceptance
videoEntries composes upgraders from one ordered list, not nested calls.
Any ordering constraint relative to the apply* decorators is stated in the
list rather than implied by nesting.
No behavior change: the existing registry, migration, and disclosure suites
pass unmodified.
Notes
Raised in review of #5871, which added the sixth upgrader. Deliberately NOT done
in that PR — it touches every upgrader and would have buried a user-facing
download-size fix under a cross-cutting refactor.
Problem
server/lib/mediaModels.jsnow carries at least six registry upgraders that allshare one shape —
(id, shippedRepo, priorShippedValue) -> newValue, applied toa persisted entry only when it still matches what PortOS itself shipped:
upgradeMiniMaxH3OutputControls(and its nestedupgradeMiniMaxH3DenoisingCount)upgradeLtx25AudioControlsupgradeLtx25CudaMemoryFloorupgradeLegacyCudaLtxRuntimeupgradeFastMetalDownloadSizes(added in FastMetal display names understate their download by 3-4x #5871)backfillRuntime/dropRetiredEntriesat the ends of the same chainThey are composed by hand in
normalizeRegistry'svideoEntries, which is nowfour parens deep and gains a nesting level with every addition:
The ordering is load-bearing in places (an upgrader must run before
applyVideoDisclosures, which only fills an ABSENT disclosure) but thatconstraint is invisible in the expression — it reads as arbitrary nesting.
Work
Introduce an ordered
REGISTRY_UPGRADESarray reduced in one place, so addingthe seventh upgrader is appending a row rather than adding a paren level. Keep
each upgrader's own guard logic where it is; this is about the composition, not
the rules.
Where an upgrader is a pure
(id, shippedRepo, oldValue) -> newValueprofilerewrite (FastMetal and the LTX-2.5 audio backfill both are), consider expressing
it as data plus one shared applier rather than a bespoke function.
Acceptance
videoEntriescomposes upgraders from one ordered list, not nested calls.apply*decorators is stated in thelist rather than implied by nesting.
pass unmodified.
Notes
Raised in review of #5871, which added the sixth upgrader. Deliberately NOT done
in that PR — it touches every upgrader and would have buried a user-facing
download-size fix under a cross-cutting refactor.
Related to #5871