fix: name function_logs and event_message in the ClickHouse query_logs hint - #376
Open
Rjabov wants to merge 5 commits into
Open
fix: name function_logs and event_message in the ClickHouse query_logs hint#376Rjabov wants to merge 5 commits into
Rjabov wants to merge 5 commits into
Conversation
…se hint Add assertions for ClickHouse log sources in tests
2 tasks
Updated the schemaHint for ClickHouse logs to include additional details on reading log line text and per-row metadata.
Add expectation for event_message in SQL description test
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.
Closes #375
Problem
On hosted projects
get_logsis hidden, soquery_logsis the only logs tool. Its ClickHousehint names
function_edge_logsbut notfunction_logs, and tells the model to readlog_attributes['<key>']without mentioningevent_message.log_attributesholds onlymetadata (level, execution_id, request_id); the log line text lives solely in
event_message.The result is a model that reaches the right table, reads the wrong column, and tells the user
their output was never stored:
Change
Names both Edge Function sources, and states that
event_messagecarries the log line whilelog_attributescarries metadata. Additive prose only; theselect distinct source from logsescape hatch is unchanged, and the BigQuery hint is untouched (self-hosted Logflare does not
serve
function_logs, and itsnot.toContainassertion still passes).Evidence
32-run matrix against a live project (4 models × 2 prompts × 2 reasoning levels × 2 builds),
test function returning HTTP 200 on every call while logging an
errorline, graded on whetherthe answer contains the actual error text.
function_logsunaided (Haiku did so in 7/7 runs on both builds).event_message: the 5 previously-failing cells, 2 replicates each, 10/10 pass,median 1.5 queries versus a median of 4 while failing.
Local:
pnpm run build, 215/215 unit tests,pnpm typecheckclean,npx @biomejs/biome@1.9.4 ci .clean (89 files).Two caveats: an earlier version of this description presented a scripted client with hardcoded
SQL as though an agent had chosen the query, which overstated it. And I retested only
previously-failing cells, so I have not shown the new wording leaves passing cells alone.
Published metadata
This edits a
.describe()string, in the frozen-fields list. Purely additive, no schema shapeor optionality change, so it should fit the expand step, but flagging in case it should be
folded into the next plugin submission.