fix(sec): name aged filings in deferred warnings
This commit is contained in:
@@ -262,6 +262,39 @@ async def test_companyfacts_lag_does_not_mask_second_validation_failure():
|
||||
assert len(result.messages) == 2
|
||||
|
||||
|
||||
async def test_deferred_alert_names_aged_out_accessions_separately():
|
||||
importer = SecFundamentalsImporter(today=date(2026, 5, 6))
|
||||
importer._latest_index_date = date(2026, 5, 5)
|
||||
staged = StagedFundamentals(
|
||||
resolved=ResolvedUniverse(),
|
||||
missing_xbrl=[
|
||||
{
|
||||
"cik": "0000320193",
|
||||
"accession": "YOUNG",
|
||||
"form": "10-Q",
|
||||
"index_date": date(2026, 5, 5),
|
||||
"age_days": 1,
|
||||
"reason": "not_in_companyfacts",
|
||||
},
|
||||
{
|
||||
"cik": "0000789019",
|
||||
"accession": "AGED-OUT",
|
||||
"form": "10-Q",
|
||||
"index_date": date(2026, 5, 1),
|
||||
"age_days": 5,
|
||||
"reason": "not_in_companyfacts",
|
||||
},
|
||||
],
|
||||
)
|
||||
|
||||
result = await importer.validate(None, staged)
|
||||
|
||||
assert result.retryable
|
||||
assert len(result.messages) == 1 and "YOUNG" in result.messages[0]
|
||||
assert len(result.deferred_alert_messages) == 1
|
||||
assert "AGED-OUT" in result.deferred_alert_messages[0]
|
||||
|
||||
|
||||
async def test_gate_separates_missing_submissions_from_missing_facts(engine):
|
||||
"""An index row the issuer's own filing list does not carry is a different
|
||||
failure from a Company-Facts lag, and must not be reported as one."""
|
||||
|
||||
Reference in New Issue
Block a user