You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b990b89
Browse filesBrowse the repository at this point in the historyBrowse files
authored
fix(autonumber): single owner = persistent driver sequence (#1603) (#1608)
Autonumber values were generated twice: the SQL driver's persistent,
atomic _objectstack_sequences table AND a non-persistent in-memory
counter in the engine. The engine pre-filled before calling the driver,
so the driver always saw a value and skipped — leaving the persistent
sequence as dead code and risking duplicate numbers across instances /
after a restart.
- spec: DriverCapabilities.autonumber (optional) capability flag.
- driver-sql: advertise supports.autonumber=true; bulkCreate now fills
autonumber too (was create/upsert only); parse honors autonumberFormat
OR format.
- objectql: engine defers to the driver when it advertises native
autonumber support (no more pre-fill / in-memory shadow); keeps the
in-memory fallback for memory/mongodb; fallback also reads either
format key; record-validation exempts autonumber from the required
check (runtime-owned, assigned post-validation).
Tests: driver bulkCreate + autonumberFormat + capability (driver-sql
140 pass); engine defer-vs-fallback + validator exemption (objectql
526 pass). Existing data respected via scanMaxNumericTail bootstrap.
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments