@@ -22,24 +22,25 @@ Those names describe metadata found on historical Git objects only. Readers
2222ignore legacy trailers, including malformed or conflicting values, and never
2323use them to choose a schema.
2424
25- The old named entity CLI/API forms and named refs are historical compatibility
26- paths. They may remain useful for addressing older entities, but they are not
27- the document's type definition or content identity .
25+ Names remain how entities are addressed. A name is not the document's type
26+ definition and not its content identity, both of which live in the document
27+ itself .
2828
2929== Entity Identity and Refs
3030
3131`EntityId` is the OID of the complete bound document tree: the root containing
3232exactly `schema/` and `value/`. It is not the OID of the publication commit and
33- it is not a caller-selected alias. Both the embedded schema and encoded value
34- therefore contribute to the identity. The canonical data ref is
35- `refs/store/<kind>/<entity-id>`; named paths beneath the same kind are
36- compatibility aliases and are excluded from the canonical entity index.
37-
38- The current `Kind` API exposes both layers. `put_entity`, `compile_entity`,
39- `read_entity`, and `entity_reference` use the content-derived identity.
40- `put`, `get`, `reference`, `entity_name`, `anonymous`, and related named forms
41- are compatibility conveniences for ref-addressed callers. A named write may
42- maintain an alias, but the name never becomes the entity's identity.
33+ it is not a caller-selected name. Both the embedded schema and encoded value
34+ therefore contribute to the identity.
35+
36+ Identity is a derived value, not a ref layout. Data refs are
37+ `refs/store/<kind>/<name>`, and the name is whatever the caller chooses: the
38+ store attaches no meaning to it and advances it like a branch. Applications
39+ decide what names mean. An application that wants content-addressed storage
40+ selects `<entity-id>` as the name, which the store treats like any other;
41+ `put_entity`, `read_entity`, and `entity_reference` are the shorthand for that
42+ policy, and `compile_entity` derives the id for any document without publishing
43+ it.
4344
4445== Deletion and CLI Compatibility
4546
@@ -55,16 +56,15 @@ The primary CLI form, `git store get <tree-ish>`, decodes a bound document from
5556the tree it names. The hidden compatibility form, `git store get <kind> <name>`,
5657reads a named ref and reports deleted entities differently from missing ones;
5758revision suffixes such as `name~1` and `name@<revision>` address history.
58- `git store rm <kind> <name>` publishes a tombstone over the canonical ref and
59- any alias pointing at that publication. It does not hard-delete refs ; repeating
59+ `git store rm <kind> <name>` publishes a tombstone over that name. It does not
60+ hard-delete refs, so the name's earlier publications stay reachable ; repeating
6061it reports `already deleted`, while an absent ref is an error. `get` reports a
61- tombstone as deleted and an absent ref as absent.
62+ tombstone as deleted and an absent ref as absent. Names are independent:
63+ deleting one name does not affect another that addresses the same content.
6264
63- Writing the exact same bound content after deletion restores its original
64- canonical ID by appending a normal value commit after the tombstone; aliases
65- that pointed at the tombstone are restored atomically. Writing different
66- content creates a new ID, leaving the old ID deleted. The CLI has no separate
67- restore command; recreation and restoration are library write operations.
65+ Writing to a deleted name restores it by appending a normal value commit after
66+ the tombstone. The CLI has no separate restore command; recreation and
67+ restoration are ordinary write operations.
6868
6969== Trailer and Schema Compatibility
7070
@@ -142,23 +142,23 @@ emit a success record. The current exit categories are:
142142=== Publication, CAS, and Identity
143143
144144`document publish <kind> <document-tree> --expected <absent|OID>` publishes a
145- prepared bound document. With no `--alias`, the expectation applies to the
146- canonical ref; with `--alias <name>`, it applies to that compatibility alias.
147- The canonical ref, optional alias, and materialized per-kind index advance in
148- one compare-and-swap batch. A stale expectation is a one-shot failure: the CLI
145+ prepared bound document under `--alias <name> `, defaulting to the entity's
146+ content-derived name when none is given. The expectation applies to that ref,
147+ and the ref and the materialized per-kind index advance in one compare-and-swap
148+ batch. A stale expectation is a one-shot failure: the CLI
149149returns exit category `4` and does not retry. Objects written before a lost CAS
150150may remain unreachable. A script owns retry, resume, and conflict policy.
151151
152152The complete bound document-tree OID is the content-derived `EntityId`, and both
153- its schema and value contribute to it. The canonical ref is
154- `refs/store/<kind>/<entity-id>`. Names are aliases, not identity. The persisted
155- per-kind index under `refs/cache/` is a materialized cache of canonical refs;
156- entity refs remain authoritative and reads can fall back when the index is
157- missing, malformed, or stale.
158-
159- `entity delete <kind> <entity-id >` publishes a typed tombstone over the
160- canonical ref and aliases/ index atomically. It does not remove the ref. A
161- repeated deletion reports `already_deleted`; an absent entity is distinct.
153+ its schema and value contribute to it. It is a derived value, available for any
154+ document that compiles, and is independent of where the document is published.
155+ The persisted per-kind index under `refs/cache/` is a materialized cache of the
156+ entity refs; those refs remain authoritative and reads can fall back when the
157+ index is missing, malformed, or stale.
158+
159+ `entity delete <kind> <name >` publishes a typed tombstone over that ref,
160+ advancing it and the index atomically. It does not remove the ref. A repeated
161+ deletion reports `already_deleted`; an absent entity is distinct.
162162
163163=== Script Boundary
164164
0 commit comments