feat(codegen): merge a hand-maintained beta spec overlay for store_state - #64
Conversation
The public v2 spec from docs is release-filtered and omits endpoints the CLI uses but that khepri marks x-release-status: development — the store_state family. Add a small hand-owned overlay (docs/specs/v2-beta-overlay.yaml, seeded from khepri's openapi-dev.yaml by scripts/seed-beta-overlay.py) and merge it onto the public spec in preprocess-spec.py before codegen. The merge is additive — the public spec wins — so the overlay only fills gaps, and entries get deleted as endpoints graduate to public. make gen now generates the store_state schema types. This is the mechanism + the direct store_state endpoints; migrating store_state_direct.go off its hand-written types onto the generated ones, coverage-map entries, and the sync-time auto-prune are follow-ups (DX-880). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
DX-880 CLI: hand-maintained beta spec overlay for not-yet-public endpoints (store_state)
ProblemThe public v2 spec we fetch from docs ( Consequences: Switching wholesale to khepri's full Design — hand-maintained overlay (decided: hand-maintained, not auto-pulled)
Why this shape
Relationships
Scoped from khepri ( |
The public v2 spec (from docs) is release-filtered and drops endpoints we actually call — the
store_statefamily — because khepri marks themx-release-status: development.This adds a small hand-owned overlay (
docs/specs/v2-beta-overlay.yaml) thatpreprocess-spec.pymerges onto the public spec before codegen. The merge is additive — the public spec always wins — so the overlay only fills gaps, and entries get deleted as endpoints graduate to public.scripts/seed-beta-overlay.pyseeds it from khepri'sopenapi-dev.yaml(one-time; re-run to reseed). Result: 4 store_state paths + 24 schemas.make gennow generates thestore_stateschema types (+3667/-24intypes_gen.go, purely additive).This is the mechanism + the direct store_state endpoints. Follow-ups: migrate
store_state_direct.gooff its hand-written types onto the generated ones, add coverage-map entries, and auto-prune the overlay in the weekly spec-sync.Note
Low Risk
Spec and codegen pipeline changes only; no runtime behavior until generated types are adopted in client code.
Overview
Adds a hand-maintained beta overlay (
docs/specs/v2-beta-overlay.yaml) so development-onlystore_stateAPIs missing from the public v2 spec can still drive oapi-codegen.make gennow passes that overlay intopreprocess-spec.pyafterv2-developer.yaml. The merge is additive (public spec wins on conflicts), so the overlay only fills gaps until endpoints ship in the public spec.The overlay currently defines four product
store_statepaths (get/set state, equalize subscription prices, operation polling, screenshot upload reservation) plus shared components (App Store / Play Store store-state shapes, Play billing schemas, standard error responses).Reviewed by Cursor Bugbot for commit 9b35576. Bugbot is set up for automated code reviews on this repo. Configure here.