Ccopilot-cli-release-app[bot]Update SDK snapshot for Copilot CLI 1.0.106-7
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Update SDK snapshot for Copilot CLI 1.0.106-5 | 2 天前 | |
Moving files into the correct locations (#84) * Moving files into the correct locations * Fixing paths from move | 9 个月前 | |
Update SDK snapshot for Copilot CLI 1.0.106-1 | 4 天前 | |
Update SDK snapshot for Copilot CLI 1.0.103-0 | 14 天前 | |
Update SDK snapshot for Copilot CLI 1.0.106-5 | 2 天前 | |
Update SDK snapshot for Copilot CLI 1.0.98-2 | 22 天前 | |
Update SDK snapshot for Copilot CLI 1.0.106-5 | 2 天前 | |
Expand E2E test coverage across all 4 SDKs (#1186) * Greatly expand E2E test coverage and harden tests across all 4 SDKs Adds comprehensive end-to-end coverage of the SDK + Copilot CLI surface area across C#, Python, TypeScript, and Go, with the goal that every public API and every JSON-RPC method has at least one E2E test. Reorganizes the C# and Python test layouts to clearly separate unit and E2E tests, and adds `E2E` suffixes to test class/file names for clarity. What's added ------------ E2E coverage (parity across all 4 SDKs): - Session lifecycle: connect/disconnect, dispose semantics, multi-client scenarios, resume, force-stop, idle-then-suspend. - Session config: model selection (vision-enabled/disabled transitions), agent selection, allowed/denied tool sets, working directory, environment variables, system prompts, MCP servers. - RPC surface: agent (get/getCurrent/list/reload), session state (capabilities/getCurrent/getMetadata/list/reset), trust, model (get/getCurrent/list/setCurrent), permission (request/respond/list), hooks, plan, telemetry, command execute/elicit/respond. - Streaming: assistant.message_delta + reasoning_delta ordering and matching message IDs across delta and final events. - Suspend RPC: suspend during pending permission, suspend during pending external tool, suspend idle session, resume + continue conversation after suspend. - Hooks: pre/post tool, pre/post session, deny verification (asserts target file is unchanged after a deny). - Permissions: per-session auth tokens with auto-token opt-out for tests that explicitly verify the unauthenticated path. - GitHub references, attachments, custom request headers, trace context propagation. - Tool routing, command handlers, elicitation flow. Unit coverage: - Forward-compatibility for unknown discriminators and unknown event envelope types so unrecognized future events round-trip safely. Snapshot harness: - 100+ new YAML snapshots under `test/snapshots/` covering the new scenarios; existing snapshots normalized for portability. Test layout: - C# tests split into `dotnet/test/E2E/` and `dotnet/test/Unit/` folders; xUnit collection serializes E2E execution to avoid CLI process contention (with explanatory comment at the attribute site). - Python E2E tests live under `python/e2e/` with a shared harness proxy/context. `E2E` suffix added to classes/methods. - Go E2E tests use `_e2e_test.go` suffix and an `E2E` test-function suffix for clarity. - TypeScript E2E tests use `.e2e.test.ts` suffix; `createSdkTestContext` registers Vitest hooks that auto-stop `CopilotClient` and `CapiProxy`. What's fixed ------------ Snapshot drift root cause: - `test/harness/replayingCapiProxy.ts`: `writeCapturesToDisk` was called from both `updateConfig` and `stop` regardless of CI mode. When a test exercised only a subset of a multi-conversation snapshot, the file was silently rewritten with that subset, breaking later runs. Both writes are now guarded by `process.env.GITHUB_ACTIONS !== "true"`. `gh` CLI environment-dependent help text: - Added a `normalizeGhAuthMessages` tool result normalizer so the two forms of "auth required" help text emitted by `gh` (GitHub Actions vs. local dev) both map to a stable `\` placeholder before snapshot match. PerSessionAuth auto-token leak: - `dotnet/test/Harness/E2ETestContext.cs`: added an `autoInjectGitHubToken` parameter so `CreateAuthTestClient` can opt out of the CI auto-token injection that was silently authenticating tests verifying the unauthenticated path. Go SDK lifecycle and codegen: - Polling-based `waitForCapability` helper in `go/session_test.go` to replace race-prone fixed sleeps. - Telemetry marker constant aligned with snapshot. - Codegen / lifecycle bugs surfaced while porting C# E2E coverage. TypeScript cleanup hangs: - Replaced fixed `setTimeout` waits in lifecycle/session tests with bounded polling helpers (`waitFor` / `getLastSessionId` / `getSessionMetadata` polls). - Bumped the `should stop cleanly` test timeout to 60s to absorb slow-machine variability. Python: - `_wait_for` polling helper in `test_commands_and_elicitation.py` replaces flaky fixed sleeps. Verification ------------ Five consecutive full-suite runs across all 4 SDKs, all clean (the final run was executed with all 4 suites in parallel to confirm the fixes hold under contention): - C#: 319 passed / 0 failed / 4 skipped - Python: 356 passed / 0 failed / 8 skipped - TS: 328 passed / 0 failed / 9 skipped - Go: all packages ok Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: resolve CI failures in expanded E2E coverage - Format Node E2E test files with prettier (4 files: client_lifecycle, commands, session_fs, session_lifecycle). - Format/lint Python files with ruff: switched Callable import from typing to collections.abc in test_commands_and_elicitation.py; split a long comment in conftest.py to satisfy E501; removed unnecessary "r" open mode in test_hooks_e2e.py. - Resolve macOS /var -> /private/var symlinks in test harnesses so the paths match what spawned subprocesses see when they resolve their cwd: * Go: filepath.EvalSymlinks on home_dir / work_dir. * .NET: P/Invoke libc realpath (with CA2101-compliant marshaling) and a Windows fallback to Path.GetFullPath. * Python: os.path.realpath wrapping tempfile.mkdtemp in the shared E2ETestContext and in the per-test multi-client harnesses (test_commands_e2e, test_multi_client_e2e, test_ui_elicitation_multi_client_e2e). - Loosen per-session "no token" assertions in .NET and Python so they match Node/Go: in CI the process-level fake GITHUB_TOKEN can make IsAuthenticated true even without a per-session token, and the Login may surface as null/None on Linux/macOS but as an empty string on Windows. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: round 2 of CI fixes for expanded E2E coverage - StreamingFidelityE2ETests: lock around the events list in the three remaining streaming tests. Without locking, the event handler runs on the dispatcher thread and continues to append after SendAndWaitAsync returns, racing with the test thread's enumeration and producing "Collection was modified; enumeration operation may not execute". This mirrors the lock-and-snapshot pattern already used in the Should_Emit_AssistantMessageStart_Before_Deltas_With_Matching_MessageId test in the same file. - python/pyproject.toml: add opentelemetry-sdk to dev dependencies so test_telemetry_e2e.py::test_restores_w3c_trace_context can construct a real TracerProvider. The opentelemetry-api package alone provides the namespace package "opentelemetry" but not "opentelemetry.sdk". Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address CodeQL findings on E2E tests and harness - Bind awaited results in async helpers to silence `no-effect'' warnings (Python `await x` -> `_ = await x`). - Add explanatory comments to intentional `except ExceptionGroup: pass` blocks in test_rpc_server_e2e.py. - HookLifecycleAndOutputE2ETests: remove unused errorInputs container. - ClientOptionsE2ETests: dispose TcpListener via `using`. - RpcShellAndFleetE2ETests: simplify `Contains(...) == true` to a null-coalescing form. - SessionConfigE2ETests/SessionE2ETests: use `catch (Exception)` in `DisposeAsync` cleanup blocks instead of bare `catch`. - E2ETestContext.ResolveSymlinks: replace libc realpath/free P/Invoke with managed `DirectoryInfo.ResolveLinkTarget`-based component walk; preserves macOS `/var -> /private/var` resolution behavior. Also switches the fallback `catch` to typed exceptions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Use single-underscore discard for awaited results CodeQL flagged the named `_result`/`_captured_permission_request` discards as unused locals after the prior commit. Switch to the single-underscore convention, which CodeQL's py/unused-local-variable rule and ruff F841 both treat as an intentional discard. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Use Path.Join instead of Path.Combine to avoid silent-drop warnings CodeQL flags Path.Combine because if a later argument is rooted, it silently discards the earlier ones. Path.Join concatenates segments literally and is the safer choice for these cases. - E2ETestContext.ResolveSymlinks: use Path.Join when walking path components (the loop appends user-controlled directory names that realistically never start with a path separator on these temp dirs, but the safer API removes the risk regardless). - HooksE2ETests: use Path.Join for the protected-file lookup. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add cross-SDK E2E parity tests Add missing E2E coverage so suspend RPC, event fidelity, built-in tool smoke tests, error resilience, and multi-turn scenarios are represented across all SDKs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> | 6 个月前 | |
Update SDK snapshot for Copilot CLI 1.0.89-5 | 1 个月前 | |
Update SDK snapshot for Copilot CLI 1.0.106-5 | 2 天前 | |
Add sessionId to BYOK provider-token callback; rename to bearerTokenProvider (#1796) | 4 个月前 | |
Remove 'generated' from public API in Python and Rust (#1535) | 5 个月前 | |
Python SDK API review fixes (#1376) | 5 个月前 | |
Update SDK snapshot for Copilot CLI 1.0.101-0 | 16 天前 | |
Update SDK snapshot for Copilot CLI 1.0.101-0 | 16 天前 | |
Update SDK snapshot for Copilot CLI 1.0.103-0 | 14 天前 | |
Python SDK API review fixes (#1376) | 5 个月前 | |
Update SDK snapshot for Copilot CLI 1.0.106-7 | 1 天前 | |
Python SDK API review fixes (#1376) | 5 个月前 | |
Update SDK snapshot for Copilot CLI 1.0.101-0 | 16 天前 | |
Update SDK snapshot for Copilot CLI 1.0.106-1 | 4 天前 | |
test: update replay harness default to Claude Sonnet 5 (#2472) * test: update replay harness default to Claude Sonnet 5 Preserve explicit legacy-model replay while advertising a supported default in historical catalogs. Update synthetic C# catalogs, model-list expectations, and the model-specific rate-limit fixture. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test: preserve legacy selection in catalog and vision fixtures Advertise Sonnet 4.5 alongside the current default when no capture exists, and explicitly pin capability-toggle tests to their existing model so they do not switch model families mid-test. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test: use Sonnet 5 for both vision capability turns Migrate session creation and capability updates together across Node, Python, Go, and C#. Update the shared fixture catalogs without changing conversation captures. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 79d231f3-b08c-460b-89ec-c2abbd554368 * test: migrate all Sonnet 4.5 fixtures to Sonnet 5 Use Sonnet 5 consistently in test sessions, fake providers, assertions, and replay catalogs. Remove the legacy catalog compatibility shim and retain model-independent replay coverage using an arbitrary provider model. Conversation captures are not regenerated. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 79d231f3-b08c-460b-89ec-c2abbd554368 * test: fix migration formatting and fixture-authoring examples Apply Ruff and Spotless reflow after model identifiers shortened, and update Java snapshot-authoring templates to Sonnet 5 so new tests do not reintroduce the retired model. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 79d231f3-b08c-460b-89ec-c2abbd554368 * test: trim replay coverage to the Sonnet 5 default Keep missing and empty catalog default coverage and the existing cached catalog test; remove tests added for the deleted compatibility shim. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 79d231f3-b08c-460b-89ec-c2abbd554368 --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 79d231f3-b08c-460b-89ec-c2abbd554368 | 2 个月前 | |
Python SDK API review fixes (#1376) | 5 个月前 | |
Use Copilot CLI releases for Node runtime (#2463) * Use Copilot CLI releases for Node runtime Remove the Node SDK dependency on @github/copilot, pin the CLI release and checksums in the repository, and acquire verified platform runtime assets from GitHub Releases. Update packaging, code generation, tests, and cross-SDK version consumers to use the shared release pin. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Address CLI release runtime review findings Prepare the pinned runtime from Python, .NET, Go, and Rust E2E harnesses; preserve internal npm canaries; and centralize trusted release hashes for Node, Java, and Rust packaging. Update Rust pin validation and bundled runtime contents accordingly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Package CLI runtimes by platform Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Use release checksum manifests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Fix cross-platform release runtime CI Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Address release runtime code scanning Stream Java release archives directly into tar and document generated canary condition branches for CodeQL. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Fix release runtime CI regressions Preserve the npm runtime layout, use the legacy CLI for standalone extension tests, align the Python account test with current auth behavior, and remove a Go shutdown race. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Fix runtime packaging integration gaps Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Report early CLI exits consistently Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Retrigger PR checks Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Run npm packaging through Node Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Resolve runtime path analysis findings Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Address final runtime review findings Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Harden release packaging metadata Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Avoid unsafe runtime path combination Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Read pinned CLI version in all Rust jobs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Isolate legacy extension tests on macOS Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Address runtime packaging review feedback Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Split hanging macOS .NET test shard Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Timeout stalled CLI release downloads Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Isolate macOS permission test fixtures Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Isolate macOS RPC test fixtures Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Cancel blocked tools during resume tests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Use cross-target cancellation wait Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Stabilize cross-platform E2E cleanup Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Finish CLI runtime rebase Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Synchronize Go session event shutdown Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Stabilize event fidelity ordering checks Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Wait for disconnected tools to unregister Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 * Update rebased CLI release pin Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 --------- Copilot-Session: 3043824d-becf-4b5d-b62b-4754511894f7 | 2 个月前 | |
Update SDK snapshot for Copilot CLI 1.0.106-5 | 2 天前 | |
Update SDK snapshot for Copilot CLI 1.0.101-0 | 16 天前 | |
Update @github/copilot to 1.0.67 (#1860) * Update @github/copilot to 1.0.67 - Updated nodejs and test harness dependencies - Re-ran code generators - Formatted generated code * Fix hook tests for Copilot 1.0.67 Adapt hook E2E coverage to assert SDK callbacks are invoked now that the runtime accepts hook handlers. Include missing client-global RPC types generated from the updated schema. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update generated Go RPC comments Include experimental annotations emitted by the Go code generator for newly generated RPC types so generated-file verification stays clean. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix Python session FS rename overwrite Use Path.replace in the E2E provider so Windows can overwrite existing workspace metadata files when the runtime renames temporary files into place. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address hook review comments Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Stephen Toub <stoub@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> | 4 个月前 | |
Add userPromptTransformed hook to all SDKs (#2254) * Add user prompt transformed hook to all SDKs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address user prompt hook review feedback Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Complete hook registration examples Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Synchronize transformed hook test inputs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> | 2 个月前 | |
Update SDK snapshot for Copilot CLI 1.0.106-5 | 2 天前 | |
Update SDK snapshot for Copilot CLI 1.0.91-0 | 1 个月前 | |
Update SDK snapshot for Copilot CLI 1.0.106-5 | 2 天前 | |
Update SDK snapshot for Copilot CLI 1.0.106-5 | 2 天前 | |
Multitenancy hardening: Client Mode (#1428) | 5 个月前 | |
Update SDK snapshot for Copilot CLI 1.0.106-5 | 2 天前 | |
Update SDK snapshot for Copilot CLI 1.0.106-5 | 2 天前 | |
Add experimental multi-provider BYOK registry config across all six SDKs (#1718) * Add experimental multi-provider BYOK registry config across all six SDKs Surfaces the new named-provider / provider-model registry from copilot-agent-runtime#9864 (providers + models on session create/resume) in the .NET, Node, Python, Go, Rust, and Java SDKs. The whole feature is marked experimental in each language using that SDK's existing convention. Custom agents can now bind to provider-qualified BYOK model ids (e.g. "alpha/sonnet"), letting multiple providers, multiple models per provider, and agents/subagents coexist in one session and route inference to the right provider with the configured wire model and headers. Also adds end-to-end coverage for the surface in every SDK (shared replay snapshots under test/snapshots/multi_provider_registry), and exposes "model" on the Java hand-written rpc.AgentInfo so it matches the agent-info type in the other five SDKs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix formatting in multi-provider registry E2E tests Apply prettier (Node) and ruff format (Python) to the new multi-provider registry E2E test files so the format-check CI steps pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> | 4 个月前 | |
Remove 'generated' from public API in Python and Rust (#1535) | 5 个月前 | |
Update SDK snapshot for Copilot CLI 1.0.94-4 | 28 天前 | |
Update SDK snapshot for Copilot CLI 1.0.101-0 | 16 天前 | |
Update SDK snapshot for Copilot CLI 1.0.106-5 | 2 天前 | |
Update @github/copilot to 1.0.67 (#1860) * Update @github/copilot to 1.0.67 - Updated nodejs and test harness dependencies - Re-ran code generators - Formatted generated code * Fix hook tests for Copilot 1.0.67 Adapt hook E2E coverage to assert SDK callbacks are invoked now that the runtime accepts hook handlers. Include missing client-global RPC types generated from the updated schema. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update generated Go RPC comments Include experimental annotations emitted by the Go code generator for newly generated RPC types so generated-file verification stays clean. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix Python session FS rename overwrite Use Path.replace in the E2E provider so Windows can overwrite existing workspace metadata files when the runtime renames temporary files into place. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address hook review comments Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Stephen Toub <stoub@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> | 4 个月前 | |
Update SDK snapshot for Copilot CLI 1.0.90-6 | 1 个月前 | |
Update SDK snapshot for Copilot CLI 1.0.103-0 | 14 天前 | |
Expand cross-SDK scenario and RPC E2E coverage (#2724) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> | 1 个月前 | |
Fix session start subscription tests (#2737) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> | 1 个月前 | |
Expand cross-SDK scenario and RPC E2E coverage (#2724) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> | 1 个月前 | |
Update SDK snapshot for Copilot CLI 1.0.88-2 | 1 个月前 | |
Fix session start subscription tests (#2737) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> | 1 个月前 | |
Update SDK snapshot for Copilot CLI 1.0.106-1 | 4 天前 | |
Update SDK snapshot for Copilot CLI 1.0.106-5 | 2 天前 | |
Update SDK snapshot for Copilot CLI 1.0.106-5 | 2 天前 | |
Update @github/copilot to 1.0.76-5 (#2140) * Update @github/copilot to 1.0.76-5 - Updated nodejs and test harness dependencies - Re-ran code generators - Formatted generated code * Fix SDK compatibility with Copilot 1.0.76-5 Update protocol generators and handwritten adapters for the latest RPC schema, including session filesystem SQLite transactions and newly required request fields. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7b5e2763-c535-4d58-bd7d-409c5d27c448 * Preserve SDK compatibility in Copilot update Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7b5e2763-c535-4d58-bd7d-409c5d27c448 * Format SessionFs transaction changes Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7b5e2763-c535-4d58-bd7d-409c5d27c448 * Fix Windows shell timeout test timing Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7b5e2763-c535-4d58-bd7d-409c5d27c448 * Apply nightly Rust formatting Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7b5e2763-c535-4d58-bd7d-409c5d27c448 --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Mackinnon Buck <mackinnon.buck@gmail.com> Copilot-Session: 7b5e2763-c535-4d58-bd7d-409c5d27c448 | 3 个月前 | |
Fix SDK test completion races and timeout cleanup (#2642) * Fix approve-all permission test event subscription race Subscribe before sending the permission E2E prompt so an ephemeral session.idle cannot be lost. Exercise the shared scenario against fake RPC with idle before and after the send reply, reusing the abort regression event fence and preserving the 120-second E2E timeout. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Eliminate remaining .NET test completion subscription races Replace post-send history-backfill waits with a send-and-wait helper that preserves the 120-second budget and requires a current-turn assistant message. Keep SendAsync under test with pre-armed completion observation. Exercise the shared helper with early events and reject missing or previous-turn-only answers. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Make Node test completion subscriptions race-free Replace unsafe post-send waits with sendAndWait or a trigger-based helper that subscribes before work starts. Remove ephemeral-idle history fallback, retain send behavior assertions and test budgets, and add deterministic early-event and cleanup regressions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Pre-arm Go test completion and recovery subscriptions Separate live event waiters from reads of already-completed history. Install listeners synchronously before sends, handler release, and abort/recovery operations; preserve caller contexts and required assistant output. Add deterministic fake-RPC regressions with ephemeral idle omitted from history. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Close Python test completion and scheduled-listener races Use send_and_wait for ordinary turns and synchronously subscribe before sends, aborts, and pending-work operations. Remove ephemeral-idle backfill, retain per-caller timeouts and error policies, and cover early RPC completion plus cancellation cleanup without initializing E2E runtime from unit tests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Wait for controlled Node send RPC before completing it CI exposed five regression fixtures completing a fake send before trace-context setup reached the RPC handler. Await the existing sendStarted fence so the RPC resolver is installed before delivering its response, without sleeps or timeout changes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Preserve Python timeout diagnostics before async cleanup Capture suspended await chains, pending RPC metadata, session and transport state, and Python thread stacks at the original pytest-timeout signal. Sample native threads for macOS in-process failures and preserve evidence in xdist reports and CI artifacts without changing timeout or failure semantics. Add deterministic diagnostic regressions and subprocess coverage for xdist reporting, including real POSIX signal timeouts during test calls and fixture teardown. Generated by Copilot Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Add opt-in fail-first Python timeout reproduction dispatch Keep ordinary PR and reusable checks unchanged. The manual reproduce_timeout input selects a single macOS/inprocess job, runs up to five complete pytest/xdist suites, and exits on the first failure with its original status and existing diagnostic artifacts. Preserve the 20-minute job budget. Validated extracted shell syntax and injected failures on invocations 1, 3, and 5, plus the five-success path. Generated by Copilot Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Cancel abandoned Python test task after recording its timeout pytest-timeout's signal interrupts run_until_complete without cancelling the test coroutine. Its held session disconnect lock can then block module cleanup. Identify exactly that task from the interrupted runner's traceback and schedule cancellation after preserving diagnostics; do not cancel unrelated tasks, force-stop the runtime, or hide the first failure. Add actual-plugin/module-fixture regressions for lock-only cleanup recovery and a still-unresponsive runtime. Both retain the original failed test; the latter still reports teardown failure. POSIX uses the real signal timer and Windows invokes the same plugin handler at the event-loop boundary. Generated by Copilot Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Bound Python timeout reproduction scopes within the job budget Limit the full-suite diagnostic scope to two invocations and add an allowlisted session-config scope with ten invocations. Preserve pytest/xdist options and stop at the first nonzero status. Record started/completed invocations, only mark complete after all pass, and attempt diagnostic artifact upload even after cancellation. Ordinary PR/reusable tests and the 20-minute budgets are unchanged. Validated extracted shell syntax, both count limits, first/middle/last failures, exit 130, process interruption, and rejection of unsupported targets. Generated by Copilot Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Preserve bounded macOS .NET hang diagnostics Keep the existing dotnet test command and its selection unchanged. Record allowlisted build/runtime/test/shutdown progress and owned process metadata, then collect bounded native stack samples and terminate only the owned process group before the job deadline. Retain artifacts on failure, cancellation, and successful diagnostic controls. Add focused watchdog regressions including macOS sampling and POSIX pipe-retention cleanup. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Capture Go and Windows .NET hangs before CI deadlines Retain goroutine and bounded managed/native stack evidence before the outer job timeout. Reuse the watchdog with owned Windows Job Object cleanup and preserve test selection, assertions, timeouts, and original failures. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Complete the Python persisted-session fixture before cleanup Use the existing synthetic inference response helpers and observe the completed turn before saving and listing session metadata. Preserve nonempty discriminator assertions and always stop the per-test client when detach fails. Add shared-scenario ordering and cleanup controls. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Remove investigation-only CI instrumentation Restore all three SDK workflows to the PR base and remove the now-unused .NET and Go watchdogs, stack collectors, diagnostic TestMain, supporting tests and documentation. Remove the Python manual reproduction dispatch documentation. Keep the completion fixes, Python interrupted-task cleanup and their regression coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> | 1 个月前 | |
Update SDK snapshot for Copilot CLI 1.0.92-3 | 1 个月前 | |
Update SDK snapshot for Copilot CLI 1.0.93-0 | 30 天前 | |
Remove 'generated' from public API in Python and Rust (#1535) | 5 个月前 | |
Stabilize Python streaming resume E2E test (#2597) * Stabilize Python streaming resume E2E test Wait for the detached session lock to release before cold-resuming it from a new CLI process, avoiding a timing race in merge-queue runs. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Cover both Python streaming resume paths Reuse the session-lock release wait before every cold-resume path in the streaming fidelity E2E test. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> | 1 个月前 | |
Update SDK snapshot for Copilot CLI 1.0.99-3 | 19 天前 | |
Update SDK snapshot for Copilot CLI 1.0.106-5 | 2 天前 | |
Remove 'generated' from public API in Python and Rust (#1535) | 5 个月前 | |
Add preamble section and preserve action to SDKs (#1713) * Add preamble section and preserve action to SDKs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add E2E test for replaced preamble section across SDKs Adds a 'should_use_replaced_preamble_section_in_response' E2E test to all six SDKs (Node, Go, Python, .NET, Java, Rust) exercising the new 'preamble' section ID end-to-end, with a shared replay snapshot. Updates the Java SystemMessageSections constant-count assertion from 11 to 12. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Align getting-started unknown-section docs with SDK READMEs Remove the unsupported 'a warning is emitted' claim from the system message customization section so it matches the silent-fallback behavior documented in the language READMEs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix Ruff E501 line-length in preamble E2E test docstring The new preamble test docstring exceeded the 100-char limit, failing 'ruff check' in the Python SDK Tests CI job across all platforms. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add SectionPreamble to go/README SystemMessage keys list The SystemMessage parameter-reference table's inline section-constant list still started at SectionIdentity. Add SectionPreamble so it matches the dedicated 'Available section constants' list and the other SDKs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> | 4 个月前 | |
Expand E2E test coverage across all 4 SDKs (#1186) * Greatly expand E2E test coverage and harden tests across all 4 SDKs Adds comprehensive end-to-end coverage of the SDK + Copilot CLI surface area across C#, Python, TypeScript, and Go, with the goal that every public API and every JSON-RPC method has at least one E2E test. Reorganizes the C# and Python test layouts to clearly separate unit and E2E tests, and adds `E2E` suffixes to test class/file names for clarity. What's added ------------ E2E coverage (parity across all 4 SDKs): - Session lifecycle: connect/disconnect, dispose semantics, multi-client scenarios, resume, force-stop, idle-then-suspend. - Session config: model selection (vision-enabled/disabled transitions), agent selection, allowed/denied tool sets, working directory, environment variables, system prompts, MCP servers. - RPC surface: agent (get/getCurrent/list/reload), session state (capabilities/getCurrent/getMetadata/list/reset), trust, model (get/getCurrent/list/setCurrent), permission (request/respond/list), hooks, plan, telemetry, command execute/elicit/respond. - Streaming: assistant.message_delta + reasoning_delta ordering and matching message IDs across delta and final events. - Suspend RPC: suspend during pending permission, suspend during pending external tool, suspend idle session, resume + continue conversation after suspend. - Hooks: pre/post tool, pre/post session, deny verification (asserts target file is unchanged after a deny). - Permissions: per-session auth tokens with auto-token opt-out for tests that explicitly verify the unauthenticated path. - GitHub references, attachments, custom request headers, trace context propagation. - Tool routing, command handlers, elicitation flow. Unit coverage: - Forward-compatibility for unknown discriminators and unknown event envelope types so unrecognized future events round-trip safely. Snapshot harness: - 100+ new YAML snapshots under `test/snapshots/` covering the new scenarios; existing snapshots normalized for portability. Test layout: - C# tests split into `dotnet/test/E2E/` and `dotnet/test/Unit/` folders; xUnit collection serializes E2E execution to avoid CLI process contention (with explanatory comment at the attribute site). - Python E2E tests live under `python/e2e/` with a shared harness proxy/context. `E2E` suffix added to classes/methods. - Go E2E tests use `_e2e_test.go` suffix and an `E2E` test-function suffix for clarity. - TypeScript E2E tests use `.e2e.test.ts` suffix; `createSdkTestContext` registers Vitest hooks that auto-stop `CopilotClient` and `CapiProxy`. What's fixed ------------ Snapshot drift root cause: - `test/harness/replayingCapiProxy.ts`: `writeCapturesToDisk` was called from both `updateConfig` and `stop` regardless of CI mode. When a test exercised only a subset of a multi-conversation snapshot, the file was silently rewritten with that subset, breaking later runs. Both writes are now guarded by `process.env.GITHUB_ACTIONS !== "true"`. `gh` CLI environment-dependent help text: - Added a `normalizeGhAuthMessages` tool result normalizer so the two forms of "auth required" help text emitted by `gh` (GitHub Actions vs. local dev) both map to a stable `\` placeholder before snapshot match. PerSessionAuth auto-token leak: - `dotnet/test/Harness/E2ETestContext.cs`: added an `autoInjectGitHubToken` parameter so `CreateAuthTestClient` can opt out of the CI auto-token injection that was silently authenticating tests verifying the unauthenticated path. Go SDK lifecycle and codegen: - Polling-based `waitForCapability` helper in `go/session_test.go` to replace race-prone fixed sleeps. - Telemetry marker constant aligned with snapshot. - Codegen / lifecycle bugs surfaced while porting C# E2E coverage. TypeScript cleanup hangs: - Replaced fixed `setTimeout` waits in lifecycle/session tests with bounded polling helpers (`waitFor` / `getLastSessionId` / `getSessionMetadata` polls). - Bumped the `should stop cleanly` test timeout to 60s to absorb slow-machine variability. Python: - `_wait_for` polling helper in `test_commands_and_elicitation.py` replaces flaky fixed sleeps. Verification ------------ Five consecutive full-suite runs across all 4 SDKs, all clean (the final run was executed with all 4 suites in parallel to confirm the fixes hold under contention): - C#: 319 passed / 0 failed / 4 skipped - Python: 356 passed / 0 failed / 8 skipped - TS: 328 passed / 0 failed / 9 skipped - Go: all packages ok Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: resolve CI failures in expanded E2E coverage - Format Node E2E test files with prettier (4 files: client_lifecycle, commands, session_fs, session_lifecycle). - Format/lint Python files with ruff: switched Callable import from typing to collections.abc in test_commands_and_elicitation.py; split a long comment in conftest.py to satisfy E501; removed unnecessary "r" open mode in test_hooks_e2e.py. - Resolve macOS /var -> /private/var symlinks in test harnesses so the paths match what spawned subprocesses see when they resolve their cwd: * Go: filepath.EvalSymlinks on home_dir / work_dir. * .NET: P/Invoke libc realpath (with CA2101-compliant marshaling) and a Windows fallback to Path.GetFullPath. * Python: os.path.realpath wrapping tempfile.mkdtemp in the shared E2ETestContext and in the per-test multi-client harnesses (test_commands_e2e, test_multi_client_e2e, test_ui_elicitation_multi_client_e2e). - Loosen per-session "no token" assertions in .NET and Python so they match Node/Go: in CI the process-level fake GITHUB_TOKEN can make IsAuthenticated true even without a per-session token, and the Login may surface as null/None on Linux/macOS but as an empty string on Windows. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: round 2 of CI fixes for expanded E2E coverage - StreamingFidelityE2ETests: lock around the events list in the three remaining streaming tests. Without locking, the event handler runs on the dispatcher thread and continues to append after SendAndWaitAsync returns, racing with the test thread's enumeration and producing "Collection was modified; enumeration operation may not execute". This mirrors the lock-and-snapshot pattern already used in the Should_Emit_AssistantMessageStart_Before_Deltas_With_Matching_MessageId test in the same file. - python/pyproject.toml: add opentelemetry-sdk to dev dependencies so test_telemetry_e2e.py::test_restores_w3c_trace_context can construct a real TracerProvider. The opentelemetry-api package alone provides the namespace package "opentelemetry" but not "opentelemetry.sdk". Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address CodeQL findings on E2E tests and harness - Bind awaited results in async helpers to silence `no-effect'' warnings (Python `await x` -> `_ = await x`). - Add explanatory comments to intentional `except ExceptionGroup: pass` blocks in test_rpc_server_e2e.py. - HookLifecycleAndOutputE2ETests: remove unused errorInputs container. - ClientOptionsE2ETests: dispose TcpListener via `using`. - RpcShellAndFleetE2ETests: simplify `Contains(...) == true` to a null-coalescing form. - SessionConfigE2ETests/SessionE2ETests: use `catch (Exception)` in `DisposeAsync` cleanup blocks instead of bare `catch`. - E2ETestContext.ResolveSymlinks: replace libc realpath/free P/Invoke with managed `DirectoryInfo.ResolveLinkTarget`-based component walk; preserves macOS `/var -> /private/var` resolution behavior. Also switches the fallback `catch` to typed exceptions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Use single-underscore discard for awaited results CodeQL flagged the named `_result`/`_captured_permission_request` discards as unused locals after the prior commit. Switch to the single-underscore convention, which CodeQL's py/unused-local-variable rule and ruff F841 both treat as an intentional discard. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Use Path.Join instead of Path.Combine to avoid silent-drop warnings CodeQL flags Path.Combine because if a later argument is rooted, it silently discards the earlier ones. Path.Join concatenates segments literally and is the safer choice for these cases. - E2ETestContext.ResolveSymlinks: use Path.Join when walking path components (the loop appends user-controlled directory names that realistically never start with a path separator on these temp dirs, but the safer API removes the risk regardless). - HooksE2ETests: use Path.Join for the protected-file lookup. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add cross-SDK E2E parity tests Add missing E2E coverage so suspend RPC, event fidelity, built-in tool smoke tests, error resilience, and multi-turn scenarios are represented across all SDKs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> | 6 个月前 | |
Update SDK snapshot for Copilot CLI 1.0.106-1 | 4 天前 | |
Fix SDK test completion races and timeout cleanup (#2642) * Fix approve-all permission test event subscription race Subscribe before sending the permission E2E prompt so an ephemeral session.idle cannot be lost. Exercise the shared scenario against fake RPC with idle before and after the send reply, reusing the abort regression event fence and preserving the 120-second E2E timeout. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Eliminate remaining .NET test completion subscription races Replace post-send history-backfill waits with a send-and-wait helper that preserves the 120-second budget and requires a current-turn assistant message. Keep SendAsync under test with pre-armed completion observation. Exercise the shared helper with early events and reject missing or previous-turn-only answers. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Make Node test completion subscriptions race-free Replace unsafe post-send waits with sendAndWait or a trigger-based helper that subscribes before work starts. Remove ephemeral-idle history fallback, retain send behavior assertions and test budgets, and add deterministic early-event and cleanup regressions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Pre-arm Go test completion and recovery subscriptions Separate live event waiters from reads of already-completed history. Install listeners synchronously before sends, handler release, and abort/recovery operations; preserve caller contexts and required assistant output. Add deterministic fake-RPC regressions with ephemeral idle omitted from history. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Close Python test completion and scheduled-listener races Use send_and_wait for ordinary turns and synchronously subscribe before sends, aborts, and pending-work operations. Remove ephemeral-idle backfill, retain per-caller timeouts and error policies, and cover early RPC completion plus cancellation cleanup without initializing E2E runtime from unit tests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Wait for controlled Node send RPC before completing it CI exposed five regression fixtures completing a fake send before trace-context setup reached the RPC handler. Await the existing sendStarted fence so the RPC resolver is installed before delivering its response, without sleeps or timeout changes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Preserve Python timeout diagnostics before async cleanup Capture suspended await chains, pending RPC metadata, session and transport state, and Python thread stacks at the original pytest-timeout signal. Sample native threads for macOS in-process failures and preserve evidence in xdist reports and CI artifacts without changing timeout or failure semantics. Add deterministic diagnostic regressions and subprocess coverage for xdist reporting, including real POSIX signal timeouts during test calls and fixture teardown. Generated by Copilot Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Add opt-in fail-first Python timeout reproduction dispatch Keep ordinary PR and reusable checks unchanged. The manual reproduce_timeout input selects a single macOS/inprocess job, runs up to five complete pytest/xdist suites, and exits on the first failure with its original status and existing diagnostic artifacts. Preserve the 20-minute job budget. Validated extracted shell syntax and injected failures on invocations 1, 3, and 5, plus the five-success path. Generated by Copilot Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Cancel abandoned Python test task after recording its timeout pytest-timeout's signal interrupts run_until_complete without cancelling the test coroutine. Its held session disconnect lock can then block module cleanup. Identify exactly that task from the interrupted runner's traceback and schedule cancellation after preserving diagnostics; do not cancel unrelated tasks, force-stop the runtime, or hide the first failure. Add actual-plugin/module-fixture regressions for lock-only cleanup recovery and a still-unresponsive runtime. Both retain the original failed test; the latter still reports teardown failure. POSIX uses the real signal timer and Windows invokes the same plugin handler at the event-loop boundary. Generated by Copilot Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Bound Python timeout reproduction scopes within the job budget Limit the full-suite diagnostic scope to two invocations and add an allowlisted session-config scope with ten invocations. Preserve pytest/xdist options and stop at the first nonzero status. Record started/completed invocations, only mark complete after all pass, and attempt diagnostic artifact upload even after cancellation. Ordinary PR/reusable tests and the 20-minute budgets are unchanged. Validated extracted shell syntax, both count limits, first/middle/last failures, exit 130, process interruption, and rejection of unsupported targets. Generated by Copilot Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Preserve bounded macOS .NET hang diagnostics Keep the existing dotnet test command and its selection unchanged. Record allowlisted build/runtime/test/shutdown progress and owned process metadata, then collect bounded native stack samples and terminate only the owned process group before the job deadline. Retain artifacts on failure, cancellation, and successful diagnostic controls. Add focused watchdog regressions including macOS sampling and POSIX pipe-retention cleanup. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Capture Go and Windows .NET hangs before CI deadlines Retain goroutine and bounded managed/native stack evidence before the outer job timeout. Reuse the watchdog with owned Windows Job Object cleanup and preserve test selection, assertions, timeouts, and original failures. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Complete the Python persisted-session fixture before cleanup Use the existing synthetic inference response helpers and observe the completed turn before saving and listing session metadata. Preserve nonempty discriminator assertions and always stop the per-test client when detach fails. Add shared-scenario ordering and cleanup controls. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Remove investigation-only CI instrumentation Restore all three SDK workflows to the PR base and remove the now-unused .NET and Go watchdogs, stack collectors, diagnostic TestMain, supporting tests and documentation. Remove the Python manual reproduction dispatch documentation. Keep the completion fixes, Python interrupted-task cleanup and their regression coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> | 1 个月前 | |
Update SDK snapshot for Copilot CLI 1.0.92-4 | 1 个月前 | |
Expand E2E test coverage across all 4 SDKs (#1186) * Greatly expand E2E test coverage and harden tests across all 4 SDKs Adds comprehensive end-to-end coverage of the SDK + Copilot CLI surface area across C#, Python, TypeScript, and Go, with the goal that every public API and every JSON-RPC method has at least one E2E test. Reorganizes the C# and Python test layouts to clearly separate unit and E2E tests, and adds `E2E` suffixes to test class/file names for clarity. What's added ------------ E2E coverage (parity across all 4 SDKs): - Session lifecycle: connect/disconnect, dispose semantics, multi-client scenarios, resume, force-stop, idle-then-suspend. - Session config: model selection (vision-enabled/disabled transitions), agent selection, allowed/denied tool sets, working directory, environment variables, system prompts, MCP servers. - RPC surface: agent (get/getCurrent/list/reload), session state (capabilities/getCurrent/getMetadata/list/reset), trust, model (get/getCurrent/list/setCurrent), permission (request/respond/list), hooks, plan, telemetry, command execute/elicit/respond. - Streaming: assistant.message_delta + reasoning_delta ordering and matching message IDs across delta and final events. - Suspend RPC: suspend during pending permission, suspend during pending external tool, suspend idle session, resume + continue conversation after suspend. - Hooks: pre/post tool, pre/post session, deny verification (asserts target file is unchanged after a deny). - Permissions: per-session auth tokens with auto-token opt-out for tests that explicitly verify the unauthenticated path. - GitHub references, attachments, custom request headers, trace context propagation. - Tool routing, command handlers, elicitation flow. Unit coverage: - Forward-compatibility for unknown discriminators and unknown event envelope types so unrecognized future events round-trip safely. Snapshot harness: - 100+ new YAML snapshots under `test/snapshots/` covering the new scenarios; existing snapshots normalized for portability. Test layout: - C# tests split into `dotnet/test/E2E/` and `dotnet/test/Unit/` folders; xUnit collection serializes E2E execution to avoid CLI process contention (with explanatory comment at the attribute site). - Python E2E tests live under `python/e2e/` with a shared harness proxy/context. `E2E` suffix added to classes/methods. - Go E2E tests use `_e2e_test.go` suffix and an `E2E` test-function suffix for clarity. - TypeScript E2E tests use `.e2e.test.ts` suffix; `createSdkTestContext` registers Vitest hooks that auto-stop `CopilotClient` and `CapiProxy`. What's fixed ------------ Snapshot drift root cause: - `test/harness/replayingCapiProxy.ts`: `writeCapturesToDisk` was called from both `updateConfig` and `stop` regardless of CI mode. When a test exercised only a subset of a multi-conversation snapshot, the file was silently rewritten with that subset, breaking later runs. Both writes are now guarded by `process.env.GITHUB_ACTIONS !== "true"`. `gh` CLI environment-dependent help text: - Added a `normalizeGhAuthMessages` tool result normalizer so the two forms of "auth required" help text emitted by `gh` (GitHub Actions vs. local dev) both map to a stable `\` placeholder before snapshot match. PerSessionAuth auto-token leak: - `dotnet/test/Harness/E2ETestContext.cs`: added an `autoInjectGitHubToken` parameter so `CreateAuthTestClient` can opt out of the CI auto-token injection that was silently authenticating tests verifying the unauthenticated path. Go SDK lifecycle and codegen: - Polling-based `waitForCapability` helper in `go/session_test.go` to replace race-prone fixed sleeps. - Telemetry marker constant aligned with snapshot. - Codegen / lifecycle bugs surfaced while porting C# E2E coverage. TypeScript cleanup hangs: - Replaced fixed `setTimeout` waits in lifecycle/session tests with bounded polling helpers (`waitFor` / `getLastSessionId` / `getSessionMetadata` polls). - Bumped the `should stop cleanly` test timeout to 60s to absorb slow-machine variability. Python: - `_wait_for` polling helper in `test_commands_and_elicitation.py` replaces flaky fixed sleeps. Verification ------------ Five consecutive full-suite runs across all 4 SDKs, all clean (the final run was executed with all 4 suites in parallel to confirm the fixes hold under contention): - C#: 319 passed / 0 failed / 4 skipped - Python: 356 passed / 0 failed / 8 skipped - TS: 328 passed / 0 failed / 9 skipped - Go: all packages ok Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: resolve CI failures in expanded E2E coverage - Format Node E2E test files with prettier (4 files: client_lifecycle, commands, session_fs, session_lifecycle). - Format/lint Python files with ruff: switched Callable import from typing to collections.abc in test_commands_and_elicitation.py; split a long comment in conftest.py to satisfy E501; removed unnecessary "r" open mode in test_hooks_e2e.py. - Resolve macOS /var -> /private/var symlinks in test harnesses so the paths match what spawned subprocesses see when they resolve their cwd: * Go: filepath.EvalSymlinks on home_dir / work_dir. * .NET: P/Invoke libc realpath (with CA2101-compliant marshaling) and a Windows fallback to Path.GetFullPath. * Python: os.path.realpath wrapping tempfile.mkdtemp in the shared E2ETestContext and in the per-test multi-client harnesses (test_commands_e2e, test_multi_client_e2e, test_ui_elicitation_multi_client_e2e). - Loosen per-session "no token" assertions in .NET and Python so they match Node/Go: in CI the process-level fake GITHUB_TOKEN can make IsAuthenticated true even without a per-session token, and the Login may surface as null/None on Linux/macOS but as an empty string on Windows. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: round 2 of CI fixes for expanded E2E coverage - StreamingFidelityE2ETests: lock around the events list in the three remaining streaming tests. Without locking, the event handler runs on the dispatcher thread and continues to append after SendAndWaitAsync returns, racing with the test thread's enumeration and producing "Collection was modified; enumeration operation may not execute". This mirrors the lock-and-snapshot pattern already used in the Should_Emit_AssistantMessageStart_Before_Deltas_With_Matching_MessageId test in the same file. - python/pyproject.toml: add opentelemetry-sdk to dev dependencies so test_telemetry_e2e.py::test_restores_w3c_trace_context can construct a real TracerProvider. The opentelemetry-api package alone provides the namespace package "opentelemetry" but not "opentelemetry.sdk". Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address CodeQL findings on E2E tests and harness - Bind awaited results in async helpers to silence `no-effect'' warnings (Python `await x` -> `_ = await x`). - Add explanatory comments to intentional `except ExceptionGroup: pass` blocks in test_rpc_server_e2e.py. - HookLifecycleAndOutputE2ETests: remove unused errorInputs container. - ClientOptionsE2ETests: dispose TcpListener via `using`. - RpcShellAndFleetE2ETests: simplify `Contains(...) == true` to a null-coalescing form. - SessionConfigE2ETests/SessionE2ETests: use `catch (Exception)` in `DisposeAsync` cleanup blocks instead of bare `catch`. - E2ETestContext.ResolveSymlinks: replace libc realpath/free P/Invoke with managed `DirectoryInfo.ResolveLinkTarget`-based component walk; preserves macOS `/var -> /private/var` resolution behavior. Also switches the fallback `catch` to typed exceptions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Use single-underscore discard for awaited results CodeQL flagged the named `_result`/`_captured_permission_request` discards as unused locals after the prior commit. Switch to the single-underscore convention, which CodeQL's py/unused-local-variable rule and ruff F841 both treat as an intentional discard. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Use Path.Join instead of Path.Combine to avoid silent-drop warnings CodeQL flags Path.Combine because if a later argument is rooted, it silently discards the earlier ones. Path.Join concatenates segments literally and is the safer choice for these cases. - E2ETestContext.ResolveSymlinks: use Path.Join when walking path components (the loop appends user-controlled directory names that realistically never start with a path separator on these temp dirs, but the safer API removes the risk regardless). - HooksE2ETests: use Path.Join for the protected-file lookup. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add cross-SDK E2E parity tests Add missing E2E coverage so suspend RPC, event fidelity, built-in tool smoke tests, error resilience, and multi-turn scenarios are represented across all SDKs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> | 6 个月前 | |
Remove 'generated' from public API in Python and Rust (#1535) | 5 个月前 | |
Preserve image replay compatibility across CLI image limits (#2670) * Restore image replay histories across CLI image limits Restore authentic image-bearing recordings alongside exact one-image histories needed by the SDK-pinned CLI. Add strict HTTP replay coverage for both histories, completion, and rejected unrecorded image content. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Preserve strict subagent replay across notification orders Keep both legal completion-notification histories without changing hooks or matching. Require the final subagent answer followed by idle, and add scoped elapsed diagnostics for the still-unclassified resume timeout. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Retain native process evidence for Python timeouts Discover independently owned CLI processes in pending test frames and retain failure-only diagnostics from both Python CI matrices. Preserve existing failures and test commands while collecting the native evidence needed to diagnose stalled session.resume responses. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Publish the Rust host-crash fixture PID atomically Write and close a sibling file before publishing the readiness path. This prevents the lifecycle test from observing an empty or partial PID before terminating the host. Keep the process-liveness assertions and deadlines unchanged, and cover complete publication and failed writes with deterministic filesystem regressions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Isolate Go in-process E2E environments Run each in-process E2E test in a fresh worker and isolate multi-context subtests before starting native hosts. Keep the public in-process Env rejection unchanged while preventing native threads from racing process environment restoration. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> | 1 个月前 |