Skip to content

Freeze the ReplaceRange text-fact law and differential oracle #292

Description

@flyingrobots

Current truth

Jedit production ReplaceRange semantics are implemented by the native persistent-rope planner. Its retained facts use compact serde JSON in node-alpha atom attachments and domain-separated BLAKE3 identities. A richer TypeScript graph-rope model exists, but it is not byte- or proposition-equivalent to the native production model.

Echo and Edict must not guess which model an admitted executable ReplaceRange operation consumes.

Contract

Publish one Jedit-owned versioned declaration that freezes the existing native production model for the first executable-operation corridor:

  • Buffer, Blob, Leaf, Branch, Head, Rewrite, and Diff fact shapes;
  • compact field-ordered UTF-8 JSON encoding;
  • type labels, attachment posture, and absence of structural edges;
  • content, buffer, blob-content, and empty-root identity domains;
  • fixed-width coordinate and metric ranges;
  • explicit exclusion of TypeScript-only maintenance, anchor, and richer diff propositions;
  • compatibility posture: existing native facts remain byte-stable; migration is a separate operation.

Add a deterministic ReplaceRange oracle corpus generated by the existing planner. The corpus must bind exact initial facts, invocation, ordered patch, read/write support, result facts, identities, and typed obstruction posture for representative insert, delete, Unicode replacement, cross-leaf rewrite, large replacement, no-op, malformed range, stale basis, UTF-8 boundary, and overflow cases.

Executable witness

A Rust test regenerates every corpus case from the current planner and compares exact canonical bytes and identities to committed artifacts. A separate schema test rejects drift in the declaration digest and canonical codec vectors.

Non-goals

  • No production routing change.
  • No Echo evaluator or operation package.
  • No caller-supplied MutationPlan crossing.
  • No ReplaceRange, rope split, rope join, or balance intrinsic.
  • No TypeScript/native schema unification.
  • No Kitten runtime, TextWindow, Continuum, child lanes, or wormholes.

Acceptance

  • The canonical declaration is machine-readable and digest-locked by a checked vector.
  • The corpus is reproducible from the legacy planner without invoking a future Echo evaluator.
  • Successful cases cover persistent structure and exact patch/footprint evidence.
  • Obstructed cases prove no patch is produced.
  • Production behavior and existing generic Echo behavior remain unchanged.

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

    causal-ropeCausal rope text authority roadmapenhancementNew feature or requestsliceImplementable roadmap slicetext-authorityText authority and storage invariants

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions