Skip to content

Allocate entity subjects and expose causal occurrence receipts #837

Description

@flyingrobots

Goal

Make dependency-pure entity capture usable by applications that do not already own an independent semantic subject, without moving causal identity or ordering policy into the application.

Contract

  • Distinguish an application-supplied semantic subject from the substrate occurrence that admits it.
  • Add an allocation form for entity.add that derives an opaque subject from git-warp's writer-local dot machinery.
  • Return the admitted entity subject and an opaque occurrence coordinate on the WriteReceipt.
  • Let the coordinate answer causal relation through version-vector context and deterministic presentation order through git-warp's canonical EventId comparator.
  • Keep wall-clock observations such as capturedAt as payload metadata only.
  • Preserve repeated additions of one semantic subject as distinct substrate occurrences.

Non-goals

  • Enforcing distributed semantic-subject uniqueness.
  • Asking applications to maintain writer counters, Lamport state, version vectors, or custom sort keys.
  • Treating a version vector as a total-order clock.
  • Implementing Think retrieval optics in this issue.

Acceptance

  • Two auto-allocated entity writes with identical payload timestamps receive distinct subjects and occurrence ids.
  • Sequential occurrences report causal order.
  • Concurrent occurrences remain causally incomparable while sorting deterministically by canonical event order.
  • Supplied-subject entity.add continues to work and returns a distinct occurrence for every admitted write.
  • Documentation states the ownership boundary and corrects the current application-owned ordering advice.
  • Focused tests, type checks, and repository gates pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:apiPrimary work area: api.priority:asapImmediate release pressure.status:activeSomeone is actively working this issue.type:featureNew capability or product behavior.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions