Skip to content

Commit fcc2749

Browse files
committed
sandbox
1 parent 7a10caa commit fcc2749

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

GeminiSharpSDK.Tests/TestSupport/RealGeminiTestSandbox.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,9 @@ public ThreadOptions CreateThreadOptions(string model, bool ephemeral = false)
5757

5858
public void Dispose()
5959
{
60-
if (Directory.Exists(WorkingDirectory))
61-
{
62-
Directory.Delete(WorkingDirectory, recursive: true);
63-
}
60+
// Gemini CLI persists visited project directories in ~/.gemini/projects.json and may
61+
// re-read them later in the same test session. Keeping auth sandboxes on disk avoids
62+
// spurious "Directory does not exist" startup failures during full-suite runs.
6463
}
6564

6665
private static string ResolveRepositoryRootPath()

docs/Testing/strategy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Verify `ManagedCode.GeminiSharpSDK` behavior against real Gemini CLI contracts,
1919
- Cross-platform CI smoke also validates isolated-profile unauthenticated behavior through a headless prompt run, proving binary discovery + process launch without relying on local credentials.
2020
- Real integration runs must use existing Gemini CLI login/session; test harness does not use API key environment variables.
2121
- Auth-required real Gemini tests run under a shared parallel limiter so local full-suite execution does not deadlock or stall on concurrent headless CLI sessions.
22-
- Auth-required real Gemini thread/session tests must also run in unique git sandboxes under `tests/.sandbox/*` so persisted session state and resume behavior stay deterministic across the full suite.
22+
- Auth-required real Gemini thread/session tests must also run in unique git sandboxes under `tests/.sandbox/*` and keep those directories on disk for the duration of local test history, because Gemini CLI caches visited project paths in `~/.gemini/projects.json` and can fail later startup if a referenced sandbox disappears mid-suite.
2323
- Real integration model selection must be explicit: set `GEMINI_TEST_MODEL`, define `model` in `~/.gemini/config.toml`, or rely on a recent local Gemini session that already recorded the active model in the current profile.
2424
- Cover error paths and cancellation paths.
2525
- Keep protocol parser coverage for all supported event/item kinds.

0 commit comments

Comments
 (0)