fix(sec): warn when deferred imports stay stale

This commit is contained in:
2026-07-31 13:27:31 +02:00
parent f58f8b0818
commit c8c660e63d
8 changed files with 123 additions and 17 deletions
+4 -3
View File
@@ -413,14 +413,15 @@ class SecFundamentalsImporter:
summary=summary,
source_max_date=self._latest_index_date,
messages=messages,
# Pure Company-Facts publication lag is expected and self-healing:
# keep the cursor in place and retry, but do not page operators. Any
# other missing reason or validation message remains a real failure.
# Company-Facts absence is usually publication lag, but can also be a
# permanent co-registrant misfile that the daily index did not expose.
# Defer quietly at first; the framework warns if promotions stay stale.
retryable=(
len(messages) == 1
and bool(blocking)
and all(m.get("reason") == "not_in_companyfacts" for m in blocking)
),
deferred_alert_after_days=MISSING_XBRL_RETRY_DAYS,
)
async def promote(self, db, staged: StagedFundamentals, run_id: int) -> dict[str, int]: