Skip to content

Commit e42073f

Browse files
committed
chore(changeset): regrade @objectstack/metadata to minor for the stat() answer change (#16422)
Seat ruling on the delivery: the `patch` argument holds for the four repaired sites — those change only values `MetadataRecordSchema` / `MetadataHistoryRecordSchema` already refused, so nothing a consumer legitimately received has moved. It does not cover `DatabaseLoader.stat()`. A row with an unreadable `updated_at` and a good `created_at` previously published `new Date().toISOString()` as its `mtime`, and that answer was LEGAL — it satisfies `MetadataStats.mtime`'s `z.string().datetime()`, and the pre-existing pin asserted exactly that. So that site is not the repair of a violation; it is one legal published answer replaced by a different legal published answer on a published read verb, which the ladder puts at `minor`. The level is per package, so the four repaired sites ride along. `@objectstack/metadata-protocol` stays `patch`: `rowToEvent` only stops emitting values `MetadataEventSchema` refused, and `listCommits` is byte-identical on all seven probe inputs. Front-matter and prose are moved together — the body now states which site carries the level, why the old answer was legal, and why the sibling package does not take it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XTBcV7zZHmokdyQgXjbyEU
1 parent ae50c73 commit e42073f

1 file changed

Lines changed: 31 additions & 3 deletions

File tree

.changeset/iso-from-valid-date-family-collapse.md

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
"@objectstack/metadata": patch
2+
"@objectstack/metadata": minor
33
"@objectstack/metadata-protocol": patch
44
---
55

@@ -55,16 +55,44 @@ to materialise for these columns. They now arrive as the declared *type* (a
5555
string) that simply is not a valid datetime, so the producer's bug stays visible
5656
instead of being papered over.
5757

58-
## One behaviour change worth reading twice
58+
## One behaviour change worth reading twice — and it is why this is `minor`
5959

6060
`DatabaseLoader.stat()` computes `record.updatedAt ?? record.createdAt`. An
6161
Invalid `updated_at` used to WIN that `??` — a `Date` is truthy and not nullish —
6262
so a row with an unreadable `updated_at` and a good `created_at` published
6363
`new Date()` as its `mtime`. It now folds to `undefined` one step earlier and
6464
loses the `??`, so the row publishes its `created_at`: a stored instant in place
65-
of a fabricated one, and exactly the "same `?? <default>` chain an absent column
65+
of a fabricated one, and exactly the "same `?? DEFAULT` chain an absent column
6666
takes" that `#14078`'s own ruling text prescribes for the shape.
6767

68+
⚠️ **The old answer was LEGAL.** `new Date().toISOString()` satisfies
69+
`MetadataStats.mtime`'s `z.string().datetime()` perfectly well, and the
70+
pre-existing pin asserted exactly that. So this one site is **not** the repair of
71+
a violation — it is one legal published answer replaced by a different legal
72+
published answer on a published read verb. Nothing was refused before and is
73+
permitted now; a consumer simply receives a different instant.
74+
75+
## Why the two levels differ
76+
77+
- **`@objectstack/metadata``minor`.** Its four repaired sites, on their own,
78+
are the "repairing an implementation that silently violated its own already
79+
published declared type" case: the values that changed there are ones
80+
`MetadataRecordSchema` / `MetadataHistoryRecordSchema` already refused, and
81+
nothing a consumer legitimately received has moved. But this package also
82+
carries `stat()`, and that site changes a **legal** published answer, which the
83+
paragraph above measures. The level is per package, so the four repaired sites
84+
ride along at `minor`.
85+
- **`@objectstack/metadata-protocol``patch`.** Neither of its two sites moves
86+
a legal published answer. `rowToEvent` only stops emitting values
87+
`MetadataEventSchema` refused (a `Date`, a `number`, an opaque object in a
88+
field declared `z.string()`), and `listCommits` is byte-identical on all seven
89+
probe inputs.
90+
91+
⛔ No declared type narrowed, no export was added or removed (neither helper was
92+
ever exported), and no envelope or accept set moved — so this is `minor` by the
93+
changed-answer row, not a breaking change, and it carries no ADR-0087
94+
disposition.
95+
6896
## What deliberately did NOT collapse
6997

7098
`listCommits` in `@objectstack/metadata-protocol` keeps its copy. Its docblock

0 commit comments

Comments
 (0)