Repository navigation
Description
Reduce repeated defects by making type generation, conversion, and validation derive their decisions from one complete callable contract.
The design has two cooperating parts:
- Compile Python callable information into a resolved contract with arguments, overloads, logical result types, representations, runtime requirements, and diagnostics.
- Compose value conversion from shared semantic rules for primitives, records, collections, and scientific values.
Tracking:
- spike(codegen): compile complete callable contracts before emission #335: complete callable-contract compiler prototype.
- spike(codec): compose value conversion from shared semantic rules #343: compositional conversion prototype.
- test(architecture): verify value contracts across generation and execution #344: independent proof across generation and execution.
Keep explicit runtime binding in #340 as a separate design lane. It removes global bridge selection from bound clients but is not required to prove the compiler or codec design.
Proof cases:
- Integer policy shared by producer, generated types, and validator.
- Float16 ndarray conversion reused by Torch.
- An overloaded function returning a nested record.
Acceptance criteria:
- Each proof case runs through generation, TypeScript compilation, bridge execution, decoding, and validation.
- Precise generated return types require a supported conversion and validation path.
- Known unsupported behavior produces diagnostics. Unresolved annotations retain explicit unknown behavior.
- Pure compilation is separate from interpreter discovery, caching, and file writes.
- Independent review tests the design against fix(codec): reject unsafe Python integers before JSON encoding #331, fix(codec): decode Arrow float16 values for NumPy and Torch #332, feat(codegen): preserve Python overload input and return relationships #336, design(codec): define exact bigint transport and generated integer types #337, feat(runtime): execute Python awaitables as single-response RPC calls #338, and design(codec): define validated dataclass value transport #339.
- Extension sketches demonstrate that a new value kind does not scatter policy changes across unrelated layers.
- Record compatibility, performance evidence, and a proceed/revise/stop decision before planning implementation PRs.
Start with the bounded prototypes in #335 and #343. Keep transports and value RPC intact. Capability diagnostics do not implement coroutine execution; #338 still needs runtime work.
This revises the earlier issue-by-issue approach. Use the existing defect issues as acceptance cases. Let the prototype evidence determine implementation order and the release split with #342. Do not close defects based on architecture documents alone.
Activity
bbopen commentedon Sep 20, 2026
The architecture decision is proceed for the accepted callable compiler and value-contract changes. Independent review covered the compiler, numeric behavior, overloads, coroutines, and the bounded extension proofs. Three generated-wrapper paths pass end-to-end checks. Precise return types require supported conversion and validation; unresolved and unsupported cases retain distinct diagnostics.
The decision records compatibility, same-run performance evidence, and explicit limits. Bigint, dataclass, and runtime-binding prototypes remain design proofs. The final combined candidate passed its required checks. Publication and installed-consumer evidence are recorded in #334 and #342 and linked below.
Evidence:
docs/maintainers/architecture-decision-0.11.md, its linked design/review records, and the final CI and publication evidence below.Verified release evidence:
0861ebeand mergef6f811dhave identical trees.The architecture decision records the accepted scope and prototype limits.
Closing with the implemented and verified 0.11 release outcome.