fix(backend): 修复 CI 失败问题

修复内容:
1. 修复 6 个 golangci-lint 错误
   - 3 个 errcheck 错误:在 gateway_request_test.go 中添加类型断言检查
   - 3 个 gofmt 格式化问题:修复代码格式
2. 修复 API 契约测试失败
   - 在测试中添加缺失的字段:enable_identity_patch 和 identity_patch_prompt

所有测试和 linter 检查现已通过。
This commit is contained in:
IanShaw027
2026-01-05 00:56:48 +08:00
parent 64b52c4383
commit 06216aad53
5 changed files with 122 additions and 97 deletions

View File

@@ -17,14 +17,14 @@ func TestStripSignatureSensitiveBlocksFromClaudeRequest(t *testing.T) {
},
Messages: []antigravity.ClaudeMessage{
{
Role: "assistant",
Role: "assistant",
Content: json.RawMessage(`[
{"type":"thinking","thinking":"secret plan","signature":""},
{"type":"tool_use","id":"t1","name":"Bash","input":{"command":"ls"}}
]`),
},
{
Role: "user",
Role: "user",
Content: json.RawMessage(`[
{"type":"tool_result","tool_use_id":"t1","content":"ok","is_error":false},
{"type":"redacted_thinking","data":"..."}