Skip to content

Refactor copilot SDK driver into self-contained Node program#36549

Merged
pelikhan merged 12 commits into
mainfrom
copilot/refactor-copilot-sdk-driver
Jun 3, 2026
Merged

Refactor copilot SDK driver into self-contained Node program#36549
pelikhan merged 12 commits into
mainfrom
copilot/refactor-copilot-sdk-driver

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 2, 2026

copilot_sdk_driver.cjs was a module-only export; the harness managed the sidecar and SDK session inline, receiving configuration through a JSON payload piped via stdin. This refactors the driver into a standalone program started by the harness like any other command, with configuration via environment variables — serving as a sample for how to create a Copilot SDK driver extension in agentic-workflows.

Architecture change

Before:

printf '%s' '{"promptFile":"...","serverArgs":[...]}' | { node harness.cjs copilot; }

Harness reads stdin JSON, starts sidecar, manages SDK session inline.

After:

node harness.cjs "$GH_AW_NODE_EXEC" copilot_sdk_driver.cjs copilot

Harness starts the sidecar, then runs the driver subprocess as a pure SDK client. The driver connects to the already-running server, runs the SDK session, and exits.

Changes

  • copilot_sdk_driver.cjs — adds main() entry point + require.main === module guard; reads GH_AW_PROMPT, COPILOT_SDK_URI, COPILOT_CONNECTION_TOKEN, COPILOT_MODEL from env; connects to the harness-managed sidecar as a client only (no sidecar lifecycle management)

  • copilot_harness.cjs — adds copilotSDKDriverMode (GH_AW_COPILOT_SDK_DRIVER=1); in driver mode, starts the sidecar using the copilot binary from args[1] and GH_AW_COPILOT_SDK_SERVER_ARGS; always generates and injects COPILOT_CONNECTION_TOKEN; always stops the sidecar in the finally block; uses runProcess to run the driver subprocess

  • copilot_engine_execution.go — removes copilotSDKStdinOptions struct and stdin-pipe command format; emits driver script path in command args; sets GH_AW_COPILOT_SDK_DRIVER=1 and GH_AW_COPILOT_SDK_SERVER_ARGS (JSON-encoded sidecar argv) in step env

  • engine_constants.go — adds CopilotSDKServerArgsEnvVar and CopilotSDKDriverEnvVar

New env vars

Variable Purpose
GH_AW_COPILOT_SDK_DRIVER Tells harness to delegate to driver subprocess
GH_AW_COPILOT_SDK_SERVER_ARGS JSON array of complete CLI args for the headless sidecar

Backward compatibility

The original harness-managed SDK path (stdin JSON + inline sidecar) is preserved when GH_AW_COPILOT_SDK_DRIVER is unset. All existing exports from copilot_sdk_driver.cjs are unchanged.


Updated branch for run https://github.com/github/gh-aw/actions/runs/26877286775.

Generated by 👨‍🍳 PR Sous Chef · gpt54mini 3.2M ·


Generated by 📋 Changeset Generator for issue #36549 · gpt54mini 1.7M ·



✨ PR Review Safe Output Test - Run 26879446391

Warning

Firewall blocked 6 domains

The following domains were blocked by the firewall during workflow execution:

  • accounts.google.com
  • android.clients.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • safebrowsingohttpgateway.googleapis.com
  • www.google.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "android.clients.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "safebrowsingohttpgateway.googleapis.com"
    - "www.google.com"

See Network Configuration for more information.

💥 [THE END] — Illustrated by Smoke Claude · opus48 5.1M ·

Copilot AI and others added 3 commits June 2, 2026 23:13
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…r message, fix harness terminology

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan
Copy link
Copy Markdown
Collaborator

pelikhan commented Jun 3, 2026

@copilot the server should be started in copilot_harness.cjs and the driver should only open a client

Copilot AI and others added 2 commits June 3, 2026 00:58
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- copilot_harness.cjs: starts sidecar in driver mode using copilot binary
  from args[1] and GH_AW_COPILOT_SDK_SERVER_ARGS; always generates and
  injects COPILOT_CONNECTION_TOKEN; always stops sidecar in finally block
- copilot_sdk_driver.cjs: main() no longer manages sidecar; reads
  COPILOT_CONNECTION_TOKEN from env and connects as client only

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jun 3, 2026

@copilot the server should be started in copilot_harness.cjs and the driver should only open a client

Done in 5b57b4c. The sidecar is now started by copilot_harness.cjs in both inline and driver modes. The harness reads the copilot binary from args[1] and server args from GH_AW_COPILOT_SDK_SERVER_ARGS, generates the COPILOT_CONNECTION_TOKEN, and stops the sidecar in the finally block. copilot_sdk_driver.cjs main() is now a pure client — it reads COPILOT_SDK_URI and COPILOT_CONNECTION_TOKEN from env and calls runWithCopilotSDK() directly, with no sidecar management.

@pelikhan pelikhan marked this pull request as ready for review June 3, 2026 01:19
Copilot AI review requested due to automatic review settings June 3, 2026 01:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the Copilot SDK driver from a module-only helper into a standalone Node program that is invoked as a normal subprocess by the Copilot harness, shifting configuration from a stdin JSON payload to environment variables. This aligns the Copilot SDK execution path with other “command-style” engines and provides a concrete sample for building Copilot SDK driver extensions.

Changes:

  • Adds a standalone main() entry point to copilot_sdk_driver.cjs (guarded by require.main === module) and reads SDK configuration from env vars.
  • Introduces new engine constants (GH_AW_COPILOT_SDK_DRIVER, GH_AW_COPILOT_SDK_SERVER_ARGS) and updates the Copilot engine tests to assert the new env-driven/driver-mode behavior.
  • Updates numerous workflow *.lock.yml files to use the new harness invocation pattern and env vars (no stdin JSON piping).
Show a summary per file
File Description
pkg/workflow/copilot_engine_test.go Updates SDK-mode expectations for driver-mode env vars and removes stdin-payload assertions.
pkg/constants/engine_constants.go Adds new env var constants for Copilot SDK driver mode and sidecar argv transport.
actions/setup/js/copilot_sdk_driver.cjs Adds standalone program entry point that reads configuration from env vars and runs one SDK session.
.github/workflows/smoke-copilot-sdk.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/q.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/python-data-charts.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/pr-triage-agent.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/pr-nitpick-reviewer.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/pr-code-quality-reviewer.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/plan.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/pdf-summary.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/org-health-report.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/metrics-collector.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/mcp-inspector.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/linter-miner.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/layout-spec-maintainer.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/jsweep.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/firewall.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/firewall-escape.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/draft-pr-cleanup.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/docs-noob-tester.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/discussion-task-miner.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/dictation-prompt.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/dev-hawk.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/deployment-incident-monitor.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/delight.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/dead-code-remover.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/daily-workflow-updater.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/daily-syntax-error-quality.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/daily-spdd-spec-planner.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/daily-skill-optimizer.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/daily-sentrux-report.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/daily-security-observability.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/daily-secrets-analysis.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/daily-repo-chronicle.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/daily-performance-summary.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/daily-model-inventory.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/daily-malicious-code-scan.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/daily-issues-report.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/daily-geo-optimizer.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/daily-experiment-report.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/daily-compiler-threat-spec-optimizer.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/daily-cli-performance.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/daily-assign-issue-to-user.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/daily-architecture-diagram.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/daily-agent-of-the-day-blog-writer.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/craft.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/copilot-pr-prompt-analysis.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/copilot-pr-nlp-analysis.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/copilot-pr-merged-report.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/copilot-opt.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/copilot-cli-deep-research.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/code-scanning-fixer.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/cli-consistency-checker.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/ci-coach.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/breaking-change-checker.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/brave.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/artifacts-summary.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/architecture-guardian.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.
.github/workflows/agent-performance-analyzer.lock.yml Switches locked command to driver-mode harness invocation and sets new env vars.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 68/68 changed files
  • Comments generated: 2

Comment on lines +272 to +277
// CopilotSDKServerArgsEnvVar is the environment variable that holds the JSON-encoded
// CLI argument array for the headless Copilot CLI sidecar started by copilot_sdk_driver.cjs.
// The array includes all server control and configuration flags
// (--headless, --no-auto-update, --port, --add-dir, --log-level, etc.)
// that the engine computes at compile time. The driver reads this variable at
// runtime to start the sidecar without any argument parsing.
Comment on lines +320 to +322
const model = process.env.COPILOT_MODEL || undefined;
const connectionToken = process.env.COPILOT_CONNECTION_TOKEN || undefined;

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

@copilot review all comments and address unresolved review feedback. Please refresh the branch and rerun checks after applying fixes.

Generated by 👨‍🍳 PR Sous Chef · gpt54mini 6.3M ·

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

⚠️ PR Code Quality Reviewer failed during code quality review.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

Design Decision Gate 🏗️ completed the design decision gate check.

No ADR enforcement needed: PR #36549 does not have the 'implementation' label and has 92 new lines of code in business logic directories, which is at or below the 100-line threshold (has_implementation_label=false, requires_adr_by_default_volume=false, has_custom_config=false).

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

🧪 Test Quality Sentinel completed test quality analysis.

@github-actions github-actions Bot mentioned this pull request Jun 3, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

🧪 Test Quality Sentinel Report

Test Quality Score: 92/100 — Excellent

Analyzed 1 modified test function: 1 design test (behavioral contract), 0 implementation tests, 0 coding-guideline violations.

📊 Metrics & Test Classification (1 test analyzed)
Metric Value
New/modified tests analyzed 1 (modified)
✅ Design tests (behavioral contracts) 1 (100%)
⚠️ Implementation tests (low value) 0 (0%)
Tests with error/edge cases 1 (100%)
Duplicate test clusters 0
Test inflation detected No
🚨 Coding-guideline violations 0

Test Classification Details

Test File Classification Issues Detected
TestCopilotEngineExecutionStepsWithCopilotSDK pkg/workflow/copilot_engine_test.go:243 ✅ Design None — adapts assertions from stdin-pipe to env-var contract

Language Support

Tests analyzed:

  • 🟨 JavaScript (*.test.cjs): 0 new/modified test files in this PR

Verdict

📖 Understanding Test Classifications

Design Tests (High Value) verify what the system does:

  • Assert on observable outputs, return values, or state changes
  • Cover error paths and boundary conditions
  • Would catch a behavioral regression if deleted
  • Remain valid even after internal refactoring

Implementation Tests (Low Value) verify how the system does it:

  • Assert on internal function calls (mocking internals)
  • Only test the happy path with typical inputs
  • Break during legitimate refactoring even when behavior is correct

References: §26857895846

🧪 Test quality analysis by Test Quality Sentinel · sonnet46 2.2M ·

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Quality Sentinel: 92/100. Test quality is acceptable - 0% of modified tests are implementation tests (threshold: 30%). The single modified test adapts behavioral contract assertions from stdin-pipe to env-var-based configuration. No coding-guideline violations detected.

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skills-Based Review 🧠

Applied /improve-codebase-architecture and /zoom-out — commenting with observations, no hard blockers.

📋 Key Themes & Highlights

Key Themes

  • Provider/AWF reflection gap: Driver mode's main() calls runWithCopilotSDK without provider, silently skipping the custom provider config that inline mode injects via sdkCustomProviderConfig. Workflows with AWF_REFLECT_ENABLED=1 lose the reflection proxy when running in driver mode.
  • Phantom argv: The copilot binary path is threaded into the driver subprocess's process.argv but main() reads all config from env vars — the positional arg is unused and undocumented. Confusing for the extension-sample audience this PR targets.
  • Dual-mode harness: Inline SDK mode (stdin JSON pipe) is preserved alongside the new driver mode with no deprecation signal. This doubles the harness's internal branching for SDK flows.
  • Weak test coverage of GH_AW_COPILOT_SDK_SERVER_ARGS: Triple-fallback quoting check means the assertion only catches a completely absent key, not a malformed value.

Positive Highlights

  • ✅ Clean separation: sidecar lifecycle stays with the harness, SDK client logic moves to the driver — a solid division of responsibility.
  • ✅ Env-var-based configuration is more robust than the stdin JSON pipe for subprocess boundaries.
  • ✅ Good inline comments throughout, especially the Go engine explaining copilotSDKServerArgsJSON pre-declaration.
  • ✅ Removing copilotSDKStdinOptions struct and the single-quote escaping logic is a meaningful simplification.
  • require.main === module pattern is idiomatic for a dual-role CommonJS module.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · sonnet46 3.3M


// --- Run SDK session -------------------------------------------------

const result = await runWithCopilotSDK({
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/improve-codebase-architecture] provider (AWF reflection proxy config) is silently dropped in driver mode — workflows using AWF_REFLECT_ENABLED=1 will run without the custom provider.

💡 Details

In inline mode the harness resolves sdkCustomProviderConfig from the AWF reflect API and passes it to runWithCopilotSDK. In driver mode, main() calls runWithCopilotSDK without provider, so the AWF reflection proxy is never used even when AWF_REFLECT_ENABLED=1.

If this is intentional (driver mode does not yet support custom providers), it should be documented here and the harness should log a warning when AWF_REFLECT_ENABLED=1 and driver mode is active. If unintentional, consider passing provider via an env var (e.g. GH_AW_COPILOT_PROVIDER_JSON) similar to how server args are passed.

// Server args are provided via GH_AW_COPILOT_SDK_SERVER_ARGS (JSON-encoded CLI arg list
// generated by the Go engine). The copilot binary is args[1] in the driver command:
// node copilot_harness.cjs $GH_AW_NODE_EXEC copilot_sdk_driver.cjs <copilot-binary>
const copilotBin = args[1];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/zoom-out] args[1] (the copilot binary path) is passed through to the driver subprocess via currentArgs, but copilot_sdk_driver.cjs's main() never reads process.argv — all config comes from env vars. This creates a phantom positional argument that future extension authors will find confusing.

💡 Details

The harness uses args[1] only to start the sidecar (correct). Then runProcess({ command, args: currentArgs }) spawns the driver with currentArgs = [copilot_sdk_driver.cjs, copilot-binary] so the driver receives the copilot binary as process.argv[3] — but ignores it.

Since this PR's stated goal is to make the driver a sample for extension authors, having a silently-ignored argv is a footgun. Consider either:

  • Removing the copilot binary from the driver's args (pass it only via GH_AW_COPILOT_SDK_SERVER_ARGS already set in env), or
  • Documenting in main() that process.argv[2] carries the copilot binary and is intentionally unused.

// Driver mode: the engine started copilot_sdk_driver.cjs as a standalone command.
// The harness starts the sidecar and then runs the driver like any other subprocess;
// the driver only opens an SDK client connection to the already-running server.
const copilotSDKDriverMode = copilotSDKMode && process.env.GH_AW_COPILOT_SDK_DRIVER === "1";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/improve-codebase-architecture] Inline SDK mode (stdin JSON pipe) is retained alongside the new driver mode, so both code paths coexist permanently. If driver mode is now the canonical path for copilot-sdk: true, consider whether inline mode should be deprecated.

💡 Details

The PR description frames driver mode as the new architecture, but the old readSDKOptionsFromStdin path remains active for copilotSDKMode && !copilotSDKDriverMode. The flag GH_AW_COPILOT_SDK_DRIVER gates the fork, making the harness perpetually maintain two SDK execution paths.

If inline mode will eventually be removed, a // TODO: deprecate inline SDK mode (#XXXX) comment here would signal intent and prevent future engineers from investing in the dead path. If both are deliberately supported long-term, a brief comment explaining the use-case difference would help.


// GH_AW_COPILOT_SDK_SERVER_ARGS must carry the JSON-encoded server arg list.
if !strings.Contains(stepContent, constants.CopilotSDKServerArgsEnvVar+":'") &&
!strings.Contains(stepContent, constants.CopilotSDKServerArgsEnvVar+": '") {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/tdd] The GH_AW_COPILOT_SDK_SERVER_ARGS assertion has triple fallback quoting checks — it passes as long as the env var key appears anywhere in the content, regardless of value format. This doesn't actually verify the server args are well-formed JSON.

💡 Suggested tightening

The current assertion:

if !strings.Contains(stepContent, constants.CopilotSDKServerArgsEnvVar+":'">) &&
    !strings.Contains(stepContent, constants.CopilotSDKServerArgsEnvVar+": '") {
    if !strings.Contains(stepContent, constants.CopilotSDKServerArgsEnvVar+":") {
        t.Fatalf(...)
    }
}

effectively only fails if the key is completely absent. Separately, --headless and --port are checked globally in stepContent, not scoped to the server-args value.

Consider extracting the env var value from the step content and verifying it parses as valid JSON containing the expected flags. At minimum, scope the --headless check to the text after GH_AW_COPILOT_SDK_SERVER_ARGS:

serverArgsIdx := strings.Index(stepContent, constants.CopilotSDKServerArgsEnvVar)
require.Greater(t, serverArgsIdx, -1, "GH_AW_COPILOT_SDK_SERVER_ARGS must be present")
afterArgs := stepContent[serverArgsIdx:]
assert.Contains(t, afterArgs, `"--headless"`, "server args must include --headless")

// GH_AW_COPILOT_SDK_SERVER_ARGS when copilot-sdk: true. It is declared here so that the
// env-block section further down can reference the same value that was computed while
// building the command, avoiding the need to re-derive it separately.
var copilotSDKServerArgsJSON string
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/zoom-out] copilotSDKServerArgsJSON is declared at the top of a long function and only assigned ~48 lines later in the isCopilotSDKMode branch. Declaring it next to its assignment site (or inlining it) would reduce cognitive distance, since readers must track the variable across unrelated code paths.

💡 Suggestion

Since copilotSDKServerArgsJSON is only ever set and consumed inside if isCopilotSDKMode { ... } blocks, moving the declaration into that block or into a small helper function would make the scope explicit and avoid the need for the explanatory comment bridging the two locations.

Alternatively, the existing comment explaining the variable's purpose is valuable — consider keeping the comment but moving the var declaration just before the if isCopilotSDKMode { block where serverArgs is computed.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

@copilot review all comments and address unresolved review feedback.
Please refresh the branch and rerun checks after the review fixes land.

Generated by 👨‍🍳 PR Sous Chef · gpt54mini 4.4M ·

@pelikhan
Copy link
Copy Markdown
Collaborator

pelikhan commented Jun 3, 2026

@copilot review all comments and previews . Apply copilot-review skill

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jun 3, 2026

@copilot review implementation and simplify, refactor, add logging.

Implemented in f1b5171 (plus 311c0be): I simplified/refactored SDK driver-mode server-args handling by extracting validated env parsing into a dedicated helper, added clearer driver-mode sidecar startup diagnostics, and expanded focused tests for parsing edge cases. I also clarified harness-vs-driver responsibility comments in the related Go constants/execution paths.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

@copilot review all comments and address unresolved review feedback.
Please resolve the 7 open review threads, especially the driver-mode reflection/provider gap and the unused argv path.

Generated by 👨‍🍳 PR Sous Chef · gpt54mini 3.2M ·

@pelikhan pelikhan added the smoke label Jun 3, 2026
@pelikhan
Copy link
Copy Markdown
Collaborator

pelikhan commented Jun 3, 2026

/smoke-copilot-sdk

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

✅ All tools validated successfully! Agent Container Smoke Test confirms agent container is ready.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

💫 TO BE CONTINUED... Smoke Claude failed! Our hero faces unexpected challenges...

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

🚀 Smoke Antigravity MISSION COMPLETE! Antigravity has spoken. ✨

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

🚀 Smoke Pi MISSION COMPLETE! Pi delivered. 🥧

@pelikhan
Copy link
Copy Markdown
Collaborator

pelikhan commented Jun 3, 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

Smoke Copilot SDK completed successfully!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

🚀 Smoke Gemini MISSION COMPLETE! Gemini has spoken. ✨

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

Agent Container Tool Check

Tool Status Version
bash 5.2.21
sh available
git 2.54.0
jq 1.7
yq 4.53.2
curl 8.5.0
gh 2.92.0
node 24.16.0
python3 3.13.13
go 1.24.13
java 21.0.11
dotnet 10.0.300

Result: 12/12 tools available ✅

Overall Status: PASS

🔧 Tool validation by Agent Container Smoke Test · sonnet46 565.8K ·

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

Smoke Test Results

  • GitHub MCP Testing: ✅
  • Web Fetch Testing: ✅
  • File Writing Testing: ✅
  • Bash Tool Testing: ✅
  • Build gh-aw: ❌

Overall Status: FAIL

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • localhost

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "localhost"

See Network Configuration for more information.

Smoke Gemini — Powered by Gemini ·

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

Commit pushed: 316c7b9

Generated by Changeset Generator · gpt54mini 1.7M

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

Smoke test summary for run 26879446434:

  • PR titles checked: 2 merged PRs
  • Serena activation and symbol lookup: ✅
  • Browser/web-fetch: ❌ unavailable in this session
  • File write + bash verification: ✅
  • Build gh-aw: ✅
  • Overall status: FAIL

🔮 The oracle has spoken through Smoke Codex · gpt54mini 9.5M ·

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

Comment Memory

Build hums in the shell
Checks settle into bright green
Smoke drifts, work stands still

Note

This comment is managed by comment memory.

It stores persistent context for this thread in the code block at the top of this comment.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

🔮 The oracle has spoken through Smoke Codex · gpt54mini 9.5M ·

@pelikhan pelikhan merged commit 932936b into main Jun 3, 2026
@pelikhan pelikhan deleted the copilot/refactor-copilot-sdk-driver branch June 3, 2026 10:48
Copilot stopped work on behalf of pelikhan due to an error June 3, 2026 10:49
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

💨 Smoke Test: Claude — Run 26879446391

Core #1–13: ✅ all passed
PR Review #14–19: ✅ all passed | #20 (close PR): ⚠️ skipped (no safe PR)

Overall: PARTIAL (1 intentional skip) — run

Warning

Firewall blocked 6 domains

The following domains were blocked by the firewall during workflow execution:

  • accounts.google.com
  • android.clients.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • safebrowsingohttpgateway.googleapis.com
  • www.google.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "android.clients.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "safebrowsingohttpgateway.googleapis.com"
    - "www.google.com"

See Network Configuration for more information.

💥 [THE END] — Illustrated by Smoke Claude · opus48 5.1M ·

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💥 Automated smoke test review - all systems nominal!

Warning

Firewall blocked 6 domains

The following domains were blocked by the firewall during workflow execution:

  • accounts.google.com
  • android.clients.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • safebrowsingohttpgateway.googleapis.com
  • www.google.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "android.clients.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "safebrowsingohttpgateway.googleapis.com"
    - "www.google.com"

See Network Configuration for more information.

💥 [THE END] — Illustrated by Smoke Claude · opus48 5.1M

@@ -0,0 +1,5 @@
---
"gh-aw": patch
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Smoke test review: changeset bump type looks correct (patch). ✅

"gh-aw": patch
---

Refactored the Copilot SDK driver into a standalone Node program launched by the harness with environment-based configuration.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Smoke test review: clear, concise changeset summary. Nice. 👍

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

Titles: Refactor copilot SDK driver into self-contained Node program | Add license string support in aw.yml manifest parsing and schema | [jsweep] Clean update_pr_description_helpers.cjs
Results: ✅ GitHub reads, ✅ mcpscripts, ✅ serena, ✅ playwright, ❌ web-fetch, ✅ file, ✅ bash, ✅ discussion, ✅ build, ✅ artifact, ❌ discussion-create, ✅ dispatch, ✅ review, ❌ memory, ✅ sub-agent, ✅ check-run
Overall: FAIL
Author: app/copilot-swe-agent
Assignees: pelikhan, Copilot

Warning

Firewall blocked 6 domains

The following domains were blocked by the firewall during workflow execution:

  • accounts.google.com
  • android.clients.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • safebrowsingohttpgateway.googleapis.com
  • www.google.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "android.clients.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "safebrowsingohttpgateway.googleapis.com"
    - "www.google.com"

See Network Configuration for more information.

📰 BREAKING: Report filed by Smoke Copilot · gpt54 8.8M ·

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants