Skip to content

[P1] Diagnose DuckDB Today Picks query contract regressions #45

Description

@fxbin

Context

Bounded PostgreSQL full-suite diagnostic PR #34 exposed four consecutive failures in tests/test_duckdb_service.py while the surrounding DuckDB query tests continued to execute:

  1. test_today_picks_query_uses_latest_analysis_only
  2. test_today_picks_query_applies_aggregated_feedback
  3. test_today_picks_query_uses_unified_risk_threshold_for_candidates
  4. test_today_picks_query_excludes_ignored_content

Objective

Collect exact targeted tracebacks and determine whether this is:

  • a stale SQL-contract regression test after a Today Picks query refactor;
  • an actual production SQL/query regression;
  • one shared root cause or multiple independent defects.

Required diagnostic pass

Run exactly these four tests with current dependencies and full tracebacks. For each failure record:

  • assertion/exception;
  • expected vs actual SQL/query contract;
  • relevant current implementation path;
  • whether surrounding digest/daily-report DuckDB query contracts remain valid;
  • smallest durable repair boundary.

Decision rules

  • Do not weaken candidate/risk/ignored-content semantics merely to satisfy stale string assertions.
  • Do not rewrite production SQL until the current intended Today Picks product contract is identified from code/tests/callers.
  • Group tests only when a shared root cause is demonstrated.

Acceptance criteria

  • All four tests execute in a targeted diagnostic run with full failure evidence.
  • Root cause is classified as stale test vs production regression.
  • Any durable repair gets its own bounded Worker issue/branch when needed.
  • Diagnostic workflow/PR is closed without merge.
  • No process artifacts enter main.

Parent stabilization: #2
Regression inventory: #5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions