GeezerVison is showing github.com — Convert management command to address licensing metadata issues by bjester · Pull Request #5760 · learningequality/studio
Conversation
bjester
commented
Mar 16, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
Converts the management command that was previously used to export data for analyzing the issue of incomplete licensing metadata for nodes that have missing source nodes that were in public channels.
- Uses a CSV for applying licensing metadata on a per-channel basis, all for public channels
- Limits usage of
.iterator() to when it handles a channel with imported nodes, to reduce the duration of how long a transaction is open
References
Reviewer guidance
- Review the tests, do they make sense?
- You can run the command locally, it shouldn't fail!
- We'll do a test run on hotfixes!
AI usage
- Changes to the management command were implemented, then AI was instructed to create tests for
LicensingFixesLookup. Those tests were refactored to be more robust, then AI was told to update the management command tests for the same scenarios. Corrections were made to thoses tests until they passed.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
rtibblesbot reacted with eyes emoji
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.
Solid conversion of the audit-only command into one that actually fixes licensing metadata. CI passing.
- suggestion (1):
get_info could crash if a channel isn't in the CSV lookup
- nitpick (1): Type hint mismatch on
license_id parameter
- praise (2): Clean
LicensingFixesLookup extraction; good transaction scoping
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
Reviewed the pull request diff checking for:
- Correctness: bugs, edge cases, undocumented behavior, resource leaks, hardcoded values
- Design: unnecessary complexity, naming, readability, comment accuracy, redundant state
- Architecture: duplicated concerns, minimal interfaces, composition over inheritance
- Testing: behavior-based assertions, mocks only at hard boundaries, accurate coverage
- Completeness: missing dependencies, unupdated usages, i18n, accessibility, security
- Principles: DRY (same reason to change), SRP, Rule of Three (no premature abstraction)
- Checked CI status and linked issue acceptance criteria
- For UI changes: inspected screenshots for layout, visual completeness, and consistency
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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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.
Clean conversion from audit-only to fix-apply command. CI passing.
Delta from prior review: Both prior findings (suggestion: None guard in get_info, nitpick: Optional[int] type hint) are RESOLVED in the current code.
- suggestion (1): potential
AttributeError on license_obj — see inline
- praise (2): prior praise still stands — good
LicensingFixesLookup encapsulation and deliberate transaction scoping
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
Compared the current PR state against findings from a prior review:
- Retrieved prior bot reviews deterministically via the GitHub API
- Classified each prior finding as RESOLVED, UNADDRESSED, ACKNOWLEDGED, or CONTESTED
- Only raised NEW findings for newly introduced code
- Reviewed the pull request diff checking for correctness, design, architecture, testing, completeness, and adherence to DRY/SRP principles
- Checked CI status and linked issue acceptance criteria
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
Just one possible issue with kind vs kind_id that I think will break.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
Prior findings
All 2 prior findings remain resolved — no changes since last review. The kind/kind_id bug flagged by @rtibbles has been fixed (node.kind_id at line 246) and the test now validates the exact arguments passed to get_info.
CI passing. No UI files changed.
- nitpick (inline):
info["license_id"] key access in get_info — see comment
- praise (inline): test arg validation catches the kind/kind_id bug cleanly
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
Compared the current PR state against findings from a prior review:
- Retrieved prior bot reviews deterministically via the GitHub API
- Classified each prior finding as RESOLVED, UNADDRESSED, ACKNOWLEDGED, or CONTESTED
- Only raised NEW findings for newly introduced code
- Reviewed the pull request diff checking for correctness, design, architecture, testing, completeness, and adherence to DRY/SRP principles
- Checked CI status and linked issue acceptance criteria
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.
|
|
|
|
|
call_command("fix_missing_import_sources")
|
|
|
|
|
|
lookup.get_info.assert_called_once_with(
|
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.
praise: Adding the exact-args assertion here is what exposed the node.kind vs node.kind_id bug — good example of a test validating the call contract rather than just that the call happened.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
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
rtibbles
rtibbles approved these changes
Uh oh!
There was an error while loading. Please reload this page.
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.
|