Repository navigation
Conversation
Add opt-in discovery schedules using fresh read-only worker Sessions and explicit report or no_report settlement through the existing Bot path. Preserve original execution identities across restart and Host handoff. Refs: apache#6716 Generated-by: OpenAI Codex
Keep cancellation durable across resume and service disablement, and settle only the original investigation Turn. Recheck report authority at admission and restrict Recall to the enabled built-in implementation. Preserve uncertain result writes and allow approved inactive plans to resume. Generated-by: OpenAI Codex
Share scoped investigation outcomes and checkpoints across fresh workers using the existing scheduler store. Keep complete reasons and source references available through bounded queries and explicit continuation. Link corrections and feedback to the original investigation and immutable user input, including quoted and steered messages. Record notification decisions in SendUser or sleep without an extra model step, retaining outbox identity and uncertain-write semantics. Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
Exercise committed but unacknowledged settlement, uncertain notification receipts, concurrent memory writes, and project relocation with real storage and a test-only fault seam. Generated-by: OpenAI Codex
Reconcile discovery jobs, feedback and bounded records with the durable Run and queue contracts introduced by apache#6713. Port the Host regressions to the current fixture and preserve unknown-effect cleanup semantics. Generated-by: OpenAI Codex
Sync rust-preview through apache#6740, retaining its archive and WebSocket recovery fixes. Handle scheduler revision conflicts and wait for original Run cleanup in the discovery fixtures. Generated-by: OpenAI Codex
Retain always-visible controls when rebuilding the authorized Run catalog, and calculate continuation replay evidence from the discovered tool subset. Keep replay signature validation and current tool authorization unchanged. Exercise Bot controls with tool discovery enabled; the existing desktop continuation regression covers failed-Run continuation without duplicate input. Generated-by: OpenAI Codex
Integrate apache#6728 and keep desktop discovery status, publication provenance and quoted feedback on the current Agent execution and queue contracts. Obsolete fixture coverage will be carried by the current Host and journal tests. Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
Persist admitted discovery identity for desktop status, retain quoted previews through send and history, and migrate restart and UI coverage to the current interfaces. Generated-by: OpenAI Codex
liugddx
reviewed
Nov 10, 2026
liugddx
left a comment
Member
There was a problem hiding this comment.
Automated code review by Codex. I found two correctness issues and called them out inline. The focused workbench checks could not run because this environment is missing /opt/homebrew/opt/simdjson/lib/libsimdjson.33.dylib; Rust checks were unavailable because cargo is not installed.
Keep existing second-based schedules intact during instruction edits. Hide continuation for quoted drafts and recheck quotes around asynchronous continuation admission. Extend existing regression coverage for both review findings. Generated-by: OpenAI Codex
liugddx
reviewed
Nov 10, 2026
Preserve discovery tool restrictions and quoted draft actions while adopting upstream model stack and native residency updates. Generated-by: OpenAI Codex
Check the original approval and pending fire before starting queue consumers. Retract revoked pending reports across both delivery crash windows, and preserve original notification identity when authorization remains valid. Generated-by: OpenAI Codex
Integrate the durable Agent execution API, retain the A1 read-only investigation scope, and retract revoked pending reports before recovery consumers start. Port behavior coverage to the current real Host harness. Generated-by: OpenAI Codex
Preserve shared discovery records and feedback while synchronizing the current durable Agent runtime. Carry the recovered-report authorization checks and their real Host regressions into A2. Generated-by: OpenAI Codex
Include the latest upstream UI changes and regenerate the dependency inventory after the upstream native graph changes. Generated-by: OpenAI Codex
Carry the current rust-preview synchronization while retaining the recovered-report authority checks and shared-memory regression coverage. Generated-by: OpenAI Codex
Integrate the current rust-preview dependency stack and preserve desktop discovery, quoted drafts, publication identity, and recovery authorization coverage. Generated-by: OpenAI Codex
Finish each simulated model step before awaiting steering. Verify that Stop targets the current Run while an accepted followup executes once and the next draft stays intact. Keep the existing input, queue, and timeout checks. Generated-by: OpenAI Codex
Finish each simulated model step before awaiting steering. Verify that Stop targets the current Run while an accepted followup executes once and the next draft stays intact. Keep the existing input, queue, and timeout checks. Generated-by: OpenAI Codex
Sync current rust-preview while retaining the recovered-report authorization boundary. Box the new legacy-compaction projection at its entrypoint to bound the debug poll stack, and keep the notification recovery fixture pinned to its original busy Run. Generated-by: OpenAI Codex
Carry the verified A1 recovery boundary, bounded projection stack, and existing desktop steering fixture correction into the shared-memory layer. Generated-by: OpenAI Codex
Preserve discovery and quoted drafts while integrating the removal of manual risk UI and history prefetch. Carry the verified recovery authorization and original-Run fixture fixes from A1/A2. Generated-by: OpenAI Codex
Acquire the existing child handle before the five-second pipe-drain wait. This separates PowerShell fixture startup from drain timing and preserves cleanup when the wait fails; production process behavior and the drain bound are unchanged. Generated-by: OpenAI Codex
The queue consumer uses try_lock for Goal admission, so an enqueue wake can be consumed while the producer still owns the gate. Notify after releasing it when the persisted schedule still has ready work; keep the existing authorization and ordering checks. Generated-by: OpenAI Codex
…-discovery-desktop
Generated-by: OpenAI Codex
…ntrols Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
2 of 6 tasks
Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
…discovery-records
Generated-by: OpenAI Codex
…nc-discovery-desktop
… with upstream Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
…p base Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
This branch has not been deployed
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.
Summary
Refs #6716. Depends on #6724 and #6728.
The discovery backend can already run scheduled investigations and retain shared records, but users need a desktop entry point to approve and manage discovery, inspect the original investigation, and reply to a finding with an explicit reference.
This PR connects those capabilities to the Bot desktop interface.
This is the desktop-control and quoted-feedback slice of #6716, built on the scheduling and shared-record work in the preceding PRs.
Proactive discovery flow
flowchart TD plan["Approved discovery plan"] scheduler["Host Scheduler<br/>One active investigation"] worker["Fresh worker Session<br/>Approved Session tools"] complete{"DiscoveryComplete"} settled["Settle quietly"] bot["Existing Bot Session<br/>Review queued report"] outbox["Bot outbox<br/>User sees the finding"] asleep["End Bot turn quietly"] memory[("DiscoveryMemory<br/>Results, notes, decisions and feedback")] plan -->|"Timer or Check now"| scheduler scheduler --> worker worker --> complete complete -->|no_report| settled complete -->|"report via Session queue"| bot bot -->|SendUser| outbox bot -->|sleep| asleep complete -. "Persist on settlement" .-> memory memory -. "Read records on demand" .-> worker bot -. "Record notification decision" .-> memory outbox -. "User quotes finding, Bot records feedback" .-> memoryVerification
The branch has been synchronized with #6728 and
rust-previewthroughe8bc5aa2f. Local checks below apply to that updated implementation on macOS.Coverage includes discovery status and original-worker links, durable notification receipts, quote-linked feedback after restart, rejecting mismatched discovery records, quoted drafts and frozen-send upgrades, and bounded quote previews. Existing tests were adapted to the durable Agent interfaces without restoring the removed legacy harnesses.
The remaining sent-message quote preview has been implemented. This update does not change retry policy or investigation permissions.
The release packaging and real-provider checks below were completed before this upstream synchronization, on the earlier implementation. They have not been repeated on the updated head.
Live-provider checks used Command Code → DeepSeek V4.1 Flash with isolated synthetic data:
All investigating workers used read-only permissions. Test plans were paused after verification.
The live checks also exposed model-quality limitations: one investigation incorrectly treated an additional, permitted language file as a mismatch, and the Bot initially described background file access inaccurately. Corrective feedback was retained and respected in subsequent investigations. These checks validate the integration, not general discovery accuracy.
Windows/Linux desktop validation and full repository CI were not run locally. The macOS package was a local smoke-test artifact, not a signed or source-bound publication candidate.
Live use in an approved workspace
This snapshot comes from macOS runtime records for an existing approved workspace. Both builds used Command Code / DeepSeek V4.1 Flash. The post-sync local build was based on this PR with #6874, #6907 and a local adapter for the existing schedule.
agent_cell_origin_mismatcherrors in that round.wait32 times and made 10 separate checks of the same repository fix across commits, branches, and worktrees. This run had no execution deadline.AI use
Tool(s) and scope: OpenAI Codex assisted with implementation, regression tests, local verification and drafting this description.
Checklist
Does this PR entail a change in behavior?
简体中文
概述
关联 #6716,依赖 #6724 和 #6728。
主动发现后端已经能够执行定时调查并保留共享记录,但用户还需要桌面入口来批准和管理发现计划、查看原始调查,以及明确引用某条发现进行反馈。
本 PR 将这些能力接入 Bot 桌面界面。
这是 #6716 中桌面控制与引用反馈部分的实现,建立在前两个 PR 的调度和共享记录能力之上。
主动发现流程
flowchart TD plan["已批准的主动发现计划"] scheduler["Host 调度器<br/>同时只运行一轮调查"] worker["每轮新建调查会话<br/>使用获准的会话工具"] complete{"DiscoveryComplete<br/>提交调查结果"} settled["静默结算"] bot["原有 Bot 会话<br/>判断是否通知用户"] outbox["Bot 发件箱<br/>用户收到发现"] asleep["静默结束 Bot 本轮"] memory[("DiscoveryMemory<br/>调查结果、笔记、通知决定和反馈")] plan -->|"定时到点或点击立即检查"| scheduler scheduler --> worker worker --> complete complete -->|"no_report 无需汇报"| settled complete -->|"report 报告进入会话队列"| bot bot -->|SendUser| outbox bot -->|sleep| asleep complete -. "结算时写入" .-> memory memory -. "按需读取历史调查记录" .-> worker bot -. "记录通知决定" .-> memory outbox -. "用户引用通知,Bot 记录反馈" .-> memory验证
分支已同步 #6728,并纳入截至
e8bc5aa2f的rust-preview。以下本地检查对应同步后的 macOS 实现。覆盖调查状态与原 worker 链接、通知回执持久化、重启后的引用反馈关联、错误记录关联拒绝、引用草稿与旧冻结发送内容的升级,以及引用预览的长度边界。原有有效测试已适配新的持久化 Agent 接口,没有恢复上游删除的旧测试框架。
此前剩余的已发送消息引用预览已实现。本次不改变重试策略或调查权限。
下述 release 打包和真实模型联调在本次同步上游之前的实现上完成,尚未在更新后的提交上重复执行。
真实模型联调使用 Command Code → DeepSeek V4.1 Flash,材料均为隔离的合成数据:
调查 worker 均使用只读权限,测试结束后已暂停计划。
真实联调也暴露出模型判断的局限:一次调查把允许存在的额外语言文件误判为差异,Bot 最初也未准确说明后台调查的文件读取能力。纠正反馈得到保存,并在后续调查中生效。这些检查验证的是集成链路,不能作为普遍发现准确率的证明。
本地未执行 Windows/Linux 桌面验证或完整仓库 CI。macOS 包仅用于本地安装冒烟,不是已签名或绑定源码归档的正式发布候选产物。
已授权工作区的真实运行数据
以下数据来自现有已授权工作区的 macOS 运行记录。两个构建均使用 Command Code / DeepSeek V4.1 Flash。同步后的本地构建以本 PR 为基础,包含 #6874、#6907 和用于读取原有计划的本地适配。
agent_cell_origin_mismatch。wait,另有 10 次围绕同一个仓库修复核对提交、分支和工作树。本轮没有执行截止时间。AI 使用说明
OpenAI Codex 协助完成实现、回归测试、本地验证及本说明起草。
检查清单
本 PR 存在行为变化,已在概述中说明。