Repository navigation
fix(monitor): keep retained prose out of target selection - #6687
loopx-agent wants to merge 1 commit into
Conversation
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 — model: gpt-6.1-sol; provider: OpenAI; reasoning_effort: max; runtime_reported.
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
精确 head 867d5597fac5b36da26453a383d7d449562d0d6f;不可变分叉基线 c9c3adf63f9771ef95f1fcca12b11ed7de1f69eb。代码结论 APPROVE;批准与合并、部署、安装各有独立边界。
动机
长期 Goal 中需要按时读取并轮询 Monitor 的 CLI/Host。
无关任务的保留备注把目标选择请求撑过 2 MiB,原来还会把传输拒绝当成未到期。新头只发送选择器实际读取的字段,再返回选中记录的全部内容,传输故障也不会被静默吞成无任务。
独立真实 File/SQLite 的 258 条、2694148 字节来源在基线读取失败且 due 为空,新头完整读回且 due 为真;80 组小输入的完整返回和错误相等,原记录没有修改。
不截断候选集合或选中记录,不提高传输/单记录上限,不改到期、权限、provider、轮询记账及用户配置。
剩余边界:正常安装、其它宿主、PostgreSQL和持续运行未由本次独立证据资格化,既有迁移/部署任务继续;本次解决源码上的目标读取阻塞。
改动思路
复用现有 scheduler 读边界和 TS selector,不在 Python 重写匹配规则,不增加分页、快照协议或缓存;局部字段投影与源记录映射留在同一函数。
原来是完整任务正文一起跨选择 RPC;现在候选条数不减少,仅传选择所需事实,选择后返回同一来源快照的完整记录。因此原到期检查仍看得到 cadence、等待、过期、capability、claim 及备注。普通有效选择与模糊/失效目标的分支仍归 TS;传输故障向调用方抛出,不能冒充“本次没有到期工作”。这是一条既有路径的修复,没有新增用户配置或手工步骤。
具体改动
规范:docs/project-agent-todo-contract.md,版本同上,按原文 continuous_monitor、next_due_at、monitor-target-key 逐项核验;同时保留 TS 迁移 RFC 的单一规则 owner。
resolve_monitor_todo_item完整读取 canonical inventory,沿用原 agent/archive 过滤。局部 DTO 只有todo_id/target_key/status/archive_state/role/task_class,恰好对应未修改的selectMonitorTodo实际读取字段。没有 display cap、正文截断、存储写入或第二个匹配器。- selector 成功后按原 fact 找回来源,返回
deepcopy;来源不匹配或响应 schema 不符立即失败。只有invalid_request转语义 ValueError,其余 runtime rejection 保持可见。resolve_due_monitor_candidate因而不会吞掉认证/超限故障。 - 新增
test_monitor_target_transport.py复用 canonical fixture,覆盖完整大源、单记录原上限、重复 key、精确 ID、错误类别、未来/过期/等待状态、结果隔离,以及真实 CLI poll/replay 的一次事件与零扣额。
对主干的风险
独立 100 项 Python 测试通过,覆盖真实 File/SQLite 和 native CLI。另用 258 条、2694148 字节的不同合成来源复现两种 provider,实际不可变执行基线为 dededb6174c3768fed55b67cb1e4ea3f4fbbce52(相关 owner 与分叉基线同 blob):主干读取 oversized,旧 due 返回空;新头完整返回且 due 为真,源文件已移除,无法靠旧 Markdown 回退。80 组小输入在两头的整个返回、错误类型和文本相等,输入记录未改动;真实 provider 返回的嵌套字段也验证了隔离。5 项原生 TS Monitor 测试通过。另有 12 项 File/SQLite 行政 owner 测试通过,6 项 PostgreSQL 用例明确因缺隔离服务器跳过,不计作通过。
Ruff、变更 advisory 后完整语义 smoke、两路径公开扫描及 diff hygiene 通过。当前分叉到 main 的差异只有既有 Lark/inbox 修复,不触及本选择器、quota、provider 或测试 owner。这里没有改 authority-store 实现,也未复核作者的安装 wheel 或性能数字;本轮证据证明源代码真实路径与边界,不声称安装、其它宿主、PostgreSQL 或持续负载已经通过。新非语义故障传播是有意改变,不能因原来安静就继续隐藏它。
我的整体评价
APPROVE。long_horizon 为 improved:积累历史不会再把一个有效目标压过选择请求边界;user_experience 为 improved:到期状态和读取不可用能如实区分,无需额外确认或重填已知信息。已把相关整理收在现有 scheduler 适配器:六字段投影、完整来源映射和错误类别保留;规则仍在 TS。没有为单一适配器另造协议、共享词汇或迁移框架,也没有把这项源码修复冒称整项迁移完成。
English verdict: APPROVE — 867d559. Real File/SQLite large-source baseline failures now return the complete target; 100 Python tests, 80 whole-result/error parity cases and 5 native selector tests passed. Existing limits and rules remain. No installed, PostgreSQL or sustained-operation qualification.
|
CI attribution for unchanged head The failed PR run checked out merge
The Release Artifacts build also fails in the same configuration-backup scenario. The baseline run was ultimately cancelled, but the three linked jobs had completed with these failures before cancellation. Independent local check: extracted the actual baseline and CI merge sources, then ran These observations establish that the listed failures predate this PR; they do not establish passing required CI or resolve the browser root causes. Required checks remain failed, exact-head independent review remains outstanding, and merge/runtime adoption/real Monitor recovery are still unqualified. No CI rerun, limit increase, unrelated source change, merge or deployment was performed. |
Canonical Monitor lookup forwarded complete Todo records to the native target selector. Retained notes could push a valid target lookup over the 2 MiB transport limit; converting that transport rejection to
ValueErrormade due lookup treat it as an unavailable target.Send every existing candidate with only the fields consumed by the unchanged TypeScript selector, then return a deep copy of its complete source record. Matching, ambiguity, archive/status rules and due evaluation keep their existing owners. Non-semantic runtime rejections now propagate instead of becoming a not-due result. The existing transport and canonical per-record page limits remain enforced.
Validation:
This reuses the scheduler transport boundary rather than adding a selector or provider abstraction. It changes no frontend/Lark entrypoint or configuration: the existing CLI Monitor journey is exercised. PostgreSQL, other hosts, latency and sustained production recovery were not qualified. No active Goal was used for validation, and no runtime deployment or merge is included.