Repository navigation
Keep ready native context readable and reuse observed scope - #8393
loopx-agent wants to merge 3 commits into
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…write-scope-20261109 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, reasoning_effort=max
Request changes conclusion (author-owned PR; GitHub blocks formal self-review)
动机 / Motivation
原生会话需要先读到当前 Todo、租约、停止条件和必读项,再判断可以开始的工作。基线的长写入范围会占满首读,关键控制条件必须翻页。候选让冷首读完整显示控制条件,并允许已完整收到的同一路由范围复用。评审覆盖原生 ready 首读、范围复用和同一捕获的恢复。复用其他已读字段时,变化后的长写入范围仍会挤走当前控制条件。
改动思路 / Approach
保留同一份捕获和现有读取 owner,在写入范围仍需交付时保住完整首段。评审覆盖原生 ready 首读、范围复用和同一捕获的恢复。可以沿已分开的首段和范围续读保留当前控制条件,并在同一路由已完整收到范围后复用它。范围与授权继续由现有 Turn 和租约 owner 核验。 基线验收规则
具体改动 / Changes
评审 c0052d1 对 73e49c4 的 8 个路径,+328/−32。complete-ready-opening 的冷场景通过,有其他已读字段时失败。current-scope-binding 与 capture-and-disabled-parity 在实际 File/SQLite 首读与恢复通过。whole-episode-qualification 仍沿现有 C1 对照验证。
关键代码讲解
readyWriteScope用当前 ready 状态、注册路由、Goal、Agent、Todo 和边界生成范围的来源身份。nativeContextReadPlan把宽范围放进同一捕获的续段,首段保留控制和 execution preparation。 范围条件 · 选择规划_bounded_initial_read为首段及续段核验真实输出预算,并保留同一捕获的摘要。实际native_context_capture_view仍会先采用普通 observed reader,再判断是否交付完整首段。 有界读取 · 原生导航
对主干的风险 / Risks
P2 · 复用其他字段时,新的长范围会遮住控制条件。 在同一会话先用原生读回完整收到 Goal 正文,不读取范围,再改动 290 条范围的末项并生成新的 ready Turn。File 和 SQLite 的基线与候选都从 12,000 字节的截断页开始。首段只读到六项检查中的 effective_action。选定 Todo、当前回执身份、租约状态、停止条件和需要父级批准的动作都要翻页。候选冷首读能用 5,886 字节交付全部六项。其他字段的合法复用使分段分支无法到达。请在当前范围仍需交付时保留完整首段,并沿同一摘要验证续段和已完整观察范围的复用。 分支
我的整体评价 / Verdict
请求修改。实际两种后端的普通游标最终都读到当前范围、guard 和原回执,已完整观察范围的测试也由三页降为两页。250 项 Python、154 项 TypeScript(1 项环境跳过)及 standard premerge 的 6 项直接检查、19 项自动检查通过。补齐混合观察场景后复验首段。模型是否实际使用这些信息、完整成本和安装版资格仍待对应验证。
English verdict: REQUEST_CHANGES. Reusing an unrelated observed Goal narrative bypasses the complete opening when the current write scope is still wide and needs delivery.
| result["first_read_command"] = context_capture_read_command(Path(current["path"]), current["sha256"], | ||
| reference_file=first, page_bytes=first_page_bytes, | ||
| max_page_output_bytes=first_output_bytes, reader_argv=reader_argv) | ||
| elif (not page_attached and initial_read_plan and initial_read_plan.get("prefer_linked_opening") is True |
There was a problem hiding this comment.
[P2] 已读其他字段时仍须保留完整首段
同一会话只完整读取 Goal 正文,然后改动 290 条写入范围的末项。已有正文观测会先选择普通 observed reader,跳过这里的分段。在实际 File/SQLite 入口,新的 ready 首读都是 12,000 字节截断页,缺选定 Todo、回执身份、租约状态、停止条件与父级批准条件。请在当前范围仍需交付且会遮住控制条件时保留分段,并同时复验已完整观察范围的暖读和同一捕获续段。
A large write scope can fill the native first page before it delivers the decision, selected Todo and required reads. Ready Turns now expose those controls in a complete opening and link the exact remaining selection. An eligible warm Turn can reuse the already delivered, unchanged scope for the same registered route and Todo.
Goal And Delivered Outcome
main. Related to C1: unify work sources and validate recovery #8266.Author Declaration
Implemented against
Scope And Continuation
Validation
c0052d15934d99b05a6af241a8ab42518a54c670against73e49c4889774effa019c197fc8958d9f7505efb.regression_paritypassedreal_entrypointpassedreal_backendpassedintegrationpassedstaticpassedFrontend / Visual Evidence
Type of Change
LoopX Area
Shared-authority RFC fixture impact
N/A. The change is to first-read presentation.
Boundary Checklist