#7641·nango

getRecordsByIds silently omits records when a batch spans multiple pages

Author: dakjdakdCreated Sep 24, 2026Updated Sep 24, 2026

getRecordsByIds() is expected to return every stored record whose ID was requested. The response budget introduced in #6187 lets the records service shorten a response to stay within RECORDS_MAX_RESPONSE_SIZE_BYTES and return a next_cursor for the remaining records. The SDK currently makes one request per group of 100 IDs, then moves to the next group even when that response has a cursor. Within a single group, the remaining records are silently omitted from the returned map.

For example, with two stored records and a response budget that fits only one, getRecordsByIds(['a', 'b'], model) returns a map containing a only. The records response includes a cursor, but the SDK does not request its next page. This occurs when the byte budget is enabled and RECORDS_MAX_RESPONSE_SIZE_DRY_RUN is false.

The SDK should keep the same set of external IDs while following every cursor for that group, then start the next group without carrying over the previous cursor. The returned map should contain both records in the example above. A regression test covering a shortened page and the transition to the next ID group would protect both parts of the behavior.