Your Name
cbbb553e9f
feat(adapter): add sub2api platform adapter stack
2026-05-06 10:45:51 +08:00
Your Name
6c3474e23b
feat(ai-customer-service): add gate readiness verification and handoff docs
2026-05-06 09:39:33 +08:00
Your Name
087de4e102
fix(audit): use uuid.New() for ticket workflow audit IDs
...
Fixes 'invalid input syntax for type uuid' error when writing ticket
workflow audit logs. The audit Event.ID field was using fmt.Sprintf
with nanoseconds ('wf-%d') which doesn't match PostgreSQL's uuid type.
Also adds uuid import to ticket_workflow.go.
Verified: full chain webhook→assign→resolve→close produces 3 audit
logs correctly, no more 'invalid uuid' errors in logs.
2026-05-04 13:44:39 +08:00
Your Name
cf46b27610
fix: P0-1 RateLimiter并发写安全 + P0-2工单操作错误码区分 + P1 rows.Close修复
...
P0-1 (limits.go): Allow()方法改为全程使用写锁保护counters map读写,避免RLock写入时的data race
P0-2 (ticket_workflow.go+ticket_handler.go): Assign/Resolve/Close操作先查询ticket存在性和状态,返回明确的CS_TICKET_4001/CS_TKT_4002/CS_TICKET_4092/CS_TICKET_4093错误码,handler根据错误前缀路由HTTP状态码
P1-1 (ticket_store.go): 移除GetStats中3处手动rows.Close(),只保留defer Close()
2026-05-01 20:56:25 +08:00
Your Name
4123cd9e1c
test(P0-2): 补齐 postgres store ticket workflow 测试
...
新增 internal/store/postgres/ticket_workflow_test.go(8 个测试):
- TestTicketWorkflowStore_ListOpen: 开放工单查询
- TestTicketWorkflowStore_Assign: 工单分配(正常+已分配冲突)
- TestTicketWorkflowStore_Resolve: 工单解决
- TestTicketWorkflowStore_Close: 工单关闭(正常+非resolved错误)
- TestTicketWorkflowStore_NilDB: nil db 错误处理(4 个子测试)
**覆盖率提升**:
- internal/store/postgres: 43.1% → **62.0%** (+18.9%)
- 整体覆盖率: 66.2% → **71.3%** (+5.1%)
✅ Phase 2 目标 >70% 已达成
Ref: test/PHASE2_TEST_PLAN.md P0-2
2026-05-01 09:38:52 +08:00