Skip to content

Commit 7de4b86

Browse files
committed
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
1 parent 29a3c2c commit 7de4b86

23 files changed

+113
-2347
lines changed

.claude/skills/agentic-merge-upstream/SKILL.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.github/copilot-instructions.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ These instructions guide GitHub Copilot when assisting with this repository. The
99
- **Tech Stack**: Java 17+, Maven, Jackson for JSON, JUnit for testing
1010
- **Purpose**: Provide a Java SDK for programmatic control of GitHub Copilot CLI
1111
- **Architecture**: JSON-RPC client communicating with Copilot CLI over stdio
12-
- **Key Goals**: Maintain parity with upstream .NET SDK while following Java idioms
12+
- **Key Goals**: Maintain parity with reference implementation .NET SDK while following Java idioms
1313

1414
## Build & Test Commands
1515

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

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

9090
## Key Conventions
9191

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

@@ -299,12 +299,12 @@ The release process is automated via the `publish-maven.yml` GitHub Actions work
299299
- Converts the `## [Unreleased]` section to `## [version] - date`
300300
- Creates a new empty `## [Unreleased]` section at the top
301301
- Updates version comparison links at the bottom of CHANGELOG.md
302-
- Injects the upstream SDK commit hash (from `.lastmerge`) as a `> **Upstream sync:**` blockquote in both the new `[Unreleased]` section and the released version section
302+
- 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
303303

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

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

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

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

.github/prompts/agentic-merge-reference-impl.prompt.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ This writes a `.merge-env` file used by the other scripts. It outputs:
5656
- The reference-impl dir path
5757
- A short log of reference implementation commits since `.lastmerge`
5858

59-
## Step 2: Analyze Upstream Changes
59+
## Step 2: Analyze reference implementation Changes
6060

6161
Run the diff script for a detailed breakdown by area:
6262

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

9797
### Key Files to Compare
9898

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

126126
### Commit Changes Incrementally
127127

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

182182
```bash
183183
cd "$TEMP_DIR/copilot-sdk"
184-
git diff "$LAST_MERGE_COMMIT"..origin/main --stat -- dotnet/test/
185-
git diff "$LAST_MERGE_COMMIT"..origin/main --stat -- test/snapshots/
184+
git diff "$LAST_REFERENCE_IMPL_COMMIT"..origin/main --stat -- dotnet/test/
185+
git diff "$LAST_REFERENCE_IMPL_COMMIT"..origin/main --stat -- test/snapshots/
186186
```
187187

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

197197
### Test File Mapping
198198

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

210210
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:
211211

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

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

0 commit comments

Comments
 (0)