Skip to content

[pull] main from apache:main - #13

Merged
pull[bot] merged 4 commits into
section9-lab:mainfrom
apache:main
May 16, 2026
Merged

pull[bot] merged 4 commits into
section9-lab:mainfrom
apache:main

Conversation

@pull

@pull pull Bot commented May 16, 2026 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

avichaym and others added 4 commits May 16, 2026 20:55
…dd contract test (#677)

Wrap the List arg in new ArrayList<>() in the constructors of the events
that user code instantiates directly: ChatRequestEvent (messages) and
ContextRetrievalResponseEvent (documents). This avoids the JDK 17+ Kryo
InaccessibleObjectException when callers pass List.of(...) or any other
ImmutableCollections instance.

ToolRequestEvent / ToolResponseEvent are intentionally not changed -
they are produced only by built-in framework actions, never by user code,
so adding defensive copies there only adds overhead. (And shallow copies
wouldn't help anyway: tool-call payloads can carry nested Map.of(...).)

EventKryoSerializationTest in the e2e integration module asserts the
defensive-copy contract directly: the stored collection must be mutable.
Two tests, one per affected event.

Co-authored-by: Avichay Marciano <avichaym@amazon.com>
When a JavaCollectionManageableVectorStore wraps a Java vector store
backed by a Python embedding model, the previous flow delegated query/
add/update to the Java side, which then called the embedding model from
Java. For a PYTHON-backed embedding model that callback is a Java→Python
re-entry on the Flink operator thread, and pemja's sub-interpreter state
on that thread ends up corrupted; the next pemja conversion in the same
thread crashes inside JcpPyDecimal_Check → PyImport_ImportModule with a
NULL sys.modules dereference.

Drop the add/query/update overrides in JavaVectorStoreImpl and inherit
BaseVectorStore's canonical flow: embed in Python first, then make a
single-direction Python→Java call to addEmbedding/queryEmbedding/
updateEmbedding. open() now also chains super().open() so the embedding
model resolves from string to instance before the Python embed step
runs. fromPythonVectorStoreQuery (its only caller is gone) and the
matching python_java_utils helpers (get_mode_value,
from_java_vector_store_query_result) are removed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@pull pull Bot locked and limited conversation to collaborators May 16, 2026
@pull pull Bot added the ⤵️ pull label May 16, 2026
@pull
pull Bot merged commit e5b3274 into section9-lab:main May 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants