Repository navigation
refactor(progress-review): qualify loaded receipts in TypeScript - #7902
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 11d963e8da
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| qualification = effect_runtime_result("progress_review.context.qualify", { | ||
| "goal_id": goal_id, "runtime_root": str(runtime_root), | ||
| "goal_instance_id": goal.get("goal_instance_id"), | ||
| "receipts": loaded, | ||
| "contract_revision": policy.get("contract_revision"), |
There was a problem hiding this comment.
Support the full loaded-receipt size at the batch boundary
When a Goal accumulates large but valid receipts, sending the entire loaded set in one inline request exceeds the Effect runtime's 8 MiB MAX_REQUEST_BYTES limit. The loader permits 256 receipts of up to 64 KiB each; even 256 receipts with the allowed 32 file references of 1,024 characters exceed that transport limit. _send_request in effect_runtime.py then raises EffectRuntimeRejected with request_too_large, which escapes this call and breaks context consumers such as status and refresh-state. Previously, qualification transported individual bindings rather than the complete receipt collection. Use supported large-snapshot transport or bounded batches while preserving ordering and per-Todo qualification semantics.
Useful? React with 👍 / 👎.
|
This pull request has merge conflicts with Choose the remote for the base repository, not an out-of-date fork. git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEADFor a same-repository clone whose Keep the DCO |
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 | source=runtime_reported
动机 / Motivation
启用进度观察、需要在累积回执后继续读取任务状态的操作者与 Agent。此前 Python 对每条进度回执分别检查验收依据、标记过期并选取当前合同下的观察;本次把整批资格判断移到 TypeScript,减少同一事务跨语言拼接规则的维护成本。小批量与关闭模式的完整 CLI 输出保持一致;但合法累积到 256 条回执后,新批次请求超过传输上限,原本成功的 status 在当前 head 失败。本次不新增配置、执行权限或模型调用;源码路径的局部一致不代表安装包、完整成本或长程效果已经合格。整批传输需保留既有合法输入,且已接受迁移规范要求的安装包深层执行和完整成本资格仍缺失。
改动思路 / Approach
复用已有验收检查和 criterion basis owner,完整资格、过期与选择规则由一个 TypeScript 批次处理;Python 保留真实回执 IO、摘要呈现与历史数字编码。当前 PR 边界是现有进度观察读取事务的完整 owner 切换;合法输入、安装执行与成本资格必须随这个切换一起满足,不能只交付新处理器。native owner 对每个 Todo 缓存一次当前验收检查,用已有 criterion basis 判断是否仍适用,再按加载顺序保留 newest 与合同 pin。Python 的数字 codec 只保留持久 IO 表示,不能产生新的资格判断。普通重复 Todo 的边界调用从5降到3、两个 Todo 从6降到3;manual/legacy 从1增到2,不能只挑减少的案例宣称净收益。
具体改动 / Changes
审查 head 11d963e8da095106d710ff2519fbbc2ed9a4e53e,不可变迁移前 base fb16c6cb1369efce52a673030c914b38e1dac166。依据迁移前已接受的迁移 RFC,spec_ref docs/architecture/rfcs/typescript-control-plane-migration-v0.md,spec_revision fb16c6cb1369efce52a673030c914b38e1dac166。三个生产文件替换完整资格事务,测试冻结完整上下文并检查数字编码与顺序,双语 RFC/ledger 记录边界。RP-OWNER implemented;CE-INPUT、CE-INSTALL、CE-COST not_met。新 ledger 不改写已接受的 §6,也不能通过声明 source-only 取消当前切换义务。
关键代码讲解
external_progress_review_context:关闭模式先退出,非空已加载回执一次送入新批次;该调用没有沿用大投影传输。qualifyProgressReviewContext:批次复用当前验收依据、按 Todo 缓存检查并保留输入顺序和 pin 选择。_receipt_number_codec:仅按原始 source index 恢复浮点与大整数编码,不重做资格决策。progress_review.context.qualify handler:将完整资格处理注册到既有运行时分发器,无新增执行权限。
对主干的风险 / Risks
[P2] CE-INPUT:整批传输破坏合法容量。 真实 writer/loader 接受256条回执,最大单文件34,575 bytes,小于65,536;每条32个1,024字符相对引用均在既有界限内。新 params 在 File/SQLite 分别为8,754,799与8,754,801 bytes,超过 inline 8,388,608-byte 上限。固定 base 的 status JSON/Markdown 均 exit0,当前 head 四组均 exit1:TypeScript Effect runtime request is oversized。该调用位于 loader 的错误降级捕获之外,因此整次状态收集失败。已有同一 inline finding,本轮独立复现,不重复发同义 inline。复用现有受界限保护的本地 snapshot/投影传输,或在 owner 内以不丢失最新选择与每 Todo 缓存语义的方式分批;同时处理请求和响应预算。保留 256 条合法回执,不以截断或全批判为空规避。
[P2] CE-INSTALL:安装包资格缺失。 迁移前 §6 Correctness 要求 wheel 与 sdist 新环境运行深层语义;目前 ledger 明确排除 installed distribution。在该 exact head 构建 wheel 和 sdist,分别安装到全新隔离环境,从 packaged files 执行真实资格判断、拒绝路径与 CLI 深层探针,记录来源和结果。
[P2] CE-COST:完整成本资格缺失。 §6 Performance 对每个 transaction cutover 要求完整 latency/RSS 队列;crossings 只能描述结构,且部分合法早退案例增加一次 RPC。按迁移前固定 base 与当前 head、相同 fixture 和环境,在默认 SQLite 测 cold/warm request、完整事务和完整 CLI 的 p50/p95,以及 idle/burst daemon RSS;按既有阈值判断,File 单独披露。本轮没有测出或声称延迟回归;finding 是既有强制资格缺证。
聚焦 Python 113 PASS,TypeScript 75 PASS /23 SKIP,typecheck PASS。相同 harness 在固定 base/head、File/SQLite 各10个完整 characterization 场景全部一致;其中 loader 被替换,真实 canonical acceptance 仍执行,不能冒充完整 CLI。独立真实 CLI 的12组小批/关闭 JSON/Markdown 比较全部 byte-equal;关闭模式零 progress RPC。大批4组则按上述独立 oracle 失败。标准 premerge 为 FAIL,仅接口预算 smoke 失败;另两组同条件 base/head 直接运行该 smoke 均通过,原门失败仍未归因且保留为 merge hold,没有追溯改绿。远端 CI 按 wait_for_ci=false 未获取、轮询或等待。
语义与 CI 对齐
本次扩展已有内部 RPC vocabulary,复用当前验收与 observer authority:none,未引入执行、模型调用或持久状态权力。已有 snapshot/投影传输可作为修复候选,但该 method 当前未列入受控本地 snapshot eligibility;仅换一个 helper 名字不能证明修好。关闭路径的契约已实测,启用路径的合法输入集合仍破坏。安装和成本资格属于已接受的切换义务;不把它们称作未来建议,也不靠缩小输入、删除关键语义或放宽硬预算消除失败。
我的整体评价 / Verdict
这是有真实调用方的 justified_increment,机制归属与可回滚边界合理,但当前合法容量回归必须修复。long_horizon 和 user_experience 均为 regression:累积回执可能阻断后续状态读取;没有新增交互轮次并不能抵消读回失败。复用已有验收检查和 criterion basis owner,完整资格、过期与选择规则由一个 TypeScript 批次处理;Python 保留真实回执 IO、摘要呈现与历史数字编码。当前 PR 边界是现有进度观察读取事务的完整 owner 切换;合法输入、安装执行与成本资格必须随这个切换一起满足,不能只交付新处理器。已检查 status、attention、refresh 与 Chat 的现有观察消费路径;本次没有页面布局或控件改动。源码 CLI 已验证;发行安装、已安装 Host 和更多状态变体仍未验证。待作者修复传输、补齐本事务安装与成本证据后复审;完整 public scope 状态扫查、跨 Host 采用和后续收益仍不外推。
English verdict: REQUEST_CHANGES — head 11d963e8da095106d710ff2519fbbc2ed9a4e53e; legal accumulated receipts regress at the inline transport boundary; required installed-artifact and full-cost qualification remain missing. Focused suites pass, and the original premerge failure remains recorded.
| attention, refresh-state and Chat consume the native receipt read/summary owner | ||
| without Python receipt IO or composition. Retire the temporary characterization | ||
| and crossing fixtures at that same verified caller cutover, preserving semantic | ||
| negative tests. This slice neither changes a public journey nor qualifies an |
There was a problem hiding this comment.
[P2] 补齐当前事务的安装包深层资格(CE-INSTALL)。迁移前已接受的 RFC §6 对当前生产事务切换仍要求此资格,源码验证与较少 crossings 不能替代。在该 exact head 构建 wheel 和 sdist,分别安装到全新隔离环境,从 packaged files 执行真实资格判断、拒绝路径与 CLI 深层探针,记录来源和结果。
| without Python receipt IO or composition. Retire the temporary characterization | ||
| and crossing fixtures at that same verified caller cutover, preserving semantic | ||
| negative tests. This slice neither changes a public journey nor qualifies an | ||
| installed distribution, provider performance or long-horizon outcomes. |
There was a problem hiding this comment.
[P2] 补齐默认 SQLite 全路径成本资格(CE-COST)。迁移前已接受的 RFC §6 对当前生产事务切换仍要求此资格,源码验证与较少 crossings 不能替代。按迁移前固定 base 与当前 head、相同 fixture 和环境,在默认 SQLite 测 cold/warm request、完整事务和完整 CLI 的 p50/p95,以及 idle/burst daemon RSS;按既有阈值判断,File 单独披露。
Move the complete loaded-receipt qualification decision (per-Todo acceptance inspection caching, criterion-binding comparison, stale rewriting, newest selection and manual pin filtering) from capabilities/progress_review/context.py to control_plane/work_items/progress_review_evidence.ts behind one progress_review.context.qualify request. The Python loader's progress_review_receipt_order_key stays the single ordering owner; the adapter retains historical numeric IO spellings through selected source indices. Frozen context/status outputs are byte-identical; ledger entry in both languages. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> Signed-off-by: hhyykk <4408344+hhyykk@users.noreply.github.com>
Signed-off-by: huangruiteng <huangrt01@163.com>
11d963e to
9bec83c
Compare
|
Repair head Per the agreed cumulative migration policy, this PR does not ship its own wheel/sdist. Installation, installed-host readback and matched cold/warm latency/RSS qualification run once on the cumulative migration candidate, unless packaging changes separately. |
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
动机 / Motivation
开启审查观察的用户和长程 Agent 在 status 或续跑前读取累计回执。 同一任务积累 256 条合法回执时,旧头曾因批量请求超过 8 MiB 而读回失败;当前头通过既有私有 snapshot 读取并按相同资格规则显示最新回执。 已验证大量回执、规范条款当前/过期、固定版本和关闭模式的基线/当前头读回等价;这不证明后续 Agent 采用判断或产生收益。 本轮不授予合并权限,不证明安装 Host 采用、长期有效成果或完整成本收益。 wheel/sdist 深层安装、真实 Host 采用和匹配 cold/warm/RSS 留在维护者接受的累计候选资格边界,仍为 UNVERIFIED。
改动思路 / Approach
完整资格或图组合归既有 TS owner,Python 保留有实际调用者的 IO/codec;当前缺陷应在原 owner 内修复。 本次交付限于源代码只读切换;累计安装、Host 与完整成本资格按独立维护者约定保留为待验证。
入口仍是既有 external_progress_review_context,Python 只负责读取、规范化历史回执和拼装现有展示;TS 在一次粗粒度请求内拥有当前验收条款检查、按 Todo 缓存、过期撤回、最新版本与 pin 选择。它复用 acceptance authority 和 criterion basis,未创建另一份验收状态、后台观察器或 Python 决策回退。JSON 数字拼写由源索引 codec 保留,不重新决定资格。可观察状态仍是 authority=none,漂移观察不会自动授予执行或验收权。
当前 PR 边界是完整的只读资格与选择切换,而非单个叶子 RPC;保留现有 Python IO 和共用 snapshot 具有明确消费者。按 维护者当前评审约定,安装/Host/完整成本资格集中到累计迁移候选,未把它们移除或记为通过。边界可独立以原始回执和原调用端回滚;不应为了迁移继续复制 Python 规则。
具体改动 / Changes
评审 head 9bec83caab0262d3093684e749b7bbc142ac54bd,基线 d4aaaaefbd37a83a30f10681de839b45d631eeb9。12 个文件中,生产代码含 snapshot 配置为 +116/−54;其余为测试/fixture 与英中 RFC/ledger。作者描述里的旧行数与历史测试记录不作为当前证据。
关键代码讲解
external_progress_review_context与_receipt_number_codec:关闭、缺失 Goal/runtime 时提前返回;非空读回才进入资格请求。源索引保留大整数及 integral float 的历史输出,不把 codec 变成第二个资格 owner。qualifyProgressReviewContext:每个 Todo 只读取一次当前要求;不存在/不可读条款撤回旧漂移信号。最新行遵守 loader 的既有排序,pin 排除的回执仍计入 stale 并保留 rebind 提示。- 既有 snapshot 注册:8 MiB inline 拒绝后走原私有传输,不放宽 wire 或 64 MiB snapshot 硬上限;不在含糊 IO 失败后重复领域操作。
规范依据为 docs/architecture/rfcs/typescript-control-plane-migration-v0.md,接受前版本 d4aaaaefbd37a83a30f10681de839b45d631eeb9。Stage 0:当前源代码/真实 File、SQLite 的输入输出与负例已核对;安装与成本部分按上述独立维护者约定 deferred。Stage 2B 与 5. Payoff-phase PR contract:完整资格循环归同一 TS owner,Python 保留有实际调用者的 IO/codec。Caller-observable semantic parity:40 次原始正常 CLI 调用、16 次补充规范条款调用均成功,28 组基线/head 比较一致;只归一化经同基线自比较和源码证明的三个 summary 生成时间字段,Markdown 原文一致。两个真实 CLI snapshot eligibility mutation 均失败,证明大批量正例对遗漏 whitelist 敏感。Performance、7. Install, upgrade, and rollback:累计候选仍待资格,不作本 PR 的速度/部署结论。
对主干的风险 / Risks
PASS:Python 115 项、TS 39 项、control-plane typecheck、修改 Python 的 Ruff、standard premerge 18 项(含 bilingual/public boundary/semantic smoke)。另有 diff-scoped semantic advisory,仅表明支持的静态载体未发现新词,不能代替语义分析。真实 File/SQLite 输入覆盖 off、256 大回执、旧 pin、新版本提示,以及两个当前规范绑定/一个移除条款/一个手工观察;规范过期不会被手工描述升级。off 路径无资格 RPC。已有 exact-instance fixture 在 status 中失去实例字段、令规范观察过期的表现基线/head 相同,单独保留为既有调用边界;直接验收绑定测试和 legacy-canonical 公共正例均通过。
原始 maintainability ratchet 仍 FAIL:四个未变模块的 module metric finding;匹配基线/head 的完整失败签名、fixture 与环境摘要相同,native premerge 将其列为 inherited advisory,而非修复或全绿。旧头的 inline 容量失败由本次最大合法批量和 mutation 证据覆盖;不推断历史 interface-budget 失败根因,本次保留同硬阈值的检查通过。纯只读切换不引入写入/replay 协议;无跨请求原子 snapshot 承诺。累计安装、Host 与 cold/warm/RSS 仍未执行。
我的整体评价 / Verdict
APPROVE:本 exact head 无新增阻断发现,是维护者当前边界下可验证、可回滚的 justified_increment;父级迁移与长程收益未完成。架构上保留现有 IO/codec、把完整资格规则收敛到 TS 合理;本轮没有必要为行数引入额外抽象。长程影响为 preserved:回执累积、旧 pin 和撤回路径保持既有语义;没有验证实际 Agent 采用或净收益。用户体验为 preserved:已有 CLI 与 capability editor 的结果/过期告警无需新增配置、复制或确认轮次,普通已授权读取增加交互轮次为零。visual_review 不适用:检查了 status、Goal Chat 和现有 capability editor/图消费者,未改渲染布局;未验证范围为累计安装 Host 和实际展示采用。
先前 REQUEST_CHANGES、未解决线程与 GitHub merge readiness 需由后续只读 closeout 分别报告;本结论不撤销旧 review,也不授予合并权限。
English verdict: APPROVE at 9bec83c. No new blocking finding; real File/SQLite CLI parity and snapshot counterexamples pass. Cumulative install/Host/performance qualification remains unverified.
Goal And Delivered Outcome
capabilities/progress_review/context.pyqualified each loaded receipt in Python: per-Todo acceptance inspection caching, criterion-binding comparison, stale rewriting, newest-revision selection and manual pin filtering, crossing into TypeScript once per receipt evidence scope plus per-Todo inspection and basis calls.progress_review.context.qualifyrequest owned byloopx/control_plane/work_items/progress_review_evidence.ts, composing the existing acceptance-inspection and criterion-basis owners in process. Frozen per-scenario context and status-rendered outputs (JSON and Markdown, File and SQLite) are byte-identical.loopx-project/loopx:main. No issue closure claimed.Author Declaration
Implemented against
tests/control_plane/test_progress_review_qualification_characterization.py+ 841-line fixture (10 scenarios: off, empty, repeated/multiple Todos, wrong instance, removed criterion, unavailable inspection/store, manual/legacy, pin drift), frozen only after three consecutive green runs on unchanged PythonqualifyProgressReviewContext: batch Todo-inspection cache, canonical binding comparison, signal withdrawal, newest selection, pin filterprogress_review_evidence.test.tsprogress_review_receipt_order_keystays the only ordering rule (stable newest-first, first-maximal ties); TS preserves input order and never resortsgoal_acceptancebinding and no pin" to skip itselected_indices+_receipt_number_codec: integral floats and >2^53 integers keep their Python spelling without re-deciding anything2**60+n,1.0)ledger/typescript-control-plane-migration-v0/2026-11-02-progress-review-qualification{,.zh-CN}.md, linked from both RFC filescheck_rfc_bilingual.pyqualifiedarray. Both were removed; ordering stays with the Python loader and selection returns source indices directly.Migration economics receipt
loopx/control_plane/work_items/progress_review_evidence.ts(qualifyProgressReviewContext)This slice removes a Python decision owner; it is not a code-size or latency win. The bounded net increase buys one complete decision owner instead of another leaf facade. No latency or long-horizon benefit is claimed.
Scope And Continuation
external_progress_review_context, reached by status, attention, refresh and Chat projections).effect_runtime_handlers.ts. Whichever merges later needs a trivial rebase.Validation
9bec83caab0262d3093684e749b7bbc142ac54bdnpm run typecheck:control-planeexamples/semantic-vocabulary-drift-smoke.pyscripts/check_rfc_bilingual.py --base origin/main --head HEADloopx canary premerge --from-git-diff --git-diff-base origin/mainFrontend / Visual Evidence
Type of Change
LoopX Area
Technical Direction
Shared-authority RFC fixture impact
Boundary Checklist
none.Signed-off-bytrailer (git commit -s).Merge requires explicit maintainer authorization (progress-review capability and control-plane surfaces under
loopx/**).Cumulative Migration Qualification