casework-client-py: publish concrete TypedDict review output types
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- api, backend-api-design, testing
Research direction
Start in crates/registry-casework-client-py/python/registry_casework_client/init.pyi and inspect the review-output aliases described in the issue. Compare their shapes with the Rust DTOs, Node declaration, and generated OpenAPI document, then review the existing native runtime tests and Rust facade catalogue test for regression-test patterns. Done means the public snapshot and accountability aliases use concrete TypedDict shapes and type-level coverage catches DTO members missing from them.
Written by the indexing model from the issue text.
Description
Follow-up from the PR 1189 review (codex finding on `crates/registry-casework-client-py/python/registry_casework_client/init.pyi`).
Problem
Several review-output aliases in the Python facade discard the closed public shapes:
- review-kind snapshots and protected accountability records are typed as unrestricted `JsonObject` / `dict`-style aliases, while the Rust DTOs, the Node declaration, and the OpenAPI document all define their required and optional members.
Python type checkers therefore accept missing identities, stages, event ids, actors, and retention timestamps, and cannot safely type field access on valid responses.
Proposal
Expose corresponding `TypedDict` definitions for the review output roots (review-kind snapshot, accountability record, and any sibling aliases in the same family) instead of unrestricted object aliases, keeping them in parity with the Rust DTOs and the generated OpenAPI shapes. Add type-level regression coverage alongside the existing native runtime tests.
Scope notes
- Typing only: no runtime behavior change is expected.
- The tagged-union result lookups and the `Literal` state kinds are already concrete; this is about the remaining snapshot/record aliases.
- Pair with a check that new public review DTO members fail the Python type check until the `TypedDict` is updated, mirroring the Rust facade catalogue test.
- Dominant language
- Rust
- Stars
- 2
- Forks
- 0
- Avg merge
- 3h 45m
- Merged PRs (30d)
- 134
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from registrystack/registry-stack
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
registrystack/registry-stack#1239 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
registrystack/registry-stack#1235 ·
-
area:breg bug good first issue rust
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
registrystack/registry-stack#1227 ·
-
area:casework documentation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
registrystack/registry-stack#1217 ·
-
area:breg documentation
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
registrystack/registry-stack#1213 ·
All issues in registrystack/registry-stack
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100