Skip to content

Paginate importmetadata on max_results and include descendants - #6173

Open
rtibblesbot wants to merge 1 commit into
learningequality:hotfixesfrom
rtibblesbot:issue-6170-5557d0
Open

rtibblesbot wants to merge 1 commit into
learningequality:hotfixesfrom
rtibblesbot:issue-6170-5557d0

Conversation

@rtibblesbot

@rtibblesbot rtibblesbot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • v2/importmetadata pages on max_results and includes descendants on descendants, matching Kolibri's endpoint.

References

Closes #6170. Kolibri client: learningequality/kolibri#15352.

Reviewer guidance

  • On Metadata import fails for sources that return unpaginated importmetadata kolibri#15352, run _get_import_metadata(NetworkClient(<studio>), SimpleNamespace(contentnode_id=<topic id>, metadata={"import_descendants": True})) — content_contentnode holds the topic, its ancestors and every descendant, once each.
  • Open: descendants=false enables descendants, as in Kolibri — compare to "true" instead?
  • Open: prerequisite/related rows spanning two pages are dropped, as in Kolibri — does Kolibri need them?

AI usage

Claude Code implemented this test-first from Kolibri's endpoint. Verified with the importmetadata tests and Kolibri's _get_import_metadata against a local Studio (2 → 14 nodes imported for a course topic).

🤖 Generated with Claude Code


@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly

How was this generated?
  • Ran pre-flight CI checks (lint, format, tests) and verified all pass
  • Rebased onto the target branch and resolved any conflicts
  • Reorganized commit history into clean, logical commits
  • Audited the diff to ensure only issue-relevant files are changed
  • Built PR body from the repository's PR template with evidence blocks
@rtibblesbot

🟡 Waiting for feedback

Last updated: 2026-09-24 20:31 UTC

@rtibblesbot
rtibblesbot marked this pull request as ready for review September 24, 2026 20:26
@rtibblesbot
rtibblesbot requested review from a team and rtibbles September 24, 2026 20:26
Matches Kolibri's endpoint so course imports can fetch metadata from Studio.

Closes learningequality#6170

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant