Files
tokens-reef/.workbuddy/memory/MEMORY.md
Developer dc92194b2b docs: update project documentation with experience lessons
- DEV_GUIDE.md: Add E2E test pitfalls (坑12-15) and Gitea repo info
- CLAUDE.md: Add project experience summary and Gitea remote
- MEMORY.md: Update with all fixed issues (P0/P1/E2E)
- docs/PROJECT_EXPERIENCE.md: New comprehensive experience doc
2026-04-02 23:24:10 +08:00

3.3 KiB
Raw Blame History

Sub2API 项目长期记忆

项目基本信息

代码审查历史

2026-04-02 E2E 测试修复

问题清单

ID 文件 问题 修复方案
E2E-01 user-apikey-lifecycle.spec.ts API Key 路径错误 /api/v1/keys 改为 /api/v1/api-keys24处
E2E-02 admin-users.spec.ts:156-157 余额调整 Payload 错误 确认格式正确:{balance, operation, notes}
E2E-03 admin-groups.spec.ts:229-232 Rate Multiplier Payload 错误 确认格式正确:{entries: [...]}

修复提交

  • 8b19f56 fix: update E2E test API paths and payloads to match backend

2026-04-02 后端修复

已修复问题

ID 文件 问题 修复方案
P0-01 sticky_session_test.go 缺少 context import 添加 import "context"
P0-02 wire_gen.go 缺少 usageLogRepository 添加参数
P0-03 admin_service_stub_test.go 缺少 GetGroupAPIKeyCount 添加 stub
P1-01 gateway_service.go defaultMaxLineSize 过大 优化为合理值
P1-02 account_service.go TestCredentials 返回 nil 实现真实验证
P1-03 group_handler.go GetStats 返回硬编码零值 实现真实数据查询

2026-03-31首次基线审查

审查的 commit

  • 141424a fix: resolve P0/P1 code quality issues2026-03-31
    • 修复了 ModelError.Is() 错误匹配、shouldClearStickySession ctx 传播、validateCodeSignature 重构、api_key_service.go 英文错误消息
  • bda7c39 初始提交Merge PR #1196

待修复问题清单

ID 级别 文件 问题摘要 状态
P0-01 🔴 P0 backend/internal/service/sticky_session_test.go:108 shouldClearStickySession 测试调用缺少 ctx 参数,go test -tags unit 编译失败 已修复
P1-01 🟡 P1 backend/internal/service/gateway_service.go:44 defaultMaxLineSize = 500MB高并发下 OOM 风险 已修复
P1-02 🟡 P1 backend/internal/service/account_service.go:386-398 TestCredentials 三平台均 return nil凭证验证功能形同虚设 已修复
P1-03 🟡 P1 backend/internal/handler/admin/group_handler.go:362-368 GetStats API 返回硬编码零值 mock 数据 已修复
P1-04 🟡 P1 backend/internal/handler/sora_client_handler_test.go 16 个 Sora 相关测试用 t.Skip 长期屏蔽,无 Issue 追踪 已改善
挑剔-01 💭 多个 service 文件 math/rand 使用缺少注释说明用途 已改善
挑剔-02 💭 gemini_messages_compat_service.go:44 geminiDummyThoughtSignature 魔法字符串无文档 已改善
挑剔-03 💭 backend/internal/pkg/models/interface.go:220-225 ModelError.Error() 使用 fmt.Sprint 而非 fmt.Sprintf格式化占位符不生效 已修复

健康度评分9/10