Skip to content

fix: handle framework lifecycle and cancellation events - #1

Open
MistEO wants to merge 2 commits into
mainfrom
fix/tasker-lifecycle-validation
Open

MistEO wants to merge 2 commits into
mainfrom
fix/tasker-lifecycle-validation

Conversation

@MistEO

@MistEO MistEO commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

MaaFramework 新增的 Tasker 生命周期事件没有任务身份,原校验器会错误拒绝;原生取消终态此前作为未知消息保存,导致记录中的执行跨度无法闭合。本 PR 保留原始通知,并正确表达这些事件。

  • 仅对精确匹配的 Tasker.Created / Tasker.Destroying 实例通知豁免 task_id/run_id 要求;执行事件、未知消息及身份不一致仍严格校验。
  • 将已知 Node.*.Cancelled 转为对应结束事件,结果为 cancelled。原生 reason: cancelled 也可表达旧式 Tasker 成功状态下的停止,原始 native_status 保持不变。
  • 取消事件不推断为识别命中、选中候选或已完成节点转移。未知消息仍按 framework.event 保存。

同步更新格式说明和回归测试,不增加对新 MaaFramework 导出符号的依赖。

验证:9 组 CTest 通过,其中 pipeline validator 23 项、CLI inspector 27 项、CI helper 6 项;覆盖所有已知节点取消消息、旧式任务终态、未知消息保留及流程推断边界。

与 MaaXYZ/MaaFramework#1622 联调:直接挂载本库运行完整 PipelineTesting,生成 8,780 条事件、29 个任务、43 份配置快照,校验 0 错误、0 警告。

AI 使用信息:

  • Agent:Codex
  • 模型:gpt-6-astra
  • 思考强度:ultra

Copilot AI balanced review requested due to automatic review settings November 13, 2026 09:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

你好——我已经审阅了你的更改,整体看起来很棒!


Sourcery 为开源项目免费提供服务——如果你喜欢我们的评审,请考虑分享 ✨
Original comment in English

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@MistEO MistEO changed the title fix: accept Tasker lifecycle notifications in upstream trace validation fix: handle framework lifecycle and cancellation events Nov 13, 2026
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.

2 participants