Conversation
- main.js 新增战斗步骤必填项前置校验:缺 bossName 时不进 BGI,改打 MAS_STEP_MISSING_CONFIG 标记并跳过该步,避免落回 AutoBossParam 无参构造 读取 BGI 全局 autoBossConfig 的旧首领 - AutoProxy 识别该标记判负,并把「自动首领讨伐:未选择首领」推到调度台与日志
原先战斗 4 项(MAS一条龙)与自定义配置组(MAS-{短id}-自定义配置组N)分两次
启动 BetterGI,各自杀进程、启动、监控、收尾;队列顺序也无法跨越这两批。
现改为「切段 + 一次 --startGroups」:
- one_dragon_bridge.build_execution_segments 按左栏队列顺序把执行层切成若干「段」,
write_execution_groups 每段写一个配置组文件,再由一次
`--startGroups <段1 段2 ...>` 顺序跑完(BGI 的 OnStartMultiScriptGroupWithNamesAsync
按传入顺序 foreach 执行)。
- 战斗 4 项整体一段(内部仍由 main.js 按 Plan 编排,保留树脂耗尽短路等批次语义),
插在队列中第一个被接管的战斗项处;js/pathing/keymouse 类与相邻项合并成段
(其组级 config 由 MAS 合成、无用户语义);
scriptgroup 类独立成段 —— BGI 的 Pathing/Shell 项目只读**组级** config
(ScriptGroupProject.Run 用 GroupInfo.Config.PathingConfig),合并会丢掉
用户配置组的队伍/自动拾取等设置,故必须保真。
- one_dragon 新增 resolve_custom_group,把「自定义项 → 可执行配置组」的解析
统一到一处,materialize_user_script_groups 与切段共用,消除重复分支。
- 执行层接管时不再逐项物化,改为把这些项的名字并进 exclude_task_names 从原生
副本剔除;段组文件与历史残留由 _restore_one_dragon_config /
cleanup_leftover_execution_groups 清理。
- 删除已被取代的 write_one_dragon_group / remove_one_dragon_group 与
_run_plan_custom,_run_plan_combat 泛化为 _run_execution_layer(等待所有段的
执行结束标记)。
- 原生副本剔除战斗组的门控从 plan_mode(是否存在启用项)改为 use_execution_layer + Plan 归属:全部战斗行都关掉时 plan_mode 为假,原来战斗项会整体落回原生副本照跑, 与界面「已关」不符(2026-09-12 实机排障) - 新增 one_dragon_plan.plan_combat_bases():只看归属(Plan 中配过实例)不看启停, 与 build_combat_steps() 的分工是「谁负责」与「这次跑谁」 - Plan 中没有实例的战斗组仍留在原生副本,宁可多跑一次也不静默丢任务 - 同步 step-enabled 接口与前端服务层文档:enabled=false 的语义是「本次不跑」, 不是「退回原生一条龙跑」 - 补单测 tests/task/test_bettergi_combat_scope.py(4 例)
_run_execution_layer 跑完 BetterGI 后不写 log_record:战斗/自定义项全部由执行层完成、 原生一条龙又无启用任务时,整轮结果显示「未开始运行」(UserItem.result 对空记录的兜底), 并且不写历史日志、不发「统计信息」通知、分步报告与掉落统计无数据可解析。 改为执行层启动时新建 log_record 并把执行层日志写进去,收尾按成败写入状态(成功用项目 契约 "Success!",失败写具体原因:命中致命日志 / 进程在结束标记前退出 / 空闲超时 / 执行异常 / 必填配置缺失);同时把 log_start_time / cur_user_log 指向它,使执行层阶段的 on_crash 异常写入与「运行异常」通知也能生效。没有需要接管的段时不建记录。
本 PR 重建到当前 dev 后按新规范登记:碎片固定用 changelog.d/,不再改 CHANGELOG.md 与 res/version.json(重做时已从提交里剔除这两处生成物改动)。
审查者指南本 PR 将 BetterGI 一条龙执行层改为按左栏队列切段、单次启动并顺序执行,同时按 Plan 归属修正战斗项剔除逻辑,补齐执行层运行记录与结果统计链路,并将必填配置缺失从静默跳过改为可见失败。 单次启动 BetterGI 执行流程时序图sequenceDiagram
participant AutoProxyTask
participant one_dragon_bridge
participant BetterGI
participant LogMonitor
participant RunRecord
AutoProxyTask->>one_dragon_bridge: build_execution_segments()
one_dragon_bridge-->>AutoProxyTask: execution segment groups in queue order
AutoProxyTask->>one_dragon_bridge: write_execution_groups()
AutoProxyTask->>BetterGI: open_process(--startGroups, group_names...)
BetterGI->>BetterGI: execute segments sequentially
BetterGI-->>LogMonitor: 配置组执行结束 / MAS_STEP_FAIL / MAS_STEP_MISSING_CONFIG
LogMonitor->>RunRecord: update content and status
LogMonitor-->>AutoProxyTask: all groups completed or fatal condition
AutoProxyTask->>BetterGI: run native one-dragon tasks
Plan 归属和已禁用战斗项流程图flowchart TD
A[Plan contains combat instance] --> B[plan_combat_bases]
B --> C[Exclude combat base from native one-dragon]
C --> D{Queue row enabled}
D -->|Yes| E[build_combat_steps]
E --> F[Include in execution segment]
D -->|No| G[Do not execute]
H[Plan has no combat instance] --> I[Leave combat base in native one-dragon]
文件级变更
提示和命令与 Sourcery 交互
自定义你的体验访问你的控制面板以:
获取帮助Original review guide in EnglishReviewer's Guide本 PR 将 BetterGI 一条龙执行层改为按左栏队列切段、单次启动并顺序执行,同时按 Plan 归属修正战斗项剔除逻辑,补齐执行层运行记录与结果统计链路,并将必填配置缺失从静默跳过改为可见失败。 Sequence diagram for the single-launch BetterGI execution flowsequenceDiagram
participant AutoProxyTask
participant one_dragon_bridge
participant BetterGI
participant LogMonitor
participant RunRecord
AutoProxyTask->>one_dragon_bridge: build_execution_segments()
one_dragon_bridge-->>AutoProxyTask: execution segment groups in queue order
AutoProxyTask->>one_dragon_bridge: write_execution_groups()
AutoProxyTask->>BetterGI: open_process(--startGroups, group_names...)
BetterGI->>BetterGI: execute segments sequentially
BetterGI-->>LogMonitor: 配置组执行结束 / MAS_STEP_FAIL / MAS_STEP_MISSING_CONFIG
LogMonitor->>RunRecord: update content and status
LogMonitor-->>AutoProxyTask: all groups completed or fatal condition
AutoProxyTask->>BetterGI: run native one-dragon tasks
Flow diagram for Plan ownership and disabled combat tasksflowchart TD
A[Plan contains combat instance] --> B[plan_combat_bases]
B --> C[Exclude combat base from native one-dragon]
C --> D{Queue row enabled}
D -->|Yes| E[build_combat_steps]
E --> F[Include in execution segment]
D -->|No| G[Do not execute]
H[Plan has no combat instance] --> I[Leave combat base in native one-dragon]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
本分支为自洽而包含了 AUTO-MAS-Project#766 的提交(执行层判负逻辑依赖它引入的 _missing_config_reasons), 但「一条 PR 恰好一个碎片」,重复登记会被 CI 判失败。故此处移除该碎片:它在 AUTO-MAS-Project#766 里保留。 待 AUTO-MAS-Project#766 合入后,本分支 rebase 到新的 dev 即可让这段重复代码一并消失。
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 进程里顺序执行,省掉一次冷启动,执行顺序也真正听队列。plan_combat_bases)判断,而不是「是否存在启用项」——界面关掉的行不再悄悄回退到原生副本执行。changelog.d/规范登记碎片。说明:本分支基于最新
dev重做,包含 #766(首领必填校验)的改动——_missing_config_reasons等辅助函数由该 PR 引入,本分支的「必填配置缺失判负」逻辑依赖它;#766 合入后本 PR 的对应部分会自动从 diff 中消失(GitHub 按 merge-base 计算)。验证:
py_compile通过;pytest tests/task/test_bettergi_combat_scope.py tests/task/test_bettergi_one_dragon_read_failure.py8 passed;python scripts/changelog.py check通过。实机验证待补。Sourcery 总结
将 BetterGI 一条龙执行层整合为按队列顺序单次启动,并完善任务归属、运行记录和配置缺失时的失败反馈。
新功能:
问题修复:
改进:
测试:
杂项:
Original summary in English
Summary by Sourcery
将 BetterGI 一条龙执行层整合为按队列顺序单次启动,并完善任务归属、运行记录和配置缺失的失败反馈。
New Features:
Bug Fixes:
Enhancements:
Tests:
Chores:
Original summary in English