Merged
Conversation
Contributor
wolfy-j
commented
Mar 21, 2026
- Fix table? validation rejecting valid tables (Ref("table") unresolved from manifest, builtin type fallback added to resolveRuntimeType)
- Add structured validation errors via *Error with Kind=Invalid and details map (field, expected, got, constraint) accessible from Lua through err:kind(), err:details(), err:message()
- Fast-path :is() using zero-alloc validateValue on success, only computing error details on failure (2.6x speedup, 0 allocs on pass)
- Handle all 32 typ.Type implementations in runtime validation: Recursive, Sum, Platform, Intersection, Ref, Annotated nil-inner
- Nil-safe String()/Kind() on all compound types (Record, Map, Array, Tuple, Union, Intersection, Optional, Annotated) to prevent segfaults from corrupted manifests
- Guard all reflection methods (elem, key, val, inner, ret, fields, variants, params) and type comparison against nil internals
- Recursion depth limit (64) on validation to prevent stack overflow from malformed recursive types
- Map validation checks Array part for number-keyed maps
- Record validation checks MapComponent for records with map components
- Type IO decoder hardening: maxSliceLen reduced to 64, depth limit 32, node budget 1024, missing checkSliceLen in readCondition
- CI: add fuzz, race, and benchmark jobs
- Fix table? validation rejecting valid tables (Ref("table") unresolved
from manifest, builtin type fallback added to resolveRuntimeType)
- Add structured validation errors via *Error with Kind=Invalid and
details map (field, expected, got, constraint) accessible from Lua
through err:kind(), err:details(), err:message()
- Fast-path :is() using zero-alloc validateValue on success, only
computing error details on failure (2.6x speedup, 0 allocs on pass)
- Handle all 32 typ.Type implementations in runtime validation:
Recursive, Sum, Platform, Intersection, Ref, Annotated nil-inner
- Nil-safe String()/Kind() on all compound types (Record, Map, Array,
Tuple, Union, Intersection, Optional, Annotated) to prevent segfaults
from corrupted manifests
- Guard all reflection methods (elem, key, val, inner, ret, fields,
variants, params) and type comparison against nil internals
- Recursion depth limit (64) on validation to prevent stack overflow
from malformed recursive types
- Map validation checks Array part for number-keyed maps
- Record validation checks MapComponent for records with map components
- Type IO decoder hardening: maxSliceLen reduced to 64, depth limit 32,
node budget 1024, missing checkSliceLen in readCondition
- CI: add fuzz, race, and benchmark jobs
512 tests, 115M+ fuzz executions across 4 fuzzers (Lua source types,
manifest types, corrupted type bytes, corrupted manifests), zero crashes.
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.