Skip to content

Conversation

@georgeh0
Copy link
Member

No description provided.

@georgeh0 georgeh0 requested a review from Copilot November 13, 2025 19:59
Copilot finished reviewing on behalf of georgeh0 November 13, 2025 20:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the behavior version handling in the function executor interface to simplify the API design. Instead of having behavior_version() as a method on executor traits, the behavior version is now determined during the build/analysis phase and returned as part of the build output.

Key changes:

  • Moved behavior version from executor runtime interface to build-time output
  • Renamed resolve_schema to analyze to better reflect its expanded responsibilities
  • Introduced structured output types (SimpleFunctionBuildOutput and SimpleFunctionAnalysisOutput) to replace tuple returns

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
rust/cocoindex/src/ops/interface.rs Added SimpleFunctionBuildOutput struct and removed behavior_version() method from SimpleFunctionExecutor trait
rust/cocoindex/src/ops/factory_bases.rs Added SimpleFunctionAnalysisOutput struct, renamed resolve_schema to analyze, and removed behavior_version() implementations from executor wrappers
rust/cocoindex/src/ops/py_factory.rs Updated to extract behavior version from Python executors during build phase and return it in SimpleFunctionBuildOutput
rust/cocoindex/src/ops/functions/split_recursively.rs Updated analyze method to return SimpleFunctionAnalysisOutput with behavior_version: None
rust/cocoindex/src/ops/functions/split_by_separators.rs Updated analyze method to return SimpleFunctionAnalysisOutput with behavior_version: None
rust/cocoindex/src/ops/functions/parse_json.rs Updated analyze method to return SimpleFunctionAnalysisOutput with behavior_version: None
rust/cocoindex/src/ops/functions/extract_by_llm.rs Removed behavior_version() method from executor and moved version to analyze output
rust/cocoindex/src/ops/functions/embed_text.rs Removed behavior_version() method from executor and moved client's version to analyze output
rust/cocoindex/src/ops/functions/detect_program_lang.rs Updated analyze method to return SimpleFunctionAnalysisOutput with behavior_version: None
rust/cocoindex/src/builder/analyzer.rs Updated to extract behavior version from build_output and include it in fingerprinting earlier in the build process
rust/cocoindex/src/ops/functions/test_utils.rs Updated test helper to destructure SimpleFunctionBuildOutput instead of tuple

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@georgeh0 georgeh0 merged commit 5050026 into main Nov 13, 2025
18 checks passed
@georgeh0 georgeh0 deleted the g/simplify-behavior-version branch November 13, 2025 20:05
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.

2 participants