fix: tolerate runtime schema drift
This commit is contained in:
13
progress.md
13
progress.md
@@ -17,6 +17,7 @@
|
||||
| 2026-05-25 | 2 | coding agent | TDD 修复 symlinked `agents` 目录边界 | 完成;提交 `fix: reject symlinked agents directory` |
|
||||
| 2026-05-25 | 3 | coding agent | TDD 实现项目配置、运行线程和动态工作流只读模型 | 完成;新增 `/api/projects`、`/api/runtime/threads`、`/api/workflow/events` |
|
||||
| 2026-05-25 | 3 | spec review | 规格审查未通过:SQLite 依赖提升 Go 下限到 1.25;单侧 DB 缺失来源证据不足 | coding agent 按 blocking 范围修复 |
|
||||
| 2026-05-25 | 3 | quality review | 代码质量审查未通过:SQLite schema drift 可导致 500、`partial` 置信度不在契约内、workflow nil Runtime panic | coding agent 按 blocking 范围修复 |
|
||||
|
||||
## Test Results
|
||||
|
||||
@@ -85,6 +86,15 @@
|
||||
| 2026-05-25 | `git diff --check` | PASS | Phase 3 review fix whitespace 检查通过 |
|
||||
| 2026-05-25 | `go test ./...` | PASS | Phase 3 review fix 全量 Go 测试通过 |
|
||||
| 2026-05-25 | `go test -count=1 ./...` | PASS | Phase 3 review fix 非缓存全量 Go 测试通过 |
|
||||
| 2026-05-25 | `go test ./internal/runtime ./internal/workflow` | FAIL | TDD 红灯:`partial` 置信度、缺可选列、NULL、缺关键列和 nil Runtime 均复现失败 |
|
||||
| 2026-05-25 | `go test ./internal/runtime ./internal/workflow` | PASS | schema-aware SQLite 读取和 nil Runtime 空视图通过 |
|
||||
| 2026-05-25 | `go test ./internal/server` | PASS | runtime API 的 `sqlite_partial` 置信度更新为 `medium` |
|
||||
| 2026-05-25 | `go test ./internal/runtime ./internal/workflow ./internal/server` | PASS | Phase 3 quality fix 目标包测试通过 |
|
||||
| 2026-05-25 | `go test ./...` | PASS | Phase 3 quality fix 全量 Go 测试通过 |
|
||||
| 2026-05-25 | `go test -count=1 ./...` | PASS | Phase 3 quality fix 非缓存全量 Go 测试通过 |
|
||||
| 2026-05-25 | `go vet ./...` | PASS | Phase 3 quality fix vet 通过 |
|
||||
| 2026-05-25 | `gofmt -l internal/runtime internal/workflow internal/server internal/projects internal/app cmd` | PASS | 无需格式化输出 |
|
||||
| 2026-05-25 | `git diff --check` | PASS | Phase 3 quality fix whitespace 检查通过 |
|
||||
|
||||
## Bug Loop
|
||||
|
||||
@@ -101,3 +111,6 @@
|
||||
| 3 | runtime 测试初次失败于未使用的 `os` import | 删除测试中不再使用的 import | `go test ./internal/runtime` PASS |
|
||||
| 3 | `modernc.org/sqlite v1.50.1` 将 module 最低版本提升到 Go 1.25 | 降级到 `modernc.org/sqlite v1.35.0`,清理高版本间接依赖,并恢复 `go 1.22` | `go test ./internal/runtime` PASS |
|
||||
| 3 | 单侧 SQLite 缺失时聚合来源仍可能显示整体 high confidence | 增加 `Snapshot.Sources`,按 `state` / `goals` 分别记录 `sqlite_missing` 或 `sqlite_readonly`,聚合来源使用 `sqlite_partial` | `go test ./internal/runtime` PASS |
|
||||
| 3 | SQLite schema drift、NULL 或数值字段可让 Snapshot 返回 error 并导致 API 500 | 使用 `PRAGMA table_info` 构造宽容 SELECT;缺关键列返回空表和 `sqlite_schema_drift` 证据;可选列/NULL/数值字段转为空字符串或文本 | `go test ./internal/runtime` PASS |
|
||||
| 3 | `SourceEvidence.Confidence` 出现设计外值 `partial` | 保留 `Kind: sqlite_partial`,将 `Confidence` 改为 `medium` | `go test ./internal/runtime ./internal/server` PASS |
|
||||
| 3 | `workflow.Store` 未配置 Runtime 会 panic | nil Runtime 返回空 view 和 `runtime_missing`/`low` 证据 | `go test ./internal/workflow` PASS |
|
||||
|
||||
Reference in New Issue
Block a user