Skip to content

fix: recognise quoted function names; cap instruction and label sizes - #5

Merged
eddietejeda merged 1 commit into
mainfrom
fix/quoted-name-and-size-caps
Sep 24, 2026
Merged

eddietejeda merged 1 commit into
mainfrom
fix/quoted-name-and-size-caps

Conversation

@eddietejeda

Copy link
Copy Markdown
Contributor

Findings from fuzzing the SQL surface (2,000 generated queries)

No internal errors, timeouts, or invariant violations. Two rough edges:

  1. "prompt_jev"(...) with a quoted identifier was not recognised: the rewrite compared the name's Display, which keeps the quotes, so the call reached DataFusion as an unknown function. It now matches the bare identifier case-insensitively. Schema-qualified names are still left to DataFusion.
  2. Very long questions (5,000+ characters) were accepted at plan time and then rejected by the provider with a bare HTTP 400. Validation now caps instructions at 4,000 characters, labels at 256, and descriptions at 1,024, with a plan-time error naming the limit. README updated.

Tests

36 pass (2 new): quoted and uppercase names resolve to the same function; each size cap fails at plan time with no request made.

`"prompt_jev"(...)` was compared through the name's Display, which keeps
the quotes, so a quoted call fell through to DataFusion as an unknown
function. Match the bare identifier case-insensitively instead.

Instructions over a few thousand characters are rejected by the provider
with a bare HTTP status. Cap instructions at 4,000 characters, labels at
256, and descriptions at 1,024 during validation, so the caller sees the
actual problem at plan time and no request is made.

Found by fuzzing the SQL surface with 2,000 generated queries.
@eddietejeda
eddietejeda requested a review from a team as a code owner September 24, 2026 06:05
@eddietejeda
eddietejeda requested review from rohan-hotdata and removed request for a team September 24, 2026 06:05
@eddietejeda
eddietejeda merged commit c83b370 into main Sep 24, 2026
3 checks passed
@eddietejeda
eddietejeda deleted the fix/quoted-name-and-size-caps branch September 24, 2026 06:06
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