Repository navigation
refactor(harness): isolate tool failures and allow empty timelines - #158
Conversation
PR1 内置浏览器验收(2026-08-02)验收 worktree: UI → API → SQLite → log 证据
动态工具面观察(不混入 PR1)真实模型第一轮只绑定了 因此 PR1 的完整删除产品态由公开 API + UI + SQLite + event log 验收;“相同失败调用均真实进入 executor / 无关调用不受污染 / 失败信封精确字段”由本 PR 的 agentexec 与 service 行为测试覆盖。动态工具面扩展留在 #157 后续推荐 PR,避免把不同阶段揉进 PR1。 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 30a6b5288b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
| primary, exists := tracks["visual_base"] | ||
| if !exists || len(primary.Clips) == 0 { | ||
| if document.DurationFrames == 0 && exists && len(primary.Clips) == 0 { |
There was a problem hiding this comment.
Reject empty timelines before queuing renders
After a full-range delete, this makes timeline.Validate report the zero-duration document as valid, but both enqueuePreviewRender and validateUserExportTimeline use that result as their renderability gate. Consequently, preview generation or a user export for this new canonical-empty version is accepted and queued, only for the worker's media.RenderTimeline to deterministically fail with 时间线没有主视觉 clip; add a render-specific empty-timeline check so these requests return validation failure before creating doomed jobs.
Useful? React with 👍 / 👎.
目标
这是 #157 推荐拆分中的 PR 1/7:移除跨工具调用的失败记忆与局部 repair/exhaustion 预算,让每次模型工具调用独立进入 executor;同时允许合法的完整区间删除落为 canonical empty timeline。
Refs #157
改动
failedCalls/pendingFailures/ duplicate admission / repair exhaustion 状态机与对应指标、错误码和过时测试。error_code、message、invalid_fields、current_state、recovery;持久化data仍保留同样信息。timeline.delete [0,duration)现在合法并持久化 duration=0 的 canonical empty 文档;越界返回稳定的timeline_range_out_of_bounds与精确字段。验收证据
[0,1441):返回精确end_frame约束且不产生新版本。[0,1440):成功持久化 v2,duration_frames=0。本地门禁
make contractsmake testmake coverage— Rushes Go handwritten coverage 90.4%make lintmake web— 27 files / 231 tests,build 与 bundle budget 通过make e2e— 9 Playwright tests 通过PR 保持 draft,待 GitHub CI 与内置浏览器真实草稿/API/SQLite/log 验收通过后再转 ready 并合并。