docs: 用标识符替代行号定位代码
This commit is contained in:
@@ -32,20 +32,20 @@
|
||||
|
||||
| 编号 | 报告声明 | 核对结果 | 证据 |
|
||||
|---|---|---|---|
|
||||
| P0-1 | CORS 反射 Origin + 允许凭证 | ✅ 属实 | `bootstrap.go:120-138`,`Access-Control-Allow-Origin: origin` + `Allow-Credentials: true` |
|
||||
| P0-4 | `pending` 在提前返回/超时路径泄漏 | ✅ 属实 | `mcp_sse_client.go:402-411`:`c.pending[id] = ch` 之后才判 `postURL == ""` 并直接 return |
|
||||
| P0-5 | `ensureStarted` 并发首次调用失败 | ✅ 属实 | `mcp_sse_client.go:66-78`:锁内置 `c.started = true`,锁外才 `openSSE`;并发者看到 true 直接返回,`postURL` 仍空 |
|
||||
| P0-7 | `writeError(c, nil)` panic | ✅ 属实 | `agent_handler.go:102-109`:`errors.As(nil, ...)` 为 false 后走 `err.Error()` |
|
||||
| P0-8 | 无优雅停机 | ✅ 属实 | `bootstrap.go:93-102` 直接 `e.Router.Run(addr)`;`main.go` 无 signal |
|
||||
| P1-4 | ctx 未透传 | ✅ 属实 | `adapter.go:415/449/460` 三处 `context.Background()` |
|
||||
| P1-13 | `adkRunnerPlugin` 是空壳 | ✅ 属实 | `adapter.go:557-570`:只判 `OnUserMessageCallback() != nil`,从未调用它 |
|
||||
| P0-1 | CORS 反射 Origin + 允许凭证 | ✅ 属实 | `corsMiddleware` in `internal/app/bootstrap/bootstrap.go`,`Access-Control-Allow-Origin: origin` + `Allow-Credentials: true` |
|
||||
| P0-4 | `pending` 在提前返回/超时路径泄漏 | ✅ 属实 | `(*MCPSSEClient).callRPC` in `internal/infrastructure/ai/mcp_sse_client.go`:`c.pending[id] = ch` 之后才判 `postURL == ""` 并直接 return |
|
||||
| P0-5 | `ensureStarted` 并发首次调用失败 | ✅ 属实 | `(*MCPSSEClient).ensureStarted` in `internal/infrastructure/ai/mcp_sse_client.go`:锁内置 `c.started = true`,锁外才 `openSSE`;并发者看到 true 直接返回,`postURL` 仍空 |
|
||||
| P0-7 | `writeError(c, nil)` panic | ✅ 属实 | `writeError` in `internal/trigger/http/agent_handler.go`:`errors.As(nil, ...)` 为 false 后走 `err.Error()` |
|
||||
| P0-8 | 无优雅停机 | ✅ 属实 | `(*Engine).Run` in `internal/app/bootstrap/bootstrap.go` 直接 `e.Router.Run(addr)`;`main.go` 无 signal |
|
||||
| P1-4 | ctx 未透传 | ✅ 属实 | `(*Runner).Run`、`(*Runner).Stream`、`(*Runner).notifyPlugins` in `internal/infrastructure/adk/adapter.go` 三处 `context.Background()` |
|
||||
| P1-13 | `adkRunnerPlugin` 是空壳 | ✅ 属实 | `(*adkRunnerPlugin).OnUserMessage`/`BeforeAgent` in `internal/infrastructure/adk/adapter.go`:只判 `OnUserMessageCallback() != nil`,从未调用它 |
|
||||
| P1-14 | MCP 发现失败静默降级 | ✅ 属实 | `RegisterAndExpand` 里 `listFailures` 只写不读,失败时把配置名当工具返回 |
|
||||
| P2-19 | 三处库名/端口不一致 | ✅ 属实(且比报告更糟) | compose `ai-agent-scaffold`、yaml `ai-agent-scaffold-go`、`.env` `ai_agent_scaffold_go`;`.env` 还指向 3306/6379 |
|
||||
| P2-23 | 流式未发 `Accept: text/event-stream` | ✅ 属实 | `openai_client.go:205` 恒为 `application/json` |
|
||||
| P2-23 | 流式未发 `Accept: text/event-stream` | ✅ 属实 | `(*OpenAIClient).do` in `internal/infrastructure/ai/openai_client.go` 恒为 `application/json` |
|
||||
| P3-9 | `gofmt -l` 全量误报(CRLF) | ✅ 属实 | 无 `.gitattributes`;`bootstrap.go` 前 200 字节含 CRLF |
|
||||
| P3-16 | 空列表响应缺 `data` 字段 | ✅ 属实 | `response.go:5-9` 的 `Data T \`json:"data,omitempty"\`` |
|
||||
| P3-20 | `validateTable` 必填校验顺序随机 | ✅ 属实 | `loader.go:95-107` 遍历 `map[string]string` 报错 |
|
||||
| P3-21 | 只有 `/healthz`,无 `/readyz` | ✅ 属实 | 全仓库仅 `bootstrap.go:114` 一处 |
|
||||
| P3-16 | 空列表响应缺 `data` 字段 | ✅ 属实 | `Envelope` in `internal/api/response/response.go` 的 `Data T \`json:"data,omitempty"\`` |
|
||||
| P3-20 | `validateTable` 必填校验顺序随机 | ✅ 属实 | `validateTable` in `internal/app/config/loader.go` 遍历 `map[string]string` 报错 |
|
||||
| P3-21 | 只有 `/healthz`,无 `/readyz` | ✅ 属实 | 全仓库仅 `newRouter` in `internal/app/bootstrap/bootstrap.go` 一处 |
|
||||
| P1-11 | compose redis 引用未声明网络 | ✅ 属实 | `deployments/docker-compose.yml`,`voice-input-net` 未在顶层声明 |
|
||||
|
||||
**抽查结论**:没有发现误报,也没有发现"看起来严重其实无害"的虚高条目。报告的判断力是可信的。
|
||||
|
||||
Reference in New Issue
Block a user