Summary
Roadmap item (DESIGN.md section 6.1 honest deferrals: auto-generated ids are out of v1). Today every put(id, doc) requires a caller-chosen id; a put(doc)/add(doc) overload that generates one is standard document-store ergonomics.
Scope sketch
- Generation scheme must be deliberate: ids become kernel key bytes and therefore SORT — a time-ordered scheme (ULID-like) makes
all() return insertion order for free, while random UUIDs scatter. Decide and document.
- Determinism constraint: the DST/test story needs seedable generation (inject a generator, default to crypto randomness) so tests stay reproducible.
- Validation unchanged: generated ids must pass the same well-formedness rules as caller ids (trivially true for ASCII schemes).
- Return the generated id from the write (
{ id, changed }), extending WriteResult carefully or via a distinct return shape.
Constraints
- Kernel unchanged; a lens-level convenience only.
- Changeset (minor); gate green.
Summary
Roadmap item (DESIGN.md section 6.1 honest deferrals: auto-generated ids are out of v1). Today every
put(id, doc)requires a caller-chosen id; aput(doc)/add(doc)overload that generates one is standard document-store ergonomics.Scope sketch
all()return insertion order for free, while random UUIDs scatter. Decide and document.{ id, changed }), extending WriteResult carefully or via a distinct return shape.Constraints