Skip to content

Type and paginate group members#6

Merged
terjekv merged 1 commit into
mainfrom
agent/type-group-members
Jul 25, 2026
Merged

Type and paginate group members#6
terjekv merged 1 commit into
mainfrom
agent/type-group-members

Conversation

@terjekv

@terjekv terjekv commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Why

The Hubuum v0.0.3 group-members endpoint is cursor-paginated and returns the PrincipalMemberResponse contract, but the client exposed raw dictionaries and silently converted any non-array response to []. That hid malformed server responses and left membership pagination unavailable through the typed API.

What changed

  • replace the incomplete internal Principal shape with the exported, contract-complete PrincipalMember model
  • return PrincipalMember values from synchronous and asynchronous groups.members()
  • add members_page(), member_pages(), and bounded all_members() helpers with sync/async parity
  • route membership decoding through the shared typed page decoder so malformed responses raise DecodeError
  • update unit, e2e, README, querying documentation, and the unreleased changelog

Verification

  • uv sync --extra dev
  • uv run ruff format --check .
  • uv run ruff check . (including active PLR0913)
  • uv run mypy
  • uv run bandit -q -r src scripts
  • uv run zizmor .
  • uv run pytest --cov — 69 passed, 96.00% coverage
  • uv run mkdocs build --strict
  • uv build

The local Docker daemon remained unresponsive even to docker ps, so the pinned Hubuum v0.0.3 e2e workflow in CI is the live compatibility authority for this PR.

Review focus

The public return type changes from dictionaries to frozen Pydantic values. This is intentional for the typed-client contract and is documented in the changelog.

@terjekv
terjekv force-pushed the agent/type-group-members branch from 16b3540 to d594d0a Compare July 23, 2026 11:55
@terjekv
terjekv force-pushed the agent/type-group-members branch from d594d0a to a42fd38 Compare July 25, 2026 00:33
@terjekv
terjekv marked this pull request as ready for review July 25, 2026 00:33
@terjekv
terjekv merged commit 174cff6 into main Jul 25, 2026
7 checks passed
@terjekv
terjekv deleted the agent/type-group-members branch July 25, 2026 00:35
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