Skip to content

Generate Python types from service and access record schemas - #4683

Merged
max-sixty merged 3 commits into
mainfrom
python-lints-types
Oct 29, 2026
Merged

max-sixty merged 3 commits into
mainfrom
python-lints-types

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Python now checks the fields of service and access-key records against types generated from their existing JSON schemas. A misspelled key, wrong port or lifetime value, or missing token is reported by ty through the actual record read/write APIs.

Keep the schemas canonical: leaf-dev record-types generates a type-only stub, and pre-commit checks its freshness alongside whole-tree ty. Record carries the value type through storage without adding runtime validation or dependencies to standalone session cleanup. The service constructor and fresh-address result also have precise types, so the real producer benefits from the generated fields. The trial covers these two simple records; opaque runtime metadata remains an open dictionary.

Validation: whole-tree pre-commit and pnpm run check; focused generator, address and service-lifetime tests; dependency-free loading on system Python 3.9. Independent review by Astra recommended the constructor/address refinements included here and approved the final result.

This was written by Codex on behalf of max-sixty

Keep JSON schemas canonical and carry their field types through Record reads and writes using generated type-only stubs. Type the service constructor and transient address result so the real producer benefits from field checking; preserve dependency-free system-Python session cleanup.
Use an unsupported lifetime word that typos will not repair. Narrow the thread ID in the newly integrated stills scenario before passing it to the command, matching neighboring scenarios and clearing whole-tree ty.
@max-sixty
max-sixty merged commit 83ea6e4 into main Oct 29, 2026
4 checks passed
@max-sixty
max-sixty deleted the python-lints-types branch October 29, 2026 09:30
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.

2 participants