Skip to content

Commit 187b5a0

Browse files
committed
chore(changeset): #21790 declares Clause-② yes -- metadata-core widens a published surface
orderedMapKeys is a new export and canonicalize/hashSpec take a new parameter, so the PR widens @objectstack/metadata-core's public surface. Levels unchanged: metadata-core minor, metadata-protocol and metadata-fs patch; the level axis accepts them under yes. Claude-Session: https://claude.ai/code/session_017ErfyP2Rx7XWHJA27QjyUi Co-authored-by: Claude <noreply@anthropic.com>
1 parent 071959e commit 187b5a0

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎.changeset/21790-metadata-core-ordered-fields-hash.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
The content hash keeps the order of an object's `fields`, so a pure field reorder is a new version instead of "no change" (#21790).
66

7-
Clause-②: no
7+
Clause-②: yes
88

99
- **`canonicalize(value, type?)` and `hashSpec(value, type?)`** take the metadata type. For a type whose body has a map the spec declares ordered, that map keeps its insertion order in the canonical form. Today that is one map: `object.fields`, whose traversal order is the field order the platform presents. Every other map stays key-order independent, including the keys around `fields` and the keys inside each field definition. Called without a type, both functions return exactly what they returned before.
1010
- **`orderedMapKeys(type?)`** is a new export. It returns the top-level keys of a `type` body whose map keeps its order (`['fields']` for `object`, `[]` otherwise).

‎.changeset/21790-metadata-fs-ordered-fields-hash.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
`FileSystemRepository` hashes each item as its metadata type, so a reorder of an object's `fields` is a change (#21790). A reordered object is written, and an external edit that only reorders `fields` is reported as an update.
66

7-
Clause-②: no
7+
Clause-②: yes
88

99
Event-log entries written before this release carry the order-blind hash. For an object whose `fields` are not in sorted key order, `get()` and `list()` no longer find that entry until the item next changes. They fall back to the defaults: no parent hash, sequence `0`, the filesystem actor, and the epoch timestamp. The body and the version hash are unaffected.

‎.changeset/21790-metadata-protocol-ordered-fields-hash.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Publishing a pure field reorder of an object now saves it. The object designer's drag-to-reorder used to answer success on publish, keep the old order and delete the draft (#21790).
66

7-
Clause-②: no
7+
Clause-②: yes
88

99
- `SysMetadataRepository` hashes each body as its type, so a reorder of an object's `fields` is a content change. It is written, recorded in history and served by `GET /api/v1/meta/object/:name`.
1010
- **Rows stored before this release** keep the `checksum` they were written with. That value is still the version token: reads return it, `If-Match` tokens are derived from it, and the optimistic lock compares against it, so upgrading raises no conflict.

0 commit comments

Comments
 (0)