Skip to content

Commit 795fa72

Browse files
Rebase on newer runtime and harden Rust lifecycle E2E
Rebased this lifecycle/reliability branch onto current main, which now includes CLI 1.0.84-4 and additional in-process E2E stabilization. Retried the exact Rust/.NET Windows in-process cells that previously exposed native AccessViolation/SIGSEGV crashes; the newer runtime still reproduces the blocker, so keep those cells excluded and update the workflow comments with that fresh evidence. The full retry also exposed two small Rust Windows lifecycle fixture issues unrelated to the FFI shutdown fix: the stdio job-object containment test was running under the in-process matrix, and the PID-file waiter accepted an empty file before the fixture had finished writing the child process id. Skip that stdio-only test for in-process runs and wait for a parseable PID instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent d4ce415 commit 795fa72

3 files changed

Lines changed: 18 additions & 7 deletions

File tree

‎.github/workflows/dotnet-sdk-tests.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,8 @@ jobs:
196196
# ordinary connection I/O -- unrelated to shutdown/disposal, and independently
197197
# matched by a SIGSEGV in the Rust SDK's own Windows in-process CI in the same
198198
# PR. That rules out an SDK-side binding bug; tracked upstream at
199-
# github/copilot-agent-runtime#18990. Re-add windows-latest here once resolved.
199+
# github/copilot-agent-runtime#18990. Retrying after rebasing onto CLI 1.0.84-4
200+
# reproduced the same blocker, so re-add windows-latest here once resolved.
200201
runs-on: ${{ matrix.os }}
201202
# A hung test used to run until the runner died (~50 min) and the dying
202203
# runner never uploaded its logs, so the failures were undiagnosable.

‎.github/workflows/rust-sdk-tests.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,9 @@ jobs:
224224
# shared runtime cdylib rather than anything fixable from this SDK's
225225
# FFI bindings. An identical crash class (AccessViolationException)
226226
# was independently reproduced on Windows in-process in the .NET SDK
227-
# in the same PR, ruling out a per-language binding bug. Tracked
228-
# upstream at github/copilot-agent-runtime#18990; re-add
227+
# in the same PR, ruling out a per-language binding bug. Retrying
228+
# after rebasing onto CLI 1.0.84-4 reproduced the same blocker.
229+
# Tracked upstream at github/copilot-agent-runtime#18990; re-add
229230
# windows-latest here once that's resolved. See github/copilot-sdk#2525.
230231
os: [ubuntu-latest, macos-latest]
231232
runs-on: ${{ matrix.os }}

‎rust/tests/e2e/client_lifecycle.rs‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ use github_copilot_sdk::CliProgram;
33
use github_copilot_sdk::SessionLifecycleEventType;
44
use serde_json::json;
55

6+
#[cfg(windows)]
7+
use super::support::skip_inprocess;
68
use super::support::{wait_for_lifecycle_event, with_e2e_context};
79

810
#[tokio::test]
@@ -144,6 +146,10 @@ async fn dispose_disconnects_client_and_disposes_rpc_surface_drop() {
144146
#[cfg(windows)]
145147
#[tokio::test]
146148
async fn abrupt_host_termination_still_kills_cli_via_job_object() {
149+
if skip_inprocess("job-object containment is specific to the stdio CLI child process") {
150+
return;
151+
}
152+
147153
with_e2e_context(
148154
"client_lifecycle",
149155
"abrupt_host_termination_still_kills_cli_via_job_object",
@@ -226,14 +232,17 @@ async fn abrupt_host_termination_still_kills_cli_via_job_object() {
226232
#[cfg(windows)]
227233
async fn wait_for_pid_file_windows(path: &std::path::Path) -> u32 {
228234
super::support::wait_for_condition("host-crash fixture CLI pid file", || async {
229-
path.exists()
235+
std::fs::read_to_string(path)
236+
.ok()
237+
.and_then(|contents| contents.trim().parse::<u32>().ok())
238+
.is_some()
230239
})
231240
.await;
232-
std::fs::read_to_string(path)
233-
.expect("read host-crash fixture CLI pid")
241+
let contents = std::fs::read_to_string(path).expect("read host-crash fixture CLI pid");
242+
contents
234243
.trim()
235244
.parse()
236-
.expect("parse host-crash fixture CLI pid")
245+
.unwrap_or_else(|err| panic!("parse host-crash fixture CLI pid from {contents:?}: {err}"))
237246
}
238247

239248
#[cfg(windows)]

0 commit comments

Comments
 (0)