Repository navigation
feat(recall): send recent turns (prompt + answer) and the session title in the recall context - #92
forrestlinfeng wants to merge 4 commits into
sentinel advisory review
Repository: evomap/evolver-agent-plugin
PR: #92
Head: 99866df5d9880eba582ba355f94c842b206890d3
Task: task_ebd386632986d22d5e441f895fa03251
Status: verified_needs_manual_review
Blocking findings: 0
Non-blocking verified findings: 0
Yellow advisory: 7
Blocking clusters: 0
Unresolved review items: 14
Prior-head recheck obligations: 7
Invalid review item statuses: 0
Pending gate reconciliation: 0
Pending result publication: 0
Review/CI integrity blockers: 2
Lineage cutover ready: true
Agent context: /api/v1/sentinel/pr-review-context?head_sha=99866df5d9880eba582ba355f94c842b206890d3&owner_repo=evomap%2Fevolver-agent-plugin&pr_number=92
Prior-head selectors: prior_recheck:review_item_8f42b83b469ccf9ea1a515eb, prior_recheck:review_item_7d664643da59ab7cbd82ef63, prior_recheck:review_item_029fe74fb0844f17b97ab423, prior_recheck:review_item_d91f26f054254b9d9acfe1d0, prior_recheck:review_item_804bc7d9b53b7ceda8e04121, prior_recheck:review_item_9a7c7dcc5c00874bf263bf5e, prior_recheck:review_item_2d2ee31014ba04ea5ca9042d
Yellow advisory summary:
p3无turnId的结束事件可将旧答案写入当前回合: path: 某回合 A 的结束回调携带answer、但未携带turnId;回合 B 已通过openedTurn成为当前打开回合后,回调调用closedTurn(session, null, now, answerA)。 | mechanism: 新增的answer会在未提供turnId时写入任意当前打开回合。若异步结束事件可迟到且其调用方省略身份标识,A 的答案会关闭 B 并保存为 B 的答案;随后openedTurn或endedSession会将这组错误的 prompt/answer 归档到recentTurns。 | probe: 直接构造已打开的 A,随后用openedTurn打开 B;再调用closedTurn(sessionB, null, now, 'A 的回答'),最后调用openedTurn打开 C。需要检查recentTurns中是否出现{ prompt: B.prompt, answer: 'A 的回答' }。 | facts:closedTurn本 PR 新增参数answer = '',并将其写入返回的next.answer。;isOpenTurn明确允许 `turn...(truncated)p3缺失或被清洗的用户提示会留下孤立的助手回答: path: 历史回合包含空提示、提示被清洗为空,或提示未被记录但已有回答时,调用recentTurnsOf构造context.recent_turns。 | mechanism:messagesOf独立过滤空消息,而非以整轮为单位过滤;当turn.prompt为空而turn.answer有内容时,它会返回单独的{ role: 'assistant' }消息。这与“whole turns only”以及“prompt then answer”的新增契约不一致。 | probe: 调用recentTurnsOf([{ prompt: '', answer: 'done' }]),检查返回值。 | facts:messagesOf先构造 user 与 assistant 两条消息。; 随后使用.filter((message) => message.text)独立移除空消息。;answerTextOf(turn?.answer)可在promptTextOf(turn?.prompt, ...)为空时仍返回非空文本。; 注释与文档均声明应按“a turn goes whole”及“whole turns only”处理。p216 KiB 上下文会被旧版 Proxy 整体丢弃: path: 用户提交长提示触发turn_startrecall,或检查失败触发check_failedrecall,经/asset/fetch与文本搜索请求发送context| mechanism: 本 PR 将客户端发送上限从 4096 字节提高到 16384 字节,但没有在构造请求时协商或检测 Proxy 版本。代码及架构文档明确指出 2.0.48 及更早版本会丢弃超过 4096 字节的整个上下文,因此插件与旧 Proxy 混合部署时会产生确定的协议上限不一致。 | probe: 使用 Evolver Proxy 2.0.48 启动插件,提交由约 4000 个 CJK 字符组成的首个任务,或先产生三轮历史再提交短 follow-up;捕获发送到/asset/fetch的JSON.stringify(body.context)字节数及 Hub 收到的上下文。 | facts:PROXY_CONTEXT_MAX_BYTES从4096改为16_384。; 新增注释明确写明“4096 bytes up to 2.0.48”时 Proxy 会丢弃整个 recal...(truncated)p2无回合标识的迟到turnEnded可能把旧答案写入当前回合: path: host 发送不含turnId/expectedTurn的turnEnded,且该事件在下一次promptSubmitted打开新回合后才到达 | mechanism: 本 PR 将事件携带的answer传给closeTurn,后者从执行时的当前 session 调用closedTurn(..., answerTextOf(answer))。expectedTurn校验是可选的,而新增测试中的标准调用也没有提供turnId或expectedTurn;因此迟到事件缺少身份栅栏,可能关闭新回合并把旧答案记录到新回合。settleTurn的sameTurn只能保护已经由closeTurn选中的回合,无法验证答案来源。 | probe: 在同一sessionId上提交 prompt A;延迟其无turnId的结束事件;提交 prompt B;再调用turnEnded({ sessionId, reason: 'answer', answer: 'A answer' });随后提交 prompt C 并检查/asset/fetch的context.recent_turns。 | facts: 当前 diff 在 `...(truncated)p3迟到的turnEnded会把旧答案写入新回合: path: 用户提交提示 A → 在 A 的结束事件到达前提交提示 B → 主机迟到发送不含turnId/expectedTurn的 AturnEnded→ 再提交提示 C | mechanism:turnEnded的expectedTurn和turnId均可省略;此时closeTurn直接对更新执行时的最新 session 调用closedTurn(..., answerTextOf(answer))。若 B 已经打开,迟到的 A 结束事件会关闭 B 并把 A 的答案保存为 B 的answer。下一次openedTurn又会把{prompt: B, answer: A}固化进recentTurns。settleTurn的sameTurn检查只能保护已经被错误选中的 B,不能识别答案实际属于 A。 | probe: 使用memoryPorts();依次调用promptSubmitted打开 A、在未结束 A 时再次调用promptSubmitted打开 B、调用turnEnded({sessionId: 's', reason: 'answer', answer: 'Answer A'}),然后打开 C 并检查 C 的 `/asset/...(truncated)p2recentTurnsOf未落实“最多三个回合”的外发边界: path: 用户提交提示 → 构造recent_turns→recallStrategy经 Evolver Proxy 向 Hub 发送 recall context | mechanism: 新增循环只执行 4000 字符总量限制,没有回合计数限制。四个或更多较短的历史回合会全部进入recent_turns,与架构文档声明的“last three typed turns”不符。 | probe: 执行recentTurnsOf(Array.from({ length: 10 }, (_, i) => ({ prompt: \p${i}`, answer: `a${i}` }))),并断言结果长度不超过 6 条消息。 | facts: 文档新增内容声明recent_turns是“session's last three typed turns before it”。;recentTurnsOf的循环条件仅检查total + size > RECENT_TURNS_MAX_CHARS。; 循环没有回合计数器或slice(-3)` 等三回合上限。; 每个极短回合的 prompt/answer 总字符数很小,四个以上可共同低于 4000 字符。p3并发提示可能读取后一轮的任务、标题和历史上下文: path:promptSubmitted打开当前 turn → 异步调用recalled→recalled重新读取ports.sessions.read(sessionId)→recallContextOf(session)构造 recall 请求上下文。 | mechanism:promptSubmitted已取得本轮fencedOpen返回的opened快照,但recalled不使用该快照,而是异步重新读取共享 session。若下一轮提示在 recall 请求完成前打开,当前 PR 新增的recent_turns和title会从下一轮状态读取并发送给 Hub。 | probe: 使用可控的ports.sessionsmock,让第一轮promptSubmitted(A)在recalled的sessions.read前暂停;随后执行第二轮promptSubmitted(B),将 session 的title、task和recentTurns改为 B;继续第一轮 recall,并记录传给recallStrategy/Proxy 的context。 | facts: 当前 PR 新增recallContextOf(session),读取 `session.task...(truncated)
Large PR review:
- Size class:
large - Review mode:
sliced - Slice count:
6 - Sentinel split this PR into review slices. This check stays in progress until the sliced review is aggregated.
Sentinel desired check mode: non_blocking.
Required-check usage is configured in GitHub Branch Protection; Sentinel reports its effective status as unknown.
Details
sentinel found non-blocking yellow advisory or P2/P3 review items. This Check remains neutral, including in required repositories; red P0/P1 and independent hard gates are unaffected.