Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions scripts/run_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,11 @@ def run(command, *, cwd=output, env=base_env, timeout=600) -> str:
runtime_paths = [runtime_bin, agent_bin, tool_bin]
if os.name == "nt":
system_root = Path(base_env["SYSTEMROOT"])
# Copilot's shell tool tries pwsh first; Windows PowerShell alone can miss its 40s
# startup probe on a cold runner and leave Copilot without a shell.
pwsh = shutil.which("pwsh", path=base_env.get("PATH"))
if "copilot" in agents and pwsh:
runtime_paths.append(Path(pwsh).parent)

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.

test · low
what happens if pwsh lives in a shared dir like %LOCALAPPDATA%\Microsoft\WindowsApps (Store install)? that puts every alias there on PATH, which breaks the isolation the tool_bin comment above relies on. can we link pwsh into tool_bin instead?

runtime_paths.extend(
[
system_root / "System32",
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_ug_copilot_headless.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def test_ug_copilot_headless_gpt_responses_task(live_session, workspace):
"--model",
CODEX_TEST_MODEL,
"-p",
task.prompt,
task.prompt_with_path,
*COPILOT_HEADLESS_FLAGS,
timeout=180,
)
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/test_ug_copilot_lifecycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def test_ug_configure_copilot_repeat_and_revert(live_session, workspace):
"--model",
CODEX_TEST_MODEL,
"-p",
task.prompt,
task.prompt_with_path,
*COPILOT_HEADLESS_FLAGS,
timeout=180,
)
Expand Down Expand Up @@ -261,7 +261,7 @@ def test_ug_copilot_upgrade_scrubs_token_saved_by_older_ug(live_session, workspa
"--model",
CODEX_TEST_MODEL,
"-p",
task.prompt,
task.prompt_with_path,
*COPILOT_HEADLESS_FLAGS,
timeout=180,
)
Expand Down
5 changes: 5 additions & 0 deletions tests/integration/utils/evidence.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ def __init__(self, session):
f"Read the local file {self.filename} in the current directory using a tool. "
"Reply with only its contents."
)
# Small models can drop path segments after a space when rebuilding the absolute path.
self.prompt_with_path = (
f"Read the local file {session.cwd / self.filename} using a tool. "
"Reply with only its contents."
)
self.delegate_prompt = (
f"Delegate this task to one subagent: read the local file {self.filename} in the "
"current directory using a tool and return its contents. Do not read the file "
Expand Down
Loading