Skip to content

feat: add first-class function wire contracts - #3985

Merged
Xuanwo merged 2 commits into
mainfrom
xuanwo/first-class-functions-slice-1
Aug 21, 2026
Merged

Xuanwo merged 2 commits into
mainfrom
xuanwo/first-class-functions-slice-1

Conversation

@Xuanwo

@Xuanwo Xuanwo commented Aug 21, 2026

Copy link
Copy Markdown
Member

Problem

Enterprise Function-backed computed columns need a stable SDK contract before Sophon catalog and execution endpoints can be added. The existing Job API can only represent unit terminal results, and there is no shared Rust/Python wire definition for immutable Function versions, applications, bindings, or refresh results.

Behavior

This introduces remote-only canonical Function values in Rust and Python, evolves Job<T = ()> to decode typed remote terminal results while keeping local spawned operations unit-typed, and fixes the cross-language contract with shared JSON golden fixtures. Unknown fields and discriminator values remain forward-decodable, while canonical output contains only fields known to the client. Function models contain secret names only.

Sophon remains the sole owner of catalog persistence, environment bake, secret resolution, execution, and publication. This PR does not add authoring/catalog endpoints, local execution, refresh runners, or live Sophon E2E coverage.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@github-actions github-actions Bot added enhancement New feature or request Python Python SDK Rust Rust related issues labels Aug 21, 2026
Comment thread python/python/lancedb/functions.py Resolved
Comment thread python/python/lancedb/job.py Resolved
Comment thread python/python/lancedb/functions.py Resolved
Comment thread python/python/lancedb/functions.py Resolved
Comment thread python/python/lancedb/functions.py Resolved

@lancedb-gatekeeper lancedb-gatekeeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Gate recommendation: request changes.

The typed-job direction is worthwhile, but this revision does not yet establish one executable Rust/Python wire contract. I independently confirmed the existing Python result-erasure, numeric canonicalization, and optional-field parity findings.

A viable revision should define one terminal-result policy across Rust, PyO3, Python, and both supported Pydantic majors; preserve result-agnostic Job<()> resume semantics; cover byte-stable defaults and numbers in shared fixtures; and document every exported model.

Comment thread rust/lancedb/src/remote/job.rs Resolved
Comment thread python/python/lancedb/functions.py Resolved
Comment thread docs/src/python/python.md Resolved
@lancedb-gatekeeper lancedb-gatekeeper Bot added K-changes Latest Gatekeeper recommendation requests changes. and removed K-changes Latest Gatekeeper recommendation requests changes. labels Aug 21, 2026
@Xuanwo
Xuanwo merged commit 426684c into main Aug 21, 2026
28 of 30 checks passed
@Xuanwo
Xuanwo deleted the xuanwo/first-class-functions-slice-1 branch August 21, 2026 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request K-changes Latest Gatekeeper recommendation requests changes. Python Python SDK Rust Rust related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants