Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .github/actions/java-test-report/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ inputs:
report-path:
description: "Path to the test report XML files (glob pattern)"
required: false
default: "java/target/{surefire-reports*,failsafe-reports}/TEST-*.xml"
default: "java/sdk/target/{surefire-reports*,failsafe-reports}/TEST-*.xml"
jacoco-path:
description: "Path to the JaCoCo XML report"
required: false
default: "java/target/site/jacoco-coverage/jacoco.xml"
default: "java/sdk/target/site/jacoco-coverage/jacoco.xml"
jacoco-csv-path:
description: "Path to the JaCoCo CSV report"
required: false
default: "java/target/site/jacoco-coverage/jacoco.csv"
default: "java/sdk/target/site/jacoco-coverage/jacoco.csv"
check-name:
description: "Name for the check run"
required: false
Expand Down
8 changes: 4 additions & 4 deletions .github/aw/actions-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
"version": "v7.0.1",
"sha": "043fb46d1a93c77aae656e7c1c64a875d1fc6a0a"
},
"github/gh-aw-actions/setup-cli@v0.83.1": {
"repo": "github/gh-aw-actions/setup-cli",
"github/gh-aw-actions/setup@v0.83.1": {
"repo": "github/gh-aw-actions/setup",
"version": "v0.83.1",
"sha": "8bdba8075360648fe6802302a5b4e016361dc6ac"
},
"github/gh-aw-actions/setup@v0.83.1": {
"repo": "github/gh-aw-actions/setup",
"github/gh-aw-actions/setup-cli@v0.83.1": {
"repo": "github/gh-aw-actions/setup-cli",
"version": "v0.83.1",
"sha": "8bdba8075360648fe6802302a5b4e016361dc6ac"
}
Expand Down
12 changes: 6 additions & 6 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

- Top-level: `README.md` (architecture + quick start)
- Language entry points: `nodejs/src/client.ts`, `python/README.md`, `go/README.md`, `dotnet/README.md`
- Java: `java/README.md`, `java/pom.xml`
- Java: `java/sdk/README.md`, `java/pom.xml`, `java/sdk/pom.xml`
- Test harness & E2E: `test/harness/*`, Python harness wrapper `python/e2e/testharness/proxy.py`
- Schemas & type generation: `nodejs/scripts/generate-session-types.ts`
- Session snapshots used by E2E: `test/snapshots/` (used by the replay proxy)
Expand Down Expand Up @@ -61,13 +61,13 @@

## Where to add new code or tests 🧭

- SDK code: `nodejs/src`, `python/copilot`, `go`, `dotnet/src`, `rust/src`, `java/src/main/java`
- Unit tests: `nodejs/test`, `python/*`, `go/*`, `dotnet/test`, `rust/tests`, `java/src/test/java`
- E2E tests: `*/e2e/` folders that use the shared replay proxy and `test/snapshots/`, `java/src/test/java/**/e2e/`
- Generated types: update schema in `@github/copilot` then run `cd nodejs && npm run generate:session-types` and commit generated files in `src/generated` or language generated location. Java generated types: `java/src/generated/java`
- SDK code: `nodejs/src`, `python/copilot`, `go`, `dotnet/src`, `rust/src`, `java/sdk/src/main/java`
- Unit tests: `nodejs/test`, `python/*`, `go/*`, `dotnet/test`, `rust/tests`, `java/sdk/src/test/java`
- E2E tests: `*/e2e/` folders that use the shared replay proxy and `test/snapshots/`, `java/sdk/src/test/java/**/e2e/`
- Generated types: update schema in `@github/copilot` then run `cd nodejs && npm run generate:session-types` and commit generated files in `src/generated` or language generated location. Java generated types: `java/sdk/src/generated/java`

## Boundaries — files you must NOT hand-edit ⛔

- `java/src/generated/java/` — auto-generated by `scripts/codegen/java.ts`; regenerate with `cd java && mvn generate-sources -Pcodegen`.
- `java/sdk/src/generated/java/` — auto-generated by `scripts/codegen/java.ts`; regenerate with `cd java/sdk && mvn generate-sources -Pcodegen`.
- `nodejs/src/generated/` — auto-generated by `npm run generate:session-types`.
- `test/snapshots/` — authoritative test fixtures; add/edit YAML here to change E2E behavior, but don't delete without understanding downstream impact.
8 changes: 4 additions & 4 deletions .github/skills/new-java-e2e-test-yaml-and-test/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ conversations:

### Step 3: Create the Java IT test class

Place it in `java/src/test/java/com/github/copilot/` with an `IT` suffix
Place it in `java/sdk/src/test/java/com/github/copilot/` with an `IT` suffix
(e.g., `MyFeatureIT.java`). The failsafe plugin picks up `*IT.java` files.

**Template:**
Expand Down Expand Up @@ -141,12 +141,12 @@ mvn clean verify

| What | Where |
|------|-------|
| Test context (manages proxy, workDir, CLI) | `java/src/test/java/com/github/copilot/E2ETestContext.java` |
| Java proxy wrapper | `java/src/test/java/com/github/copilot/CapiProxy.java` |
| Test context (manages proxy, workDir, CLI) | `java/sdk/src/test/java/com/github/copilot/E2ETestContext.java` |
| Java proxy wrapper | `java/sdk/src/test/java/com/github/copilot/CapiProxy.java` |
| Replay proxy (TypeScript) | `test/harness/replayingCapiProxy.ts` |
| Proxy server entry point | `test/harness/server.ts` |
| Snapshot files | `test/snapshots/<category>/<name>.yaml` |
| Existing IT tests for reference | `java/src/test/java/com/github/copilot/*IT.java` |
| Existing IT tests for reference | `java/sdk/src/test/java/com/github/copilot/*IT.java` |

## How the Proxy Matches Requests

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codegen-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
- 'go/rpc/**'
- 'rust/src/generated/**'
- 'sdk-protocol-version.json'
- 'java/src/main/java/com/github/copilot/SdkProtocolVersion.java'
- 'java/sdk/src/main/java/com/github/copilot/SdkProtocolVersion.java'
- '.github/workflows/codegen-check.yml'
workflow_dispatch:

Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
- name: Verify Java protocol version matches
run: |
EXPECTED=$(jq -r '.version' sdk-protocol-version.json)
ACTUAL=$(grep -oP 'LATEST\(\K[0-9]+' java/src/main/java/com/github/copilot/SdkProtocolVersion.java)
ACTUAL=$(grep -oP 'LATEST\(\K[0-9]+' java/sdk/src/main/java/com/github/copilot/SdkProtocolVersion.java)
if [ "$EXPECTED" != "$ACTUAL" ]; then
echo "::error::Java SDK protocol version ($ACTUAL) does not match sdk-protocol-version.json ($EXPECTED). Java manages its own SdkProtocolVersion.java via java/scripts/codegen/. Update it to match."
exit 1
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/docs-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ on:
- 'python/copilot/**'
- 'go/**/*.go'
- 'dotnet/src/**'
- 'java/src/**'
- 'java/sdk/src/**'
- 'java/pom.xml'
- 'java/sdk/pom.xml'
- 'scripts/docs-validation/**'
- '.github/workflows/docs-validation.yml'
workflow_dispatch:
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@ You are an automation agent that fixes handwritten Java SDK source and test code

- The branch `${{ inputs.branch }}` already has:
- Updated `java/scripts/codegen/package.json` with the new version
- Regenerated `java/src/generated/java/` code that compiles successfully
- Regenerated `java/sdk/src/generated/java/` code that compiles successfully
- Updated the Java POM CLI/version pin property
- Your job is ONLY to fix **handwritten** code, NOT generated code.

## Boundaries

- ❌ Do NOT edit anything under `java/src/generated/java/`
- ❌ Do NOT edit anything under `java/sdk/src/generated/java/`
- ❌ Do NOT edit `java/scripts/codegen/java.ts`
- ❌ Do NOT create or modify tests in the `com.github.copilot.generated` test package (`java/src/test/java/com/github/copilot/sdk/generated/`)
- ✅ DO edit `java/src/main/java/com/github/copilot/sdk/**`
- ✅ DO edit `java/src/test/java/com/github/copilot/sdk/**` (excluding the `generated` subpackage)
- ❌ Do NOT create or modify tests in the `com.github.copilot.generated` test package (`java/sdk/src/test/java/com/github/copilot/sdk/generated/`)
- ✅ DO edit `java/sdk/src/main/java/com/github/copilot/sdk/**`
- ✅ DO edit `java/sdk/src/test/java/com/github/copilot/sdk/**` (excluding the `generated` subpackage)
- ✅ DO add new test methods or test classes if new user-facing API surface is introduced

## Instructions
Expand Down Expand Up @@ -146,7 +146,7 @@ mvn verify -Dskip.test.harness=true
If this passes, commit and push:

```bash
git add java/src/main/java java/src/test/java
git add java/sdk/src/main/java java/sdk/src/test/java
git commit -m "Fix handwritten Java code for @github/copilot schema changes

Adapt constructor calls, enum references, and test assertions to match
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/java-codegen-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ on:
- main
paths:
- 'java/scripts/codegen/**'
- 'java/src/generated/**'
- 'java/sdk/src/generated/**'
- '.github/workflows/java-codegen-check.yml'
pull_request:
paths:
- 'java/scripts/codegen/**'
- 'java/src/generated/**'
- 'java/sdk/src/generated/**'
- '.github/workflows/java-codegen-check.yml'
workflow_dispatch:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/java-codegen-fix.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading