[Java] Add copilot-native module producing linux-x64 classifier JAR for runtime.node - #2236
Merged
edburns merged 3 commits intoAug 3, 2026
Conversation
Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Create copilot-native Maven module for Rust CLI runtime
[Java] Add copilot-native module producing linux-x64 classifier JAR for runtime.node
Aug 3, 2026
Contributor
Cross-SDK Consistency Review ✅This PR adds the No cross-SDK consistency issues identified. This change is entirely Java/Maven infrastructure:
The change correctly defers the
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds the Java native-runtime Maven module, packaging the lockfile-pinned linux-x64 runtime.node binary as a classifier JAR.
Changes:
- Downloads and verifies the npm runtime artifact.
- Produces placeholder and
linux-x64classifier JARs. - Integrates the module into the Java reactor.
Show a summary per file
| File | Description |
|---|---|
java/pom.xml |
Enables the native module. |
java/copilot-native/pom.xml |
Configures fetching, packaging, and validation. |
java/copilot-native/scripts/fetch-native.mjs |
Fetches, verifies, and stages the runtime. |
java/copilot-native/src/main/resources/native/lib/copilot-runtime.properties |
Defines placeholder artifact metadata. |
.gitignore |
Ignores native-module build output. |
Review details
Suppressed comments (1)
java/copilot-native/pom.xml:150
- The release workflow runs the whole reactor with
-Prelease, but that profile exists only insdk/pom.xml; profiles are not inherited from sibling modules. This module will consequently be deployed without attached source/Javadoc archives or GPG signatures, and this publishing extension does not create them despite the comment, so Maven Central validation will fail. Add equivalent release executions here or move the common release profile to the parent POM.
<!--
Required by Maven Central: sources and javadoc artifacts. This
module has no Java sources, so both produce empty archives.
-->
<plugin>
- Files reviewed: 4/5 changed files
- Comments generated: 2
- Review effort level: Balanced
…s assertion - Persist integrity hash and binary digest in the .version stamp file so corrupted binaries or lockfile integrity changes are detected on cache hit. - Add zipentry assertion for platform.properties in the classifier JAR structural guard. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
edburns
merged commit Aug 3, 2026
3390c73
into
edburns/1917-java-embed-rust-cli-runtime-dd-3039924-agentic-run-02
26 checks passed
edburns
deleted the
copilot/edburns1917-java-embed-rust-cli-runtime-dd-3039924
branch
August 3, 2026 22:34
edburns
added a commit
that referenced
this pull request
Aug 4, 2026
…or runtime.node (#2236) * Initial plan * Add copilot-native module with linux-x64 classifier JAR Co-authored-by: edburns <75821+edburns@users.noreply.github.com> * Address Copilot review: harden cache stamp and add platform.properties assertion - Persist integrity hash and binary digest in the .version stamp file so corrupted binaries or lockfile integrity changes are detected on cache hit. - Add zipentry assertion for platform.properties in the classifier JAR structural guard. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: edburns <75821+edburns@users.noreply.github.com> Co-authored-by: Ed Burns <edburns@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
edburns
added a commit
that referenced
this pull request
Aug 4, 2026
…or runtime.node (#2236) * Initial plan * Add copilot-native module with linux-x64 classifier JAR Co-authored-by: edburns <75821+edburns@users.noreply.github.com> * Address Copilot review: harden cache stamp and add platform.properties assertion - Persist integrity hash and binary digest in the .version stamp file so corrupted binaries or lockfile integrity changes are detected on cache hit. - Add zipentry assertion for platform.properties in the classifier JAR structural guard. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: edburns <75821+edburns@users.noreply.github.com> Co-authored-by: Ed Burns <edburns@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
edburns
added a commit
that referenced
this pull request
Aug 4, 2026
…or runtime.node (#2236) * Initial plan * Add copilot-native module with linux-x64 classifier JAR Co-authored-by: edburns <75821+edburns@users.noreply.github.com> * Address Copilot review: harden cache stamp and add platform.properties assertion - Persist integrity hash and binary digest in the .version stamp file so corrupted binaries or lockfile integrity changes are detected on cache hit. - Add zipentry assertion for platform.properties in the classifier JAR structural guard. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: edburns <75821+edburns@users.noreply.github.com> Co-authored-by: Ed Burns <edburns@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
edburns
added a commit
that referenced
this pull request
Aug 4, 2026
…or runtime.node (#2236) * Initial plan * Add copilot-native module with linux-x64 classifier JAR Co-authored-by: edburns <75821+edburns@users.noreply.github.com> * Address Copilot review: harden cache stamp and add platform.properties assertion - Persist integrity hash and binary digest in the .version stamp file so corrupted binaries or lockfile integrity changes are detected on cache hit. - Add zipentry assertion for platform.properties in the classifier JAR structural guard. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: edburns <75821+edburns@users.noreply.github.com> Co-authored-by: Ed Burns <edburns@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
edburns
added a commit
that referenced
this pull request
Aug 4, 2026
…or runtime.node (#2236) * Initial plan * Add copilot-native module with linux-x64 classifier JAR Co-authored-by: edburns <75821+edburns@users.noreply.github.com> * Address Copilot review: harden cache stamp and add platform.properties assertion - Persist integrity hash and binary digest in the .version stamp file so corrupted binaries or lockfile integrity changes are detected on cache hit. - Add zipentry assertion for platform.properties in the classifier JAR structural guard. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: edburns <75821+edburns@users.noreply.github.com> Co-authored-by: Ed Burns <edburns@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
edburns
added a commit
that referenced
this pull request
Aug 5, 2026
…or runtime.node (#2236) * Initial plan * Add copilot-native module with linux-x64 classifier JAR Co-authored-by: edburns <75821+edburns@users.noreply.github.com> * Address Copilot review: harden cache stamp and add platform.properties assertion - Persist integrity hash and binary digest in the .version stamp file so corrupted binaries or lockfile integrity changes are detected on cache hit. - Add zipentry assertion for platform.properties in the classifier JAR structural guard. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: edburns <75821+edburns@users.noreply.github.com> Co-authored-by: Ed Burns <edburns@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
edburns
added a commit
that referenced
this pull request
Aug 5, 2026
…or runtime.node (#2236) * Initial plan * Add copilot-native module with linux-x64 classifier JAR Co-authored-by: edburns <75821+edburns@users.noreply.github.com> * Address Copilot review: harden cache stamp and add platform.properties assertion - Persist integrity hash and binary digest in the .version stamp file so corrupted binaries or lockfile integrity changes are detected on cache hit. - Add zipentry assertion for platform.properties in the classifier JAR structural guard. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: edburns <75821+edburns@users.noreply.github.com> Co-authored-by: Ed Burns <edburns@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
edburns
added a commit
that referenced
this pull request
Aug 5, 2026
…or runtime.node (#2236) * Initial plan * Add copilot-native module with linux-x64 classifier JAR Co-authored-by: edburns <75821+edburns@users.noreply.github.com> * Address Copilot review: harden cache stamp and add platform.properties assertion - Persist integrity hash and binary digest in the .version stamp file so corrupted binaries or lockfile integrity changes are detected on cache hit. - Add zipentry assertion for platform.properties in the classifier JAR structural guard. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: edburns <75821+edburns@users.noreply.github.com> Co-authored-by: Ed Burns <edburns@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Task 4.7 of the embedded-runtime plan: create the
copilot-native/Maven module (com.github:copilot-sdk-java-runtime) that obtains theruntime.nodenative binary forlinux-x64vianpm pack, verifies it against the SHA-512 hash pinned innodejs/package-lock.json, and packages it as a classifier JAR alongside a placeholder primary JAR.New:
java/copilot-native/pom.xmlexec-maven-pluginingenerate-resourcesinvokes the fetch script for the singlelinux-x64classifier (Phase 4 hard invariant).maven-jar-pluginexecution produces the placeholder primary JAR fromsrc/main/resources; a second execution with<classifier>linux-x64</classifier>packages fromtarget/native-staging/linux-x64/.maven-antrun-pluginguard asserts the classifier JAR containsnative/linux-x64/runtime.nodeand that the primary JAR does not — catches staging/classifier regressions atpackagetime rather than at publish time.skip-native-downloadprofile (-Dcopilot.native.skip.download=true) disables the npm fetch and classifier JAR for offline / placeholder-only builds.New:
java/copilot-native/scripts/fetch-native.mjsResolves version and integrity from the same lockfile entry, then fails closed on mismatch:
Also writes
native/<classifier>/platform.properties(classifier,version) and a.versionstamp so repeat builds skip the ~180 MB download.New:
src/main/resources/native/lib/copilot-runtime.propertiesFiltered placeholder (
placeholder=true,version=${project.version}) — satisfies Maven Central's main-artifact requirement without shipping binaries.Modified
java/pom.xml—copilot-nativeenabled in<modules>;copilot-native-allcomment narrowed to the still-deferred uber-JAR..gitignore— ignorejava/copilot-native/target.