Skip to content

fix(cves): place undated CVEs after dated entries - #258

Open
sahilshingate01 wants to merge 1 commit into
c2siorg:mainfrom
sahilshingate01:codex/sort-undated-cves-last
Open

sahilshingate01 wants to merge 1 commit into
c2siorg:mainfrom
sahilshingate01:codex/sort-undated-cves-last

Conversation

@sahilshingate01

Copy link
Copy Markdown

Bug

The CVE watchlist orders articles by publication date descending, but PostgreSQL sorts NULL dates first for descending order. Undated articles could therefore displace dated CVEs from limited results.

Root cause and fix

The query did not specify NULL ordering. Added NULLS LAST to keep undated entries after dated entries.

Testing

Updated the query regression test to assert the explicit null ordering.

Assisted-By: OpenAI Codex

Generated-By: OpenAI Codex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant