Files
Sasha Rakhmatulin 42e5ccfa89 chore: cover empty-slug autosave updates and clarify the create comment
Addresses review feedback on the update path.

Adds the requested test: create two source-less drafts, then update both,
confirming they still coexist under the unique index.

The accompanying code change was not needed. The update branch's `null` is
inert — it never reaches storage on any adapter. Verified by inspecting the
raw main and version documents on Mongo after an autosave update: the slug
key is absent, not null, so the sparse index never sees a null to collide
on. The same holds at the API level on Postgres and SQLite.

Reworded the create-branch comment, which claimed to mirror "the `null` the
update branch falls back to". That framing was misleading given the above,
and it omitted the actual reason for `undefined`: Mongo's sparse index does
include `null`, so `null` would fix Postgres alone.

Renamed three tests from "leave the slug null" to "leave the slug absent"
to match what is really stored.
2026-09-10 15:31:03 +01:00
..
2025-12-19 16:07:14 -05:00
2026-04-14 09:27:46 -07:00
2025-07-18 06:48:27 -04:00
2026-07-01 13:42:19 -07:00