[pull] main from github:main - #265
Merged
Merged
Conversation
* feat(java): embed Rust CLI runtime as native module Squashed from PR #2295 (branch edburns/…-review-02). Includes Java multi-module Maven restructure, copilot-native submodule for bundling the Rust CLI runtime, codegen updates, and related workflow changes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 90cbda40-cda3-4ecd-b381-9f9ba0573d0a * java: add flatten-maven-plugin to produce self-contained deployed POMs Child modules (copilot-sdk-java, copilot-sdk-java-runtime) inherit from copilot-sdk-java-parent, which is not published to Maven Central. Without flattening, consumers resolving a child artifact would fail to resolve the parent POM. The flatten-maven-plugin (ossrh mode) inlines all inherited metadata so the deployed POM is fully self-contained. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3a69f33e-eea6-4b8c-9ef0-8b4d56d53a9c * java: only release callback GC root after successful connection_close Previously the tracked callback was removed in a finally block, releasing its GC root even when native connection_close failed or threw. Native code could still retain and invoke the stale function pointer, crashing the JVM after JNA collected the callback. Now the callback reference is only removed from trackedCallbacks when the native call succeeds, ensuring the function pointer stays rooted while native code may still hold it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3a69f33e-eea6-4b8c-9ef0-8b4d56d53a9c * java: remove spike test library references, use real native runtime Remove CallbackTestLib interface and all tests that depended on the spike libcallback_test.so from the removed 1917-java-embed-rust-cli-runtime-remove-before-merge directory. Rewrite the 3 duplicate-load guard tests to use NativeRuntimeLoader.resolve() to locate the real runtime.node binary instead of the spike library. Remove the startWithSpikeLibrarySupportsLifecycleAndDataFlow integration test from FfiRuntimeHostTest — this functionality is covered by E2E tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3a69f33e-eea6-4b8c-9ef0-8b4d56d53a9c * docs: add JNA dependency to in-process mode README snippet JNA is declared optional in the SDK POM so subprocess-mode users don't pull it transitively. The in-process mode section was missing this required third dependency, which would cause NoClassDefFoundError at runtime. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3a69f33e-eea6-4b8c-9ef0-8b4d56d53a9c * java: add empty javadoc and sources JARs for copilot-native module Maven Central requires javadoc and sources classifier JARs for every non-POM artifact. Since copilot-native has no Java sources, the parent's maven-javadoc-plugin produced nothing. Add explicit empty-archive executions to maven-jar-plugin so the module passes Central validation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3a69f33e-eea6-4b8c-9ef0-8b4d56d53a9c * java: use size_t-width type for native length parameters The C ABI declares all buffer-length parameters as size_t (8 bytes on 64-bit), but the Java FFI layer was using int (always 4 bytes). While harmless for current JSON-RPC payloads, this is incorrect on 64-bit platforms and would be wrong on Windows x64 where NativeLong (C long) is also only 4 bytes. Introduce SizeT, a minimal IntegerType subclass sized via Native.SIZE_T_SIZE, and use it in CopilotRuntimeLibrary and OutboundCallback. The NativeBinding Java abstraction layer keeps int parameters; JnaNativeBinding converts at the boundary. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3a69f33e-eea6-4b8c-9ef0-8b4d56d53a9c * java: remove global JNA callback exception handler The process-wide Native.setCallbackExceptionHandler was redundant: the local catch (Throwable) in createOutboundCallback() already prevents any exception from escaping across the FFI boundary. The global mutation affected unrelated JNA callbacks in the same process and was never restored. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3a69f33e-eea6-4b8c-9ef0-8b4d56d53a9c * ci: make java-sdk-inprocess test job blocking Remove continue-on-error so FFI regressions in the in-process transport block PRs. The in-process transport is now production code and must not silently regress. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3a69f33e-eea6-4b8c-9ef0-8b4d56d53a9c * fix: update jbang-example.java path after move to sdk/ submodule The JBang example moved from java/jbang-example.java to java/sdk/jbang-example.java but two references were not updated: the runnable JBang URL in README.md and the release workflow's update-documentation-versions script invocation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3a69f33e-eea6-4b8c-9ef0-8b4d56d53a9c * docs: fix ADR relative links in README The ADRs are at java/docs/adr/, not java/sdk/docs/adr/. Fix the relative links for ADR-006 and ADR-004. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3a69f33e-eea6-4b8c-9ef0-8b4d56d53a9c * Regenerate Java codegen output Auto-committed by java-codegen-check workflow. * fix(java): retain JNA callbacks for process lifetime Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 108d08d4-0724-4414-bed8-2771b12b58de * fix(java): publish executable CLI atomically Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 108d08d4-0724-4414-bed8-2771b12b58de * docs(java): align native runtime ADR Document strict in-process selection, the implemented runtime resolution order, current artifact contents, and the intentionally narrow PATH compatibility fallback. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 108d08d4-0724-4414-bed8-2771b12b58de * fix(java): key native cache by runtime version Read the packaged native version before cache lookup so mutable SDK snapshot builds cannot reuse stale runtime and CLI artifacts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 108d08d4-0724-4414-bed8-2771b12b58de * fix(java): validate staged native artifacts Include the bundled CLI digest in the incremental staging stamp, require complete platform metadata, and verify the classifier JAR contains the CLI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 108d08d4-0724-4414-bed8-2771b12b58de * fix(java): complete Maven module migration Restore pre-migration dependency and plugin versions, publish correct child project metadata, and update repository consumers to the moved SDK paths. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 108d08d4-0724-4414-bed8-2771b12b58de --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Copilot-Session: 90cbda40-cda3-4ecd-b381-9f9ba0573d0a Copilot-Session: 3a69f33e-eea6-4b8c-9ef0-8b4d56d53a9c Copilot-Session: 108d08d4-0724-4414-bed8-2771b12b58de
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
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 : )