feat: Show honest qualifying-day progress and confidence (issue #77)
This commit is contained in:
@@ -92,6 +92,7 @@ class ProjectionResult:
|
||||
staleness_fact: Optional[str]
|
||||
degraded_identity_fact: Optional[str]
|
||||
zero_rate_fact: Optional[str]
|
||||
qualifying_days_progress: Optional[str] = None # Issue #77: honest qualifying-day progress
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -547,6 +548,16 @@ def compute_projection(conn, clock_now):
|
||||
days_below_coverage = sum(1 for d in segment_days
|
||||
if d["coverage"] < WARMING_COVERAGE_FLOOR or d["sample_count"] == 0)
|
||||
qualifying = total_days_count - days_below_coverage
|
||||
|
||||
# Issue #77: Show honest qualifying-day progress
|
||||
if total_days_count >= WARMING_MIN_DAYS:
|
||||
# After warm-up, show qualifying day details for transparency
|
||||
qualifying_days_progress = "%d of %d qualifying days" % (qualifying, total_days_count)
|
||||
if days_below_coverage > 0:
|
||||
qualifying_days_progress += " (%d below coverage)" % days_below_coverage
|
||||
else:
|
||||
qualifying_days_progress = None
|
||||
|
||||
if total_days_count < WARMING_MIN_DAYS or days_below_coverage > WARMING_MAX_LOW_COVERAGE:
|
||||
warming_fact = "warming up: %d of %d qualifying days" % (qualifying, WARMING_MIN_DAYS)
|
||||
facts.append(warming_fact)
|
||||
@@ -605,4 +616,5 @@ def compute_projection(conn, clock_now):
|
||||
staleness_fact=staleness_fact,
|
||||
degraded_identity_fact=degraded_identity_fact,
|
||||
zero_rate_fact=zero_rate_fact,
|
||||
qualifying_days_progress=qualifying_days_progress,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user