Skip to content

Merge:'fix/patch4.3.1'| 4.3.1小型补丁合集#276

Merged
sunyink merged 7 commits into
mainfrom
fix/patch4.3.1
May 8, 2026
Merged

Merge:'fix/patch4.3.1'| 4.3.1小型补丁合集#276
sunyink merged 7 commits into
mainfrom
fix/patch4.3.1

Conversation

@sunyink
Copy link
Copy Markdown
Owner

@sunyink sunyink commented May 8, 2026

Summary by Sourcery

确保在钓鱼回合结束时出售剩余鱼获,并在每次主循环迭代后都一致地调用售鱼逻辑。

Bug Fixes:

  • 无论本次钓鱼循环是否成功,始终在每次循环迭代后触发售鱼逻辑,以避免出现未售出的鱼获。
  • 在钓鱼运行停止时添加最终保护措施,如果仍有被追踪但未售出的鱼获,则将其全部出售。
Original summary in English

Summary by Sourcery

Ensure remaining fish catches are sold at the end of fishing sessions and invoke fish selling consistently after each main loop iteration.

Bug Fixes:

  • Always trigger fish selling logic after each fishing loop iteration regardless of success to avoid unsold catches.
  • Add a final safeguard to sell any remaining fish when the fishing run stops if unsold catches are still tracked.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 8, 2026

Warning

Rate limit exceeded

@sunyink has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 35 minutes and 13 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: aa32972d-c0e4-4bd2-9bb9-853cbaa65868

📥 Commits

Reviewing files that changed from the base of the PR and between ef5b9e1 and ee37187.

⛔ Files ignored due to path filters (2)
  • release/app_msg.md is excluded by !**/*.md and included by none
  • release/release_header.md is excluded by !**/*.md and included by none
📒 Files selected for processing (6)
  • .github/workflows/deepseek-review.yml
  • agent/fishing_agent.py
  • assets/interface.json
  • assets/resource/base/pipeline/Activities.json
  • assets/resource/base/pipeline/Fishing.json
  • assets/resource/base/pipeline/QuestList.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/patch4.3.1

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented May 8, 2026

审阅者指南(在小型 PR 上折叠)

审阅者指南

通过始终触发卖鱼逻辑来优化 fishing agent 在运行结束时的清理流程,并在运行停止时增加一个兜底机制,用于出售所有剩余的鱼,同时更新了一些资源/界面 JSON 定义。

FishingAgent 运行和清理流程的时序图

sequenceDiagram
    actor User
    participant FishingAgent

    User->>FishingAgent: run(max_count)
    activate FishingAgent
    FishingAgent->>FishingAgent: running = True
    loop Until stop condition
        FishingAgent->>FishingAgent: main_loop()
        activate FishingAgent
        FishingAgent->>FishingAgent: tap(coords.screen_center.x, coords.screen_center.y)
        FishingAgent->>FishingAgent: delay(1.0)
        FishingAgent->>FishingAgent: check_and_sell_fish()
        deactivate FishingAgent
    end
    FishingAgent->>FishingAgent: finally block
    FishingAgent->>FishingAgent: running = False
    alt Remaining fish exist
        FishingAgent->>FishingAgent: print summary
        FishingAgent->>FishingAgent: sell_all_fish()
    end
    FishingAgent-->>User: return success_count > 0
    deactivate FishingAgent
Loading

更新后的 FishingAgent 结束运行清理逻辑类图

classDiagram
    class FishingAgent {
        +bool running
        +int fish_since_last_sell
        +int success_count
        +Coords coords
        +bool main_loop()
        +bool run(max_count)
        +void check_and_sell_fish()
        +void sell_all_fish()
        +void tap(x, y)
        +void delay(seconds)
    }

    class Coords {
        +Point screen_center
    }

    class Point {
        +float x
        +float y
    }

    FishingAgent --> Coords : uses
    Coords --> Point : has
Loading

文件级变更

Change Details Files
在每次主循环迭代结束时始终运行卖鱼逻辑,而不再依赖成功状态。
  • 移除了主循环中围绕卖鱼调用的条件检查,使卖鱼流程在每次迭代中都被调用
  • 保持主循环中其余控制流不变,仍然返回原有的成功标记
agent/fishing_agent.py
确保在钓鱼运行结束时出售所有剩余的鱼。
  • 在 run 方法退出时新增 finally 块兜底逻辑,用于检查是否有未售出的剩余鱼
  • 记录一条关于剩余鱼数量的汇总日志,并在需要时触发批量出售操作
  • 保持重置 running 状态和基于 success_count 的返回行为不变
agent/fishing_agent.py
调整与活动、钓鱼以及任务列表相关的界面和游戏资源配置数据。
  • 更新了界面定义 JSON 中的界面布局或标识符
  • 修改了活动流水线配置,包括与钓鱼相关的流程
  • 调整了任务列表流水线数据,可能是为了与更新后的钓鱼行为或 UI 对齐
assets/interface.json
assets/resource/base/pipeline/Activities.json
assets/resource/base/pipeline/Fishing.json
assets/resource/base/pipeline/QuestList.json

技巧与命令

与 Sourcery 交互

  • 触发新的审阅: 在 pull request 中评论 @sourcery-ai review
  • 继续讨论: 直接回复 Sourcery 的审阅评论。
  • 从审阅评论生成 GitHub issue: 在某条审阅评论下回复,请求 Sourcery 从该评论创建 issue。你也可以在审阅评论中回复 @sourcery-ai issue 来从该评论创建 issue。
  • 生成 pull request 标题: 在 pull request 标题的任意位置写入 @sourcery-ai 以随时生成标题。你也可以在 pull request 中评论 @sourcery-ai title 来(重新)生成标题。
  • 生成 pull request 摘要: 在 pull request 正文任意位置写入 @sourcery-ai summary,即可在该位置生成 PR 摘要。你也可以在 pull request 中评论 @sourcery-ai summary 来在任意时间(重新)生成摘要。
  • 生成审阅者指南: 在 pull request 中评论 @sourcery-ai guide 以在任意时间(重新)生成审阅者指南。
  • 解决所有 Sourcery 评论: 在 pull request 中评论 @sourcery-ai resolve 来解决所有 Sourcery 评论。如果你已经处理完所有评论且不想再看到它们,这会很有用。
  • 撤销所有 Sourcery 审阅: 在 pull request 中评论 @sourcery-ai dismiss 来撤销所有现有的 Sourcery 审阅。特别适用于你想从一次全新的审阅开始的情况——别忘了再评论 @sourcery-ai review 来触发新的审阅!

自定义你的体验

打开你的 dashboard 以:

  • 启用或禁用审阅功能,例如 Sourcery 生成的 pull request 摘要、审阅者指南等。
  • 更改审阅语言。
  • 添加、删除或编辑自定义审阅说明。
  • 调整其他审阅设置。

获取帮助

Original review guide in English
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Refines the fishing agent’s end-of-run cleanup by always triggering the fish selling logic and adds a safety net to sell any remaining fish when the run stops, along with some updates to resource/interface JSON definitions.

Sequence diagram for FishingAgent run and cleanup flow

sequenceDiagram
    actor User
    participant FishingAgent

    User->>FishingAgent: run(max_count)
    activate FishingAgent
    FishingAgent->>FishingAgent: running = True
    loop Until stop condition
        FishingAgent->>FishingAgent: main_loop()
        activate FishingAgent
        FishingAgent->>FishingAgent: tap(coords.screen_center.x, coords.screen_center.y)
        FishingAgent->>FishingAgent: delay(1.0)
        FishingAgent->>FishingAgent: check_and_sell_fish()
        deactivate FishingAgent
    end
    FishingAgent->>FishingAgent: finally block
    FishingAgent->>FishingAgent: running = False
    alt Remaining fish exist
        FishingAgent->>FishingAgent: print summary
        FishingAgent->>FishingAgent: sell_all_fish()
    end
    FishingAgent-->>User: return success_count > 0
    deactivate FishingAgent
Loading

Updated class diagram for FishingAgent end-of-run cleanup logic

classDiagram
    class FishingAgent {
        +bool running
        +int fish_since_last_sell
        +int success_count
        +Coords coords
        +bool main_loop()
        +bool run(max_count)
        +void check_and_sell_fish()
        +void sell_all_fish()
        +void tap(x, y)
        +void delay(seconds)
    }

    class Coords {
        +Point screen_center
    }

    class Point {
        +float x
        +float y
    }

    FishingAgent --> Coords : uses
    Coords --> Point : has
Loading

File-Level Changes

Change Details Files
Always run fish selling logic at the end of each main loop iteration, regardless of success status.
  • Removed the conditional check around the fish-selling call in the main loop so the selling routine is invoked every iteration
  • Kept the rest of the main loop control flow unchanged, still returning the original success flag
agent/fishing_agent.py
Ensure any remaining fish are sold when the fishing run terminates.
  • Added a finally-block safeguard that checks remaining unsold fish when the run method exits
  • Logs a summary message about remaining fish and invokes a bulk sell operation if needed
  • Preserves the running state reset and success_count-based return behavior
agent/fishing_agent.py
Adjust interface and gameplay resource configuration data related to activities, fishing, and quest lists.
  • Updated interface layout or identifiers in the interface definition JSON
  • Modified activity pipeline configuration, including fishing-related flows
  • Adjusted quest list pipeline data, likely to align with the updated fishing behavior or UI
assets/interface.json
assets/resource/base/pipeline/Activities.json
assets/resource/base/pipeline/Fishing.json
assets/resource/base/pipeline/QuestList.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - 我在这里给出了一些总体反馈:

  • 由于在 main_loop 中无条件调用 check_and_sell_fish(),你现在会在循环失败/中止时也触发售卖逻辑;请考虑当循环尚未完成一次有效的钓鱼周期时,这个方法是否应该提前返回或直接不进行任何操作,以避免产生意外的 UI/动作。
  • runfinally 代码块中的带表情符号的 print 语句,可能与项目其余部分的日志风格不一致,并且在某些环境中可能会引发编码问题;建议通过现有的日志机制来输出这条信息,和/或移除表情符号。
用于 AI 助手的提示词
请根据本次代码评审中的评论进行修改:

## 总体评论
- 由于在 `main_loop` 中无条件调用 `check_and_sell_fish()`,你现在会在循环失败/中止时也触发售卖逻辑;请考虑当循环尚未完成一次有效的钓鱼周期时,这个方法是否应该提前返回或直接不进行任何操作,以避免产生意外的 UI/动作。
-`run``finally` 代码块中的带表情符号的 `print` 语句,可能与项目其余部分的日志风格不一致,并且在某些环境中可能会引发编码问题;建议通过现有的日志机制来输出这条信息,和/或移除表情符号。

Sourcery 对开源项目免费 —— 如果你觉得我们的评审有帮助,欢迎分享 ✨
帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈改进后续的评审。
Original comment in English

Hey - I've left some high level feedback:

  • By calling check_and_sell_fish() unconditionally in main_loop, you’re now invoking sell logic even on failed/aborted loops; consider whether this method should early-return or no-op when the loop hasn’t completed a valid fishing cycle to avoid unintended UI/actions.
  • The print with an emoji in run's finally block may not be consistent with the rest of the project’s logging and could cause encoding issues in some environments; consider routing this through the existing logging mechanism and/or removing the emoji.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- By calling `check_and_sell_fish()` unconditionally in `main_loop`, you’re now invoking sell logic even on failed/aborted loops; consider whether this method should early-return or no-op when the loop hasn’t completed a valid fishing cycle to avoid unintended UI/actions.
- The `print` with an emoji in `run`'s `finally` block may not be consistent with the rest of the project’s logging and could cause encoding issues in some environments; consider routing this through the existing logging mechanism and/or removing the emoji.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

🤖 DeepSeek 自动评审报告

模型deepseek-v4-pro 触发pull_request Diff 截断:否 输出截断:否 改动文件:5 个(其中 0 个二进制已跳过)

概览

本次 PR 是一个小型补丁合集,主要修复钓鱼循环中未及时售鱼的问题(无论本次循环成功与否都触发售鱼;结束时兜底售鱼),并调整了几个流水线节点的识别参数。整体质量尚可,但存在两处可能影响执行稳定性的阻塞性问题(使用了非标准字段、正则中含有不稳定的 lookahead),需修正。

阻塞性问题(必须修改)

  • 文件assets/resource/base/pipeline/Fishing.json 第 169 行附近节点
    问题:新增了 "only_rec": true 字段。
    原因:查阅《任务流水线协议》全篇,only_rec 并非 MaaFW 官方字段。官方节点属性中不存在该标识,框架会将其忽略。而该节点同时定义了 "action": "Click""target",因此实际仍会执行点击动作,与 only_rec 的预期(仅识别不动作)不符,导致行为不可控。
    建议:若意图是仅识别不执行动作,应使用 "action": "DoNothing";若意图是识别后触发后续节点(通过 next 驱动)但需要点击特定位置,保留 Click 并移除 only_rec。请根据实际业务目的选择修改方式。

  • 文件assets/interface.json 第 569 行附近
    问题:将 OCR expected"蜥蜴人祭坛" 改为 "(?=.*[蜥])(?=.*[蜴])(?=.*[祭坛]).{5,}$",其中使用了多个正向前瞻 (?=...)
    原因:依据项目通用规范第 3 条,MaaFW 底层使用 C++ std::regex,对 lookbehind / lookahead 支持不稳定,已有误匹配的历史记录。该正则可能导致识别结果不稳定或错误。
    建议:改用不含 lookahead 的稳健写法,例如直接匹配完整字符串(若顺序固定可写 ^.*蜥.*蜴.*祭坛.*$)或拆分为多个 expected 条目实现任意顺序匹配(如 ["蜥.*蜴.*祭坛", "蜴.*蜥.*祭坛", ...],若预期仅为固定顺序,则单条足够)。避免依赖前瞻断言。

建议改进(非阻塞)

  • 文件assets/resource/base/pipeline/QuestList.json 第 50 行附近节点 RewardsDaily_InIndex
    问题next 列表中新增了 "[JumpBack]Global_WaitingForLoading"
    原因:该跳转依赖锚点 Global_WaitingForLoading。需确保该锚点已在流水线中被 anchor 字段设置,否则带 [JumpBack] 的条目会被跳过,导致该跳转功能失效(但不会阻塞流程,因为后续还有 RewardsDaily_InIndex 节点作为 fallback)。
    建议:请确认 Global_WaitingForLoading 锚点已在某个节点(如加载等待节点)中定义,以保证预期跳转正常工作。若尚未定义,需补充。

  • 文件assets/resource/base/pipeline/Activities.json 第 121 行附近节点
    问题:将模板匹配阈值从 [0.75] 降低至 [0.7]
    原因:降低阈值可提高识别成功率,但可能增加误匹配风险。当前无可评估的上下文,故仅标记。
    建议:若在实际运行中未出现误匹配,修改可接受;建议关注后续识别准确率。

疑问 / 需要作者确认

  • Fishing.json"only_rec": true 的来源或预期用途是什么?是否为某个自定义脚本的保留字段?若是误加,应移除;若有特殊用途,需通过 custom_action_param 传递参数,而非在流水线中使用未定义字段。
  • 确认 Global_WaitingForLoading 锚点是否已在流水线中定义,以便评估 QuestList.json 的修改是否完整。

本评论由 GitHub Actions + DeepSeek 自动生成;最终判断以人工审查为准。

@sunyink sunyink merged commit 80e7c7a into main May 8, 2026
21 checks passed
@sunyink sunyink deleted the fix/patch4.3.1 branch May 8, 2026 13:36
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