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
feat(rvm): add context/metadata support, new instructions, and serialization v6
Extend the RVM infrastructure with evaluation context, program metadata,
and several new instructions needed by language frontends beyond Rego.
VM & instructions:
- Add LoadContext / LoadMetadata instructions for accessing evaluation
context and program metadata from within RVM programs
- Add ArrayPushDefined (skip-undefined variant of ArrayPush) for
wildcard alias collection where absent properties should be excluded
- Add ReturnUndefinedIfNotTrue for early-return semantics without
triggering VM assertion failures
- Add CoalesceUndefinedToNull for languages where missing fields are
null rather than undefined
- Support IterationState::Single in loops and comprehensions for
iterating over scalar values alongside collections
Program metadata:
- Extend ProgramMetadata with language identifier, typed annotations
(BTreeMap<String, MetadataValue>), and to_value() conversion
- Add MetadataValue enum (String, Bool, Integer, Float, Array, Object)
with full serde support
- Add has_host_await flag to Program with recompute_host_await_presence()
Serialization:
- Bump binary format version to 6
- Add JSON serialization for ProgramMetadata including annotations
Compiler:
- Track has_host_await during compilation
- Minor import cleanups
Test infrastructure:
- Extend VM test harness with context, metadata_language, and
metadata_annotations fields
- Add instruction parser support for new instructions
- Add assembly listing support (readable, tabular, compact formats)
- Add 3 new YAML test suites: load_context_metadata,
coalesce_undefined_to_null, return_undefined_if_not_true
0 commit comments