gemini-cli PR fixes flaky test by mocking realpathSync in orphan PTY slave fd case
AbbasFullstack · ghdev · 2026-10-29
PR #30018 in google-gemini/gemini-cli fixes a flaky test: shellExecutionService.test.ts mocked statSync/fstatSync/closeSync from node:fs but not realpathSync, so closeOrphanSlaveFd hit the real implementation. On machines where /dev/ttys001 exists (any Mac with a second terminal open), the test took the /dev/fd comparison path instead of the intended rdev-only path.
The fix adds a hoisted mockRealpathSync wired into the existing mock, and makes the darwin test throw ENOENT so the rdev-only branch runs deterministically on every host. No production code changes; all 85 tests pass.
More from coding & agent
- LLM agents forecast with $500 budgets; GPT splurges, Grok/Kimi/GLM spend nothing — karinanguyen · 2026-10-29
- Dev shows GPT-6 Astra staging a JUCE recreation of the Roland TB-303 synth — kylegawley · 2026-10-29
- Espressif launches ESP-Mosaico: an ESP32-S31 kit built for vibe coding — songguoxiansen · 2026-10-29
- Dev shares design notes for a remote MCP server letting 20+ Claude projects share one board — mmmmjjjj1228 · 2026-10-29
- Dev post-trains Qwen3-4B into a tool-using agent: 66 MB llama.cpp LoRA runs on a Mac, val 0.51→0.83 — DesignerIsland5524 · 2026-10-29
- Dev builds read-only Grok Bot assistant that answers questions from your Mac screen and call history — bfrench · 2026-10-29