Skip to content

fix: Plan 缓存校验 + CI 配置 (Issues #5, #6)#23

Closed
urika wants to merge 1 commit into
mainfrom
fix/issue-6-ci-config
Closed

fix: Plan 缓存校验 + CI 配置 (Issues #5, #6)#23
urika wants to merge 1 commit into
mainfrom
fix/issue-6-ci-config

Conversation

@urika

@urika urika commented May 29, 2026

Copy link
Copy Markdown
Owner

Summary

修复 Issue #5: Plan 缓存键增加冲突处理 + Issue #6: 添加 CI 配置

Issue #5 修复

  • load_cached_plan 增加 task 描述校验
  • 缓存键碰撞时验证 task 描述是否完全匹配

Issue #6 修复

  • 添加 .github/workflows/test.yml CI 配置文件
  • 包含 pytest 测试和 ruff 检查

测试

  • pytest tests/ -q (163 passed)

Checklist

  • 测试通过
  • task 校验已添加
  • CI 配置已创建

feat: 添加 .github/workflows/test.yml CI 配置 (Issue #6)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@urika

urika commented May 29, 2026

Copy link
Copy Markdown
Owner Author

Code Review — PR #23: Plan 缓存校验 + CI 配置

🟡 Major

1. 将两个不相关的 Issue 打包在一个 PR 中

这两个修改没有技术依赖关系。打包在一起导致:

建议: 拆分为两个独立 PR。

2. 与 PR #22 的 api.py 修改完全重复

PR #22 和 PR #23agent_go/api.py 的修改字节级一致(添加 task 参数 + cached_task != task[:200] 校验)。合并其中一个会导致另一个冲突。应关闭其中一个。

3. 与 PR #24.github/workflows/test.yml 冲突

两个 PR 都创建了同名文件但内容不同:

4. CI 中 ruff 使用 || true,lint 失败不会阻塞 CI

与 PR #24 相同的问题。如果目的是渐进式引入,应添加注释和跟踪 issue。

🟢 Minor

  1. ruff 在 lint 步骤中单独 pip install,而非在依赖安装步骤中统一安装
  2. cached_task != task[:200] 截断比较是安全的(因为 save_cached_plan 也存储 task[:200]),但两个前 200 字符相同的长任务理论上会绕过校验。作为深度防御措施可以接受。

总结: 建议拆分为两个独立 PR,关闭与 PR #22 重复的部分,CI 部分与 PR #24 协调后合并。

@urika

urika commented May 29, 2026

Copy link
Copy Markdown
Owner Author

🔒 关闭本 PR — 与 PR #22#24 重复

本 PR (#23) 打包了两个不相关的 Issue,分别与已有 PR 重复:

  1. Issue L3: Plan 缓存键增加冲突处理 #5 (缓存校验) → 与 PR fix: Plan 缓存键增加 task 描述校验 (Issue #5) #22 完全重复,保留 PR fix: Plan 缓存键增加 task 描述校验 (Issue #5) #22

  2. Issue L4: 缺少 CI 配置文件 #6 (CI 配置) → 被 PR feat: 添加 ruff + mypy CI 检查 (Issue #13) #24 取代

保留的 PR:

本 PR 关闭,各 Issue 的修复在对应 PR 上继续。

@urika

urika commented May 29, 2026

Copy link
Copy Markdown
Owner Author

关闭:与 PR #22 (Issue #5) 和 PR #24 (Issue #6) 重复,分别保留对应 PR 继续修复。

@urika urika closed this May 29, 2026
@urika urika deleted the fix/issue-6-ci-config branch May 30, 2026 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant