Add Class authoring/parity: Class runtime model, IR support, and tests - #116
Open
haydnv wants to merge 1 commit into
Open
Add Class authoring/parity: Class runtime model, IR support, and tests#116haydnv wants to merge 1 commit into
haydnv wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Classauthoring surface to mirror Python v1 model semantics while emitting versioned/class/{publisher}/{resource}/{version}definitions.Description
py/tinychain/classdef.pyimplementingClass,ClassErrorsubclasses,class_definition, andvalidate_class_definitionwith canonical identity, prototype extraction, override validation, construction, and route binding.py/tinychain/library.pyto compile and includeclassesin the IR viacompile_ir, adjustinstallto submit IR when classes are present, and adapt route compilation to handle class-bound routes.py/tinychain/__init__.pyto export the newClassAPI and errors, and addStatetopy/tinychain/state/__init__.pyexports.py/CLASS_PARITY.mddescribing Class v1→v2 parity and usage, updatepy/README.mdto reference it, and include a language-neutral fixturepy/tests/fixtures/class_definitions.json.py/tests/test_class_authoring.pyexercising class definition encoding, construction, bound methods, inheritance semantics, validation errors, manifest compilation, and equality with the golden fixture.Testing
py/tests/test_class_authoring.pyunderpytestand the tests passed.compile_iryields an IR containing aclasseslist that matchesclass_definitionoutputs for declaredClasstypes using theclass_definitions.jsonfixture.library_definitionand new IR submission behavior and confirmed no regressions in route compilation.Codex Task