Skip to content

[daily-ai-review] Database schema mismatch preventing candidate persistence #156

@github-actions

Description

@github-actions

Problem

Candidate article persistence is failing due to a database schema mismatch in the Supabase instance.

Evidence

HTTP 400 Error: Could not find the 'skipped_query_count' column of 'discovery_runs' in the schema cache

Error Details:

  • URL: https://ltafdcsnvppvqyoclkod.supabase.co/rest/v1/discovery_runs?on_conflict=run_id
  • Response: PGRST204 error indicating missing column in schema cache
  • Column: skipped_query_count not found in discovery_runs table

Impact

While this doesn't affect the core ingestion pipeline (articles are still being processed and classified), it prevents:

  • Proper tracking of discovery run metadata
  • Historical analysis of source performance
  • Complete audit trails for debugging

Suggested Next Steps

  1. Database migration: Add the missing skipped_query_count column to the discovery_runs table
  2. Schema validation: Verify all expected columns are present in the production schema
  3. Error handling: Consider adding graceful degradation when persistence fails
  4. Schema versioning: Implement schema version checks to catch mismatches earlier

This is a medium-priority infrastructure issue that should be resolved to maintain data completeness.

Review context

  • Run timestamp: 2026-05-20T07:50:12.295376+00:00

  • Run snapshot: state_repo/news_items/ingest/runs/2026-05-20T07-50-12-295376Z.json

  • Debug summary: state_repo/news_items/ingest/logs/2026-05-20T07-50-12-295376Z.summary.json

  • Debug log: state_repo/news_items/ingest/logs/2026-05-20T07-50-12-295376Z.json

  • Workflow run: https://github.com/DataHackIL/tfht_enforce_idx/actions/runs/26149004924

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions