Conversation
- main.js 新增战斗步骤必填项前置校验:缺 bossName 时不进 BGI,改打 MAS_STEP_MISSING_CONFIG 标记并跳过该步,避免落回 AutoBossParam 无参构造 读取 BGI 全局 autoBossConfig 的旧首领 - AutoProxy 识别该标记判负,并把「自动首领讨伐:未选择首领」推到调度台与日志
审查者指南本 PR 在 MAS 调度层前置拦截未填写的战斗必填项,防止自动首领讨伐回退到 BetterGI 全局旧配置;同时通过专用日志标记让执行层判负并展示具体缺失原因,避免整轮被错误显示为完成。 缺失首领配置处理时序图sequenceDiagram
participant Scheduler as MASOneDragon
participant BGI as BetterGI
participant Monitor as AutoProxy
participant Dispatch as DispatchLog
Scheduler->>Scheduler: missingRequiredFields(step)
alt bossName is missing
Scheduler->>Scheduler: masLog(MAS_STEP_MISSING_CONFIG)
Scheduler-->>Monitor: MAS_STEP_MISSING_CONFIG
Monitor->>Monitor: _missing_config_reasons(log)
Monitor->>Monitor: result.success = false
Monitor->>Dispatch: _push_dispatch_log(执行层(战斗4项)有任务未执行)
Note over Scheduler,BGI: dispatchCombat is skipped - BetterGI is not started
else required fields are present
Scheduler->>BGI: dispatchCombat(step)
BGI-->>Monitor: completion or failure logs
Monitor->>Monitor: result.success = true/false
end
文件级变更
提示与命令与 Sourcery 交互
自定义使用体验访问你的控制面板以:
获取帮助Original review guide in EnglishReviewer's Guide本 PR 在 MAS 调度层前置拦截未填写的战斗必填项,防止自动首领讨伐回退到 BetterGI 全局旧配置;同时通过专用日志标记让执行层判负并展示具体缺失原因,避免整轮被错误显示为完成。 Sequence diagram for missing boss configuration handlingsequenceDiagram
participant Scheduler as MASOneDragon
participant BGI as BetterGI
participant Monitor as AutoProxy
participant Dispatch as DispatchLog
Scheduler->>Scheduler: missingRequiredFields(step)
alt bossName is missing
Scheduler->>Scheduler: masLog(MAS_STEP_MISSING_CONFIG)
Scheduler-->>Monitor: MAS_STEP_MISSING_CONFIG
Monitor->>Monitor: _missing_config_reasons(log)
Monitor->>Monitor: result.success = false
Monitor->>Dispatch: _push_dispatch_log(执行层(战斗4项)有任务未执行)
Note over Scheduler,BGI: dispatchCombat is skipped - BetterGI is not started
else required fields are present
Scheduler->>BGI: dispatchCombat(step)
BGI-->>Monitor: completion or failure logs
Monitor->>Monitor: result.success = true/false
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
TCddddd
added a commit
to TCddddd/AUTO-MAS
that referenced
this pull request
Sep 14, 2026
本分支为自洽而包含了 AUTO-MAS-Project#766 的提交(执行层判负逻辑依赖它引入的 _missing_config_reasons), 但「一条 PR 恰好一个碎片」,重复登记会被 CI 判失败。故此处移除该碎片:它在 AUTO-MAS-Project#766 里保留。 待 AUTO-MAS-Project#766 合入后,本分支 rebase 到新的 dev 即可让这段重复代码一并消失。
qiyinxi
added a commit
that referenced
this pull request
Sep 15, 2026
#779/#780) (#787) ## 概述 将以下 9 个 BetterGI 相关 PR 合并为一个分支统一提交: #756 #759 #765 #766 #767 #768 #771 #779 #780 注:#768 的提交历史已内含 #765 与 #766,故以 #768 一次性带入三者,避免重复应用。 ## 主要改动(用户可见) - 通知统一走 AUTO-MAS 通知编排 - 掉落统计开启时强制打开首领讨伐奖励识别 - 执行层运行也留下运行记录;一条龙执行层改为单次启动,按左栏队列顺序执行 - 修复未选择首领时自动首领讨伐被静默跳过、整轮仍显示完成 - 地脉花策略设置现在生效 - 首领改为必填校验;直控配置来源与原生配置写入分离 - Plan 到原生键反向映射补充单测 - 修复一条龙战斗组开关关闭后仍运行 - 修复自定义分组脚本配置下拉框无法展开选项 ## Sourcery 摘要 统一 BetterGI 的执行、配置、通知和报告行为,同时修复任务启用和验证相关问题。 新功能: - 添加 BetterGI 掉落统计配置,并在通知和 HTML 报告中包含聚合后的奖励识别结果。 - 在单次有序启动中运行 BetterGI 执行层任务,同时记录执行层结果并支持自定义任务分段。 错误修复: - 防止已禁用的 BetterGI 战斗组回退到原生一条龙执行。 - 将缺少必需 Boss 配置的情况报告为失败且可见的执行,而不是静默跳过。 - 使地脉花战斗策略和已清空队伍设置生效。 - 将直接控制配置的所有权与临时原生配置写入分离,并安全恢复被修改的配置。 - 修复自定义分组设置下拉框,使其选项能够正常展开。 改进: - 通过共享的 AUTO-MAS 通知编排机制发送 BetterGI 通知。 - 添加从计划战斗设置到 BetterGI 原生配置键的反向映射,并集中处理自定义分组解析。 测试: - 添加针对战斗组所有权、掉落统计解析、原生计划设置映射以及基于队列的分组启用功能的回归测试。 杂项: - 将 BetterGI 相关更改整合到单个发布条目中。 <details> <summary>Original summary in English</summary> ## Sourcery 摘要 统一 BetterGI 的执行、配置、通知和报告行为,同时修复任务启用、验证、进程处理和自定义组配置相关的问题。 新功能: - 增加可配置的 BetterGI 掉落统计聚合功能,并将其用于通知和 HTML 报告。 - 将 BetterGI 执行层任务按队列顺序统一启动,并记录执行结果及步骤级报告。 错误修复: - 防止已禁用或配置不完整的 BetterGI 任务意外运行或被静默跳过。 - 修复 BetterGI 进程生命周期处理问题,包括残留进程、权限相关的终止失败、自提权后的 PID 变化以及过早退出检测。 - 修复战斗策略、队伍清空、奖励识别、原生配置同步、自定义组选择、路径引用和自定义脚本下拉列表的行为。 改进: - 通过共享的 AUTO-MAS 通知编排机制发送 BetterGI 通知。 - 将直接控制配置的所有权与临时原生配置覆盖分离,并在执行后恢复受保护的设置。 - 增加从计划战斗设置到 BetterGI 原生配置键的反向映射,并集中处理自定义组解析。 测试: - 增加针对战斗组所有权、掉落统计解析、执行层报告、原生计划设置映射、组启用状态以及类似路径的脚本组名称的回归测试覆盖。 杂项: - 将 BetterGI 相关更改合并为单个变更日志条目。 <details> <summary>Original summary in English</summary> ## Sourcery 摘要 统一 BetterGI 的执行、配置、通知和报告行为,同时让任务启用状态及验证失败变得可见且可靠。 新功能: - 支持配置 BetterGI 掉落统计聚合,并将其添加到通知和 HTML 报告中。 - 在单个按队列顺序启动的队列中运行 BetterGI 执行层任务,同时记录执行层结果和步骤报告。 错误修复: - 防止已禁用或配置不完整的 BetterGI 任务意外运行或被静默跳过。 - 修复 BetterGI 进程生命周期处理问题,包括残留进程、权限相关的终止失败、提权后的 PID 变化以及过早退出检测。 - 修复战斗策略、已清除的队伍设置、奖励识别、原生配置同步、自定义组选择、路径引用以及自定义脚本下拉菜单行为。 改进: - 通过共享的 AUTO-MAS 通知编排机制发送 BetterGI 通知。 - 将直接控制配置的所有权与临时原生配置覆盖分离,并在执行后恢复受保护的设置。 - 添加从计划中的战斗设置到 BetterGI 原生配置键的反向映射,并集中处理自定义组解析。 测试: - 增加针对战斗组所有权、掉落统计解析、执行层报告、原生计划设置映射、组启用状态以及类似路径的脚本组名称的回归测试覆盖。 杂项: - 将 BetterGI 的更改合并为单条变更日志记录。 <details> <summary>Original summary in English</summary> ## Sourcery 摘要 统一 BetterGI 的执行、配置、通知和报告行为,同时修复任务启用、验证、进程处理和自定义组配置问题。 新功能: - 支持配置 BetterGI 掉落物汇总方式,并应用于通知和 HTML 报告。 - 按队列顺序执行执行层任务,通过单次 BetterGI 启动完成执行,同时记录执行层结果和步骤报告。 错误修复: - 使缺少必需设置、已禁用的战斗组、过时的进程状态、未生效的战斗设置,以及类似路径的名称或自定义组配置错误能够被明确发现并可靠处理。 增强功能: - 将 BetterGI 通知与共享的 AUTO-MAS 通知编排统一,并将直接控制配置的所有权与临时原生配置覆盖分离,同时安全地恢复原始配置。 测试: - 增加针对战斗组所有权、掉落物解析、执行层报告、原生 Plan 设置映射、组启用状态以及类似路径的脚本组名称的回归测试覆盖。 日常维护: - 将 BetterGI 相关更改合并为单条变更日志条目。 <details> <summary>Original summary in English</summary> ## Sourcery 总结 统一 BetterGI 的执行、配置、通知和报告流程,同时确保任务启用、验证和进程处理更加可靠。 新功能: - 添加可配置的 BetterGI 掉落汇总功能,使用奖励识别日志,并将结果包含在通知和 HTML 报告中。 - 将 BetterGI 执行层任务按照队列顺序统一启动,并提供执行记录和步骤级报告。 Bug 修复: - 使缺少必需的 Boss 设置、已禁用的战斗组、无效的战斗设置、过时的原生配置值、进程失败,以及类似路径或自定义脚本组的配置错误能够被清晰地发现并可靠处理。 增强功能: - 通过共享的 AUTO-MAS 通知编排机制发送 BetterGI 通知,并将直接控制权与临时原生配置覆盖分离,同时安全地恢复原有配置。 - 添加从计划战斗设置到 BetterGI 原生配置的反向映射,并集中处理自定义组解析。 测试: - 增加针对战斗组所有权、掉落解析、执行层报告、原生计划设置映射、组启用状态,以及类似路径的脚本组名称的回归测试覆盖。 日常维护: - 将 BetterGI 相关更改合并为单条变更日志记录。 <details> <summary>Original summary in English</summary> ## Summary by Sourcery Unify BetterGI execution, configuration, notification, and reporting while making task enablement, validation, and process handling reliable. New Features: - Add configurable BetterGI drop aggregation using reward-recognition logs and include the results in notifications and HTML reports. - Run BetterGI execution-layer tasks in a single queue-ordered launch with execution records and step-level reports. Bug Fixes: - Make missing required Boss settings, disabled combat groups, ineffective combat settings, stale native configuration values, process failures, and path-like or custom script group configuration errors visible and reliable. Enhancements: - Route BetterGI notifications through the shared AUTO-MAS notification orchestration and separate direct-control ownership from temporary native configuration overrides with safe restoration. - Add reverse mapping from Plan combat settings to BetterGI native configuration and centralize custom group resolution. Tests: - Add regression coverage for combat-group ownership, drop parsing, execution-layer reports, native Plan-setting mappings, group enablement, and path-like script group names. Chores: - Combine the BetterGI-related changes into a single changelog entry. </details> </details> </details> </details> </details> ## 评审须知:与已合入 dev 的 #781「快速配置」语义的关系 本分支已合并最新 `dev`(含 #781 全专项「快速配置开关」)。合并后经确认,本 PR 的既定决策是 **「配置来源(`Info.Mode`)决定一切,快速配置不作为配置来源开关」**,因此有 4 处与 #781 语义分叉, 评审时请一并确认是否接受: | # | 位置 | 本 PR 的行为 | #781 的行为 | |---|---|---|---| | 1 | `app/task/BetterGI/AutoProxy.py` | `use_mas_config = (config_mode != CONFIG_SOURCE_DIRECT)`:直控 = 用 BGI 所选原生配置,MAS 不接管 | `use_mas_config = IfQuickConfig`:关掉快速配置即用原生配置 | | 2 | `app/task/BetterGI/ScriptConfig.py` | 同上,并补回 `proxy_helpers` 的导入 | 同上 | | 3 | `frontend/.../BetterGIUserEdit.vue` | 任务配置卡片常显;面板形态由配置来源决定;快速配置开关位于配置来源区内 | 卡片由 `Info.IfQuickConfig` 门控,开关置于页面顶部 | | 4 | `frontend/.../quickConfigPanels.test.ts` | 将 `BetterGI` 移出「面板必须受开关门控」的断言列表;选择器断言改为校验「按需渲染」 | 断言包含 `BetterGI`,且禁止选择器出现快速配置字样 | 快速配置本身**没有删除**:`Info.IfQuickConfig` 仍保留,在直控下表示「是否把面板值写入 BGI 原生配置」 (`writes_native_config`)。若维护者最终倾向 #781 的语义,改动范围就是上表这 4 处,可整块翻回。 其它专项与对外契约未受影响:`GeneralConfigModeSelector` 的快速配置项仍是「调用方声明了 `quickConfig` 才渲染」, 未接入的专项不会出现死开关;其余 6 个专项页面与 MaaFW 的单测断言一字未改。 合并带来的非语义收益予以保留(均已逐条确认优于原实现):`useSaveQueue` 取代手写保存链(原实现会丢弃紧随其后的保存)、 `masConfigEnabled.value` 修正(原写法漏 `.value`,配置名会恒为 MAS 槽位)、一条龙设置写回前的快照比对、 关闭快速配置前先 flush 未保存设置。 **验证**:后端 `tests/task + tests/api` 659 passed(本地另有 5 项环境性失败:缺 `pytest-asyncio`、GBK 默认编码,CI 的 Linux/UTF-8 不受影响); 前端 `vitest` 63 files / 577 tests passed;`vue-tsc`、`scripts/changelog.py check`、`py_compile` 均通过。 --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: qiyinxi <qiyinxi@foxmail.com>
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.
摘要
changelog.d/规范登记碎片。验证:
py_compile通过;python scripts/changelog.py check通过。未运行自动化测试(本模块无对应单测)。Sourcery 总结
确保在执行 BetterGI 之前跳过缺少必需设置的战斗步骤,并将其明确报告为失败。
Bug 修复:
增强功能:
杂项:
Original summary in English
Summary by Sourcery
Ensure combat steps with missing required settings are skipped before BetterGI execution and clearly reported as failures.
Bug Fixes:
Enhancements:
Chores: