Merge:'chore/FrameVer2.11.5'| 框架更新至5.9.2,有较大改动#235
Conversation
BREAKING CHANGE:警告,框架修改了管路写法。会使一个任务中所有节点,在跨节点链层级后受到毁灭性影响。
…pBack。 BREAKING CHANGE: MFA5.9后必须应用此提交补丁。
审阅者指南将项目更新为使用 MAAFW core 5.9.2 / MFAA v2.11.5-beta.1,并使流水线(pipeline)资源定义与新框架保持一致,包括新增全局错误/空值处理器,以及默认流水线文件的位置调整。 更新后流水线导航中全局错误处理的时序图sequenceDiagram
participant Engine as PipelineEngine
participant Start as Global_ToHomePage_Start
participant Reset as Global_ToHomePage_Reset
participant SeasonSet as JumpBack_StartGame_SeasonSet
participant Special as JumpBack_StartGame_Special
participant PVPSet as JumpBack_StartGame_PVPSet
participant PVPError as JumpBack_PVP_PerOperationsMain_Error
participant NullEx as Global_Null_Exception
participant NullPanic as Global_Null_Panic
Engine->>Start: invoke with timeout 8000
note over Start: recognition Or, reset to home page
Start-->>Engine: success
Engine->>Reset: invoke with timeout 10000
alt Reset completes in time
Reset-->>Engine: success
else Reset timeout or error
Engine->>SeasonSet: on_error fallback
Engine->>Special: on_error fallback
Engine->>PVPSet: on_error fallback
Engine->>PVPError: on_error fallback
alt unexpected null result
Engine->>NullEx: handle null exception
else unrecoverable null state
Engine->>NullPanic: handle null panic
end
end
文件级变更
提示与命令与 Sourcery 交互
自定义你的体验访问你的 dashboard 以:
获取帮助Original review guide in EnglishReviewer's GuideUpdates the project to use MAAFW core 5.9.2 / MFAA v2.11.5-beta.1 and aligns pipeline resource definitions with the new framework, including new global error/null handlers and a relocation of the default pipeline file. Sequence diagram for updated global error handling in pipeline navigationsequenceDiagram
participant Engine as PipelineEngine
participant Start as Global_ToHomePage_Start
participant Reset as Global_ToHomePage_Reset
participant SeasonSet as JumpBack_StartGame_SeasonSet
participant Special as JumpBack_StartGame_Special
participant PVPSet as JumpBack_StartGame_PVPSet
participant PVPError as JumpBack_PVP_PerOperationsMain_Error
participant NullEx as Global_Null_Exception
participant NullPanic as Global_Null_Panic
Engine->>Start: invoke with timeout 8000
note over Start: recognition Or, reset to home page
Start-->>Engine: success
Engine->>Reset: invoke with timeout 10000
alt Reset completes in time
Reset-->>Engine: success
else Reset timeout or error
Engine->>SeasonSet: on_error fallback
Engine->>Special: on_error fallback
Engine->>PVPSet: on_error fallback
Engine->>PVPError: on_error fallback
alt unexpected null result
Engine->>NullEx: handle null exception
else unrecoverable null state
Engine->>NullPanic: handle null panic
end
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
📝 WalkthroughWalkthrough此PR将 MAAFW 目标版本从 5.8.1 升级为 5.9.2,调整回退版本范围,并在大量 pipeline 配置节点中新增或引用全局错误处理节点(Global_Null / Global_Null_Exception / Global_Null_Panic),同时移除若干显式空 Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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.
Hey,我给了一些高层面的反馈:
- MAAFW 的回退版本范围(
FALLBACK_MAAFW_SPEC = ">=5.9,<6.1")相比之前的模式要宽泛得多,现在跨越了两个次要主版本范围;建议收紧一些(例如<6.0),以避免在未来无意间拉取到不兼容的 6.0+ 版本。 - 你已经将
default_pipeline.json从assets/resource/pipeline/default_pipeline.json移动到了assets/resource/default_pipeline.json;请再次确认所有加载该文件的代码和配置都已更新到新路径,以避免运行时路径问题。
给 AI 代理的提示
Please address the comments from this code review:
## Overall Comments
- The fallback version range for MAAFW (`FALLBACK_MAAFW_SPEC = ">=5.9,<6.1"`) is much broader than the previous pattern and now spans two major minor ranges; consider tightening this (e.g. `<6.0`) to avoid unintentionally pulling in incompatible future 6.0+ releases.
- You’ve moved `default_pipeline.json` from `assets/resource/pipeline/default_pipeline.json` to `assets/resource/default_pipeline.json`; please double-check that all code and configuration that load this file are updated to the new location to avoid runtime path issues.帮我提升质量!请在每条评论上点 👍 或 👎,我会根据这些反馈改进后续的评审。
Original comment in English
Hey - I've left some high level feedback:
- The fallback version range for MAAFW (
FALLBACK_MAAFW_SPEC = ">=5.9,<6.1") is much broader than the previous pattern and now spans two major minor ranges; consider tightening this (e.g.<6.0) to avoid unintentionally pulling in incompatible future 6.0+ releases. - You’ve moved
default_pipeline.jsonfromassets/resource/pipeline/default_pipeline.jsontoassets/resource/default_pipeline.json; please double-check that all code and configuration that load this file are updated to the new location to avoid runtime path issues.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The fallback version range for MAAFW (`FALLBACK_MAAFW_SPEC = ">=5.9,<6.1"`) is much broader than the previous pattern and now spans two major minor ranges; consider tightening this (e.g. `<6.0`) to avoid unintentionally pulling in incompatible future 6.0+ releases.
- You’ve moved `default_pipeline.json` from `assets/resource/pipeline/default_pipeline.json` to `assets/resource/default_pipeline.json`; please double-check that all code and configuration that load this file are updated to the new location to avoid runtime path issues.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
assets/resource/pipeline/Battle.json (1)
841-866:⚠️ Potential issue | 🟡 Minor
doc注释与实际等待时间不一致。
doc写的是"这里要等动画,3S",但post_wait_freezes实际值为800(800ms)。请统一这两处:要么将post_wait_freezes改为3000,要么更新doc注释以反映实际的 800ms 等待时间。🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@assets/resource/pipeline/Battle.json` around lines 841 - 866, The doc string for the QuickHunt_FastBattleStart node says "这里要等动画,3S" but post_wait_freezes is 800 (ms); update them to match: either change post_wait_freezes to 3000 to reflect a 3s wait, or edit the doc field to indicate 800ms (e.g., "0.8s" or "800ms"); ensure you modify the QuickHunt_FastBattleStart object’s post_wait_freezes or doc accordingly so the comment and actual wait are consistent.assets/resource/pipeline/Collect_skills.json (1)
146-153:⚠️ Potential issue | 🟡 Minor
Collect_Skill_TapReset缺失recognition声明,导致默认 DirectHit 截断后续节点。该节点虽有
template: ["pin.png"],但没有显式声明recognition字段,因此按 DirectHit 处理。根据 MaaFramework PipelineProtocol,on_error 链顺序识别子节点,只执行首个命中的节点,后续节点立即终止。这导致Global_Null_Exception和Global_Null_Panic两个兜底节点永远无法执行。需补充
"recognition": "TemplateMatch"或其他合适的识别方式,使兜底节点可被正确处理。参考同链中Collect_Skill3_3_Nothing的模式(同样有 template,显式声明 TemplateMatch)。🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@assets/resource/pipeline/Collect_skills.json` around lines 146 - 153, The node Collect_Skill_TapReset is missing an explicit recognition field so it defaults to DirectHit and prevents later on_error nodes (Global_Null_Exception, Global_Null_Panic) from running; update the Collect_Skill_TapReset entry to include an explicit recognition (e.g., "recognition": "TemplateMatch") consistent with Collect_Skill3_3_Nothing so the pipeline treats it as a template-match node and allows subsequent fallback nodes to be evaluated.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@assets/resource/pipeline/Battle.json`:
- Around line 282-286: 当前 on_error 中的 "Global_Null_Exception" 和
"Global_Null_Panic" 永远不会触发,因为前置恢复节点(例如
QuickHunt_AdventureRouteReBackHuntingGrounds_Pipeline)以默认 DirectHit
顺序优先命中;请修复:在这些前置恢复节点(如 QuickHunt_AdventureRouteReBackHuntingGrounds_Pipeline
及其他出现问题的恢复节点)上设置明确命中上限(max_hit)或添加跳回策略([JumpBack]),或将全局兜底节点移到这些恢复节点的出口(outlet)上以确保在超限/完成后能继续到
Global_Null_Exception/Global_Null_Panic;同样应用此修正到文件中另外提到的重复位置(行段
850-854、973-977、1172-1176 对应的恢复节点)。
In `@assets/resource/pipeline/Collect_Launcher.json`:
- Around line 1590-1593: The on_error for node
Collect_LocatePackFrame_Smart_Swip currently lists "[Anchor]SmartSwipOut" and
"Global_Null" which silently swallows failures; update the on_error array to
mirror the other nodes (Collect_LocatePackFrame_Loc1..Loc7) and standard
patterns (Battle.json/GACHA.json) by replacing "Global_Null" with the escalation
pair "Global_Null_Exception" and "Global_Null_Panic" so failures at
[Anchor]SmartSwipOut will capture a screenshot/log and trigger a restart for
recovery.
In `@assets/resource/pipeline/Setup.json`:
- Around line 360-365: 当前三级兜底被短路:当 Setup_Scan_Error_PreVerdict (max_hit:1)
首次触发后,Setup_Scan_Error_FinVerdict 因没有声明 recognition 而默认 DirectHit 总是匹配并直接走它的
next,导致后续 Global_Null_Exception 和 Global_Null_Panic 无法触达。解决方法:在
Setup_Scan_Error_FinVerdict 上添加对等的限流比如 "max_hit": 1 或合适的次数,或者把其 recognition
改为需要判断的类型(非 DirectHit)以便在不匹配时继续落到 Global_Null_Exception/Global_Null_Panic;同时保持
on_error 列表不变以保留兜底链路。
---
Outside diff comments:
In `@assets/resource/pipeline/Battle.json`:
- Around line 841-866: The doc string for the QuickHunt_FastBattleStart node
says "这里要等动画,3S" but post_wait_freezes is 800 (ms); update them to match: either
change post_wait_freezes to 3000 to reflect a 3s wait, or edit the doc field to
indicate 800ms (e.g., "0.8s" or "800ms"); ensure you modify the
QuickHunt_FastBattleStart object’s post_wait_freezes or doc accordingly so the
comment and actual wait are consistent.
In `@assets/resource/pipeline/Collect_skills.json`:
- Around line 146-153: The node Collect_Skill_TapReset is missing an explicit
recognition field so it defaults to DirectHit and prevents later on_error nodes
(Global_Null_Exception, Global_Null_Panic) from running; update the
Collect_Skill_TapReset entry to include an explicit recognition (e.g.,
"recognition": "TemplateMatch") consistent with Collect_Skill3_3_Nothing so the
pipeline treats it as a template-match node and allows subsequent fallback nodes
to be evaluated.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6700df2c-5b1d-4d0c-8507-9525b7b6df9b
⛔ Files ignored due to path filters (2)
assets/resource/default_pipeline.jsonis excluded by none and included by nonerequirements.txtis excluded by none and included by none
📒 Files selected for processing (19)
agent/utils/venv_ops.pyassets/resource/pipeline/Arbitrage.jsonassets/resource/pipeline/Battle.jsonassets/resource/pipeline/Collect_Launcher.jsonassets/resource/pipeline/Collect_Navigation.jsonassets/resource/pipeline/Collect_TeleportRecall.jsonassets/resource/pipeline/Collect_skills.jsonassets/resource/pipeline/Daily.jsonassets/resource/pipeline/Dummy.jsonassets/resource/pipeline/EventBattle.jsonassets/resource/pipeline/GACHA.jsonassets/resource/pipeline/GACHA_ADV.jsonassets/resource/pipeline/Global.jsonassets/resource/pipeline/Mail.jsonassets/resource/pipeline/PVP.jsonassets/resource/pipeline/QuestList.jsonassets/resource/pipeline/Redemption.jsonassets/resource/pipeline/Setup.jsonassets/resource/pipeline/default_pipeline.json
💤 Files with no reviewable changes (1)
- assets/resource/pipeline/default_pipeline.json
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
assets/resource/pipeline/Setup.json (1)
438-442:⚠️ Potential issue | 🟡 Minor这四处新增的
Global_Null_*仍然触达不到。
Setup_Scan_Error_PreVerdict已经有max_hit: 1,第一次复位后就会被跳过;而Setup_Scan_Error_FinVerdict目前没有声明recognition,按协议会默认成DirectHit。这样错误链在第二层就被消费掉,后面追加的Global_Null_Exception/Global_Null_Panic实际不会进入。要保留三级兜底的话,建议给Setup_Scan_Error_FinVerdict加max_hit,或改成可失败的识别节点。 (maafw.com)Also applies to: 519-523, 600-604, 681-685
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@assets/resource/pipeline/Setup.json` around lines 438 - 442, 当前在多处把 Global_Null_Exception/Global_Null_Panic 追加到 on_error 链,但它们被上层节点消费掉无法到达;定位到 Setup_Scan_Error_PreVerdict 和 Setup_Scan_Error_FinVerdict,解决办法是:为 Setup_Scan_Error_FinVerdict 明确增加 max_hit(例如 1 以支持复位后仍能触达下一层)或者将 Setup_Scan_Error_FinVerdict 的 recognition 改为可失败的类型(非默认 DirectHit),以确保错误链能继续传递到 Global_Null_* 三级兜底;在仓库中所有类似追加 Global_Null_* 的位置(如与本 diff 同类的其他三处)都按此修复。
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@assets/resource/pipeline/Arbitrage.json`:
- Around line 2172-2175: 当前 on_error 列表里因为 Arbitrage_Cooking_ERREND 缺少
recognition 会总是被 DirectHit,导致后面的 Global_Null_Exception / Global_Null_Panic
永远不会执行;请在 Arbitrage_Cooking_Hub 的 on_error 处理里要么把 Global_Null_Exception 和
Global_Null_Panic 提前到 on_error 数组前面(保证全局兜底先被评估),要么为 Arbitrage_Cooking_ERREND
增加可失败的识别条件或命中次数限制(例如添加 recognition 字段或 hit_count
限制)以允许后续全局节点命中;定位符:Arbitrage_Cooking_Hub、Arbitrage_Cooking_ERREND、Global_Null_Exception、Global_Null_Panic。
---
Duplicate comments:
In `@assets/resource/pipeline/Setup.json`:
- Around line 438-442: 当前在多处把 Global_Null_Exception/Global_Null_Panic 追加到
on_error 链,但它们被上层节点消费掉无法到达;定位到 Setup_Scan_Error_PreVerdict 和
Setup_Scan_Error_FinVerdict,解决办法是:为 Setup_Scan_Error_FinVerdict 明确增加 max_hit(例如
1 以支持复位后仍能触达下一层)或者将 Setup_Scan_Error_FinVerdict 的 recognition 改为可失败的类型(非默认
DirectHit),以确保错误链能继续传递到 Global_Null_* 三级兜底;在仓库中所有类似追加 Global_Null_* 的位置(如与本 diff
同类的其他三处)都按此修复。
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 93603944-e3ce-4a54-8d03-69e8c7428b1b
⛔ Files ignored due to path filters (1)
assets/resource/default_pipeline.jsonis excluded by none and included by none
📒 Files selected for processing (8)
assets/resource/pipeline/Arbitrage.jsonassets/resource/pipeline/Battle.jsonassets/resource/pipeline/Collect_Launcher.jsonassets/resource/pipeline/Collect_Navigation.jsonassets/resource/pipeline/Daily.jsonassets/resource/pipeline/Global.jsonassets/resource/pipeline/PVP.jsonassets/resource/pipeline/Setup.json
🚧 Files skipped from review as they are similar to previous changes (4)
- assets/resource/pipeline/PVP.json
- assets/resource/pipeline/Collect_Launcher.json
- assets/resource/pipeline/Global.json
- assets/resource/pipeline/Battle.json
| "on_error": [ | ||
| "Arbitrage_Cooking_ERREND" | ||
| "Arbitrage_Cooking_ERREND", | ||
| "Global_Null_Exception", | ||
| "Global_Null_Panic" |
There was a problem hiding this comment.
这里追加的两个全局兜底同样是死分支。
Arbitrage_Cooking_Hub 一旦走到 on_error,前面的 Arbitrage_Cooking_ERREND 会因为缺少 recognition 而按协议默认命中 DirectHit,所以后面的 Global_Null_Exception / Global_Null_Panic 没机会执行。若这里既想保留正常收尾,又想保留升级兜底,建议把全局节点前置,或给 Arbitrage_Cooking_ERREND 加上可失败的识别条件/命中次数限制。 (maafw.com)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@assets/resource/pipeline/Arbitrage.json` around lines 2172 - 2175, 当前
on_error 列表里因为 Arbitrage_Cooking_ERREND 缺少 recognition 会总是被 DirectHit,导致后面的
Global_Null_Exception / Global_Null_Panic 永远不会执行;请在 Arbitrage_Cooking_Hub 的
on_error 处理里要么把 Global_Null_Exception 和 Global_Null_Panic 提前到 on_error
数组前面(保证全局兜底先被评估),要么为 Arbitrage_Cooking_ERREND 增加可失败的识别条件或命中次数限制(例如添加 recognition
字段或 hit_count
限制)以允许后续全局节点命中;定位符:Arbitrage_Cooking_Hub、Arbitrage_Cooking_ERREND、Global_Null_Exception、Global_Null_Panic。
Summary by Sourcery
更新核心框架版本,并使资源流水线和错误处理与新版本保持一致。
增强功能:
assets/resource下的新路径,并相应调整流水线资源。构建:
Original summary in English
Summary by Sourcery
Update core framework version and align resource pipelines and error handling with the new release.
Enhancements:
Build:
Summary by CodeRabbit
发布说明
新功能
改进
配置优化