Skip to content

Introduce typed values, inclusive ranges, and immutable variables #39

Description

@HsiangNianian

Parent

What to build

Add the RFC-0001 runtime kinds and the RFC-0003 schema 2.0 serialization foundation for instructions and values.

Frozen contract

  • Value is a closed Scalar, Text, Boolean, Values, or RollSet union.
  • RollSet items are {node_id, annotations} references and always retain item_kind: scalar | text, including when empty.
  • Source Values literals are flat; occurrences, grouping, and repeat may produce bounded nested Values.
  • InstructionResult contains id, frame-local index, byte span, canonical text, value, nullable scalar, trace_root, and nested executions.
  • Scalar projection is identity for Scalar, a checked sum for flat scalar Values and Scalar RollSets, zero for empty scalar collections, and null for all other kinds.
  • ${name} and ${0} resolve from immutable environments and preserve typed values.

Acceptance criteria

  • Rust types serialize exactly to the RFC-0003 schema and installed Python exposes the same decoded fields.
  • Inclusive ranges, Boolean literals, nested Values, quoted strings, and empty typed collections have boundary cases.
  • Variables return spanned unknown/wrong-kind errors without implicit coercion.
  • Scalar arithmetic and projection use checked i64 operations.
  • Instruction IDs are request-local, monotonic, and replay deterministic.
  • Conformance covers every kind, projection, and invalid cross-kind operation.

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:engineEvaluation, randomness, safety, and result corearea:languageDice expression syntax and semanticsarea:pythonPython API, bindings, typing, and packagingblockedCannot proceed until a listed dependency is completebreaking-changeChanges public syntax, semantics, or API contractspriority:p1Required for the current production milestonetype:featureA user-visible vertical feature sliceworkflow:afkReady for independent implementation

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions