Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Replace upstream terminology with reference implementation
Rebase the topic branch onto current main and preserve the original intent:
replace "upstream" naming with "reference implementation" across the repo.

- Update docs, prompts, workflows, and release automation wording
- Remove legacy upstream-sync assets superseded by reference-impl-sync assets
- Update references in tests and project guidance content
- Keep behavior aligned while clarifying terminology
- Apply Spotless formatting updates in touched Java test files
  • Loading branch information
edburns committed Apr 16, 2026
commit 7de4b86aa2e32174fea78b04a77fce1f0165566a
7 changes: 0 additions & 7 deletions .claude/skills/agentic-merge-upstream/SKILL.md

This file was deleted.

11 changes: 6 additions & 5 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ These instructions guide GitHub Copilot when assisting with this repository. The
- **Tech Stack**: Java 17+, Maven, Jackson for JSON, JUnit for testing
- **Purpose**: Provide a Java SDK for programmatic control of GitHub Copilot CLI
- **Architecture**: JSON-RPC client communicating with Copilot CLI over stdio
- **Key Goals**: Maintain parity with upstream .NET SDK while following Java idioms
- **Key Goals**: Maintain parity with reference implementation .NET SDK while following Java idioms

## Build & Test Commands

Expand Down Expand Up @@ -85,7 +85,7 @@ Tests use the official copilot-sdk test harness from `https://github.com/github/

- **E2ETestContext** - Manages test environment with CapiProxy for deterministic API responses
- **CapiProxy** - Node.js-based replaying proxy using YAML snapshots from `test/snapshots/`
- Test snapshots are stored in the upstream repo's `test/snapshots/` directory
- Test snapshots are stored in the reference implementation repo's `test/snapshots/` directory

## Key Conventions

Expand Down Expand Up @@ -217,7 +217,7 @@ Test method names are converted to lowercase snake_case for snapshot filenames t
- **DO NOT** modify `target/` directory - this contains build artifacts
- **DO NOT** edit `pom.xml` dependencies without careful consideration - this SDK has minimal dependencies by design
- **DO NOT** change the Jackson version without testing against all serialization patterns
- **DO NOT** modify test snapshots in `target/copilot-sdk/test/snapshots/` - these come from upstream
- **DO NOT** modify test snapshots in `target/copilot-sdk/test/snapshots/` - these come from reference implementation
- **DO NOT** alter the Eclipse formatter configuration in `pom.xml` without team consensus
- **DO NOT** remove or skip Checkstyle or Spotless checks

Expand Down Expand Up @@ -299,12 +299,12 @@ The release process is automated via the `publish-maven.yml` GitHub Actions work
- Converts the `## [Unreleased]` section to `## [version] - date`
- Creates a new empty `## [Unreleased]` section at the top
- Updates version comparison links at the bottom of CHANGELOG.md
- Injects the upstream SDK commit hash (from `.lastmerge`) as a `> **Upstream sync:**` blockquote in both the new `[Unreleased]` section and the released version section
- Injects the reference implementation SDK commit hash (from `.lastmerge`) as a `> **Reference implementation sync:**` blockquote in both the new `[Unreleased]` section and the released version section

2. **Reference Implementation Sync Tracking**: Each release records which commit from the official `github/copilot-sdk` it is synced to:
- The `.lastmerge` file is read during the release workflow
- The commit hash is injected into `CHANGELOG.md` under the release heading
- Format: `> **Upstream sync:** [\`github/copilot-sdk@SHORT_HASH\`](link-to-commit)`
- Format: `> **Reference implementation sync:** [\`github/copilot-sdk@SHORT_HASH\`](link-to-commit)`

3. **Documentation Updates**: README.md and jbang-example.java are updated with the new version.

Expand All @@ -316,3 +316,4 @@ The release process is automated via the `publish-maven.yml` GitHub Actions work
5. **Rollback**: If the release fails, the documentation commit is automatically reverted

The workflow is triggered manually via workflow_dispatch with optional version parameters.

17 changes: 9 additions & 8 deletions .github/prompts/agentic-merge-reference-impl.prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ This writes a `.merge-env` file used by the other scripts. It outputs:
- The reference-impl dir path
- A short log of reference implementation commits since `.lastmerge`

## Step 2: Analyze Upstream Changes
## Step 2: Analyze reference implementation Changes

Run the diff script for a detailed breakdown by area:

Expand Down Expand Up @@ -96,7 +96,7 @@ For each change in the reference implementation diff, determine:

### Key Files to Compare

| Upstream (.NET) | Java SDK Equivalent |
| reference implementation (.NET) | Java SDK Equivalent |
|------------------------------------|--------------------------------------------------------|
| `dotnet/src/Client.cs` | `src/main/java/com/github/copilot/sdk/CopilotClient.java` |
| `dotnet/src/Session.cs` | `src/main/java/com/github/copilot/sdk/CopilotSession.java` |
Expand All @@ -121,7 +121,7 @@ Before modifying any code:
2. **Identify the Java equivalent approach** - Don't replicate C# patterns; find the idiomatic Java way
3. **Check for existing abstractions** - The Java SDK may already have mechanisms that differ from .NET
4. **Preserve backward compatibility** - Existing API signatures should not break unless absolutely necessary
5. **When in doubt, match existing code** - Follow what's already in the Java SDK, not the upstream
5. **When in doubt, match existing code** - Follow what's already in the Java SDK, not the reference implementation

### Commit Changes Incrementally

Expand Down Expand Up @@ -181,8 +181,8 @@ After porting implementation changes, **always check for new or updated tests**

```bash
cd "$TEMP_DIR/copilot-sdk"
git diff "$LAST_MERGE_COMMIT"..origin/main --stat -- dotnet/test/
git diff "$LAST_MERGE_COMMIT"..origin/main --stat -- test/snapshots/
git diff "$LAST_REFERENCE_IMPL_COMMIT"..origin/main --stat -- dotnet/test/
git diff "$LAST_REFERENCE_IMPL_COMMIT"..origin/main --stat -- test/snapshots/
```

### Port Test Cases
Expand All @@ -196,7 +196,7 @@ For each new or modified test file in `dotnet/test/`:

### Test File Mapping

| Upstream Test (.NET) | Java SDK Test |
| reference implementation Test (.NET) | Java SDK Test |
|-----------------------------|--------------------------------------------------------|
| `dotnet/test/AskUserTests.cs` | `src/test/java/com/github/copilot/sdk/AskUserTest.java` |
| `dotnet/test/HooksTests.cs` | `src/test/java/com/github/copilot/sdk/HooksTest.java` |
Expand All @@ -209,7 +209,7 @@ New test snapshots are stored in `test/snapshots/` in the reference implementati

If tests fail with errors like `TypeError: Cannot read properties of undefined`, the test harness may not yet support the new RPC methods. In this case:

1. **Mark tests as `@Disabled`** with a clear reason (e.g., `@Disabled("Requires test harness update with X support - see upstream PR #NNN")`)
1. **Mark tests as `@Disabled`** with a clear reason (e.g., `@Disabled("Requires test harness update with X support - see reference implementation PR #NNN")`)
2. **Document the dependency** in the test class Javadoc
3. **Enable tests later** once the harness is updated

Expand Down Expand Up @@ -403,7 +403,7 @@ Before finishing:
- [ ] New branch created from `main`
- [ ] Copilot CLI updated to latest version
- [ ] README.md updated with minimum CLI version requirement
- [ ] Upstream repository cloned
- [ ] reference implementation repository cloned
- [ ] Diff analyzed between `.lastmerge` commit and HEAD
- [ ] New features/fixes identified
- [ ] Changes ported to Java SDK following conventions
Expand Down Expand Up @@ -437,3 +437,4 @@ Before finishing:
- Uses JUnit 5 for testing
- **Java SDK design decisions take precedence over reference implementation patterns**
- **Adapt reference implementation changes to fit Java idioms, not the other way around**

Loading
Loading