These helpers let the weekly cache generators resume from whatever detail
records were already fetched in a prior run instead of starting over every
time. They keep side effects explicit (state mutation is limited to the
caller-provided details map and missingIds set, and I/O is limited to
the injected fetchDetail callback), which keeps fetch orchestration
unit-testable without hitting the European Parliament Open Data API.
Adaptive (incremental) weekly-cache loading primitives.
These helpers let the weekly cache generators resume from whatever detail records were already fetched in a prior run instead of starting over every time. They keep side effects explicit (state mutation is limited to the caller-provided
detailsmap andmissingIdsset, and I/O is limited to the injectedfetchDetailcallback), which keeps fetch orchestration unit-testable without hitting the European Parliament Open Data API.