chore: 补提本地遗落工作(pr-review skill / try/finally / 战斗画面建档 / miyoushe skill) - #2511
Conversation
沉淀 PR 审查验证方法论(从 30 个 open PR 实操提炼): - L0~L4 验证分级(分诊→静态→背景→离线→live) - 框架语义必查项(op_callback/round_wait-retry/@operation_node/execute 重置/node_from 路由) - 先 merge main 再审(集成测试原则) - 冲突→建档→解(游戏流程类先 live 建档再融合) - live = 验证+熟悉游戏+顺路建档 - 解冲突后 import 冒烟 含 SKILL.md(方法论)+ design.md(决策理由+踩坑论据)。 Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
- §0 加'用 PR 实际 HEAD(不要被本地 merge 污染)' - §0 加'审完再决定改不改'(看到 comment 不先改,先 merge→审→评→改) - §2 强化 after_operation_done 检查:必查子步骤数 + 异常风险 + try/finally 兜底(不只看 happy path) 论据:#2459 CodeRabbit 抓到 try/finally,初轮 review 漏了——skill 有这条但不够醒目,强化。 Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
CodeRabbit review(🟠 Major):stop_auto_battle 有多步收尾(stop_running + stop_context → _release_keys 等), 任一抛异常会跳过基类 after_operation_done(运行记录/通知/APPLICATION_STOP)。 用 try/finally 保证基类清理在 finally 里必跑,与框架'after_operation_done 必须 always run'语义一致。 Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
- 战斗画面:唯一稳定标识=攻击按钮模板(无 id_mark,框架走 is_normal_attack_btn_available 直查) - 右上角动态:精英怪→血条,限时→倒计时(battle.yml 有 area 但非 id_mark) - 战斗-菜单:esc/左上角弹出,精确匹配(返回箭头+文本) - 战斗结果 area(完成/再来一次/撤退/已达成/退出/倒带) - 自动化约束:战斗态判定/stop_auto_battle 多步 try/finally/战斗结束检测反缩进/ExitInBattle 闭环 截图来源:用户提供(.debug/images/_1784380*.png) Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
- 正确位置 docs/game/screens/戦闘画面.md(之前错放在 docs/game/戦闘系統.md) - skill §3 结构:frontmatter / 何时出現+状態流転 / 識別特徴 / 可交互元素 / 識別快照(黙認+精英两子態) / 備注 - 删除错位 doc(戦闘系統.md + 戦闘結束画面歸档.md) - 登索引 screens/README.md - 截図歸檔 .webp(测试仓 screens/戦闘画面/黙認+精英) Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
vision 工具(analyze_image)正确用法已找到 + 记录 CLAUDE.local.md: CDN URL 的 Windows 路径需 URL-encode(:->%3A, \->%5C)后传入。 Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthrough新增战斗画面文档、PR审查验证技能和前瞻兑换码API流程说明,并调整自动战斗收尾逻辑,确保停止操作异常时仍执行基类处理。 Changes战斗画面文档
PR审查验证技能
自动战斗收尾处理
前瞻兑换码获取流程
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/game/screens/战斗画面.md`:
- Around line 17-18: 在文档中“子态”及其他受影响表格的标题或列表项与表格之间补充一个空行,修复 markdownlint 的 MD058
检查;仅调整这些表格前的空白行,不修改表格内容。
- Around line 13-23:
更新“战斗结果”子态的出口说明,在现有“完成/再来一次/退出/撤退”之后补充“已达成”和“倒带”,确保与上方战斗结果操作列表保持一致。
- Around line 27-29: 统一攻击按钮的描述,改为“战斗态稳定锚点”,避免表述为全局唯一标识;更新
docs/game/screens/战斗画面.md 第27-29行,并在第81-82行明确保留其不适合作为全局唯一精确匹配标识的说明;同步更新
docs/game/screens/README.md 第14行的索引简介。
In `@skills/zzz-od-dev-pr-review/SKILL.md`:
- Line 20: 更新测试仓对应说明,统一使用 zzz-od-test/screens/<screen_name>/<state>.webp
格式;将“默认.png”替换为可读的状态名和 .webp 扩展名,并保持与 zzz-od-dev-screen-onboarding/SKILL.md 的
fixture 命名契约一致。
- Around line 8-9: 统一 SKILL.md 中 L0 与 L1/L2 的适用范围表述:修改“L1/L2 总做”规则,明确仅对未在 L0
判定为不适用的 PR 强制执行;同步调整 L0 跳过规则及其覆盖的前端、CI、纯 git 启动逻辑说明,消除后续检查是否必须执行的歧义。
- Around line 15-16: 在 PR 审查流程中,将现有的 git merge origin/main 步骤更新为先执行 git fetch
origin main 刷新远程引用,再执行 git merge origin/main;保留使用提交者分支和合并主分支的既有流程。
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e38f93cd-b6b0-48e8-8f0b-6764036414fb
📒 Files selected for processing (5)
docs/game/screens/README.mddocs/game/screens/战斗画面.mdskills/zzz-od-dev-pr-review/SKILL.mdskills/zzz-od-dev-pr-review/design.mdsrc/zzz_od/application/battle_assistant/auto_battle/auto_battle_app.py
CI(tools/ci/update_redemption_code.py)用米游社直播间 H5 背后的 event/miyolive/* 公开活动接口取码——匿名 + 仅 x-rpc-act_id 头, 无 DS / cookie / 风控,比浏览器读 DOM 轻、稳、免登录。 - SKILL.md:取码分两路,脚本化优先走公开 API(复用 CI 脚本), 浏览器读 DOM 降为交互式调试备选 - design.md:三段端点(home/new→index→refreshCode)+ 过期算法 (start+1 天 23:59:59)+ 指向 CI 现成实现 Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@skills/zzz-od-miyoushe/SKILL.md`:
- Around line 35-40: 更新公开活动 API 说明,避免将匿名、免 DS、免 cookie 和不触发人机表述为永久保证,改为标注“截至
2026 年 7 月 18 日实测”。同时在 API 返回异常或遭遇限流时,明确无人值守流程应回退到浏览器 DOM 路径,并保留该路径作为备用方案。
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 90e29efe-a420-47e9-bae9-f7ab710a39ad
📒 Files selected for processing (2)
skills/zzz-od-miyoushe/SKILL.mdskills/zzz-od-miyoushe/design.md
- pr-review SKILL.md: L0/L1/L2 措辞统一;merge 前先 fetch origin main;测试仓也必须切 PR 同名分支(+ merge origin/main);fixture 路径契约统一;补 #2348 测试误合测试仓 main 致所有 PR test-check 全红的教训 - 战斗画面.md: 战斗结果出口补已达成/倒带;表格前空行(MD058);锚点'唯一稳定标识'改为'战斗态稳定锚点'(非全局唯一) - miyoushe SKILL.md: 公开活动 API 匿名/免 DS 改为'当前实测'限定 - README 索引: 战斗画面锚点表述同步 Co-Authored-By: Claude Code <noreply@anthropic.com>
- pr-review SKILL.md: fixture 契约改为 screens/<screen_name>/<state>.webp(与 screen-onboarding 一致,非 .png) - miyoushe SKILL.md: 公开 API 补'截至 2026-07-18 实测' + 接口异常/限流回退浏览器 DOM 路径 Co-Authored-By: Claude Code <noreply@anthropic.com>
背景
#2459 review 期间在本地分支做的衍生工作(+ 一个 miyoushe skill 增强),PR 用 author 原版 merge 后被遗落(未 push)。本 PR 补提,保留原 commit 历史。
内容
1. zzz-od-dev-pr-review skill(新增)
skills/zzz-od-dev-pr-review/SKILL.md+design.md2.
after_operation_done加 try/finally(auto_battle_app.py)stop_auto_battle多步收尾任一抛异常会跳过基类after_operation_done(run_record/notify/APPLICATION_STOP);try/finally 保证基类清理必跑。3. 战斗画面建档(
docs/game/screens/)zzz-od-testmain(850b009/1d1de0a/4715622/6710e29,已 push)。4. miyoushe 前瞻兑换码补公开活动 API 取码路径(
skills/zzz-od-miyoushe/)验证
ruff check+py_compile通过;9 commit cherry-pick 零冲突。🤖 Generated with Claude Code
Summary by CodeRabbit