You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
design(codec): define validated dataclass value transport #339
Define a serializable representation for dataclass returns before implementing support.
Reproduced on 6b84614: fixtures.values_torture.dataclass_instance throws Object of type Point is not JSON serializable. Its generated wrapper declares Promise with an unchecked return schema.
Specify supported fields, nesting, optional values, defaults, and the decoded TypeScript representation.
Define failures for cycles, unsupported fields, excessive depth, and payload limits.
Decide separately whether dataclass inputs are supported or rejected with guidance.
Prototype a generated Point-returning wrapper with exact value assertions and discriminating return validation.
Ordinary class instances remain unsupported unless a separate contract covers them.
Preserve value RPC without object handles or implicit pickle/joblib.
Record the design and independent review before scheduling implementation.
Coordinate with #335. This differs from decorator filtering in #133 and Pydantic dump errors in #55. It does not claim full Pydantic support.
Architectural approach:
Compose dataclass fields from supported value rules in #343 and derive the declared result and validator through #335. Unsupported fields must remain explicit. Coordinate through #345.
The bounded dataclass design is complete. Actual Python analysis produces a typed Point wrapper, and a private value adapter passes generated typechecking, execution, and wrong-return validation. Tests cover nested, optional, and defaulted fields, cycles, unsupported fields/classes, depth and payload limits, and explicit input rejection. The design uses values without object handles or pickle.
Independent review accepted this proof. Default production dataclass transport is not included in 0.11.0.
Evidence: docs/maintainers/value-contract-prototypes.md, test/value_extensions_generated_point.test.ts, test/python/test_value_extensions_prototype.py, and docs/maintainers/architecture-decision-0.11.md.
Verified release evidence:
Implementation #362 and release #354 merged after independent review, green checks, and resolved CodeRabbit findings. Final candidate 0861ebe and merge f6f811d have identical trees.
Final full CI passed, including check:all, scientific 103/103, clean consumer 20/20, real Pyodide/browser 8/8, performance 25/25, and Node/Python/Bun/OS checks. Performance budgets remained unchanged.
Fresh published-consumer run passed 20/20 checks with exact registry versions, isolated imports, and generated calls. It used no local-package fallback.
Activity
bbopen commentedon Sep 20, 2026
The bounded dataclass design is complete. Actual Python analysis produces a typed Point wrapper, and a private value adapter passes generated typechecking, execution, and wrong-return validation. Tests cover nested, optional, and defaulted fields, cycles, unsupported fields/classes, depth and payload limits, and explicit input rejection. The design uses values without object handles or pickle.
Independent review accepted this proof. Default production dataclass transport is not included in 0.11.0.
Evidence:
docs/maintainers/value-contract-prototypes.md,test/value_extensions_generated_point.test.ts,test/python/test_value_extensions_prototype.py, anddocs/maintainers/architecture-decision-0.11.md.Verified release evidence:
0861ebeand mergef6f811dhave identical trees.The architecture decision records the accepted scope and prototype limits.
Closing as complete within the issue's bounded design scope.