Skip to content

fix(github-backup): bound inventory_owner pagination and skip malformed nodes (#6840) - #7934

Merged
dezren39 merged 1 commit into
mainfrom
queue/6840-6840-inventory-owner-pagination
Nov 9, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/6840-6840-inventory-owner-pagination

Conversation

@dezren39

@dezren39 dezren39 commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Fixes #6840 — remainder after PR #6574.

What was already on main (verified this run)

PR #6574 already landed the cursor-progress half of #6840: inventory_owner raises a named RuntimeError when a page reports hasNextPage with a null/empty/repeated endCursor, with stubbed tests for all three cursor cases (36/36 checks passing before this change).

What this PR adds (the remaining acceptance criteria)

Reproduced on current main before changing anything (real ghb_common.py, run stubbed):

  • a null node raises TypeError: 'NoneType' object is not subscriptable
  • a node missing nameWithOwner raises KeyError: 'nameWithOwner'
  • a server minting a fresh advancing cursor on every page loops forever — the seen-cursor check cannot stop it, and there was no page bound

Changes in infra/github-backup/bin/ghb_common.py:

Tests

infra/github-backup/tests/test_inventory_owner.py (stubbed-run oracle, expected outcomes = the #6840 acceptance criteria):

  • null node, missing-field node, non-string-field node: good repo still inventoried, no owner error, inventory_owner returns only the good repo
  • ever-advancing cursor with the bound shrunk to 3: RuntimeError naming owner + bound, transport calls stop at exactly 3, inventory() records the owner error

Results on the laptop: targeted file 51/51 checks passed (36 pre-existing + 15 new); the full github-backup regression suite (the github-backup-tests.yml loop, all 12 test_*.py files) passes.

🤖 Queue worker lane code-u (fallback mode — queue backend down, claim carried on issue #6840).


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 9, 2026 03:33
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-09T03:33:09.565115Z
We couldn’t complete this review. Comment @codex review to try again.
a5e5d10 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 11 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f41417df-354b-4460-9766-dc40d3c55015
Commits

Reviewing files that changed from the base of the PR and between 62fca51 and a5e5d10.

Files selected for processing: 2

  • infra/github-backup/bin/ghb_common.py
  • infra/github-backup/tests/test_inventory_owner.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

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

Labels

None yet

Projects

None yet

1 participant