mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-18 06:15:51 +00:00
fix: 修复 4 个测试失败(路径规范化、SDK 签名变更、空消息防护)
- projectContext.test.ts: 使用 realpathSync 处理 macOS /var→/private/var 符号链接 - bedrockClient.test.ts: 适配 Bedrock SDK v0.80 Bearer 认证(原 AWS4-HMAC-SHA256) - bridge.ts: forwardSessionUpdates 添加 null guard 防止空消息导致 TypeError Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -111,7 +111,12 @@ describe('BedrockClient.buildRequest body.anthropic_beta cleanup', () => {
|
||||
const c = get()
|
||||
expect(c).not.toBeNull()
|
||||
expect(c!.headers.authorization).toBeDefined()
|
||||
expect(c!.headers.authorization.startsWith('AWS4-HMAC-SHA256')).toBe(true)
|
||||
// SDK >= 0.80 uses Bearer auth; older versions used AWS4-HMAC-SHA256 SigV4.
|
||||
// Either way the header must be present (i.e. signing was not broken).
|
||||
expect(
|
||||
c!.headers.authorization!.startsWith('AWS4-HMAC-SHA256') ||
|
||||
c!.headers.authorization!.startsWith('Bearer '),
|
||||
).toBe(true)
|
||||
})
|
||||
|
||||
test('FIX does not disturb requests that never had anthropic_beta', async () => {
|
||||
|
||||
Reference in New Issue
Block a user