Conversation
路径 B 执行层(--startGroups)跑完战斗后不写 log_record,该用户这次运行在 MAS 侧 便没有任何记录:结果列显示「未开始运行」、不写历史日志(statistic_paths 为空使 「统计信息」通知整块跳过)、分步报告与掉落统计也拿不到数据。 改为执行层启动时新建 log_record 并把执行层日志写进去,收尾按成败写入状态 (成功用项目契约 "Success!",失败写具体原因);同时把 log_start_time / cur_user_log 指向它,让执行层阶段的 on_crash 异常写入与「运行异常」通知也能生效。 原生一条龙随后仍会另开一条记录,结果形如「执行层 | 一条龙」两段。 验证:py_compile 通过;pytest tests/task/test_bettergi_one_dragon_read_failure.py 通过(4 passed)。本机未做实机验证。
_run_plan_custom 与 _run_plan_combat 同形态:跑完 BetterGI 同样不写 log_record。 自定义项由执行层单独跑完、原生一条龙又无启用任务时,会出现同一组症状: 整轮结果显示「未开始运行」、不写历史日志、不发统计通知、掉落统计无数据。 按同一口径补上:启动时新建 log_record 并把执行层日志写进去,收尾按成败写入状态 (成功用项目契约 "Success!",失败写具体原因),并把 log_start_time / cur_user_log 指向它,使执行层阶段的 on_crash 异常写入与「运行异常」通知也能生效。 未物化出任何自定义配置组(没有自定义项要跑)时仍不建记录。
审查者指南修复 BetterGI 通过 BetterGI 执行层运行记录时序图sequenceDiagram
participant AutoProxy
participant BetterGI
participant LogMonitor
participant LogRecord
participant MAS
AutoProxy->>LogRecord: create LogRecord()
AutoProxy->>MAS: store cur_user_item.log_record
AutoProxy->>BetterGI: execute --startGroups
BetterGI-->>LogMonitor: emit execution logs
LogMonitor->>AutoProxy: on_log(log_content)
AutoProxy->>LogRecord: update content
alt completion marker
AutoProxy->>LogRecord: set status Success!
else fatal log, process exit, timeout, or exception
AutoProxy->>LogRecord: set failure status
end
MAS->>LogRecord: read run record
MAS-->>MAS: write history, statistics, reports, and notifications
BetterGI 执行层与原生运行记录流程图flowchart LR
Start["BetterGI --startGroups"] --> Path{Execution path}
Path --> Combat["_run_plan_combat"]
Path --> Custom["_run_plan_custom"]
Combat --> Record["Create and update LogRecord"]
Custom --> Record
Record --> Finish["Set status: Success! or failure reason"]
Finish --> MAS["MAS result, history, statistics, reports"]
Finish --> Native["Native one-dragon run"]
Native --> Separate["Separate LogRecord"]
文件级变更
提示和命令与 Sourcery 交互
自定义你的使用体验访问你的控制面板以:
获取帮助Original review guide in EnglishReviewer's Guide修复 BetterGI 通过 Sequence diagram for BetterGI execution-layer run recordingsequenceDiagram
participant AutoProxy
participant BetterGI
participant LogMonitor
participant LogRecord
participant MAS
AutoProxy->>LogRecord: create LogRecord()
AutoProxy->>MAS: store cur_user_item.log_record
AutoProxy->>BetterGI: execute --startGroups
BetterGI-->>LogMonitor: emit execution logs
LogMonitor->>AutoProxy: on_log(log_content)
AutoProxy->>LogRecord: update content
alt completion marker
AutoProxy->>LogRecord: set status Success!
else fatal log, process exit, timeout, or exception
AutoProxy->>LogRecord: set failure status
end
MAS->>LogRecord: read run record
MAS-->>MAS: write history, statistics, reports, and notifications
Flow diagram for BetterGI execution-layer and native run recordsflowchart LR
Start["BetterGI --startGroups"] --> Path{Execution path}
Path --> Combat["_run_plan_combat"]
Path --> Custom["_run_plan_custom"]
Combat --> Record["Create and update LogRecord"]
Custom --> Record
Record --> Finish["Set status: Success! or failure reason"]
Finish --> MAS["MAS result, history, statistics, reports"]
Finish --> Native["Native one-dragon run"]
Native --> Separate["Separate LogRecord"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
摘要
--startGroups直连 BetterGI)完成战斗/自定义项后,整轮结果误显示为「未开始运行」的问题:任务实际已跑完并且被判成功,但 MAS 侧没有留下任何运行记录。history/下无 json/log)、不发「统计信息」通知、分步报告与掉落统计无数据可解析;执行层阶段崩溃时的异常写入与「运行异常」通知现在也能生效。_run_plan_combat(战斗 4 项)与_run_plan_custom(自定义项)两条执行层路径;原生一条龙随后仍会另开一条记录,结果形如「执行层 | 一条龙」两段。changelog.d/规范登记碎片。验证:
py_compile通过;pytest tests/task/test_bettergi_one_dragon_read_failure.py4 passed;python scripts/changelog.py check通过。实机验证待补——本机复现那次运行(2026-09-14 20:52,执行层跑完地脉花/首领讨伐/秘境,history/2026-09-14/新用户/为空)发生在本修复之前。Summary by Sourcery
为 BetterGI 执行层运行补充完整的运行记录,确保结果、统计信息和异常状态能够正确落盘并展示。
Bug Fixes:
Enhancements:
Chores:
Original summary in English
Summary by Sourcery
为 BetterGI 执行层运行补充完整的运行记录,确保结果、统计信息和异常状态能够正确落盘并展示。
Bug Fixes:
Enhancements:
Chores: