Detect whether a procedures feed response is in "recess mode" — i.e., all items
have dates from PROCEDURES_RECESS_YEAR_THRESHOLD or earlier (historical archive).
During parliamentary recesses the EP procedures/feed endpoint may return historical
archive data in ID order rather than current procedures. This function detects that
condition so callers can emit a 🟡 procedures-feed: recess mode audit row instead
of treating the response as usable current data.
Date extraction order per item: dateInitiated, then dateLastActivity, then
reference (first four characters). The first valid 4-digit year found in the
range [1952, 2100] is used.
Returns false when the payload is undefined, contains no items, or any item
yields a year later than the threshold (the feed has current data).
Parameters
payload: Record<string,unknown>|undefined
Parsed procedures feed payload
Returns boolean
true when all dated items are from PROCEDURES_RECESS_YEAR_THRESHOLD or earlier
Detect whether a procedures feed response is in "recess mode" — i.e., all items have dates from PROCEDURES_RECESS_YEAR_THRESHOLD or earlier (historical archive).
During parliamentary recesses the EP procedures/feed endpoint may return historical archive data in ID order rather than current procedures. This function detects that condition so callers can emit a
🟡 procedures-feed: recess modeaudit row instead of treating the response as usable current data.Date extraction order per item:
dateInitiated, thendateLastActivity, thenreference(first four characters). The first valid 4-digit year found in the range[1952, 2100]is used.Returns
falsewhen the payload isundefined, contains no items, or any item yields a year later than the threshold (the feed has current data).