Repository navigation
fix(steward): include remote work in default discovery - #8646
Conversation
Signed-off-by: huangruiteng <huangrt01@163.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · max
本次评审对应提交 4ba3ed2a39157419391e3f2672c781eb41526c89。
[P2] 搜索会把完整可见 Todo 报成零匹配。 同一条 796 字符记录的尾词可从精确读取验证,本地和 SSH query 均报告零条。
动机 / Motivation
通过已有 Chat/Lark Steward 或 source CLI 查询本地与授权 SSH 工作的用户。原入口默认读本地注册表,远程详情要显式指定源。Todo 精确读取可以看到正文,搜索工具只接收 Agent query。已验证按授权跨源发现、来源分页、失败与撤权、旧源兼容和空闲时的既有绑定配置采纳。以隔离 File authority、真实 source CLI 和可控 SSH 替身验证传输。线上 SSH 登录、实际 Chat/Lark 模型表现、安装后的迁移和托管 CI 本次未独立验证。同一条 796 字符 Todo 可精确读到尾部唯一词,但本地和 SSH 查询都返回 matched=0、unknown=false。SSH 查询单个 --execute 时退出 2。101 个 CJK 扩展字符通过工具输入校验后被投影拒绝。
改动思路 / Approach
权限与 transport 保持在已有读服务,TS 投影不持有凭据或写权限。当前全文搜索缺口可以在既有读取路径修复,已验证的跨源和 legacy 会话路径可保留。 现有 scope 和来源页适合复用。查询应从 canonical Todo 完整正文读取,在当前 audience 脱敏后匹配,再沿原分页输出。
具体改动 / Changes
关键代码讲解
基线 0abd0dc278bc2f735503e35f2368651ce6e13a21 与提交 4ba3ed2a39157419391e3f2672c781eb41526c89。ManagerInspection._discover_sources 按现有 scope 读取并复核,projectAgentDiscovery 交错来源并输出各自的 next_reads。在 Todo 路径,read_manager_goal_details 仍使用 500 字符列表投影,之后才调用新增 query。复现用 796 字符记录,对前缀和尾词各查询一次,再精确读取同一记录。前缀匹配一条,尾词在两种来源都返回已知零条。真实 source CLI 也复现了 SSH 传递 --execute 时的解析失败。101 个 BMP 汉字成功,101 个扩展区汉字返回 source unavailable。配置采纳沿现有空闲恢复入口。
规格 docs/reference/protocols/manager-evidence-and-continuity-v0.md,核对 authorized_source_discovery、legacy_binding_adoption、permitted_full_todo_search。
对主干的风险 / Risks
已授权项目可能因为长需求的假零匹配被漏掉。CLI 选项词也会在 SSH 边界被当成解析错误。用同一份授权全文和相同参数口径即可覆盖这些失败。
语义与 CI 对齐
预合并 19 项、聚焦 Python 66 项、TypeScript 17 项和类型检查通过。隔离 File authority 跑了本地入口和真实源 CLI,替换了 SSH 传输。
我的整体评价 / Verdict
请求修改。补齐完整正文输入和 SSH 参数传递,并对齐 Unicode 长度校验。用同一条长记录在本地和远端验证匹配。本次评审覆盖现有宿主与 CLI 行为。以隔离 File authority、真实 source CLI 和可控 SSH 替身验证传输。线上 SSH 登录、实际 Chat/Lark 模型表现、安装后的迁移和托管 CI 本次未独立验证。
English verdict: REQUEST_CHANGES. Request changes. Todo search silently misses text after the 500-character list projection, and SSH searches reject leading option tokens. Reuse the canonical full-text read and preserve the query argument.
…-8646-review-repair-20261113 Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · max
本次评审对应提交 d0f8729f8de0dbcedbd3504a7bbfee54c59b32fa。
没有阻塞发现。
动机 / Motivation
在 Chat 或 Lark 里请 Steward 查某个项目及其待办的操作者,往往不会先说项目在哪台机器。原默认只翻本地名册;命中远端项目需要先猜来源。上一提交虽能跨源发现,长 Todo 的尾词仍会被误报为零匹配。现有入口一次读出分来源的注册结果;指定 Goal 和来源后,搜索能命中长 Todo 的尾词,分页和精确读仍指向原记录。验证使用隔离 File/SQLite、真实源 CLI、可控 SSH 传输与模拟模型的真实 Chat adapter;未验证线上 SSH 登录、模型采纳质量、安装升级或托管 CI。
改动思路 / Approach
沿现有 manager-context 和 canonical Todo reader 修复;让 Python 保留 SSH 传输与 audience 复核,TypeScript 负责来源交错和匹配后分页。本 PR 交付已授权工作发现与 Todo 搜索,并在同一 Steward 会话入口修复旧绑定的空闲配置采纳。 无 query 的浏览与精确读取保留原范围;无需建立全文索引或迁移 Todo。
具体改动 / Changes
关键代码讲解
_discover_sources:仅在主动发现时 fanout,并在聚合前复核来源和授权。 projectAgentDiscovery:交错来源,分别保留 continuation 与未知覆盖。 read_manager_goal_details:有 query 才向 canonical reader 请求全文,并在投影前脱敏。 projectTodoContextPage:按可见字段匹配,再分页;精确读和查询输入互斥。 read_remote:把查询作为一个 argv 元素,验证旧源是否应用查询。 manager_session_model_allocation:只在既有空闲入口接纳同端点的显式机器设置,保留历史与未配置字段。
按 授权证据协议(docs/reference/protocols/manager-evidence-and-continuity-v0.md @ 56fc2a1e8d3101a4a909b45b32bbdd32d54ab56f)逐项核对 AUTHORIZED_SOURCE_DISCOVERY(按授权发现)、PERMITTED_TODO_SEARCH(可读正文与分页)、STEWARD_IDLE_ADOPTION(空闲时保留绑定)。上一评审提交 4ba3ed2a39157419391e3f2672c781eb41526c89 的三条问题均按同一 fixture 重放。File 和 SQLite 各用本地与真实 source CLI:尾词由已知 0 变为 1;SSH 的 --execute 由退出 2 变为匹配同一 Todo;101 个扩展区汉字由 unknown 变为匹配,201 个字符仍在调用前拒绝。同一个词跨两条记录时,先过滤再分页,每页各返回一个不同的 Todo。
对主干的风险 / Risks
远端超时为 unknown,撤权无返回;脱敏路径的唯一词不匹配;201 个字符和 query+精确 ID 在源调用前拒绝。 旧 CLI 忽略 query 时返回 remote_query_unsupported;显式浏览仍可按 next_offset 继续。当前来源不可用时继续用原 source_id 复查。 默认跨源 fanout 只发生在主动发现;并发上限 12。一次聚合还会记录本地子读,长队列及审计体量未做性能资格。
语义与 CI 对齐
149 项聚焦 Python、128 项宿主、18 项指引及 17 项 TypeScript 通过,类型检查和本地预合并通过。相同的 test_steward_reads_every_registration_across_pages_and_future_goals 在两版均因旧 activation_state 拒绝加载,触发在调用 discovery 投影前;仅在独立见证中换成 canonical activation,原断言原样通过。 托管 CI 未查询。模型没有参与这些复现,不能把提示变化视作模型已采用。
我的整体评价 / Verdict
批准当前提交。授权来源发现和全文查询均在现有入口可用;三个旧反例已通过。检查了 Chat/Lark 工具请求和 CLI 结果,未更改渲染布局。验证使用隔离 File/SQLite、真实源 CLI、可控 SSH 传输与模拟模型的真实 Chat adapter;未验证线上 SSH 登录、模型采纳质量、安装升级或托管 CI。
English verdict: APPROVE. The three search regressions are fixed on both providers, and source paging, scope and legacy fallback are verified.
A steward could resolve an ambiguous requirement against local work without discovering an authorized remote project. Its default Agent discovery now reads local and SSH sources equally, interleaves source-qualified rows, and returns independent continuations and explicit source failures. Discovery runs on demand; ordinary turn preparation still avoids full status collection.
Todo queries search permitted full task text before paging, while exact reads retain decision terms. Older remote readers that ignore this query report a compatibility gap. Existing audience grants and Goal-scoped local reads remain enforced. The shared Chat/Lark tool and managed instructions carry the change into existing conversations, including guidance to establish requirements before ranking change requests or recommending CI tracking.
Also repair legacy bound steward sessions that lack persisted executor allocations: explicit machine model/effort choices reach the next idle boundary while preserving history, unset settings and endpoint identity.
Validation: 175 focused Python tests; 17 TypeScript tests; control-plane typecheck; bilingual diff check; public-boundary scan against an isolated empty registry. A stale activation alias in the existing discovery fixture was updated to the canonical representation. A read through configured local/SSH sources and one isolated native-model probe exercised source discovery and requirement-based prioritization; these are bounded observations, not a reliability or latency percentile claim. No production conversation messages were sent for this validation.
The manager-context capability owns discovery; Python retains SSH transport while TypeScript owns bounded presentation and Todo filtering. This extends the existing conversation journey and adds no separate UI or execution authority. Private configuration and operational evidence are excluded. Merge remains with the maintainer.