GeezerVison is showing github.com — Hotfixes into unstable by rtibbles · Pull Request #5771 · learningequality/studio
Conversation
rtibbles
commented
Mar 20, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
Merge down.
Conflicts:
.gitignore
contentcuration/contentcuration/frontend/shared/vuex/session/index.js
contentcuration/contentcuration/models.py
contentcuration/contentcuration/utils/publish.py
Duelling additions/removals - nothing particularly difficult.
Also merged the migration history - opening as draft to confirm tests are still fine.
References
Reviewer guidance
AI usage
Claude Code (claude-opus-4-6) diagnosed and fixed a CI failure caused by the language FK migration test (test_language_fk_column_length_migration.py). The test rolled back migrations to 0154 but only re-applied up to 0155, leaving the merged migration history (including 0162's user notification fields) unapplied and breaking subsequent TransactionTestCase tests. The fix dynamically resolves the latest leaf migration and restores it in a finally block.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
When Language.id was changed from max_length=7 to max_length=14 in
migration 0081, Django 1.9 did not cascade the primary key column size
change to foreign key and many-to-many junction table columns.
This migration fixes those columns for databases that were created
before the migration squash. It is idempotent - columns that are
already varchar(14) are not modified.
Fixes: contentcuration_channel.language_id
Fixes: contentcuration_channel_included_languages.language_id
Fixes: contentcuration_contentnode.language_id
Fixes: contentcuration_file.language_id
Adds migration test that deliberately corrupts the DB columns
then runs the migration and confirms the fix.
After verification on production servers, only the
contentcuration_channel_included_languages junction table is affected
by the varchar(7) issue. The other FK columns (channel.language_id,
contentnode.language_id, file.language_id) are already varchar(14).
This simplifies the migration to only fix the one affected column.
Co-Authored-By: Claude Opus 4.5 <[email protected]>
Fix Language foreign key column lengths
Unit tests (as in, tests for unit folders)
Temporarily hide draft button.
Remove the ai_feature property from the feature flags JSON schema,
ungating the AI recommendations feature. Add test verifying ai_feature
is rejected as an unknown property.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Delete the IsAIFeatureEnabledForUser permission class from user.py and
remove its import/usage from recommendation.py. The recommendations
endpoint now only requires authentication, making AI recommendations
available to all authenticated users. Add test verifying non-admin
users can access the recommendations endpoint.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
…ommendations UI
Remove the isAIFeatureEnabled Vuex getter from the session module and
remove the FeatureFlagKeys import that was only used by it. Remove the
feature flag check from SearchOrBrowseWindow.vue's shouldShowRecommendations
computed property, making recommendations available to all users.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Since the flag is being purged entirely, tests that assert it's gone
add no value — the existing `test_validate__nonexistent` already covers
unknown flags being rejected by the schema validator.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
…941b2f
Remove ai_feature feature flag and ungate search recommendations
…nced
Add management command for auditing missing sources
…e-error
Downgrade non-urgent _sort_by_order logging error to warning
…arningequality#5714)
* Fix migrate_extra_fields to null m/n for non-m_of_n mastery models
Old-style exercise extra_fields were being migrated with non-null m/n
values for non-m_of_n mastery models (e.g. do_all, num_correct_in_a_row).
The mastery criteria JSON schema requires m and n to be null for these
models, causing frontend AJV validation to fail and exercises to appear
incomplete.
- Fix migrate_extra_fields to set m/n to null for non-m_of_n models
- Add management command fix_exercise_extra_fields to repair existing
data in production
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* Migrate old-style exercise extra_fields on ricecooker import
The ricecooker import path (create_node) was writing old-style
extra_fields directly to the DB without running migration. This
ensures incoming exercise data is migrated to the new-style
options.completion_criteria format before being persisted.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* Cleanup management command and add more logging.
* Target dry_run more focally for better info, cleanup redundant save.
* Lazy loading, lazy coding.
* Mark_complete returns an empty list if complete.
---------
Co-authored-by: Claude Opus 4.6 <[email protected]>
…mpletion criteria fixed but their complete value is still wrong
…ar-overflow
Update snackbar to use multiline overflow option
…A-form
Add link to new DCMA form
Add additional completion to exercises that have already had their completion criteria fixed but their complete value is still wrong
…es-patch-1
Update deploy-migrate command to echo message
The language FK migration test rolled back to 0154 but only re-applied
up to 0155, leaving later migrations (including 0162's user notification
fields) unapplied. This broke subsequent TransactionTestCase tests.
Now dynamically finds the latest leaf migration and restores it in a
finally block, making the test resilient to future migration additions.
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change to test for the language column length, makes total sense.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
bjester
bjester approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|