Skip to content

feat(feedback): 支持可选引用文本和话题轮次范围 - #3283

Merged
deepcoldy merged 8 commits into
deepcoldy:masterfrom
chaozuo-cpu:feat/feedback-reference-topic-1110
Nov 9, 2026
Merged

deepcoldy merged 8 commits into
deepcoldy:masterfrom
chaozuo-cpu:feat/feedback-reference-topic-1110

Conversation

@chaozuo-cpu

@chaozuo-cpu chaozuo-cpu commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

修改

  • answerReference 插槽可省略;保留插槽而不配置 content 时维持默认轮次/答复链接。
  • 支持固定自定义文字和 {round}、{answerUrl} 变量;空白内容隐藏引用区。限制内容长度,拒绝未知变量、mention和图片表达式,不执行任意模板表达式;预览、首次渲染和反馈更新共用模板快照契约。
  • 支持可选 roundScope: "subject" | "topic",默认保留问题级计数。原生话题按应用/群/topic聚合正式回答,普通群无topic保持问题级计数,澄清/过程不消耗首轮。
  • 保持不同问题独立准备;计数范围保存到job并在认领/真实写入边界重新检查,计数范围变化阻止旧准备,不把旧round套到新规则。
  • 配置继续使用现有Dashboard JSON、preview和保存入口;不修改部署规则、动作授权、数据库schema或公共回调协议。

验证

  • base c54fb958706a17a3e0e89df16e48da1ff400d95a → head 3e4aae8c0c9dca4593d46c693848026772ae9f43。
  • 基线template/presentation/runtime30项通过;新省略引用、自定义文本和scope回归先出现5项失败,再修复。混合规则轮次、unfinished subject隔离、写入前scope变化均真实红绿复现。
  • node node_modules/vitest/vitest.mjs run --project unit test/feedback*.test.ts test/skill-feedback*.test.ts:本轮最终修复后39 files、500 passed。
  • Bun1.4.4分进程template13/presentation19/runtime12:44 passed。
  • bun run build exit0,包含emit/typecheck、bundle及dist审计;本地缺TypeScript native使用仓库支持的TS5.9 fallback,无package/lock变更。
  • built SQLite无可选pg、预览组件、test-hygiene及vitest围栏35项通过。
  • 实际组件受控时钟探针:未完成A不阻止独立B;topic首轮及ordinary fallback隔离;subject↔topic在请求前变化被blocked;partial receipt和超时后迟到发送保持unknown、重启不重发。移除两项守卫让3个回归咬红。
  • 性能回归真实红绿:8subject/8event原64次answerUrl、16subject/16event原256次;修复后8/16次,批内listSubjectDeliveries仅1次且binding读取≤2n。后续批次新答复只增一次URL查询,已存在或本批待入队job不重复准备。native topic未完成前序bound/no-binding及claim block reason回归通过;native Bun runtime18项通过,围栏33项通过。
  • 本轮修复按批次缓存topic快照并单次遍历分subject、按chat/message缓存URL;缓存不跨批,不缓存平台权限;claim reason区分scope变化和disabled,host复用已有effective。未绑定relayed问题身份仍保守topicRootId回退,不从CLI正文猜原问题。
  • 失败URL查找不会保留被拒绝promise:瞬时查找失败在同批后续事件重新准备,成功job/准备仍去重;新增真实store恢复回归和最终nativeBun runtime19项通过。backlog既检查URL及binding上界,也核对实际ingest中distinct prepared jobs数。
  • 本地全量unit:2528 files passed /60 failed /13 skipped;49657 tests passed /204 failed /203 skipped。该运行跨增量修复编辑,包含修复前host红测试;最终493反馈回归已绿。其他宿主/全量失败未全部做准确基线归因,不声明全量通过。
  • 本轮性能修复全量unit完成:2531 files passed/56 failed/14 skipped;49656 tests passed/206 failed/211 skipped。运行跨最后缓存恢复增量编辑,已有宿主tmux/sandbox等失败,未全部准确基线归因;最终500反馈回归与build通过不代表全量通过。

预览示意

实际Dashboard组件投影到隔离HTML,并使用隔离Chrome抓取;不是手绘卡片或真实飞书投递。

默认、自定义与隐藏引用

影响面与限制

变更限于公共反馈模板/计数/宿主发送scope检查及既有测试。默认模板、subject计数、策略快照、问题/话题/普通群及动作callback保持兼容;不依赖CLI适配器或PTY/Tmux实现,不变更会话/调度库。Linux Node/Bun已验证,其他平台由CI覆盖,不扩大为生产验收。

独立新PR,不包含性能/鉴权PR3274、私有应用/群ID、业务名称、Hook脚本、真实凭据或版本后缀。没有部署、改线上配置、切换launcher、重启、补历史消息或自动合并。准确head完成复核,原性能与三项附加问题已解决,已正式转为Ready for review;真实飞书新话题及按钮验收需要独立测试授权。

最新准确head的CI PostgreSQL15/17、build、network和三种binary成功;unit四分片及Bun仍运行。不以局部CI成功替代完整全绿,也不移除上述本地全量失败限制。

Created-by: Polaris

chaozuo-cpu and others added 2 commits November 10, 2026 03:32
允许隐藏或自定义引用区,固定变量安全替换,保留默认模板;按每个回答有效规则计算subject或topic轮次,发送前复验计数范围,保留未知不重发边界。

Created-by: Polaris
Co-authored-by: TRAE CLI <[email protected]>
Created-by: Polaris
Co-authored-by: TRAE CLI <[email protected]>
@chaozuo-cpu

Copy link
Copy Markdown
Contributor Author

AI Code Review · Aegis

  • 被审版本:head 02c852bdd8cd24a31a027b44195d33e5cd4fb4fe / base c54fb958706a17a3e0e89df16e48da1ff400d95a
  • 范围:12 个文件(11 源码/测试/文档 + 截图,+267/−34)全部读取;4a911d7a3 代码 + 02c852bdd 截图
  • 结论:发现 1 项 P2(性能,建议修复)+ 3 项 P3(非阻塞)+ 2 项待确认;本 head 不 pass,待修复后新 SHA 复审
  • 验证(我实际执行):5 个改动测试文件 73 passed;扩展到 10 个反馈展示相关文件 110 passed;node scripts/tsc.mjs -p tsconfig.typecheck.json → exit 0(TS 5.9 fallback);多问题话题探针 {s:8, subjectCalls:704, urlCalls:64, sends:1}(base 同场景按 event source subject 约 8 urlCalls / ~72 subjectCalls)。本机无 Bun,scripts/fenced-run.ts 的 import.meta.main 需 Bun;探针改用仓库 unit vitest 的同套 fence(temp dir/stub,未触真实 HOME/fleet),临时文件已删除。
  • 未运行:作者全量 unit(204 失败,未归因)、真实飞书发卡(截图是 Dashboard renderer,非真实 Feishu 卡)。不声明全量通过。
  • 不 Approve;PR 保持 Draft。

P2(建议修复)

  1. 多问题话题每个 turn.completed 重建所有 subject 的卡片并重复调用 answerUrl(Lark API) — src/services/feedback-extension-runtime.ts:67-83(all-subject subjectGroups/groups)、:110(await input.answerUrl(...))、:130(extensions.ingest 才去重)。触发:subject scope(默认)+ 同话题多个 sourceMessageId + 多个 completed turn(新 mixed-question 场景;重启 backlog 更明显)。影响:answerUrl(getMessageThreadId→getMessageDetail,10s 超时、无缓存)按 s×e 串行调用,buildFeedbackSurface 也 s×e;job 只在 ingest 去重,调用不去重;reconcile/发卡延迟、Lark API 负载上升。证据:受控探针(真实 store/reconcile,8 subject/8 event,subject scope){subjectCalls:704, urlCalls:64, sends:1};base 同场景约 8/72。建议:reconcile 内按 (chatId,messageId) 缓存 answerUrl;对已存在 surface job(extensions.job(identity(['surface', answerId])))跳过;一次遍历预计算 binding 并按 subject 分组(O(n)),替代每新 subject 的 n 次 extensions.subject 过滤。验证:s/e 测试断言 answerUrl ≤ distinct answers、subject 查询 ≤ c·n。

P3(非阻塞)

  1. claim 阶段 scope 变化与 disabled 共用 reason — feedback-extension-runtime.ts:151-152:!effective?.matched || preparedScope !== currentScope 都 settle blocked presentation_disabled;beforeWrite 用 presentation_scope_changed。审计无法区分“展示被关闭”与“scope 变化阻止旧卡”。建议区分 reason。
  2. 真正的 topic-scope + unfinished 未覆盖 — test/feedback-extension-runtime.test.ts:33:ordinary 的 roundScope:'topic' 只配在 topicRootId=chat 的 fallback;非 ordinary 的 native topic 未配 roundScope,因此 native topic + topic scope + 未完成 A/完成 B 未测;answerUrl/subject 调用次数也无断言(P2 无回归测试)。建议补用例并加调用计数。
  3. beforeWrite 重复 resolve — feedback-extension-host.ts:81 已算 effective,:84 又用同参 resolveFeedbackPresentation(...);建议 if (!presentation || !effective?.matched || ...)。

待确认

  • relayed/no-binding deliveries:bindSubject 只在 dashboard-ipc-server.ts:2341;recordRelayedTurnDelivery 不绑定,runtime 的 subject fallback = topicRootId(:75/:90)。同话题的 relayed 未完成 A 仍可能通过 feedbackAnswerGroups 的 break 阻止后续 relayed B;若 relayed turn 也用于多问题话题,独立 subject 修复不完整。需确认 relayed 场景是否在范围。
  • 全量 unit 204 失败未归因;真实飞书卡未验收;截图仅 Dashboard renderer。均不改变本次 12 文件静态结论,但属验证缺口。

})));
}
}
const groups = [...new Map([...topicGroups, ...[...subjectGroups.values()].flat()].map(group => [group.id, group])).values()];

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

AI Code Review · Aegis — 被审 SHA 02c852bdd8cd24a31a027b44195d33e5cd4fb4fe

[P2] 每个 turn.completed 重建所有 subject 的卡片并重复调用 answerUrl

  • 触发:subject scope(默认,roundScope 省略)+ 同话题多个 sourceMessageId + 多个 completed turn(新 mixed-question 场景;重启 backlog 更明显)。
  • 影响:本行 groups 包含所有 subject 的 group;:110 对每个 matched group await input.answerUrl(...)(生产为 getMessageThreadId→getMessageDetail,10s 超时、无缓存),:111 再 buildFeedbackSurface;job 只在 :130 extensions.ingest 去重,调用不去重。answerUrl 调用 = s×e,串行;reconcile/发卡延迟,Lark API 负载上升。
  • 证据:受控探针(真实 store/reconcile,8 subject/8 completed event,subject scope){subjectCalls:704, urlCalls:64, sends:1};base 同场景按 event source subject 过滤约 8 次 answerUrl/~72 次 subject 查询。
  • 建议:reconcile 内按 (chatId,messageId) 缓存 answerUrl;对已存在 surface job(extensions.job(identity(['surface', answerId])))跳过;一次遍历预计算 binding 并按 subject 分组(O(n)),替代每新 subject 的 n 次 extensions.subject 过滤。验证:s/e 测试断言 answerUrl ≤ distinct answers、subject 查询 ≤ c·n。

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

已在3e4aae8c0c9dca4593d46c693848026772ae9f43修复:批内每chat/topic一次读取和一次binding遍历,bySubject线性分组,round map;render前跳过现有及本批job;URL按chat/message批内缓存,失败promise逐出不污染恢复。真实8/16 backlog先复现64/256次URL,新8/16次、list1次、binding≤2n、ingest prepared8/16;第二批新答复只加一次URL。移除prepared guard使真实ingest数64/256咬红。最终500反馈/build/Bun19通过,PR保持Draft等待新SHA复审。

});
const preparedScope = job.payload.roundScope === 'topic' ? 'topic' : 'subject';
const currentScope = effective?.roundScope === 'topic' && job.payload.topicId !== job.payload.chatId ? 'topic' : 'subject';
if (!effective?.matched || preparedScope !== currentScope) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

AI Code Review · Aegis — 被审 SHA 02c852bdd8cd24a31a027b44195d33e5cd4fb4fe

[P3] claim 阶段 scope 变化与 disabled 共用 reason

  • 本行 if (!effective?.matched || preparedScope !== currentScope) 对两种失败都 settle blocked presentation_disabled;而 beforeWrite 的 scope 变化用 presentation_scope_changed。
  • 触发:prepare 后配置 subject↔topic 变化(或展示被关闭)。
  • 影响:审计/日志无法区分“展示被关闭”与“scope 变化导致旧卡被阻止”,排查配置变更时容易误判。
  • 建议:preparedScope !== currentScope 时用 presentation_scope_changed,!effective?.matched 用 presentation_disabled;补一个 claim 阶段(非 beforeWrite)scope 变化测试。

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

已在3e4aae8c0c9dca4593d46c693848026772ae9f43区分claim reason:规则命中但prepared/current scope变化为presentation_scope_changed,不命中为presentation_disabled。现有真实queued job测试两分支通过,scope-change旧reason测试先红再绿。

removeInline: async () => {},
config: { version: 1, hostId: 'host', templates: [defaultFeedbackTemplate()], hooks: [], actions: [],
presentations: { app: normalizeFeedbackPresentation({ default: { enabled: true, rounds: [1],
...(ordinary ? { roundScope: 'topic' } : {}) } }) } } });

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

AI Code Review · Aegis — 被审 SHA 02c852bdd8cd24a31a027b44195d33e5cd4fb4fe

[P3] 真正的 topic-scope + unfinished 未覆盖

  • 本用例 ordinary 分支只在 topicRootId=chat 时配 roundScope:'topic'(走 ordinary fallback);非 ordinary 分支 topicRootId='topic' 但未配 roundScope(subject)。因此 native topic + topic scope + 未完成 A/完成 B 未测。
  • 影响:文档“未完成回答只阻止同一计数范围的后续回答”的 topic-scope 分支没有红绿证据;同时 answerUrl/subject 调用次数无断言,P2 性能回归没有回归测试。
  • 建议:补 native topic + roundScope:'topic' + 未完成 A/完成 B(断言同一 scope 阻止),并加调用计数断言(answerUrl ≤ distinct answers)。

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

已补真正native topic+roundScope topic+unfinished前序的bound和no-binding两条回归:后序completed时先零发送,前序完成后发首张卡;性能用例覆盖8/16 subject绑定/链接/实际prepared job上界。relayed无可信原问题绑定仍topicRootId回退,不猜独立问题,文档明确既有身份边界。最终500反馈通过,未宣称真实飞书或全量unit通过。

const current = await readFeedbackExtensionConfig(dataDir);
const bot = getBot(appId).config;
const presentation = current.presentations[appId] ?? bot.feedbackPresentation;
const effective = presentation && resolveFeedbackPresentation(presentation, { botAppId: appId, chatId, sourceMessageId: subjectId, round });

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

AI Code Review · Aegis — 被审 SHA 02c852bdd8cd24a31a027b44195d33e5cd4fb4fe

[P3] beforeWrite 重复 resolve

  • 本行已计算 effective,:84 又用完全相同的参数调用 resolveFeedbackPresentation(...).matched。
  • 影响:重复解析(小成本)且两份判断可能漂移;后续改 scope 逻辑容易只改一处。
  • 建议:if (!presentation || !effective?.matched || !resolveFeedbackPolicyForDelivery(...)) throw ...。

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

已在3e4aae8c0c9dca4593d46c693848026772ae9f43复用beforeWrite中的effective?.matched,不重复resolve相同presentation参数。既有host scope-beforeWrite及授权回归通过。

chaozuo-cpu and others added 2 commits November 10, 2026 04:00
按话题批内复用回答和问题绑定快照,线性按subject预分组,跳过已有及本批job;补原生topic未完成和scope审计原因回归,保留默认relay身份回退。

Created-by: Polaris
Co-authored-by: TRAE CLI <[email protected]>
失败时移除缓存让未准备答复可在同批后续事件恢复,保留成功job去重;增加失败恢复与唯一入队数回归。

Created-by: Polaris
Co-authored-by: TRAE CLI <[email protected]>
@chaozuo-cpu

Copy link
Copy Markdown
Contributor Author

AI Code Review · Aegis(复审)

  • 被审版本:head 3e4aae8c0c9dca4593d46c693848026772ae9f43 / base c54fb958706a17a3e0e89df16e48da1ff400d95a
  • 范围:12 文件(+420/−40);重点增量 02c852bdd→3e4aae8c0(runtime/host/runtime tests/docs,4 文件);原模板/引用/截图不变
  • 结论:未发现 P0/P1/P2;原 P2 与三项 P3 均已解决;relay/no-binding 待确认已文档化;本 head 在本次范围可视为 pass(不 Approve)
  • 验证(我实际执行):5 个改动/相关测试文件 80 passed(runtime 19、host 23、template/presentation/api 38);node scripts/tsc.mjs -p tsconfig.typecheck.json → exit 0(TS 5.9 fallback);独立探针 8 subject×2 turns:subject scope 首轮 URL 8、跨批新答复 +1=9;topic scope URL 1、跨批仍 1;topic 读取 1 次。
  • 未运行:作者全量 unit(56 失败文件/206 测试,未归因)、真实飞书 transport/按钮(截图是 Dashboard renderer)。不声明全量通过。
  • PR 保持 Draft。

逐项

  1. P2(多 subject 每事件重复 answerUrl/render) — 已解决。runtime:32-37 批内 topics/answerUrls/preparedJobs;:75-103 每 chat/topic 一次 listSubjectDeliveries、每 delivery 一次 extensions.subject、单遍 bySubject 预分组;:109-110 已保存 job 与本批 prepared job 在 render/URL 前跳过;:133-138 URL 按 chat/message 批内缓存,失败 .catch 逐出。新测试 prepares each answer once... 断言 URL=count、reads=1、bindings≤2n、ingest jobs=count、下一批 +1;独立探针复核 8/1、跨批 +1。旧 02c852 的 per-event all-subject 代码在同场景为 count×count / 16 次 URL,因此该测试是真实 RED→GREEN。
  2. P3-1(claim reason 不区分) — 已解决。runtime:180-183 用 effective?.matched ? 'presentation_scope_changed' : 'presentation_disabled';新测试覆盖 enabled true/false 两分支。
  3. P3-2(topic-scope unfinished 未覆盖) — 已解决。新测试 keeps unfinished answers ahead... 覆盖 native topic + roundScope:'topic' + bound/no-binding:未完成 A 时 sends=0,A 完成后首卡为 unfinished round 1;与文档“同范围前序未完成等待”一致。
  4. P3-3(beforeWrite 重复 resolve) — 已解决。host:84 改用 effective?.matched。
  5. 待确认(relay/no-binding) — 已文档化。docs:38 明确批内快照/URL 缓存边界,docs:40 明确 relay 无 sourceMessageId 时回退 topicRootId、同范围等待、不猜多问题身份、不扩大 relay 写接口;代码 runtime:84 回退一致。属保守设计,不再作为阻塞。

覆盖缺口(不改变结论)

  • blocked/succeeded/pending surface job 的跳过有测试;unknown surface job 与 blocked/succeeded 共用 extensions.job 分支,未单独用例(代码路径已核实)。
  • 全量 unit 56 失败文件/206 测试未归因;真实飞书 transport/按钮未验收;截图仅 Dashboard renderer。
  • 本机无 Bun,ad-hoc 探针使用仓库 unit vitest 同等 fence(temp dir/stub,未触真实 HOME/fleet),临时文件已删除。

@chaozuo-cpu
chaozuo-cpu marked this pull request as ready for review November 9, 2026 20:38
answerReference 配置为空白字符串时不渲染引用区的行为原先没有测试钉住,
摘掉 rendered.trim() 守卫后全部反馈测试仍绿。补 ''/'   '/'\n\t ' 三个变体,
断言只剩 status 插槽的占位 markdown,变异复验三项全部咬红。

Co-Authored-By: Claude Fable 5 <[email protected]>
@deepcoldy

Copy link
Copy Markdown
Owner

自动评审补充说明(最终以维护者审阅为准):

评审中发现一处测试缺口:answerReference 插槽配置为空白字符串时省略渲染引用区的行为(feedback-template.ts 中 rendered.trim() 守卫)没有测试钉住——摘掉该守卫后现有全部反馈测试仍然通过。

已在作者分支追加一个 test-only 提交(b87ef2f7e,不改动任何 src):在 test/feedback-template.test.ts 新增 ''、' '、'\n\t ' 三个空白变体的回归用例,断言卡片只剩 status 插槽的占位 markdown;对该用例做变异复验(去掉 trim 守卫)三个变体全部失败,确认能咬住行为回归。

其余评审结论:无阻断问题。模板变量白名单(仅 {round}/{answerUrl})、mention/图片/未知变量拒绝、roundScope 在认领与 transport 写入前的双重复验、普通群回退问题级计数等路径均有真实组件测试覆盖,本地定向测试(vitest 83 项 + bun 腿)与 bun run build 全绿。

DeepCold review and others added 3 commits November 10, 2026 06:30
同步 deepcoldy#3274(反馈卡双 lane / 共享鉴权缓存)。唯一冲突在
test/feedback-extension-host.test.ts:两边在 describe 开头同位各增用例,
保留并集(本 PR 的计数范围用例 + deepcoldy#3274 的 3 条 lane 用例);
feedback-extension-host.ts 自动合并,lane 开关与本 PR 的 send 签名、
beforeWrite 计数范围复验互不相交。

Co-Authored-By: Claude Fable 5 <[email protected]>
replyMessage 外层网关对 5xx/无响应会整段重试,beforeWrite 每次重试都重跑。
若首发已在飞书落地而响应丢失、退避窗口内又切换了 roundScope,旧逻辑在重试时
抛 feedback_presentation_scope_changed,任务落 blocked;而 reconcileSurfaceReceipt
只接受 unknown 的 surface 任务,这张已发出的卡无法人工核对补绑。

给 host 的 beforeWrite 计次:仅第一次尝试发现范围变化才抛 scope_changed
(确认尚未发出,直接 blocked);重试期再发现变化改抛
scope_changed_during_retry,runtime 不识别该错误名而落 unknown,
保留人工补绑通道。补真实组件用例(首发成功→切范围→重试→unknown→补绑成功),
另补普通群(topicRootId==chatId)配 topic 仍按 subject 发卡的宿主用例。

Co-Authored-By: Claude Fable 5 <[email protected]>
钉住四处原先无测试的行为(变异复验均咬红):
- 升级前已排队、payload 缺 roundScope 的旧 surface 任务按 subject 处理,不被 blocked;
- 非 answerReference 插槽带 content 在保存/预览期被拒(feedbackButtons/
  feedbackDetails/status/actionButtons 四个插槽);
- answerReference 的非字符串 content 被拒(number/array/object/boolean/null),
  it.each 用元组行以兼容 bun:test 不展开裸数组的语义。

Co-Authored-By: Claude Fable 5 <[email protected]>
@deepcoldy

Copy link
Copy Markdown
Owner

已按 Paid 复审意见同步 master 并落实 P3 修复,新 head 4979161dc,三个提交:

1. 同步 master(83b95b65b,merge 提交)

2. P3-1 修复(a92ef1be0)

  • host 的 beforeWrite 加调用计数:仅第一次尝试发现 roundScope 变化才抛 feedback_presentation_scope_changed(确认尚未发出,落 blocked);网关重试期再发现变化改抛 feedback_presentation_scope_changed_during_retry,runtime 不识别该错误名而落 unknown,保留 reconcileSurfaceReceipt 人工补绑通道。
  • 补真实组件用例:首发成功→退避内切范围→重试落 unknown→reconcileSurfaceReceipt 补绑成功;另补普通群(topicRootId==chatId)配 topic 仍按 subject 正常发卡的宿主用例。
  • 变异复验:把首次判断短路(重试也抛 scope_changed)后,首发 blocked 用例与重试用例分别咬红。

3. P3-2 守卫测试(4979161dc,纯测试)

  • 旧排队 payload 缺 roundScope 按 subject 处理不被 blocked(runtime 用例,变异咬红)。
  • 非 answerReference 插槽带 content 被拒(4 个插槽)、非字符串 content 被拒(5 种类型,元组行兼容 bun:test),变异复验均咬红。
  • P3-3 更正属实并已实测确认:非引用插槽的 content 在校验期就被 feedback_template_reference_invalid 拒绝,原先只是缺用例,现已补齐。

验证(合并树新 head)

均为自动评审动作,最终以维护者审阅为准。

@deepcoldy
deepcoldy merged commit 38ec829 into deepcoldy:master Nov 9, 2026
13 checks passed
@deepcoldy

Copy link
Copy Markdown
Owner

感谢贡献,已 squash 合入 master(落地 38ec829)。

这个 PR 的反馈卡可选引用文本({round}/{answerUrl} 白名单、mention/图片/未知变量拒绝、空白隐藏)和 roundScope: subject|topic 话题级轮次,整体设计克制:默认配置行为与旧版逐字一致,不动数据库 schema、回调协议和部署规则,普通群自动回退问题级计数,配置切换在任务认领和实际写入两处复验,老用户零影响。

评审过程中一起补齐的内容(均已在本 PR 内):空白引用省略渲染、旧排队任务缺 roundScope 的兼容、非引用插槽/非字符串 content 的校验用例,以及网关重试期计数范围变化改落 unknown 以保留人工补绑通道,相关守卫都有变异复验。

剩余一项验证(不阻断合码):真实飞书新话题发卡和按钮点击的端到端验收需要独立测试授权,目前覆盖到的是单元/组件级测试与 Dashboard 隔离渲染预览;安排真机验收时建议重点看话题级首轮计数和自定义引用文案的实际卡片效果。

欢迎继续贡献。

@github-actions

Copy link
Copy Markdown

@chaozuo-cpu @deepcoldy 合入 master 后的 Midscene E2E 失败:Feishu live Midscene 失败。

这次运行覆盖 7a1438f…38ec82937(4 个提交),同批合入的还有 #3262 #3274 #3285,失败不一定由本 PR 引起。

用例 跑道 状态 失败信息
OpenCode basic bot flow feishu-core-clis failed waitFor timeout: Based on the screenshot, the main content area displays a conversation thread. I am looking for a specific text bubble from "OpenCode" containing the string "ACK-e2e-opencode-1794267…

@github-actions

Copy link
Copy Markdown

🚀 Released in v3.59.0

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