Skip to content

[codex] add paginated controlplane list responses#145

Draft
cploujoux wants to merge 2 commits into
mainfrom
codex/controlplane-pagination-lists
Draft

[codex] add paginated controlplane list responses#145
cploujoux wants to merge 2 commits into
mainfrom
codex/controlplane-pagination-lists

Conversation

@cploujoux
Copy link
Copy Markdown
Contributor

@cploujoux cploujoux commented May 19, 2026

Summary

  • Regenerate the controlplane client for the new cursor-paginated list contracts.
  • Default Blaxel-Version to 2026-04-28.
  • Return list-like paginated pages from high-level sandbox, drive, volume, and job execution listing APIs.
  • Document .data, .has_more, .next_cursor, .next_page(), and .auto_paging_iter() in README and method docstrings.

Tests

  • uv run ruff check
  • uv run pytest tests/core/test_settings_api_version.py tests/core/test_controlplane_pagination.py -v
  • uv run pytest tests/ -v --ignore=tests/integration/ --ignore=tests/sandbox/integration/

Notes

  • Live controlplane integration was not run because BL_API_KEY and BL_WORKSPACE were not exported in this shell.

Note

Adds cursor-paginated list responses to the controlplane client layer. The initial commit regenerates all list API functions to accept cursor/limit/sort/q parameters, wraps responses in *List models, and introduces PaginatedList/AsyncPaginatedList (both extending list[T]) with .data, .has_more, .next_cursor, .next_page(), and auto_paging_iter(). The follow-up commit adds split_list_response() to transparently normalize legacy bare-array API responses into the new {data, meta} shape, updating all nine *List.from_dict() methods to accept dict | list.

Written by Mendral for commit 57f03f7.

mendral-app[bot]

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor

@mendral-app mendral-app Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

The legacy-compat fix in 57f03f7 is correct: Unset.__bool__ returns False, so list(items or []) in split_list_response safely handles a dict without a "data" key. The from_dict early-return of None for empty legacy arrays is consistent with prior empty-response behavior. No issues found.

Tag @mendral-app with feedback or questions. View session

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