GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add management command for auditing missing sources by bjester · Pull Request #5711 · learningequality/studio

Conversation

@bjester

@bjester bjester commented Feb 18, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Summary

  • Adds CTE functionality to channel model
  • Adds new management command that audits missing import sources for public channels, where source node was deleted or public channel was marked as deleted

References

#5683

Reviewer guidance

  • Tests make sense?
  • Can you run the command? It will generate a fix_missing_import_sources.csv in your CWD

LLMs

  • LLMs were used to convert SQL queries into Django ORM queries, but the result was almost entirely rewritten
  • Tests were bootstrapped then also rewritten

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

rtibblesbot reacted with eyes emoji
All reactions
  • 👀 1 reaction
bjester added 3 commits February 18, 2026 08:49
@bjester
Add CTE functionality to channel models
f83abb9
@bjester
Add management command for auditing missing source nodes
bb11bc9
@bjester
More ignores for all-the-AIs
9b79638
@bjester
bjester requested a review from rtibblesbot February 18, 2026 17:05
rtibblesbot
rtibblesbot reviewed Feb 18, 2026
View reviewed changes

@rtibblesbot rtibblesbot left a comment

Copy link
Copy Markdown
Contributor

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.

Audit command for missing import sources on public channels, with CTE support added to the Channel model. Code is clean and well-structured.

CI: linting and frontend builds pass; Python unit tests still pending. The "Update community pull requests spreadsheet" failure is an unrelated admin workflow.

  • suggestion: Command name vs. current behavior mismatch (inline)
  • suggestion: Duplicate CTE construction (inline)
  • nitpick: .gitignore additions are unrelated to the PR scope but harmless

@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.

All reactions
Comment thread contentcuration/contentcuration/management/commands/fix_missing_import_sources.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread contentcuration/contentcuration/management/commands/fix_missing_import_sources.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread contentcuration/contentcuration/models.py


class ChannelModelQuerySet(models.QuerySet):
class ChannelModelQuerySet(CTEQuerySet):

@rtibblesbot rtibblesbot Feb 18, 2026

Copy link
Copy Markdown
Contributor

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: Good approach — inheriting from CTEQuerySet instead of models.QuerySet keeps the custom create/update_or_create methods intact while adding CTE support. The ChannelModelManager via from_queryset is the correct Django pattern for this.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
rtibbles
rtibbles approved these changes Feb 18, 2026
View reviewed changes

@rtibbles rtibbles left a comment

Copy link
Copy Markdown
Member

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.

I ran it locally and got this:

INFO:contentcuration.management.commands.fix_missing_import_sources:=== Iterating over private destination channels. ===
INFO:contentcuration.management.commands.fix_missing_import_sources:=== Done iterating over private destination channels. ===
INFO:contentcuration.management.commands.fix_missing_import_sources:Found 0 nodes across 0 channels.
INFO:contentcuration.management.commands.fix_missing_import_sources:Finished in 0.015901565551757812

Which seems accurate :)

Further testing we can do live.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bjester reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@bjester
bjester merged commit bf03d5f into learningequality:hotfixes Feb 18, 2026
19 of 21 checks passed

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@rtibblesbot rtibblesbot rtibblesbot left review comments
@rtibbles rtibbles rtibbles approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

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.

3 participants

@bjester @rtibbles @rtibblesbot
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.