Repository navigation
fix(cli): 修复 bots list 的 isSelf 判定 - #17
Merged
Merged
Conversation
- listChatBotMembers 的返回类型从内联重复 3 次的对象字面量提取为 ChatBotMember 类型别名 - 删除测试中未被 listChatBotMembers 调用的 getAllBots / getBot / getBotClient mock - 测试新增 afterEach 清理 mkdtempSync 创建的 tmpdir
sensuossss
added a commit
that referenced
this pull request
Jun 24, 2026
按多 agent review 逐条修(合入 master 前): High - #1 runtime: revisit 后 D#001/D#002 同 node.id 并发,inFlight/nodeControllers/ nodeAbortCleanups 改按 dispatchKey(instance) 存取 + 守卫删除;cancel 按 instance abort。原先无守卫 inFlight.delete(node.id) 会删掉活着的新实例 → 整 run 误崩。 - #2 host: architect 手搓 BotSnapshot 漏 disableCliBypass → 受限 bot 在 architect 步骤悄悄提权。改用权威 botToSnapshot()。 - #3 architect: 复用 attempts/001 不清旧 manifest,watcher 见旧 manifest 直接 finish('ok') → revise-dag 后修订不生效。dispatch 前 rmSync(attemptDir)。 - #4 test: 加 runWorkflow 集成测试,断言 restricted override 真的写进 worker 的 req.botSnapshot.disableCliBypass(降权红线看门)。 Medium - #5/#12 daemon-run: driveV3Run 顶部记 wasAlreadyTerminal,已终态短路,避免 coalesce 重驱 / "/start" 重试重发 gate 卡与 done/failed 消息。 - #6 security: gate handler 的 waitId 未校验就 path-join → 加 isValidWaitId (含 # 给 A#001-gate 形态) 拦 ../ 逃逸。 - #7 dashboard: catalog 前缀路由用 startsWith 误吞 runId 以 catalog 开头的 v3 run 详情页 → 改带边界正则。(本就是合并时我引入的) - #8 daemon: 线程内 "/workflow new" grill fall-through 时 cmdContent 仍是字面量, 被待回答 ask 拦截器当答案吞掉 → ask 拦截加 !threadGrill。 - #9 test: 补 manifest 软链逃逸(symlink→外部)的拒绝用例,防 realpath 被简化成 resolve。 Nit - #16 v3-blocked handler: String(formValue) 把 object/array 强转成非空垃圾过校验 → 改 typeof==='string'。 - #17 v3.ts: 抽 isTerminalRunStatus(),统一 poll/loop 的终态停轮判定(消死代码)。 校验:pnpm build 通过;v3/daemon/dashboard 相关单测全绿(含新增 2 条)。
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.
摘要
listChatBotMembers()返回群内每个 bot 对应的larkAppIdbotmux bots list用larkAppId === 当前 session.larkAppId判定isSelfcliId场景的回归测试,避免多个 Codex/同 CLI bot 时 self 判定全为 false验证
pnpm exec tsc --noEmitpnpm vitest run test/list-chat-bot-members.test.ts test/prompt-builder.test.tspnpm run build