Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

feat(worker): 集群档取消传播止步步界——execution.cancel() 即时取消件已存在但无跨进程触发路径

Open
#34 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
python, redis

Research direction

Start with flow_worker.py and control.py to trace worker lease ownership and custom command handling, then read the cancellation path in executions.py and the FlowExecution.cancel() implementation in executor.py. The issue’s acceptance check is that cancelling a running long AGENTRUN kills its process group within 5 seconds and ends in the cancelled state.

Written by the indexing model from the issue text.

Description

场景 gap 单(okguitar 提报)· 优先级 P1 · 依赖:无

基线 HEAD = ddcedae。

Summary

  • _cancel_requested 全部调用点只有三处:start 入口(flow_worker.py:791)、resume 入口(:920)、步界(:1139)——没有任何步内/节点内轮询。
  • 引擎侧即时取消件已具备:FlowExecution.cancel()(executor.py:167-183,cancel_event + 粘滞 cancel_requested;runner.py:276-284 节点入口拒执行、code 沙箱 killpg)——但 worker 内唯一调用者是看门狗失租(:1598-1630)。
  • 控制通道具备定制命令能力:ControlListener.register_handler(control.py:97-99),但 RedisFlowWorker 从未注册 cancel handler;console 控制面只发 stop(plaita-console/backend/api/services.py:530-548)。BFF cancel 只写标志键 + 入队 resume 消息(executions.py:600-633)。
  • flow_worker.py:1136-1138 注释宣称「code 沙箱类由引擎层 cancel_event 即时击杀」——但用户取消链路上没有任何代码把标志键翻译成 execution.cancel(),该宣称当前不成立。

影响

用户对运行中的数小时高成本 AGENTRUN 点取消:API 返回成功、标志键写入,但 worker 要等这个节点自然跑完才在步界消费标志——全额成本照烧、副作用照发,取消意图延迟数小时兑现。

建议

最小闭环(纯接线不改引擎):worker 注册 control 自定义命令 cancel_execution(查本 worker 持有租约的 execution → execution.cancel()),BFF cancel 时向持有者广播;标志键仍是兜底真相源。

验收:运行中长 AGENTRUN 点取消,断言 5s 内进程组被击杀、终态 cancelled。

Dominant language
Python
Stars
0
Forks
1
Avg merge
3h 53m
Merged PRs (30d)
3

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jeffkit/plaita

All issues in jeffkit/plaita

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.