From 862d1d536b2fbaabd9051a6a504a1f0511d2b91c Mon Sep 17 00:00:00 2001 From: Dennis Thiessen Date: Thu, 30 Jul 2026 10:39:46 +0200 Subject: [PATCH] Keep the missing-weekday note honest about market holidays A weekday with no published index is usually just a market holiday (~10/yr), not a fault. The WARNING still earns its place as the guard against inferring missing from an error code, but the comment should not claim more than it can. Co-Authored-By: Claude Opus 5 --- app/services/sec_client.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/services/sec_client.py b/app/services/sec_client.py index 0d9345d..ffedf24 100644 --- a/app/services/sec_client.py +++ b/app/services/sec_client.py @@ -289,10 +289,11 @@ class SecClient: try: text = await self.get_text(url) except SecNotFoundError: - # Absent is normal on a weekend (SEC publishes business days only). On a - # weekday it is not: a SEC hiccup — or a rejection page misread as absent - # — would otherwise let the importer advance past real filings silently, - # so surface it at WARNING instead of hiding it in the info stream. + # Absent on a weekend is routine (SEC publishes business days only); on a + # weekday it is either a market holiday or something worth a look — a SEC + # hiccup, or a rejection page misread as absent, would otherwise let the + # importer advance past real filings silently. Log-level only, no alert: + # cheaper than carrying a holiday calendar just to stay quiet ~10 days/yr. logger.log( logging.INFO if day.weekday() >= 5 else logging.WARNING, "no daily index published for %s (%s)",