From 94f7f35227acfe3266c8d3f167d0d99fca656b59 Mon Sep 17 00:00:00 2001 From: Ed Burns Date: Tue, 24 Mar 2026 23:30:29 -0400 Subject: [PATCH 1/2] On branch edburns/dd-2855288-add-smoke-test-to-build-and-test Pass through the token. modified: .github/workflows/run-smoke-test.md Signed-off-by: Ed Burns --- .github/workflows/run-smoke-test.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-smoke-test.md b/.github/workflows/run-smoke-test.md index a3e8e92c1..2c55048db 100644 --- a/.github/workflows/run-smoke-test.md +++ b/.github/workflows/run-smoke-test.md @@ -78,7 +78,12 @@ Read the file `src/test/prompts/PROMPT-smoke-test.md` and follow its instruction **Critical override:** The goal of this workflow is to validate the SDK snapshot you just built and installed locally in Step 1, not any newer SNAPSHOT that might exist in a remote repository. To ensure Maven does not download a newer timestamped SNAPSHOT, you must run the smoke-test Maven build in offline mode and without `-U`, so that it uses the locally installed artifact. -Follow every step in the prompt: create the `smoke-test/` directory, create `pom.xml` and the Java source file exactly as specified, then **when the prompt instructs you to run `mvn -U clean package`, instead run** `mvn -o clean package` (no `-U`), run with `java -jar`, and verify the exit code. +**Critical override — authentication:** The Quick Start code creates a `CopilotClient` which spawns the Copilot CLI and needs authentication. The `COPILOT_GITHUB_TOKEN` environment variable is available in your environment. You **must** ensure it is passed through when running the `java -jar` command. For example: +```bash +COPILOT_GITHUB_TOKEN="$COPILOT_GITHUB_TOKEN" java -jar ./target/copilot-sdk-smoketest-1.0-SNAPSHOT.jar +``` + +Follow every step in the prompt: create the `smoke-test/` directory, create `pom.xml` and the Java source file exactly as specified, build with `mvn -U clean package`, run with `java -jar` (with `COPILOT_GITHUB_TOKEN` passed through), and verify the exit code. ### Step 3 — Report result From 997cd04eef5d96b5259e89839832df965ca54a9d Mon Sep 17 00:00:00 2001 From: Ed Burns Date: Tue, 24 Mar 2026 23:35:38 -0400 Subject: [PATCH 2/2] Force -o. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/run-smoke-test.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-smoke-test.md b/.github/workflows/run-smoke-test.md index 2c55048db..3515fac2f 100644 --- a/.github/workflows/run-smoke-test.md +++ b/.github/workflows/run-smoke-test.md @@ -83,7 +83,7 @@ Read the file `src/test/prompts/PROMPT-smoke-test.md` and follow its instruction COPILOT_GITHUB_TOKEN="$COPILOT_GITHUB_TOKEN" java -jar ./target/copilot-sdk-smoketest-1.0-SNAPSHOT.jar ``` -Follow every step in the prompt: create the `smoke-test/` directory, create `pom.xml` and the Java source file exactly as specified, build with `mvn -U clean package`, run with `java -jar` (with `COPILOT_GITHUB_TOKEN` passed through), and verify the exit code. +Follow every step in the prompt: create the `smoke-test/` directory, create `pom.xml` and the Java source file exactly as specified, build with `mvn -o clean package` (offline and without \`-U\`), run with `java -jar` (with `COPILOT_GITHUB_TOKEN` passed through), and verify the exit code. ### Step 3 — Report result