Review: Add list_messages method — read group message history

review-378-2026-03-25 Review

review ready

Verdict: READY

Template Completeness

  • [x] Lineage — discovered scope from GroupMe incident session (2026-03-25)
  • [x] Repo — forgejo_admin/groupme-sdk
  • [x] User Story — SSH operator reading GroupMe history
  • [x] Context — explains SDK gap (send only, no read), references GroupMe API endpoint
  • [x] File Targets — modify src/groupme_sdk/messages.py, do-not-touch list present
  • [x] Acceptance Criteria — 5 testable criteria
  • [x] Test Expectations — 3 unit tests + run command
  • [x] Constraints — pattern adherence, API limit, no auto-pagination
  • [x] Checklist — standard 3 items
  • [x] Related — project page + companion MCP ticket noted

File Targets

  • [x] src/groupme_sdk/messages.py — verified: file exists, contains MessagesMixin class with send_message method. Adding list_messages here is the correct location.
  • [x] Pattern verified: groups.py shows GET-with-query-params pattern using inline path strings (e.g., f"/groups?page={page}&per_page={per_page}"). The new method should follow the same pattern.
  • [x] tests/test_messages.py — exists with 4 existing tests for send_message. New tests should be added here.

Repo Placement

OK. Issue filed on forgejo_admin/groupme-sdk, scope targets same repo. Single-repo change.

Dependencies

  • Board item #379 (groupme-mcp#5 — "Add list_messages tool") has label depends:groupme-sdk#3. This SDK ticket must merge and publish first. Dependency is correctly documented on the downstream item.
  • No blockers on this ticket itself — it can proceed immediately.

Acceptance Criteria

All 5 criteria are agent-verifiable. Run command cd ~/groupme-sdk && pytest tests/ is real and confirmed (test directory exists with conftest.py and existing test files).
Implementation note: The GroupMe GET /groups/{group_id}/messages endpoint returns {"count": N, "messages": [...]} inside the response envelope. After _request strips the outer response key, the result will be a dict with count and messages keys — NOT a bare list. The implementation should extract result.get("messages", []) to return a list of message dicts as the acceptance criteria expect. This is a precision gap but not a scope issue — a competent agent will handle it.

Blast Radius

  • Pure addition — no existing methods modified, no signature changes.
  • No downstream consumers break. The companion MCP ticket (#379) will consume this new method but that ticket has its own scope.
  • No similar missing-read-method pattern found elsewhere in the SDK — groups.py already has both list_groups and get_group, members.py has list_members.

Recommendation

No action needed. Scope is solid, file targets verified, patterns are clear, dependencies documented. Ready for agent execution.