refactor(GuildActivityMonitor): 修复ADB多通知漏检问题并新增OCR检测模式 - #1764
Merged
Merged
Conversation
- 修复ADB检测bug:非活动通知不再覆盖latest_time,避免后续活动通知被漏检 - 新增use_ocr配置项,启用后通过OCR识别屏幕通知区域文字 - 统一ADB和OCR模式:均只检测用户启用的活动关键字 - 拆分run()为check_run_days/build_keyword_map/monitor_activities - 清理冗余导入、变量和注释
There was a problem hiding this comment.
嘿——我已经审阅了你的更改,看起来很棒!
Sourcery 评估
需要人工审阅者。 错误或不正确的 ADB/OCR 匹配可能会安排并启动错误的活动任务,同时还会持久化一个后续的 GuildActivityMonitor 运行。回滚可以阻止后续检测,但任何已经创建的计划任务都必须清除或允许其完成;影响范围有限且可以修复。
帮助我变得更有用!请在每条评论上点击 👍 或 👎,我会利用这些反馈来改进审阅。
Original comment in English
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Needs a human reviewer. A false or incorrect ADB/OCR match can schedule and launch the wrong activity task, while also persisting a follow-up GuildActivityMonitor run. Reverting stops future detections, but any already-created scheduled jobs must be cleared or allowed to complete; the impact is bounded and repairable.
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Contributor
Findings
|
Contributor
Change Summary
Reconstructed Intent点击此处展开- 看起来是在保留原有 ADB 监控行为的同时,修复多通知场景下无关通知导致活动漏检,并增加通过游戏通知区域 OCR 触发活动任务的模式。 - 拆分方法也意在让运行日期调度、活动选择和检测执行彼此独立。Observed Constraints点击此处展开- ADB 检测依赖通知文本包含已启用关键词,并以通知块的 时间判断是否为新通知。 - OCR 检测依赖固定 ROI()、OCR 模型可识别通知文字,以及通知区域内容发生可观测变化。 - 监控是长等待流程,需要在结束、触发任务和异常路径上正确维护/清理 stuck 状态。Intent Alignment
Release Risk
Validation Gaps点击此处展开- 建议覆盖 ADB:无关新通知 + 活动新通知、多条活动通知同批出现、未启用关键词命中、时间戳相同/乱序。 - 建议覆盖 OCR:启动时无通知后出现活动、启动时已有活动、同一关键词消失后再次出现、不同关键词连续出现,以及 OCR 误识别/空结果。 - 建议验证监控超时、触发任务和异常退出后 已清除;当前 PR 的 check runs 仍处于进行中,未看到针对上述边界的测试证据。
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sourcery 摘要
通过可配置的 ADB 或 OCR 监控模式,支持可靠的活动通知检测。
新功能:
错误修复:
增强功能:
Original summary in English
Sourcery 总结
通过可靠的过滤机制以及可选择的 ADB 或 OCR 检测模式,改进公会活动通知监控。
新功能:
错误修复:
增强功能:
Original summary in English
Summary by Sourcery
Improve guild activity notification monitoring with reliable filtering and selectable ADB or OCR detection modes.
New Features:
Bug Fixes:
Enhancements: