[hackathon] UDF Copilot: schema-aware AI in the Python UDF editor#5081
Open
mengw15 wants to merge 3 commits into
Open
[hackathon] UDF Copilot: schema-aware AI in the Python UDF editor#5081mengw15 wants to merge 3 commits into
mengw15 wants to merge 3 commits into
Conversation
Restores gui.conf, llm.conf, storage.conf, udf.conf, user-system.conf, and docker-compose.yml to upstream defaults. The leaked values (LiteLLM master key, local DB credentials, Google OAuth client ID, host paths) were introduced in 0d9a128 ("init"). Local overrides should be supplied via the existing `${?VAR_NAME}` environment indirection in each .conf file instead. Note: the secret in the prior commit remains in git history. The LiteLLM key must be rotated independently. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Demo
Screen.Recording.2026-05-15.at.4.48.45.PM.mov
The problem
Open a Python UDF in Texera today and the editor greets you with an empty file. You don't know what's in
tuple_. You don't know which columns the upstream operator emits, what their types are, or what a sample row looks like. So you guess — writetuple_["name"], run, watch it crash onKeyError, flip back to the upstream operator's output tab to remind yourself of the real column name, edit, run, crash again on a type mismatch. When something does break at runtime, the traceback lands in a separate panel disconnected from the editor; you read it, decode it, fix by hand. And when your code starts producing a new column, you have to remember to also declare it in the operator's "Extra Output Columns" property — forget, and the execution fail.Summary
retainInputColumns).What's in this PR
registerInlineCompletionsProvider(ghost text + column dropdown),addAction(Cmd+K rewrite, Fix-with-AI),registerCodeActionProvider(Pyright lightbulb), side panel for chat./api/udf-copilot/:/complete,/chat,/rewrite,/fix,/sync-schema,/sample-capture,/sample-row. Diagnose-then-fix prompt with 3-way classification (UDF code error vs API-contract violation vs framework error). Output validation + one-shot retry for known anti-patterns (yield tuple_["x"]scalar yield,.items()on Tuple).amber/.../data_processor.py): captures the first input tuple per UDF and asynchronously POSTs to agent-service so the AI gets real data even for workflows where no operator is paginated.UdfCopilotService.requestFixAndOpen.Test plan
tuple_["— column-name dropdown appears with all upstream columnstuple_["a"] >— ghost text suggests a value-aware threshold based on the sample rowtuple_["foo"] = 1— yellow banner shows+ foo:integer; Sync writes to Extra Output Columns− foo(strikethrough); Sync removes from property paneloutputColumns+retainInputColumnstuple_.items()bug; in Console tab click red "Fix with AI" button next to the error title; editor auto-opens, Fix overlay pre-filled with traceback, AI rewrites toas_key_value_pairs()🤖 Generated with [Claude Code]