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
{{ message }}
Repository navigation
Publish a renderer-preset bitmask (File.included_presets) into the content database #6004
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
Kolibri gates channel import by whether it can render a node's files. Add an included_presets bitmask to the exported content-database File mirror and populate it at publish, so new Kolibri (learningequality/kolibri#14893) can gate import by the renderers a device actually has. Ships alongside the 64-bit file-size export change (#5987) so both content-schema additions ride one hotfix release.
Complexity: Low Target branch: hotfixes
Context
Studio generates the content database through the vendored kolibri_content schema (base_models.py).
create_associated_file_objects (publish.py:643) writes File rows through it.
Both the kolibri_content export mirror and the kolibri_public API mirror derive from base_models.File.
included_presets is a per-file bitmask of the preset renderers a file needs, including its own.
A normal file needs only its own preset's renderer.
le-utils 0.2.18 defines the ordering as RENDERABLE_PRESETS_ORDER (append-only, supplementary presets excluded).
A preset's bit is 2 ** RENDERABLE_PRESETS_ORDER.index(preset_id).
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
Kolibri gates channel import by whether it can render a node's files. Add an
included_presetsbitmask to the exported content-databaseFilemirror and populate it at publish, so new Kolibri (learningequality/kolibri#14893) can gate import by the renderers a device actually has. Ships alongside the 64-bit file-size export change (#5987) so both content-schema additions ride one hotfix release.Complexity: Low
Target branch: hotfixes
Context
kolibri_contentschema (base_models.py).create_associated_file_objects(publish.py:643) writesFilerows through it.kolibri_contentexport mirror and thekolibri_publicAPI mirror derive frombase_models.File.included_presetsis a per-file bitmask of the preset renderers a file needs, including its own.RENDERABLE_PRESETS_ORDER(append-only, supplementary presets excluded).2 ** RENDERABLE_PRESETS_ORDER.index(preset_id).included_presetsis a subset of the device's presets.The Change
le-utils0.2.17→0.2.18inrequirements.in.requirements.txt(uv pip compile).included_presetscolumn tobase_models.py, inherited by both File mirrors.create_associated_file_objects(publish.py:669), set each renderable file's own preset bit.NULL.included_presetsso new Kolibri maps it.MIN_SCHEMA_VERSIONat"1"(mirroring Publish file sizes into both legacy and 64-bit content database columns #5987).Out of Scope
qti | exercisebit on a Perseus-embedding qti file ([QTI] Publish mixed Perseus + QTI exercises as one QTI package #6006).Acceptance Criteria
General
included_presetsis present and populated on both thekolibri_contentandkolibri_publicFile mirrors.Testing
included_presetsNULL.included_presetspopulated for renderable files.References
contentcuration/contentcuration/utils/publish.py—create_associated_file_objects,MIN_SCHEMA_VERSIONcontentcuration/kolibri_content/base_models.py—FileAI usage
I used Claude (Opus 4.8, via
le-skills:writing-github-issues) to locate the publish/export code and the le-utils 0.2.18 API and draft this issue.