Summary
Ingesting a large batch of records with highly heterogeneous shapes into an open (non-@sealed) table causes the vast majority of records to become unreadable — they decode as null with error #1163 "Record references a shared structure missing on this node". Critically, #1163 is documented as a replica-only condition, but this reproduces on a single node.
Severity
Potential data loss. In the repro, 6 of 50,000 records were readable back. A uniform-shape control of the same size read back 50,000/50,000.
Repro
Found via exploratory QA (qa-explorer skill), harper 001bf7b9c (v5.1.0, main).
- Define an open table (primary key only, no other declared attributes, not
@sealed).
- Insert ~50K records via the operations
insert API in batches, where each record has a randomly-generated distinct shape (varying key names drawn from a large pool, varying nesting depth, varying value types for the same key name across records).
- Read records back (search_by_id / search_by_conditions).
Observed: logs flood with #1163 (e.g. "decoded as null", citing a structure id); almost all records return null/missing.
Expected: all inserted records readable, as with uniform-shape ingest.
A scratch reproduction test exists (qa-scratch/heterogeneous-ingest) and can be promoted to integrationTests/database/ as a regression test.
Where to look
resources/RecordEncoder.ts:425 (the #1163 path). The msgpackr/structon shared-structure (typedStruct) resolution appears to lose/skip structures under high shape churn on a single node.
Open question
Not yet disambiguated whether records fail at write time or are written-but-unreadable on the shared-structure resolve path. First triage step: check whether the on-disk record bytes are present but the structure dictionary entry is missing.
Filed from qa-explorer wave 1 (F-001). Medium confidence it's a real defect; the data-loss symptom is reproducible.
Summary
Ingesting a large batch of records with highly heterogeneous shapes into an open (non-
@sealed) table causes the vast majority of records to become unreadable — they decode asnullwith error #1163 "Record references a shared structure missing on this node". Critically, #1163 is documented as a replica-only condition, but this reproduces on a single node.Severity
Potential data loss. In the repro, 6 of 50,000 records were readable back. A uniform-shape control of the same size read back 50,000/50,000.
Repro
Found via exploratory QA (qa-explorer skill), harper
001bf7b9c(v5.1.0, main).@sealed).insertAPI in batches, where each record has a randomly-generated distinct shape (varying key names drawn from a large pool, varying nesting depth, varying value types for the same key name across records).Observed: logs flood with #1163 (e.g. "decoded as null", citing a structure id); almost all records return null/missing.
Expected: all inserted records readable, as with uniform-shape ingest.
A scratch reproduction test exists (qa-scratch/heterogeneous-ingest) and can be promoted to
integrationTests/database/as a regression test.Where to look
resources/RecordEncoder.ts:425(the #1163 path). The msgpackr/structon shared-structure (typedStruct) resolution appears to lose/skip structures under high shape churn on a single node.Open question
Not yet disambiguated whether records fail at write time or are written-but-unreadable on the shared-structure resolve path. First triage step: check whether the on-disk record bytes are present but the structure dictionary entry is missing.
Filed from qa-explorer wave 1 (F-001). Medium confidence it's a real defect; the data-loss symptom is reproducible.