Skip to content

perf(curation): avoid redundant wrapper parse - #532

Closed
harshitethic wants to merge 1 commit into
Hebbian-Robotics:mainfrom
harshitethic:perf/curation-single-parse
Closed

harshitethic wants to merge 1 commit into
Hebbian-Robotics:mainfrom
harshitethic:perf/curation-single-parse

Conversation

@harshitethic

Copy link
Copy Markdown
Contributor

Summary

  • remove the second wrapper parse from reject_non_single_select
  • keep the single-statement SELECT-type check plus the explicit PRAGMA/DESCRIBE/SHOW/SUMMARIZE refusal
  • preserve valid FROM-first, parenthesized SELECT, VALUES, trailing-semicolon, and trailing-comment behavior
  • add regression coverage proving a valid curation query is parsed once instead of twice

Verification

  • git diff --check
  • uv run ruff check src/hflow/curation.py tests/test_catalog_curation.py
  • uv run pytest -q tests/test_catalog_curation.py -k reject_non_single_select

Fixes #481

@github-actions

Copy link
Copy Markdown

👋 Hi @harshitethic — thanks for the contribution! To keep starter issues available
for other contributors and give every pull request a real review, we accept
1 open pull request per contributor at a time.

You already have #531 open, so this one is being closed automatically.
Once your open pull request is merged or closed, feel free to reopen this one —
no work is lost.

@github-actions github-actions Bot closed this Sep 14, 2026
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.

The curation gate parses every query twice, and the second parse refuses nothing

1 participant