| @objectstack/core | patch |
|---|---|
| @objectstack/objectql | patch |
| @objectstack/rest | patch |
| @objectstack/metadata-protocol | patch |
fix: harden the bulk-write path — retries, idempotency, contracts, and summary visibility (#3147–#3152)
Six reliability fixes to the batched seed/import + engine.insert(array) path
introduced by the #2678 bulk-write rework:
- #3151
bulkWritevalidates thatwriteBatchreturns one record per input row (a short/long/non-array return is degraded per-row, not backfilled as phantom success);engine.insert(array)likewise rejects a short driverbulkCreatereturn instead of padding afterInsert withundefined. - #3150 wraps the two remaining un-retried write points (seed
writeRecord/resolveDeferredUpdates, import's no-createManyDatafallback) inwithTransientRetry;defaultIsTransientErrorshort-circuits definitive logical errors to non-transient. - #3148 import
resolveRefflushes pending creates on a same-object miss so a later row can reference an earlier same-file CREATE, and no longer negatively caches a miss. - #3149 threads an
attemptcounter throughbulkWrite; seed rechecks byexternalIdand import bymatchFieldsbefore re-writing, so a commit-then-lost-response retry cannot duplicate a batch. - #3147
recomputeSummariesretries transient failures and, on exhaustion, surfacesSummaryRecomputeError(ERR_SUMMARY_RECOMPUTE) instead of a silent warn; seed/import recover it to a warning without re-writing. - #3152 autonumbers are assigned after validation, so a batch that dies in validation consumes no sequence value (no number-range gaps).