Repository navigation
Publish a renderer-preset bitmask (File.included_presets) into the content database #6004
Copy link
Copy link
Closed
Closed
Copy link
Labels
Description
❌ 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_contentschema (base_models.py). create_associated_file_objects(publish.py:643) writesFilerows through it.- Both the
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.- 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). - Kolibri ([QTI] Use File.included_presets for more comprehensive import renderability gating kolibri#14893) counts a node renderable when any file's
included_presetsis a subset of the device's presets. - The column is additive, so old Kolibri ignores it.
The Change
- Bump
le-utils0.2.17→0.2.18inrequirements.in. - Recompile
requirements.txt(uv pip compile). - Add a nullable
included_presetscolumn tobase_models.py, inherited by both File mirrors. - In
create_associated_file_objects(publish.py:669), set each renderable file's own preset bit. - Leave supplementary files
NULL. - Advertise the schema version carrying
included_presetsso new Kolibri maps it. - Keep
MIN_SCHEMA_VERSIONat"1"(mirroring Publish file sizes into both legacy and 64-bit content database columns #5987).
Out of Scope
- The mixed Perseus + QTI publishing feature and its
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. - A channel published with this change imports into current Kolibri with renderability gated by the bitmask.
Testing
- Publishing a renderable file writes its own preset bit.
- Publishing a supplementary file (e.g. a thumbnail) leaves
included_presetsNULL. - The exported database imports with
included_presetspopulated for renderable files.
References
contentcuration/contentcuration/utils/publish.py—create_associated_file_objects,MIN_SCHEMA_VERSIONcontentcuration/kolibri_content/base_models.py—File- [QTI] Use File.included_presets for more comprehensive import renderability gating kolibri#14893 — Kolibri import-gating counterpart
- Publish file sizes into both legacy and 64-bit content database columns #5987 — 64-bit file-size export change
AI 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.
Reactions are currently unavailable

Activity
[-][QTI] Publish mixed Perseus + QTI exercises as one QTI package[/-][+]Publish a renderer-preset bitmask (`File.included_presets`) into the content database[/+]rtibblesbot commentedon Jul 12, 2026
Plan: Add an
included_presetsper-file renderable bitmask to the exported content-databaseFilemirror and populate it at publish, so new Kolibri (learningequality/kolibri#14893) can gate channel import by the renderers a device has.le-utilsto 0.2.18included_presetscolumn to both File mirrorsincluded_presetsat publishincluded_presets@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
rtibbles commentedon Jul 13, 2026
Fixed in #6040