casework: model the review result payload rules as a status-tagged union in the published OpenAPI
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- openapi, python
- Domain
- api, backend-api-design
Research direction
Start in products/casework/scripts/generate_openapi.py at the ReviewResult entry and run the documented generator command. Inspect the committed OpenAPI document and client typings; done means status-discriminated branches consistently encode required payload presence across the generated document and three bindings without changing wire behavior. Coordinate with #1200 on the Python TypedDict typing.
Written by the indexing model from the issue text.
Description
Deferred from #1189 review (thread 4058174731).
The published ReviewResult schema (products/casework/scripts/generate_openapi.py, ReviewResult entry) declares outcome and result as unconditionally optional across all six statuses. The runtime never emits the invalid combinations: the settlement path binds outcome/result presence to the status (answered/rejected/changes_requested carry the outcome payload; approved/cancelled/superseded do not), and approval kinds cannot define answered outcomes at all. So the published contract is looser than the enforced one, and schema-conforming generated clients can type payloads the service will never send.
Tighten the publication by modeling the status-dependent variants as a closed union (for example oneOf branches discriminated by status with per-branch required fields), regenerate the committed OpenAPI document with its documented generator command, and align the client typings. Coordinate with #1200, which covers the Python TypedDict side of the same result typing.
Not merged with #1189 because the wire behavior is unchanged: this is a publication-accuracy improvement crossing the generated OpenAPI and three language bindings, better landed as its own reviewed change than as a late addition to an approval-ownership migration.
- 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