makecindy / makecindy/cindy

Pi:启动确认窗口内 Stop 叠加进程退出可能被显示为失败

Open
#4,354 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.7k
Forks
401
Avg merge
21h 48m
Merged PRs (30d)
776

Description

## 问题

Pi prompt RPC 已确认成功,但 agent_start 还没到时,Host Stop 登记在 pending generation。若进程同时在 abort 期间退出,onExit 只检查当前 generation,可能把用户取消显示成终态失败。

来源:https://github.com/makecindy/cindy/pull/4186#discussion_r3995814597

## 证据与边界

静态核对:translator.ts 的 markPiHostAbortRequested 在 !isStreaming 且 pendingHostTurnStartToken 非空时记录 turnGeneration + 1;index.ts onExit 调用的 isCurrentTurnHostAbortRequested 只匹配当前 generation。

这是 RPC 确认、agent_start 到达前、主动 Stop 和进程退出叠加的窄时序,当前无真实场景复现。工作已停止且有明确终态,风险为取消/失败分类错误,不是请求重放或静默运行。

## 后续验收

使用 Pi adapter 故障注入构造确认后/agent_start 前 Stop + onExit,验证 cancelled;同时验证未主动 Stop 的退出仍失败、被拒绝的 prompt 不把 pending Stop 传给下一代。

作为低概率 P2 独立跟踪,不继续扩大 PR4186 的扩展刷新与静默停止修复范围。

Contributor guide

Open the contributing guide

Research direction

Start by tracing markPiHostAbortRequested in translator.ts and isCurrentTurnHostAbortRequested in index.ts, then inspect the Pi adapter fault-injection path. Construct the confirmation/Stop/onExit timing and verify it reports cancelled; also verify an unrequested exit remains failed and a rejected prompt does not carry pending Stop into the next generation.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ai, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.