Repository navigation
test: align Claude adapter thread identity assertions - #243
dl-alexandre wants to merge 1 commit into
Conversation
|
@dl-alexandre is attempting to deploy a commit to the Ping Labs Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…work ended Sol's review of AIV-574 (P15, aiva-core pingdotgg#243): - A turn waiting on an approval when its account was renewed carried on in the same Claude process once approved, so its next model call met the revoked token (seen with the real CLI). Now, when a stale-token process has a model call refused (api_retry 401), the adapter asks a small worker (aiva/tokenHandover.ts, one layer in server.ts) to restart the turn in place, once per attempt: the approved tool has run by then and Claude Code waits on the refusal (CLAUDE_CODE_OAUTH_401_WAIT_MS), so the new attempt goes on with the new token. This also covers any other way a stale process reaches Claude mid-turn. - Reopening a stale-token process ends the background work it runs (the CLI's shells and subagents die with it). The turn it reopens for is now told what was cancelled, as t3's restart note does (same entries, its own reason), so the agent knows to restart it. Tests: ClaudeAdapterV2 (a refused current token asks for nothing, a refused old token for one restart; the reopened turn's prompt names its background shell); live in aiva-core hub/tests/claude_renewal_test.py. For aiva.14, to be rebuilt from this commit. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Fixes the failing CI assertions in ClaudeCodeAdapter.test.ts for PR #179.
Updates stale expectations to match current adapter behavior:
Validated locally:
Note
Align Claude adapter tests to assert external thread IDs and provider-native identifiers in ClaudeCodeAdapter.test.ts
Updates tests to assert
session.threadIdandturn.threadIdas external IDs viaString(...), expectthread.startedto includepayload.providerThreadId, and switch native observability checks fromevent.event.threadIdtoevent.event.providerThreadIdin ClaudeCodeAdapter.test.ts.📍Where to Start
Start with the test cases in ClaudeCodeAdapter.test.ts, focusing on expectations for
session.threadId,turn.threadId,thread.startedpayloads, and observability event assertions.Macroscope summarized 47ddb15.