feat: add phase 3 readonly models

This commit is contained in:
Yoilun
2026-05-25 18:21:02 +08:00
parent 37e3d77110
commit d573bde194
18 changed files with 964 additions and 12 deletions

View File

@@ -15,6 +15,7 @@
| 2026-05-25 | 2 | coding agent | TDD 修复 agent TOML parser 和 symlink 边界 | 完成;提交 `fix: validate agent toml boundaries` |
| 2026-05-25 | 2 | spec review | 复审未通过:`agents -> .` 目录 symlink 可读取 root `config.toml` | coding agent 按 blocking 范围修复 |
| 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` |
## Test Results
@@ -59,6 +60,18 @@
| 2026-05-25 | `go test ./...` | PASS | Required verification |
| 2026-05-25 | `git diff --check` | PASS | Required verification |
| 2026-05-25 | `git status --short` | PASS | Required verificationPhase 2 symlinked directory fix 文件待提交 |
| 2026-05-25 | `go test ./internal/projects` | FAIL | TDD 红灯:`Store` 未定义 |
| 2026-05-25 | `go test ./internal/workflow` | FAIL | TDD 红灯runtime 包无实现文件 |
| 2026-05-25 | `go test ./internal/server` | FAIL | TDD 红灯Phase 3 API 端点返回 404/405 不符合预期 |
| 2026-05-25 | `go test ./internal/runtime` | FAIL | TDD 红灯:缺少 `modernc.org/sqlite` 依赖 |
| 2026-05-25 | `go get modernc.org/sqlite` | PASS_WITH_ESCALATION | 普通 sandbox 因代理连接权限失败;提升权限后下载纯 Go SQLite 驱动 |
| 2026-05-25 | `go test ./internal/projects` | PASS | projects config 解析、稳定排序、缺失 config 空列表通过 |
| 2026-05-25 | `go test ./internal/runtime` | PASS | SQLite 缺失空快照;临时 SQLite 只读读取 threads、edges、goals 通过 |
| 2026-05-25 | `go test ./internal/workflow` | PASS | 任意角色 edge/goal/plan file 生成动态事件和阶段证据通过 |
| 2026-05-25 | `go test ./internal/server` | PASS | Phase 3 GET 端点与非 GET 405 通过 |
| 2026-05-25 | `go test ./...` | PASS | 全量 Go 测试通过 |
| 2026-05-25 | `git diff --check` | PASS | Phase 3 whitespace 检查通过 |
| 2026-05-25 | `go test -count=1 ./...` | PASS | Phase 3 非缓存全量 Go 测试通过 |
## Bug Loop
@@ -72,3 +85,4 @@
| 2 | Agent TOML parser 对重复键使用 map 覆盖,且未校验 bare key | 增加 duplicate key 和 invalid key 检测,遇到 malformed TOML 返回单条 invalid | `go test ./internal/agents` PASS |
| 2 | Agent symlink 只校验最终路径在 Codex home 内,可读取 root `config.toml` | 在 agent store 层拒绝 `.toml` symlink避免读取非 agent TOML 内容 | `go test ./internal/agents` PASS |
| 2 | `agents` 目录 symlink 会让枚举逻辑读取 Codex home root 的 `.toml` 文件 | 在 `Store.List` 对 lexical `CodexHome/agents``Lstat`,发现 symlink 直接返回 forbidden error | `go test ./internal/agents` PASS |
| 3 | runtime 测试初次失败于未使用的 `os` import | 删除测试中不再使用的 import | `go test ./internal/runtime` PASS |