feat: export 64-bit file_size_bigint at publish#6041
Merged
rtibbles merged 3 commits intoJul 13, 2026
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Channels containing a file larger than 2.1 GB export with a wrong or missing size, because publish writes each file's size only into the legacy 32-bit
LocalFile.file_sizecolumn, which cannot represent it. Publish now also writes a 64-bitLocalFile.file_size_bigintcarrying the true size, and clamps the legacy 32-bitfile_size(on bothLocalFileandFile) toNULLwhen the size overflows. Current Kolibri reads the real size from the bigint column; older Kolibri keeps reading the legacy column and simply seesNULLfor those oversized files. No content-schema version bump — VERSION_6 is already advertised.References
Closes #5987. Ships with #6040 (
included_presets) in the same VERSION_6 hotfix. Kolibri reader: learningequality/kolibri#14881. Studio-side bigint storage: #5974.Reviewer guidance
contentcuration/contentcuration/utils/publish.py:67— this change deliberately adds no version bump; confirm the content-schema VERSION stays 6 andMIN_SCHEMA_VERSIONstays"1"so pre-VERSION_6 Kolibri still imports these databases.contentcuration/contentcuration/utils/publish.py:704—File.file_sizenow takes the clampedlegacy_size; confirm theFile.file_size == LocalFile.file_sizeinvariant still holds for oversized files (bothNULL).contentcuration/kolibri_content/migrations/0025_localfile_file_size_bigint.pyandcontentcuration/kolibri_public/migrations/0010_localfile_file_size_bigint.py— confirm both mirrors migrate the column and chain off the mergedincluded_presetsmigrations.AI usage
Used Claude Code to implement this against a pre-approved plan, following the sibling
included_presetsexport (#6040) for the migration and publish patterns. Verified with thetest_exportchannelsuite, including two new tests covering the ≤2.1 GB (both columns match) and >2.1 GB (bigint real, legacyNULL) cases and the existingfile_sizeinvariant regression.@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
🟡 Waiting for feedback
Last updated: 2026-07-13 01:37 UTC