Skip to content

Implement typed merge, bind, occurrences, paint, split, and group options #42

Description

@HsiangNianian

Parent

What to build

Implement typed collection transformations on RFC-0003 Values, RollSet references, immutable instruction history, and trace DAGs.

Frozen contract

  • m(expr) combines explicit compatible collections and produces a merge trace node; bare m is invalid.
  • b reads compatible completed instruction values, records source_instruction_ids, and never mutates ProgramResult history.
  • o / o(N,S) returns ordered nested [value, count] Values with occurrence provenance.
  • p[color:N,...] changes RollSet-view annotations and emits paint assignments without mutating RollNodes.
  • y flattens one Values level or spreads compound draws while keeping node IDs.
  • gN creates consecutive width-N nested Values with a final short remainder.

Acceptance criteria

  • Every option matches RFC-0001 input/output and cardinality cases.
  • Merge/bind preserve instruction IDs, trace inputs, and source-node identity.
  • Occurrence order, selectors, paint normalization, split depth, and group remainder are deterministic.
  • Empty RollSets retain item_kind; annotations do not alter scalar projection.
  • Wrong-kind, zero, oversized, forward-bind, and incompatible requests return spanned RFC-0003 errors.
  • Rust, installed Python, CLI JSON, and docs agree on schema-valid output.

Blocked by

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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