Repository navigation
Conversation
|
自动评审的初步意见(最终以维护者审阅为准): 整体方向正确,refork 路径与上游三态语义的保留都没问题,但 live worker 路径的执行身份没有真正送到 worker,这个 PR 要修的 exit 77 在常见场景下仍然会出现,需要补一处一行转发和一条守护测试。 P1:live 分支构建了
|
|
已修复评论指出的 live worker 身份转发缺口。
验证命令(Bun 1.4.3): timeout 300s bun run test test/daemon-rename-route.test.ts test/gateway-turn-caller.test.ts test/doc-comment-prompt.test.ts test/ipc-lark-tool-identity.test.ts test/session-lifecycle-start.test.ts test/identity-storage-model.test.ts test/active-turn-authority.test.ts test/turn-cli-identity.test.ts test/doc-comment-ask.test.ts test/reply-target-fallback.test.ts test/doc-comment-event-identity.test.ts test/doc-comment-daemon-concurrency.test.ts test/test-hygiene.test.ts
bun run build
git diff --check |
|
🚀 Released in v3.52.0 |
改了什么
仅修复文档评论轮的请求用户身份关联,不修改授权策略、权限配置或其它功能。
70abe2726(fix(auth): 修复排队与定时任务的执行身份切换 #2015)。保留上游trustedCaller三态判定:当前执行者优先,显式null不允许回退成评论作者或其它身份。currentGatewayCallerOpenId抽为可直接测试的纯函数,并保留 worker-pool 原导出与调用点。仅旧 worker 未提供权威调用者时,按精确turnId从评论目标恢复作者;不借用 session/subscription owner 或其它轮作者。trustedCaller,让最新 worker 从真实输入中冻结执行身份,而不是仅把作者展示给模型。保留 bot/user 类型,不将机器人标成真人;无作者、无 turnId 和 legacy adopt 输入保持无身份。sendWorkerInput第四参数转发cliInput.trustedCaller,保证身份到达真实 IPC,而不只停留在构建出的 payload 上。为什么
原评论入口正确保存了作者,但请求者解析遗漏评论 per-turn 作者,
lark-cli --as user在读取既有授权前返回No current requesting user; --as user requires their authorization(exit 77)。上游 #2015 进一步以真实输入的
trustedCaller冻结执行身份,缺少该字段会明确发布trustedCaller:null。因此本次上游同步既保留显式 callerless 的安全边界,也补齐评论输入的身份传递,不能仅消除文本冲突。影响范围
最新上游版本的实际验证
评论反馈修复后的验证(8db9e6e5f)
timeout 300s bun run test test/daemon-rename-route.test.ts test/gateway-turn-caller.test.ts test/doc-comment-prompt.test.ts test/ipc-lark-tool-identity.test.ts test/session-lifecycle-start.test.ts test/identity-storage-model.test.ts test/active-turn-authority.test.ts test/turn-cli-identity.test.ts test/doc-comment-ask.test.ts test/reply-target-fallback.test.ts test/doc-comment-event-identity.test.ts test/doc-comment-daemon-concurrency.test.ts test/test-hygiene.test.ts bun run build git diff --check上游同步时的验证(1bee62402)
timeout 120s bun run test test/gateway-turn-caller.test.ts test/doc-comment-prompt.test.ts,32 个用例中 27 通过、5 失败;失败准确复现评论输入没有执行者身份。timeout 300s bun run test test/gateway-turn-caller.test.ts test/doc-comment-prompt.test.ts test/ipc-lark-tool-identity.test.ts test/session-lifecycle-start.test.ts test/identity-storage-model.test.ts test/active-turn-authority.test.ts test/turn-cli-identity.test.ts test/doc-comment-ask.test.ts test/reply-target-fallback.test.ts test/doc-comment-event-identity.test.ts test/doc-comment-daemon-concurrency.test.ts test/test-hygiene.test.tstimeout 120s bun run test test/ipc-lark-tool-identity.test.ts test/doc-comment-prompt.test.ts test/gateway-turn-caller.test.ts,78/78 通过。bun run build:完整构建和产物审计通过;新增 gateway/comment 输入测试的独立 TypeScript 检查通过;git diff --check通过。先前版本的 live 验证
初版修复
9d034f05a曾执行bun run switch:here && bun run daemon:restart;11 个 bot 和 Dashboard 在线。随后飞书评论实测及日志确认:lark-cli contact +search-user --as user返回ok:true、identity:user、exit 0,IAM 查询成功并回复原评论,未再出现 exit 77。此 live 结果属于初版,不作为本次上游适配版本已部署的证明。本次上游适配以以上本地回归和构建结果为准。
验证环境说明
复用本机依赖视图,未在 worktree 执行 install,未修改 package.json/锁文件或主仓库共享依赖。原依赖视图缺少的
[email protected]已隔离在初版 worktree 的本地依赖视图。整个旧 IPC 测试文件的额外独立类型检查此前发现既存 SDK cache mock 类型错误,未扩大范围修复。实际 IPC 测试和项目完整构建通过。