From 38a0f4709c0edaffb288ff4d69003e2786354314 Mon Sep 17 00:00:00 2001 From: yetone Date: Tue, 6 Oct 2026 21:46:23 +0800 Subject: [PATCH] =?UTF-8?q?provider=20tests:=20the=20fake=20claude=20auth?= =?UTF-8?q?=20login=20ends=20once=20its=20test's=20folder=20is=20gone,=20r?= =?UTF-8?q?ather=20than=20polling=20for=20ever=20=E2=80=94=20a=20TestClaud?= =?UTF-8?q?eSignInByPaste=20run=20that=20ended=20without=20signing=20in=20?= =?UTF-8?q?left=20its=20fake=20looping=20every=2050ms=20for=202=20days=20(?= =?UTF-8?q?pid=20seen=2010-06,=20ppid=201).=20Its=20loop=20waits=20for=20t?= =?UTF-8?q?he=20callback's=20file=20or=20the=20pasted=20code,=20both=20in?= =?UTF-8?q?=20a=20TempDir=20the=20test=20removed,=20so=20neither=20ever=20?= =?UTF-8?q?came.=20Checked:=20the=20loop=20body=20exits=203=20after=20its?= =?UTF-8?q?=20folder=20is=20removed;=20TestClaudeSignIn*,=20TestClaudeSave?= =?UTF-8?q?dAccountDir=20pass=20-race=20-count=3D5.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/provider/signin_claude_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/provider/signin_claude_test.go b/internal/provider/signin_claude_test.go index fd5a7593c..6e105ec48 100644 --- a/internal/provider/signin_claude_test.go +++ b/internal/provider/signin_claude_test.go @@ -61,6 +61,9 @@ exec 3<&0 ( while read -r line; do echo "$line" >> "$CLAUDE_CONFIG_DIR/.pasted"; done ) <&3 >/dev/null 2>&1 & reader=$! while :; do + # a test that ended without signing in removed this folder: end, rather + # than poll for ever (one did for days after its run) + [ -d "${0%%/*}" ] || exit 3 [ -f '%s' ] && break grep -qx 'the-code#st' "$CLAUDE_CONFIG_DIR/.pasted" 2>/dev/null && break sleep 0.05