Skip to content

Python: Add Oracle native vector store connector - #8676

Merged
Eduard van Valkenburg (eavanvalkenburg) merged 5 commits into
microsoft:mainfrom
eavanvalkenburg:oracle-vector-connector
Oct 8, 2026
Merged

Eduard van Valkenburg (eavanvalkenburg) merged 5 commits into
microsoft:mainfrom
eavanvalkenburg:oracle-vector-connector

Conversation

@eavanvalkenburg

Copy link
Copy Markdown
Member

Motivation & Context

Agent Framework's Python vector-store APIs cannot currently persist or search
Oracle Database's native VECTOR columns. This enables Oracle-backed retrieval
without a custom connector as the independent Oracle task in the Phase 7
connector umbrella.

Description & Review Guide

  • What are the major changes? Adds the alpha agent-framework-oracle
    workspace package with typed collections/stores, OracleSettings, native
    FLOAT32/FLOAT64/INT8 vector binding, batch CRUD, quoted identifiers,
    bound scalar filters and paging, and VECTOR_DISTANCE search with SQL-side
    thresholds. Includes a README, runnable sample, focused unit tests, and an
    opt-in live-database test.
  • What is the impact of these changes? No core APIs or other connectors
    change. Oracle Database 23ai with COMPATIBLE >= 23.4.0 and python-oracledb
    2.2–3.x are required. Unsupported indexes, hybrid search, JSON/nested filters,
    and server-side vectorization fail explicitly. Unit tests pass on Python 3.10
    and 3.13 and with both the minimum and locked driver versions; a live Oracle
    database was unavailable, so the integration test remains opt-in.
  • What do you want reviewers to focus on? Whether Oracle MERGE/vector
    binding and SQL-side filter/threshold semantics match your 23ai deployments,
    particularly pooled write commits versus caller-managed transactions on an
    injected connection.

Related Issue

Part of #4169 (Oracle task). The Phase 7 umbrella
must remain open for other connectors, so this PR intentionally does not close
it. The existing #8675 covers DuckDB rather than
Oracle; there is no competing Oracle PR.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR is linked to an issue and there is no other open PR for this issue (see Related Issue above).
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.

Copilot AI balanced review requested due to automatic review settings September 23, 2026 10:22
@agent-framework-automation agent-framework-automation Bot added documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs python Usage: [Issues, PRs], Target: Python labels Sep 23, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

MAF Automated Review — Iteration 1

Result: Findings reported
Scope: full PR (1 commit(s)): 7bd97f8d2a34
Model: gpt-5.6-sol-fast

Overview

The new connector has strong guardrails around identifier quoting, bound SQL values, model validation, transaction ownership, pool cleanup, deterministic paging, and malformed database responses, with focused unit coverage for those contracts. The remaining publishable risk is confined to portable scalar-filter semantics: finite Decimal equality is silently miscompiled, while malformed UUID operands abort otherwise valid queries.

Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
2 verified findings remained after source verification (2 medium) across 1 file. Details are attached to the affected lines below.

Affected areas: python/packages/oracle/agent_framework_oracle/_vector_store.py

Comment thread python/packages/oracle/agent_framework_oracle/_vector_store.py Outdated
Comment thread python/packages/oracle/agent_framework_oracle/_vector_store.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Pool creation is broken, validation errors are misclassified, and Oracle-specific behavior lacks required live validation.

Review effort: Balanced
Findings: 1 High severity

Open (1)
What changed in this PR

Adds an alpha Oracle native vector-store connector for Python with CRUD, filtering, paging, and vector search.

Changes:

  • Implements Oracle store, collection, settings, native vector bindings, and SQL search.
  • Adds documentation, samples, tests, packaging, and CI registration.
  • Registers the connector as an alpha workspace package.
File Summary
python/​uv.lock Locks the package and Oracle driver.
python/​pyproject.toml Registers the workspace package.
python/​packages/​oracle/​tests/​oracle/​test_settings.py Tests settings and client lifecycle.
python/​packages/​oracle/​tests/​oracle/​test_integration.py Adds opt-in live database coverage.
python/​packages/​oracle/​tests/​oracle/​test_filters.py Tests filter SQL generation.
python/​packages/​oracle/​tests/​oracle/​test_collection.py Tests CRUD and vector search.
python/​packages/​oracle/​tests/​oracle/​conftest.py Provides Oracle test fixtures.
python/​packages/​oracle/​samples/​oracle_vectors.py Demonstrates connector usage.
python/​packages/​oracle/​README.md Documents setup and capabilities.
python/​packages/​oracle/​pyproject.toml Defines package metadata and tooling.
python/​packages/​oracle/​LICENSE Adds package licensing.
python/​packages/​oracle/​agent_framework_oracle/​py.typed Marks the package as typed.
python/​packages/​oracle/​agent_framework_oracle/​_vector_store.py Implements Oracle vector storage and search.
python/​packages/​oracle/​agent_framework_oracle/​__init__.py Exposes public APIs.
python/​PACKAGE_STATUS.md Records alpha package status.
.github/​workflows/​python-merge-tests.yml Adds merge-test coverage.
.github/​workflows/​python-integration-tests.yml Adds integration-test discovery.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread python/packages/oracle/agent_framework_oracle/_vector_store.py
@eavanvalkenburg

Copy link
Copy Markdown
Member Author

Follow-up to the automated reviews: 7d16683 fixes finite Decimal numeric equality/membership, malformed UUID filter operands, and the Zuban fixture annotation. I verified on python-oracledb 2.2.0 and 3.4.2 that create_pool_async() returns a non-awaitable AsyncConnectionPool; adding await would break both versions, so the fix adds an unmocked no-database regression test instead. The three inline threads have individual replies and are resolved. The updated head has 35 passing checks (15 intentionally skipped, none failing or pending). Live Oracle integration remains opt-in pending a disposable Oracle 23ai+ database, so this PR remains draft.

Comment thread python/packages/oracle/samples/oracle_vectors.py
@eavanvalkenburg

Copy link
Copy Markdown
Member Author

Caught up with upstream main (1b93be1a2) in merge commit 2e33bc722 and marked this PR ready for review. The net changes remain Oracle-only; all four review threads are resolved. Focused validation against the updated workspace passed: 144 Oracle unit tests, Ruff lint/format checks, strict source Pyright, all five test type checkers, and the workspace lock check. The live Oracle integration test remains opt-in and was skipped because no dedicated Oracle test credentials are configured locally.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

MAF Automated Review — Iteration 2

Result: No findings
Scope: 166 net-new commit(s): 7d16683dc89b, 76ccf3c44cee, a638ce136ed6, 0bbb7245d408, 834eb7ff12c8, 30b9b8e06766, 622737258c73, 7fb41d673c97, 4f4e72284c9c, 2055e666e1ac, 62337887116c, b20927b921d4, 2191c60c5e7d, 717557a3791a, 91fd47035684, f83a892f9f0e, 0843a9c0537b, e2c6df28daa9, 72272613d0c0, 5ee3e87d6768, 8ff549d3f721, 024dd9908bc1, 2c46deb91e70, 78018e4af770, f9310e5ac2a1, 6f1522a50b66, 273e63508fe5, 7be69facedc3, 11c0dd7ccfdd, 109234952ad4, 218700d4e94a, 2a8daa077b74, aab258745c6d, 93cf98a042c0, a38414391c1b, 9bca1ba4a800, 9acaf82b61a9, ed745e5e81de, fd932dcb8ec0, cc89fe677348, 529564c5b24e, 789d514d9cbf, 153aaa1e0416, 11c45ce72ec1, 6bb47d4fa7c6, ce4fcb2665c3, c91cf3234101, 16aa03b33a46, 490e01947e9a, 20c404524b2c, e9d9962bfc1f, 08eb7d94e9af, c804f32c983d, 238d7e2e9bb9, 3f1f3b50b57c, 3efb73a856a0, 1370903bd8e6, 37ce872a85fe, 2024d4df4c4d, 0d6d2bb6b0b5, be01deccaf3d, 3b27cd33800c, f47c3782376f, 95e711a6280d, b86cbe4dbe21, 8e6bf37c6d26, 01cf5b547c5f, b000c15d3966, 5a2b135ddb2b, 06e9b48937d5, 7a98aa9f3c21, 763887452f37, 202e85d0d876, 77f832ff1ac9, 0911ad636de4, f160d050937b, ba320332d496, 987b3459ff61, 1a2b4fb838c0, 8258db8cf08c, 30aee9fc8da4, e7d99c189678, 8220ae265631, e3a04fecbb20, e626cef6c953, 71e84a098dec, d4157d809a31, f8f15f28db6a, 534334731279, e23f3c89f29e, c8126a0cedb7, a708babd7c74, 142a1c01bf4e, 3a837e327226, 2d995049b9b0, 5e8edfc08c46, 908ca8c1a868, 52ff4d28011a, 1a03705ae453, 4b1c231b4fa4, 2a7470a92c9b, 3d39258d72d2, 4b0e3d8e84c2, 2f5713f60e6e, 612858c7170c, 853c4564476a, 7634356a1de0, d5b2de2ed66d, c3bb759b3dd7, 06f6e5f21636, 577caa2f0de1, e15c6dce2d10, 8b4713ed5c0f, 4ce5ae3f2812, 2f84b1410eb0, aa6c73cce721, cb63c2abc42e, 387d5c7bc389, a850ee6c221a, f1fb145c4d80, 99215f96dafa, d52db94e4b61, a15c0197b282, 2e8b58c06da2, 501989469265, 6d8e16ea3641, f8df81a2a84e, 68e58bf8e79c, a91fe6682f16, ef9084c8d947, 098fca4dc4b7, bbb639effc0f, e9cb7fe68707, 8e2fcbf348f3, 3e1289d180ff, 30055e4d36eb, a2f4506c0ba3, 6967986f8e4a, ffd85a2caedf, 84d135379442, cb77f68f005f, 6e681cc1e4d2, e9857bd75a21, 735050553822, 3c2fe0a8a365, d7ef9e240836, 90615858cbf0, de3a3b08df5b, cdd339b0a541, 4dfb7565b67e, 301a43c862be, 2606b1a0498a, 5bba4cec7380, ccf44d95988b, 52fed574f05a, 6ef0b73ed8ee, 2df61296bb56, 636e8562d1db, bd5ab48cfdeb, b9d24c8fb484, e63ca8ac7d9a, ac5ed2f49ee9, 23821dea4ea7, 6d896b843289, 1b93be1a2d66, 2e33bc722509
Model: gpt-5.6-sol

Overview

This incremental merge resolves the previously reported Decimal and malformed-UUID filter semantics and fixes native Oracle vector decoding before scalar validation. The changed behavior is constrained by exact numeric-representation checks, invalid-UUID non-equality handling, explicit vector-type validation, and focused unit and opt-in integration coverage. No Critical, High, or Medium defect introduced by the reviewed range was established.

Reviewed the supplied incremental change set across correctness, security/reliability, architecture, and failure behavior.
No publishable findings remained after source verification for this scope.

@jpalvarezl Jose Alvarez (jpalvarezl) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed the full connector diff, repository guidance, existing discussions, and current CI. I found no new correctness or API-compatibility issues beyond the already resolved threads. The focused Oracle unit suite, Ruff, and Pyright pass locally. The current Python matrix failure is in the unrelated Hyperlight delayed-output test; the other matrix jobs were cancelled by fail-fast.

@jpalvarezl Jose Alvarez (jpalvarezl) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed the full connector diff, repository guidance, existing discussions, and current CI. I found no new correctness or API-compatibility issues beyond the already resolved threads. The focused Oracle unit suite, Ruff, and Pyright pass locally. The current Python matrix failure is in the unrelated Hyperlight delayed-output test; the other matrix jobs were cancelled by fail-fast.

@eavanvalkenburg

Copy link
Copy Markdown
Member Author

The failing Windows Python 3.14 check was packages/hyperlight/tests/hyperlight/test_hyperlight_codeact.py::test_execute_code_tool_waits_for_dynamically_addressed_output; fail-fast cancelled the other matrix jobs. No Oracle test failed. The full Python matrix rerun on 2e33bc722 has now passed, and the merge gatekeeper is also green. All current checks are complete with success or intentional skips. No code changes were needed, and this PR remains ready for review.

Merged via the queue into microsoft:main with commit c7ffabe Oct 8, 2026
55 of 67 checks passed
@eavanvalkenburg
Eduard van Valkenburg (eavanvalkenburg) deleted the oracle-vector-connector branch October 8, 2026 09:02

This branch was previously deployed

1 inactive deployment
github-app-auth — 2e33bc72 Deployed Oct 6, 2026 by eavanvalkenburg via team_check #6123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants