Repository navigation
Fix '.;' in plan assumptions and warn on short top-N results - #39
Merged
Merged
Conversation
Assumptions are usually whole sentences, so joining them with '; ' rendered '.;' between them. Filters stay joined: they are short expressions. Fixes #16
A ranking whose ORDER BY ... LIMIT N comes back short usually means a filter or join dropped entities with no data (Q052: top 5 by population, 4 rows). The check looks at the final SELECT, or at a CTE or derived table it returns row for row, and ignores the enforced MAX_ROWS cap. It is a warning, not a repair: fewer rows can be right. Fixes #4
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
;, which rendered.;after sentences. Filters stay joined.fewer_than_requestedresult check (warning, not repairable) when a top-N query returns fewer than N rows. It reads N from anORDER BY ... LIMIT N(orFETCH FIRST) the model wrote, in the final SELECT or in a CTE / derived table the final SELECT returns row for row. That covers Q052, where the top 5 sits in a CTE and the outerLIMIT 1000is only the enforced cap.The check stays silent for the validator's added or clamped
MAX_ROWSlimit, for queries withoutORDER BY, for outer queries that aggregate, group or useDISTINCT, and for a top-N used only in anIN (...)filter.Tests
backend/tests/test_result_checks.py: 11 new cases (Q052 shape, derived table,FETCH FIRST, and every non-firing case above)frontend/src/components/Verification.test.tsx: two sentence-style assumptions render as separate items; filters still render joinedruff, mypy, oxlint, tsc, the frontend build and the unit suites pass locally. The question suite was not re-run (it needs an LLM key).
Fixes #4
Fixes #16