merge: candidate error-events-pg-roundtrip-2026-09-28 into dev
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
|
||||
| owner | task | branch | worktree | mutex | status |
|
||||
|---|---|---|---|---|---|
|
||||
| Cursor | error-events-pg-roundtrip-2026-09-28 | feature/error-events-pg-roundtrip-2026-09-28 | .worktrees/error-events-pg-roundtrip-2026-09-28 | error-events-pg-evidence | done |
|
||||
| Cursor | error-code-observability-2026-09-28 | feature/error-code-observability-2026-09-28 | .worktrees/error-code-observability-2026-09-28 | error-code-observability | done |
|
||||
| Cursor | attachment-only-turn-2026-09-28 | fix/attachment-only-turn-2026-09-28 | .worktrees/attachment-only-turn-2026-09-28 | attachment-only-turn | done |
|
||||
| Cursor | activation-preview-precheck-2026-09-28 | fix/activation-preview-400-precheck-2026-09-28 | .worktrees/activation-preview-400-precheck-2026-09-28 | web-activation-preview | done |
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
---
|
||||
title: "补跑错误审计表隔离库往返"
|
||||
task_id: "error-events-pg-roundtrip-2026-09-28"
|
||||
status: done
|
||||
created: 2026-09-28
|
||||
updated: 2026-09-28
|
||||
owner: Cursor
|
||||
task_type: implementation
|
||||
task_tier: small
|
||||
policy_revision: "agent-governance-2026-09-21-r1 @ 655fb4f149de23154aa05aa2b9eff83d2d02388a"
|
||||
branch: feature/error-events-pg-roundtrip-2026-09-28
|
||||
worktree: .worktrees/error-events-pg-roundtrip-2026-09-28
|
||||
base_dev_sha: "655fb4f149de23154aa05aa2b9eff83d2d02388a"
|
||||
write_scope: [".doc"]
|
||||
allowed_environments: []
|
||||
head_sha: ""
|
||||
mutex: error-events-pg-evidence
|
||||
review_state: accepted
|
||||
integration_state: pending
|
||||
deployment: not_required
|
||||
cleanup: pending
|
||||
cleanup_owner: "独立集成/维护执行者"
|
||||
cleanup_trigger: "报告合入 dev 后复查 worktree"
|
||||
remote_sync: not_requested
|
||||
---
|
||||
|
||||
# 补跑错误审计表隔离库往返
|
||||
|
||||
## 用户目标与授权
|
||||
|
||||
- 延续错误码审计任务。合入前 `TestStoreRoundTrip` 因没有 `TEST_DATABASE_URL` 被跳过。本次只补跑隔离库并更新测试报告。
|
||||
- 不改产品代码,不连开发库,不 push。
|
||||
|
||||
## 验证与证据
|
||||
|
||||
一次性 `pgvector/pgvector:pg16`,端口 `127.0.0.1:15432`,库 `agent_itest`。迁移到 78 后 `TestStoreRoundTrip` PASS(0.428s)。容器已删除。
|
||||
|
||||
## 收口
|
||||
|
||||
- review_state:accepted
|
||||
- integration_state:pending(本记录随候选合入)
|
||||
- deployment:not_required
|
||||
- cleanup:pending
|
||||
- remote_sync:not_requested
|
||||
@@ -62,9 +62,13 @@ HTTP 错误以前经 `writeSafeError` 只返回信封,不写服务端日志,
|
||||
|
||||
### 6. 审计表集成
|
||||
|
||||
- 输入:`go test -short -count=1 -v ./internal/errorevents -run TestStoreRoundTrip`
|
||||
- 实际输出:`TEST_DATABASE_URL not set; skipping PostgreSQL integration test`,`--- SKIP: TestStoreRoundTrip (0.00s)`,包结果 `PASS`
|
||||
- 判定:SKIP。未连接开发库,不能把跳过记成审计写入 PASS。
|
||||
- 输入(合入前):`go test -short -count=1 -v ./internal/errorevents -run TestStoreRoundTrip`
|
||||
- 实际输出:`TEST_DATABASE_URL not set; skipping PostgreSQL integration test`,`--- SKIP: TestStoreRoundTrip (0.00s)`
|
||||
- 判定:SKIP。当时没有隔离库,未连接开发库。
|
||||
|
||||
- 输入(补跑,2026-09-28):一次性容器 `pgvector/pgvector:pg16` 映射 `127.0.0.1:15432`,库名 `agent_itest`。`TEST_DATABASE_URL` 指向该库。测完容器已删除。
|
||||
- 实际输出:`OK 00078_2026-09-28-error-events-audit.sql (3.3ms)`,`goose: successfully migrated database to version: 78`,`--- PASS: TestStoreRoundTrip (0.42s)`,`ok chat-agent-system/internal/errorevents 0.428s`
|
||||
- 判定:PASS。写入后按 `request_id` 读回一条,且 `upstream` 为空。
|
||||
|
||||
### 7. 前端
|
||||
|
||||
@@ -81,11 +85,11 @@ HTTP 错误以前经 `writeSafeError` 只返回信封,不写服务端日志,
|
||||
| 相关包单测(errcode、httpx、stream、events、taskrun、ctxmgr) | PASS |
|
||||
| `go test -short ./internal/server`(修复期望后) | PASS,20.288s |
|
||||
| `go test -short ./...` 第一轮 | FAIL,1 个用例;修复后未整库重跑,变更只影响 server 错误状态与一条断言,server 包已重跑通过 |
|
||||
| `TestStoreRoundTrip` | SKIP(无 `TEST_DATABASE_URL`) |
|
||||
| `TestStoreRoundTrip` | 合入前 SKIP;隔离库补跑 PASS,0.428s |
|
||||
| `npm test` | PASS,526 + 34 |
|
||||
| `npm run build` | PASS |
|
||||
| 产品 PI 全链路 | NOT REQUIRED |
|
||||
|
||||
## 七、 测试结论与后续优化建议 (Conclusion & Next Steps)
|
||||
|
||||
授权范围内的工程验证已达到合入前门槛。错误审计的 PostgreSQL 往返要在提供隔离测试库后补跑 `TestStoreRoundTrip`。部署验证不在本次授权内。
|
||||
授权范围内的工程验证已达到合入前门槛。隔离库补跑后,`error_events` 的写入和按 `request_id` 读回通过。部署验证不在本次授权内。
|
||||
|
||||
Reference in New Issue
Block a user