fix: close remaining ingestion review gaps
This commit is contained in:
@@ -109,6 +109,50 @@ async def test_active_gap_is_blocked_until_a_later_filing_supersedes_it(db_sessi
|
||||
assert await fundamentals_quality_service.blocked_ticker_ids(db_session) == set()
|
||||
|
||||
|
||||
async def test_gap_without_index_date_uses_first_seen_date_for_supersession(
|
||||
db_session,
|
||||
):
|
||||
ticker = Ticker(symbol="DATELESS", cik="0000000045")
|
||||
first_seen = datetime(2026, 5, 1, 12, tzinfo=timezone.utc)
|
||||
db_session.add_all([
|
||||
ticker,
|
||||
SystemSetting(
|
||||
key="fundamental_data_sec_dolt_cutover_enabled",
|
||||
value="true",
|
||||
),
|
||||
SecFilingGap(
|
||||
cik=ticker.cik,
|
||||
accession="DATELESS-Q",
|
||||
form="10-Q",
|
||||
index_date=None,
|
||||
reason="not_in_companyfacts",
|
||||
first_seen_at=first_seen,
|
||||
last_attempted_at=first_seen,
|
||||
),
|
||||
])
|
||||
await db_session.flush()
|
||||
|
||||
assert await fundamentals_quality_service.blocked_ticker_ids(db_session) == {
|
||||
ticker.id
|
||||
}
|
||||
|
||||
db_session.add(
|
||||
FundamentalSnapshot(
|
||||
cik=ticker.cik,
|
||||
accession="LATER-DATELESS-Q",
|
||||
form="10-Q",
|
||||
filed_date=date(2026, 5, 2),
|
||||
accepted_at=datetime(2026, 5, 2, 12, tzinfo=timezone.utc),
|
||||
period_end=date(2026, 3, 31),
|
||||
fiscal_year=2026,
|
||||
fiscal_period="Q1",
|
||||
)
|
||||
)
|
||||
await db_session.flush()
|
||||
|
||||
assert await fundamentals_quality_service.blocked_ticker_ids(db_session) == set()
|
||||
|
||||
|
||||
async def test_ticker_quality_explains_no_xbrl_block(db_session):
|
||||
ticker = Ticker(symbol="NEWREG", cik="0000000044")
|
||||
db_session.add_all([
|
||||
|
||||
Reference in New Issue
Block a user