Skip to content

fix(quota): preserve scoped receipt waits and unify history qualification - #7117

Merged
huangruiteng merged 16 commits into
mainfrom
codex/receipt-retry-vision-wait
Oct 23, 2026
Merged

huangruiteng merged 16 commits into
mainfrom
codex/receipt-retry-vision-wait

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Problem and resulting behavior

A receipt-owned wait could be interrupted by a periodic review before its original deadline. Related ordinary reminders could also become false human gates, unclaimed work could inherit a peer's retry clock, and an administrative blocked closeout could replace the last real outcome checkpoint.

This proposal preserves the accepted wait and genuine outcome evidence while leaving independent work runnable. A periodic review becomes due again at the original deadline; higher-priority failure and feedback signals remain effective. The same compact guard also represents an exactly repeated Explore paragraph once, with an explicit reference to its complete text in the same packet.

Reviewed source: bdf7131d42ae22cff8b402f1c8d0437baa1e0be3. The published exact-head self-review concludes APPROVE after complete failing-suite attribution and repair of the four head-only regressions. The repository merged this head at 334da0973f786e748013b926cc85b5680a5343b0. Earlier failed runs and reviews remain historical evidence.

Ownership and behavior

Boundary Result
Scoped receipt wait The existing TypeScript settlement owner qualifies retry facts. Only the same Agent's accepted retry suppresses premature periodic review. No clock reset or implicit review acknowledgement is added.
Independent work and genuine gates New independent work remains admissible. Ordinary user_action notices remain nonblocking; real user_gate, invalid facts and incomplete authority retain their existing restrictions.
Outcome history An accepted administrative blocked replan does not overwrite the previous genuine milestone or unresolved gap. Modern and legacy readers consume the same settlement qualification.
Historical time codec Aware legacy time forms, microsecond expiry and UTC-range-crossing inputs retain their historical meaning. Boolean, numeric or blank Turn identities intentionally cannot establish positive retry proof.
Compact guard Only identical Explore/settlement guidance is replaced by an in-packet reference. Missing or different text stays inline; detailed Vision and standalone Explore output keep full text. Decision inputs, clocks and authoritative state are unchanged.

The refactor removes duplicate Python retry qualification and reuses the TypeScript settlement/time owners. Receipt qualification changes now belong to the shared TypeScript settlement owner, consumed by status, periodic review and history readers; Todo wakeup syntax stays with the Todo owner. The remaining Python date formatter preserves supported persisted receipts and can be removed when the owning persistence contract retires those historical input forms. No new persisted state, executor, public option, cache or permission owner is introduced. The existing quota documentation and both roadmap language files explain the boundary. There are no rendered UI or first-viewport changes.

Validation and limits

Post-merge qualification is bound to the actual combined target 334da0973f786e748013b926cc85b5680a5343b0, which contains both #7154 and #7163. The production bundle build and 16 native preflight cases pass. A fresh isolated wheel passes all 184 tests in the three quota/status/resume modules, with 18 changed production files matching the merge byte for byte. Fresh PostgreSQL 16 store/service suites pass 369 and 11 tests with zero skips. The complete actual-merge Python run finished with 26,664 passed, 914 failed, 27 errors and 707 skipped (28,312 testcase records; 2,248 subtests are separate). Every one of its 941 failure/error identities was replayed against the actual immutable target f485ba54a3d3fe2f39929a7ecbdc0ec804f1f8d3 and the merge, with matched dependencies: 822 failures, 27 errors and 92 replay passes on each side; no merge-only failure observed. Of those replay passes, 91 original failures were caused by absent TypeScript development dependencies; the remaining original retrodiction count failure was not reproduced and stays recorded. These subset replays do not turn the original full run green or prove downstream behavior blocked by failing fixtures. The complete actual-combination TypeScript suite passes 5,396 tests, with 75 conditional skips and no failures; typecheck passes. Standard managed premerge passes its direct checks and all 19 selected checks, but its final gate is held by the currently configured quality receipt because required full-Python validation remains failed. This enforcement was read back from the actual-merge source CLI; it is not inferred from an old policy description. Final independent qualification review remains open. A separate bounded follow-up, #7175, repairs the public three-transaction E2E fixture by initializing its disposable canonical SQLite authority; this does not rewrite the original full-run result. Detailed qualification and historical-run separation.

The full immutable c7ed203640b8bdf8e152967cfbc52c14ab02814d Python run completed with 857 failures, 27 errors, 26,644 passes and 707 skips. This remains a failing historical run. The 884 distinct failure/error identities were investigated using immutable base/head replays; this is not a claim that the whole repository is green.

  • The earlier 145 identities reproduced on base and head: 113 exact diagnostics, 27 matching after narrowly documented metadata normalization, and five explicit causal dispositions (two volatile observation timestamps, one canonical-authority fixture, and two checkpoint-admission fixtures subsequently repaired in test(checkpoint): distinguish fresh replan from work closeout #7163).
  • The remaining 739 identities produced 729 common failures, four head-only failures, five base-only failures and one replay pass on both. Of the 729 common failures, 558 diagnostics match exactly, 159 match after bounded execution-metadata normalization, and 12 have explicit source-bound causal dispositions. The five base-only cases concern generated dashboard availability; the both-pass case retains its original socket-peer instability record.
  • The four head-only failures exposed a real regression: receipt timestamps retained Python microseconds, while the Todo resume codec accepted only milliseconds. The final commit preserves one-to-six fractional digits and exact microsecond comparisons. Existing second/millisecond canonical forms remain unchanged; historical valid time spellings outside strict authoring syntax keep their original retry fence without fabricated automatic resume proof.
Check Observed result
Final-head focused Python clock/status cases 27 passed, including real File/SQLite CLI and HTTP readback, one microsecond before/at expiry, and legacy fallback.
Final-head complete TypeScript suite 5,383 passed / 75 conditional skips / 0 failed. Typecheck passed.
Final-head owning Python suites 296 passed / 14 failed initially. Six failures were caused by placing a gitless fixture below a Git checkout; all six pass with a genuinely external temporary root. The remaining eight canonical-authority fixture failures reproduce on immutable base and head with identical details after only exact fixture-root substitution.
Final-head standard premerge Passed: all 19 selected checks and direct checks. Ruff, compilation, paired-RFC and semantic advisory passed.
Final-head public boundary Seven changed paths passed the public-boundary scan. Two unrelated canonical-registry inspection errors remain disclosed; they are not relabeled as a fully green command.
Required PostgreSQL integration Historical affected-source qualification: 369 passed / 0 skipped, isolated PostgreSQL 16 and synthetic fixtures. The final precision codec change was exercised through pure typed/Python parity and real File/SQLite paths; no new PostgreSQL full run is claimed.
Installed package Historical integration 00886f13560977a5c58695c88afbdd9d3ef407dd: 24 passed / 0 failed / 0 skipped on isolated File/SQLite real CLI, with 17 production files matching the wheel byte for byte. This does not qualify the final combined receiver.

The complete changed source and final seven-file delta were reviewed. No benchmark scores, live receiver adoption, lower total task cost or main-merge authority follow from this source review. Historical full-suite failures, earlier interrupted runs and conditional skips are retained. The isolated actual-merge package is now qualified as described above. Actual-merge full Python execution and per-failure disposition are now recorded; required-validation failures, final independent qualification and live receiver adoption remain open.

Cost and delivery boundary

Complete-caller measurements on the inherited refactor show three additional runtime requests on retry-bearing reads (87 to 90); warm-host timings vary with concurrent load. Ordinary no-candidate history adds no qualification RPC. The compact projection uses exact equality and a shallow copy without a new control-plane request. Fewer packet bytes do not establish better task outcomes.

All authored commits carry DCO sign-offs and the existing roadmap language pair changes together. There is no rendered UI change in this proposal. The exact-head self-review is a COMMENTED author review; it is not a formal GitHub approval or authority to dismiss another review. The prior native qualification review remains visible. Experiment integration and installed receiver readback are tracked independently of this merged source proposal.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…ision-wait

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…ision-wait

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
@loopx-agent loopx-agent changed the title fix: honor receipt retry waits in Vision and quota routing fix: preserve receipt waits and real outcome checkpoints Oct 23, 2026

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: actor_kind=model_agent; model=gpt-6.1-sol; provider=OpenAI; runtime_reported; reasoning_effort=max

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

PR #7117 — REQUEST_CHANGES。审阅完整提交 e14a541e0aea50391d69ff155ae16ab0de8e6756,基线 d7be5bef0ce726ba49a23ac870932f9bc989f816。

[P2] 保留 Vision 等待中的非阻塞人类通知。 在 新增 Vision 等待路由 上,原 Task 已有重试回执、开放 Vision 与它有因果关联,同时还有一个独立 user_action 时,当前返回 agent_scope_wait,却丢失 user_channel.non_gating_notice,最终给出 human_gate / backoff_waiting_for_user,并要求 Agent 等待用户/owner。用户待办自身的 reason 仍称它为 non-blocking。这不是新增了人类授权缺口。

在不可变基线和本提交分别用同一探针跑真实 File/SQLite CLI:没有 Vision 时,两者都保留 non_gating_notice=true、quiet_wait;加入 Vision 后,基线复现原来的重规划错误,本提交改善为等待,却又在两个后端进入上述人类门禁。原 due 仍在、任务未变、扣费为零;因此这里指出的是错误的继续条件与用户介入要求,不声称数据丢失、永久饥饿或截止时间被重写。

在既有 execution/interaction 等待 owner 中保留 receipt wait 的 non_gating_notice 语义,使 Vision 等待与非阻塞 user_action 同时存在时仍自动按原截止时间重查;真实 user_gate 继续保持阻塞。

动机

受影响的是让 Agent 等待外部反馈后继续原任务的维护者。
例如,任务已有五分钟重试回执,原路径却因开放的成果承诺继续要求重规划;本提案让等待和原截止时间一致,并防止行政收尾覆盖前一次真实成果记录。

无独立人类待办的真实 File/SQLite 路径已能在原截止时刻选回原任务,重启重入保留同一 Turn;但同时存在非阻塞人类待办时,当前提交错误地要求等待用户。

本轮不证明安装采用、线上 Host 行为、完整仓库资格或长期成本收益,也不授予合并或安装权限。

改动思路

共享可执行计数、resume owner 和既有 TypeScript 结算资格,比新增持久 administrative 标记或另一套 Python 决策更合适;当前缺陷应在原有执行/交互分类中修复。
当前 PR 的边界是原截止时间等待与行政历史读取两条现有路径;需补齐通知与等待叠加的分类修复,再提交同一组真实 CLI 回归,不能靠增加确认步骤完成。

提案把“仍未完成的承诺”和“当前可执行的工作”分开:selection 提供完整且范围匹配的可执行计数,resume owner 提供原始时钟证明,既有因果覆盖 owner 再判断能否暂缓普通 Vision 缺口。缺失 checkpoint、无关绑定与未知来源继续走保守路径。

新增的历史修复也沿用同样原则:从已持久化的 Run 事实推导行政收尾资格,在一次原生调用中复用结算谓词。语义历史与旧 recent-Run 读取都保留前一个真实成果或缺口,最新 Vision、checkpoint 与 ACK 仍然可见。它只影响读取选择,不代替真正结算所需的回执。

以下表格依据当前源码和实际观察整理,便于区分预期改进与未完成部分:

场景 基线 当前提交
有因果关联的原重试,尚未到期 可能要求重复重规划 基本等待路径按原时钟等待
同时有独立人类通知 原重规划错误仍在 错误转入人类门禁,需修复
合格行政阻塞重规划之后读历史 可能覆盖真实成果 checkpoint 保留之前里程碑/真实缺口
独立可执行任务或到期监控 原有选择规则 独立探针仍可选中

具体改动

独立规范是 docs/quota-allocation.md,spec_revision=d7be5bef0ce726ba49a23ac870932f9bc989f816,以及同一基线的 docs/reference/protocols/goal-vision-replan-contract-v0.md。这两份规范在新基线与预先读过的旧基线间逐字节相同;先核对规范,再读完整新差异。新增的 quota/roadmap 文字不能自行证明验收通过。

  • Receipt-backed settlement progress:implemented。 行政阻塞收尾复用既有资格,不制造 Todo 或扣费;两种历史读路保留原里程碑及真实 gap。
  • Allocation Contract:not_met。 原 due、独立任务和范围控制有正向证据;非阻塞 user_action 被当前 Vision 路径当作人类门禁,违反同一分配合同。
  • Exact blocked-successor wait:implemented。 完整来源、因果关系、当前 Agent/unclaimed 范围和 checkpoint 负例保持原要求;不能让一个等待覆盖另一项未落实义务。

关键生产路径已逐项读取:

  1. todo_scoped_runnable_advancement_count 只接受已完成扫描、Agent 匹配、非负整数的原生计数。False、浮点、缺失或异范围不会被当成零;两个既有消费者共享它。
  2. overlay_active_turn_retries 复用 resume evaluator 生成完整 pending-clock 证明,保留原 Run/Turn/Todo 和 due;不把临时等待写回 canonical Todo。
  3. _agent_scope_no_candidate_frontier 在已证实的 Vision wait 下使用真实可执行零计数,避免承诺下限再次触发重规划。但它使 agent_scope_wait 与通知叠加路径变得可达,后续 interaction 的通知分类尚未保持一致。
  4. acceptedBlockedReplanHistoryIndexes 复用原结算资格,核对身份、blocked evidence、accepted semantic delta 和 checkpoint;不接受一个裸 administrative 标记。历史 compact checkpoint 省略的默认 boundary 仅在读分类中解码,不降低 live settlement 回执要求。
  5. accepted_blocked_replan_history_indexes 批量运输有限字段并校验返回索引;goal_semantic_history_from_runs 与 outcome_continuity 复用它跳过行政项,同时保留最新 Vision/ACK。普通无候选历史不增加这次 RPC。

全部 17 个改动文件、+560/−14 均在本轮范围:10 个生产文件完成上述组合;quota 文档及英/中文 roadmap 描述提案边界;四个测试文件覆盖等待、真实 CLI、长期历史和原生资格。租约与诊断 fixture 在初始化 canonical authority 前准备合成来源,原断言继续保留。没有新增配置、权限、持久状态或独立 UI 旅程。

对主干的风险

当前 exact head 的本地结果:106 项相关 Python 回归、8 项真实 File/SQLite CLI、135 项原生 TypeScript 结算测试通过;Ruff、配置内 mypy(17 个源文件)、标准 premerge 的6项直接检查与19项选择检查通过。没有读取或等待远端 CI。

独立比较含44组相同输入的 base/head quota 观察,保留完整字段与决策文本差异;其中30组摘要观察相同,其余含有意修复和本次发现的错误门禁,不能概括为全量语义等价。另有32组 raw/semantic、长历史和无效行政资格对照:8组修复真实成果选择,24组负例行为保持。完整来源后的70个无关 peer 项、顺序变化、缺失计数、无关/未落实绑定、已关闭来源与被替代重试均有检查。

原生 CLI 独立检查还确认:截止前一秒等待,原五分钟截止时刻选回原任务,重启按同一 Turn 身份恢复;canonical Todo 相同,扣费为零。若在到期准入后另造一个新 Turn,原未结算 Turn 的恢复门仍生效,不能将这个正常拒绝当作可跳过的错误。

失败也保留: 当前人类通知 oracle 在 File 和 SQLite 上均失败,构成本条 finding。作者另报告完整受影响 CLI 套件86失败/60通过及未闭合 CQR 资格;我没有独立重跑整个套件,也未把这些失败归为既有问题或宣布全仓合格。早先4a的检查在 head 扩展后未作为当前资格继承;当前的相关检查、配对探针和 premerge 均重新执行。探针自身最初的 schema、空结果和新 Turn 假设已在合成 fixture 中修正,原失败记录保留,不作为产品发现。

我的整体评价

方向与 owner 选择合理,当前两条基本修复有可复现价值;但完整的“合法等待后自动继续”目标尚未完成,故 REQUEST_CHANGES。修复通知与等待叠加后,重跑同一 File/SQLite 场景,并加入真正 user_gate 对照;保持原截止时间、独立任务可执行、缺失 checkpoint 仍严格,以及原 Turn 恢复规则。

用户体验的判断来自真实 CLI/Turn/调度输出:这里没有新的意图或权限缺口,却新增了等待用户的指令;不能以额外确认步骤补救。未改变任何渲染页面,因此无需为本次内部读投影制造截图;未验证范围包括安装后的 Host/模型采用、其它 Python 版本、真实 PostgreSQL 和长期净收益。先前经验中“沿真实用户任务判断有用结果、保留现有 typed owner”的建议已应用;上下文送达或检查通过不等于经验效用已被证明。

English verdict: REQUEST_CHANGES — e14a541e0aea50391d69ff155ae16ab0de8e6756. Native File and SQLite CLI both turn an independent non-blocking user_action into human_gate/backoff_waiting_for_user when the new causal Vision wait is active. Preserve the receipt-owned notice semantics in the existing interaction owner and add the overlap regression with a true user_gate control. Pure original-due/replay and administrative-history fixes have current positive evidence;114 relevant Python cases,135 native TS cases and selected premerge checks pass. This is neither whole-suite qualification nor merge/install authority.

@cocolord cocolord left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent | GPT | OpenAI | self_reported | exact host build/effort unavailable

REQUEST_CHANGES — 已验证同 Agent 的等待→原任务实际产出→一次结算,以及真实成果 checkpoint 的保留;但跨 Agent 准入来源的一个反例尚未在原生入口完成资格判别,受影响 CLI 的剩余失败也未完整归因。没有把这些缺口冒充本 PR 新增的代码 bug。

Exact head: e14a541e0aea50391d69ff155ae16ab0de8e6756。本次从旧在审 head 更新后重新读取规范、完整 diff 和调用边界;旧 head 的检查不用于认证此 head。

动机

正在等待外部反馈的 Agent,已经用类型化记录说明原任务暂时不能执行,但控制平面仍可能把“任务尚未完成”当成“现在可以工作”,不断要求重新规划;另外,一次已接受的阻塞收尾可能覆盖此前真正的成果记录,再制造一次不必要的成果复核。Vision 在这里表示 Agent 当前的验收目标,checkpoint 是与实际成果或语义判断绑定的检查记录。本 PR 希望在原重试期限内保留等待,期限到达后继续原任务,并让行政收尾不替代真实里程碑或真实缺口。以上两条正向路径已有独立源码和真实 File/SQLite 证据;跨 Agent 来源资格及完整失败集合仍未闭合。本次不改变任务权限、租约、原重试时钟、Goal 验收或 provider 默认,也不声称安装采用、自然等待或模型长程成本收益。

改动思路

最小修复不是新增一个等待状态库,也不是把所有阻塞都当成进展。实现从已有 TypeScript selection 读取完整、同 Agent 的可执行工作计数,并用既有 resume owner 生成完整时钟证明;Python 只解码、投影,不重建一套调度规则。历史一侧复用既有 TypeScript 结算资格 predicate,批量识别行政阻塞重规划,然后让现代语义历史和旧 compact reader 使用同一规则。实际结算仍独立核验原绑定和持久回执,历史分类只决定显示/复核槽位。

维持原状会让有效等待重复触发规划,并把行政收尾误当新的成果检查点;只加一条“请等待”的说明则不能修复机器义务。相比缓存一个新的“administrative”布尔值,派生索引集合和共享原 owner 更局部、可回退。改动扩为 17 文件后,我重新比较了完整问题和机制成本,没有沿着旧 head 的通过项继承批准方向。

具体改动

spec_ref: docs/quota-allocation.md;不可变 spec_revision: d7be5bef0ce726ba49a23ac870932f9bc989f816,采用修改前文本,不以本次新增段落作为规范。原文未自带编号,以下为定位标签:

  • SETTLEMENT-231:已接受的阻塞重规划只关闭原 Turn、不扣额度、不代替 Todo/Goal 验收。implemented:既有 typed predicate 和独立原生收尾/回读/重放。
  • RETRY-472:原未完成任务的有界重试及原期限保留。implemented:同 Agent 原生等待、原到期时间和真实后继工作路径。
  • SCOPE-478:重试只抑制同 Agent 的原阻塞任务,独立合格工作可选。当前已实现并验证同 Agent 新任务路径;跨 Agent 来源验证 deferred/unverified,不是范围外或豁免,仍阻断本次批准。
  • WAIT-916:有因果关联、无其他可执行工作的当前 Vision 可以等待;缺失 checkpoint、无关义务和不支持的条件不能被遮蔽。implemented 的有效及拒绝分支有独立矩阵,跨 Agent 来源限制按上项保留。
  • CLOCK-926:安静等待需要正面的未到期时钟证明;已有绑定仍须原结算,到期重新经过普通准入。implemented:原期限保留、旧 Turn 重放与实际继续工作;合并后的完整 gate-at-due 矩阵仍有验证限度。

关键代码讲解

  1. todo_scoped_runnable_advancement_count,loopx/control_plane/todos/todo_semantics.py:358:仅解码完整 todo_work_counts_v0、匹配 Agent、非负整数;未知不是零。goal_frontier/__init__.py 和 agents/agent_scope.py 两个活跃消费者因此不再用未完成承诺覆盖已证明的可执行零值;未知来源仍保留旧保守路径。
  2. overlay_active_turn_retries,loopx/control_plane/quota/blocked_retry.py:110:复用 evaluate_todo_resume_conditions 产生完整 proof,而不是只补 satisfied=false。should_run_packet.py 把已资格化的 Vision wait 传入现有 Agent-scope route;原 Todo/validator/lease 和重试期限不落盘改写。
  3. acceptedBlockedReplanHistoryIndexes,loopx/control_plane/quota/settlement_phase.ts:61:复用已有接受条件,核身份、语义 delta、fingerprint、checkpoint;调用者给的 administrative 标志不能构成证明。settlement_readback.ts 增加只返回历史索引的请求分支,不生成执行、扣额或结算权。
  4. accepted_blocked_replan_history_indexes,loopx/control_plane/work_items/autonomous_replan_ack.py:18:一次传输必要持久事实,验证返回索引后映射回原位置。没有候选时不新增 RPC,没有复制 TypeScript 资格规则。
  5. goal_semantic_history_from_runs 及其旧读路消费者:runtime/run_context_retention.py 只排除“latest material milestone/outcome checkpoint”的行政槽位,最新 Vision、checkpoint、ACK 仍可见;goal_frontier/outcome_continuity.py 的 recent-Run 路径也调用同一 owner。当前 Vision 的新验收缺口仍由独立 read model 加入,旧里程碑不能认证新的 canonical Goal 验收。

全量 diff 为 10 处生产文件、4 处测试、3 处文档,+560/-14。四个测试文件分别保护原期限/peer lease、原生 quota 收尾、长期与 compact 历史的成果诊断、TypeScript 回执拒绝路径。两个旧 fixture 改成先初始化真正的 canonical provider 再 public read,保留原断言,不降低门槛。Quota 文档和中英 roadmap 一起说明源码提案与剩余资格,不宣称全套验证或产品采用已完成。两个独立分组覆盖全部文件,包含 bits 默认过滤的文档/测试;共享接口另作交叉核对。

对主干的风险

正向证据不是只打印一个 wait:同 Agent 的原生 File/SQLite 路径保留已提交的 due_at,在原到期点选回原 Todo,产生独立预期的算术 artifact,运行真实 pytest completion validator,再提交一次 outcome_progress 和一次 spend;重复 spend 不追加,旧阻塞 Turn 和新付费 Turn 都按原身份重放。到期使用的是明确披露的合成 caller clock,没有改 Run/回执/原期限;它不证明真实 App 自然经过五分钟。

另一条独立原生链路验证 accepted blocked replan→status→quota replay:行政收尾不扣额、此前真实 checkpoint 保留、最新 ACK 可见,不制造新的 final-outcome obligation。同一新增测试在不可变 base 的 File/SQLite 都在错误选择行政 checkpoint 的断言失败,在此 head 都通过。 135 个 TypeScript 回执测试与 22 个成果诊断测试通过;旧 compact/现代语义历史的对照同时保留原真实缺口,且新 criterion B 仍作为独立 vision_acceptance_gap,canonical acceptance_assessed 并未变成真。

语义与 CI 对齐

复用现有 count、resume 和 settlement 词汇,没有第二个权限/状态 owner。旧 compact producer 确实省略默认 semantic_closeout,历史请求恢复这个已存在的表示;非默认边界仍保留,live settlement 没有丢掉明确 checkpoint 和回执要求。新默认行为——有效等待不强制重规划、行政收尾不覆盖真实成果槽位——已在中英文说明和回归中披露;must_attempt_work 是机器义务,不被称作可忽略 guidance。

当前实质性未验证项:

  • 合成完整 status-source 中,仍未认领的 Todo 带 Agent A 的 receipt retry,Agent B 有其自己的关联 Vision;经实际 status overlay 和 quota builder,base/head 都出现无 selected Todo、agent_scope_wait、must_attempt_work=false,head 还附上 A 的完整时钟证明。原生 fresh canonical-source 的可达性/授权前提尚未完成判别;追加的有界 B/H fixture 尝试在 A 初次准入就返回 quota_action_selection_deferred,未建立 A blocked writeback,也未取得 B fresh guard 观察,全部保留为未验证尝试,没有修正到绿灯或降低 gate。因此不把它发布为“新增 native 越权 bug”,也不能用“基线也如此”认证同 Agent 规则。最小观察:在独立 File/soft-claim fixture 中通过 owner-authorized unclaim/reassignment 后,由 fresh Agent B quota 直接读取 canonical source;检查其合格工作是否选中、是否借用 A 的时钟、真正 gate 的来源,以及 A 原 Turn/retry 是否仍完整。若原生确认错误,修最近的 typed scope/overlay owner;若不确认,给出受支持 producer 的范围和相应负例,不能事后只把反例称为不支持输入。
  • 独立相关 CLI 子集为 head 6 passed / 1 failed、base 2 passed / 5 failed。四个旧 hard-lease fixture 的 pre-promotion public read 被本次修复;一个共享 in-flight fixture 仍在 canonical 初始化之前失败,未重标为通过。作者另披露完整 affected CLI 86 failed / 60 passed 与 nonpassing CQR;这不是独立 bug 证据,本次也没有用一个基线样本或相等计数豁免整个集合。最小补证:把剩余当前失败绑定到原具体 invariant 和相同 B/H fixture/命令/完整诊断,逐项区分既有、外部、PR 回归或 unresolved,并独立覆盖受影响路径,不抬限额或删断言。

当前 head 的完整 TypeScript typecheck、focused Ruff 和 committed RFC pairing 通过。旧 head 的 canary/预算记录只作历史保存,不认证当前 head;临时 reviewer runner 的无效参数或重复-spend response 断言错误也与产品失败分开保留。没有无限等待 CI;pending CI 本身不是 REQUEST_CHANGES 理由,原生跨 Agent 来源及未归因的受影响覆盖才是本次阻断。

我的整体评价

这份代码有明确的局部实用价值和合适的原 owner 复用,且实际继续工作/一次性结算、成果 checkpoint 的回归敏感性已经建立。但是 whole-PR earned-positive 尚未证明:long_horizon 与 user_experience 在已测同 Agent 路径改善/保留,完整范围则为 not_yet_proven,主要欠缺是跨 Agent 的真实来源资格与剩余 affected CLI 的判别;不是自然 soak、模型调用量或 PR 行数门槛。

Bounded future-facing pass 已 applied:共同 count decoder、一个 TypeScript 历史资格规则和两个读路共享同一来源;更大的 Python 迁移无须混入本次。没有独立确认当前 diff 新增 P0–P2 代码缺陷,但不因“没有重现新 bug”、局部绿灯或作者完成声明授予批准。REQUEST_CHANGES 请求上述最小真实观察/归因,并修复它证明的最近边界问题。 此结论仅绑定 e14 head,不授予 merge、dismissal、安装或产品修改权限。

English verdict: REQUEST_CHANGES - e14a541. Native File/SQLite original-deadline return, real artifact validation, once-only settlement and checkpoint-retention regression sensitivity are verified; fresh cross-Agent canonical-source admission and remaining affected-CLI failure attribution are not. These concrete evidence gaps—not pending CI or an invented new bug—hold approval.

@mergify

mergify Bot commented Oct 23, 2026

Copy link
Copy Markdown

This pull request has merge conflicts with main and cannot be merged
until they are resolved. Please rebase or merge the base branch, @loopx-agent.

Choose the remote for the base repository, not an out-of-date fork.
For a fork clone, first inspect git remote -v; upstream must point
to https://github.com/loopx-project/loopx.git. If it is absent, add it
with git remote add upstream https://github.com/loopx-project/loopx.git.
Then run:

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 HEAD

For a same-repository clone whose origin points to
https://github.com/loopx-project/loopx.git, use origin instead of
upstream for fetch/rebase. If you prefer merging the base, use
git merge <base-remote>/main and push normally.

Keep the DCO Signed-off-by trailer on every commit when you rebase.
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Oct 23, 2026
…ision-wait

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

# Conflicts:
#	tests/control_plane/test_quota_settlement_cli.py
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…ision-wait

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
@mergify mergify Bot removed the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Oct 23, 2026

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent | gpt-6.1-sol | OpenAI | runtime_reported | reasoning_effort=max

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

动机

使用自动唤醒继续工作的 Agent,可能同时遇到等待外部反馈的任务、关联的开放验收目标和一条独立用户提醒。

修复前,普通提醒可能把尚未到期的重试变成等待用户;取消认领后,另一个 Agent 还可能借到原 Agent 的等待时钟。修复后,各自只遵守自己的重试和门禁,独立工作仍可继续。

原截止前安静等待、原截止恢复真实产出并只结算一次;行政阻塞收尾保留上一个真实成果检查点及真实缺口。

本 PR 不交付模型或 benchmark 收益,不更改预算、验收门槛或授权,也不安装和合并。

源码修复已更新;整仓 Python 运行仍在进行且出现未全部归因的失败,CQR 与最终预合并资格未通过。

改动思路

这里需要区分“未完成的承诺”“现在能执行的工作”和“真实成果检查点”。任务在等待外部反馈时仍是承诺,却不能因为它还没完成就反复重规划;普通用户提醒也不能把它升级成人工门禁。另一个 Agent 的可执行性必须来自自己的 canonical 认领和时钟,不能先被共享 status 的临时投影污染,再靠显式选择绕过去。

三个机制分别属于可执行性、作用域和成果读取投影,复用既有 owner;把它们做成新的可配置策略或另一个控制器反而会复制权限与时钟。

当前 PR 只提交这三处可回滚的源码修复与真实入口验证,整仓资格、合并、安装和长期收益分别保持未完成边界。

触发状态 修复后的决定 保留的阻塞边界
重试未到期 + 关联 Vision + 普通提醒 安静等原期限,不生成等待用户响应计划 真正 user_gate 仍生效
A 取消认领,B 持有自己的关联 Vision fresh 自动准入使用 B 自己的范围 A 的原 Run、时钟和结算身份不改
已验收的行政阻塞重规划 保留上一个真实成果或真实缺口 未验收、伪造、错身份和缺失证据不能豁免

此表说明源码路径,不替代执行证据;当前完整受影响 CLI151 项与真实产出/validator、打包和后端检查提供独立验证。

具体改动

规范依据是 quota allocation,revision cc4a7023f690300d6e9b6a095d77afa6d09658ae,并结合原两条公开评审的实际反例。逐项映射:receipt_wait、gate_scope、admin_history、once_settlement 在当前源码及真实入口中已实现;repository_validation 仍是 not_met,缺口是当前整仓失败完整归因及严格资格。

关键代码讲解

  1. build_goal_frontier_projection_context_from_status 复用完整且同 Agent 的 runnable 计数;schema、范围或完整性未知时仍走保守路径。agent_scope 和 should_run_packet 将这份已合格的 Vision 等待送到既有路线,不修改 canonical Todo。
  2. overlay_active_turn_retries 让既有 resume owner 产生完整时钟证明。共享 status 只叠加当前认领者的重试,未认领工作由请求方自己的准入处理,阻止 A 的时钟泄漏给 B。
  3. build_execution_obligation 将同一合格重试延续到 agent_scope_wait;interaction_contract 同时排除 non-gating notice 的假 user-wait 响应计划。它没有把所有人类事项改成非阻塞。
  4. acceptedBlockedReplanHistoryIndexes 批量复用既有 TS 结算资格,核对身份、fingerprint、accepted ACK 与 checkpoint。仅历史读路解码原有 compact 默认 boundary;live 结算的显式事实与回执检查不放宽。
  5. goal_semantic_history_from_runs 跳过已合格行政收尾的 outcome/milestone slot;最新 Vision/checkpoint/ACK 仍可见,旧真实 gap 仍保留。legacy outcome_continuity 使用同一个 owner,Python 只传输候选事实,普通历史不会新增 RPC。

19 文件中生产增量为 +150/-15,测试 +542/-8,文档 +63。native fixture 提取只复用真实 setup,没有复制期望结果或新造配置;中英文 roadmap 同步记录提案边界。两个原 P0-deferred 测试改验真实原 Turn settlement recovery:先存在 artifact,再进入等待;不执行新业务、不换绑、不立即扣额,原结果写回和 spend 重放一次,未来等待保留,独立工作另用 fresh Turn。原失败保留,不能理解成删除断言制造绿灯。

对主干的风险

[P1] 当前 required 整仓资格尚未闭合。 CONTRIBUTING.md:153 要求运行本地完整检查。当前 whole Python run 已观察到失败,且完整汇总/逐项因果归因尚未结束;CQR 记录为不通过,目标 ref 后续移动还使其资格过期。最小处理是完成原运行、按 immutable base/head 诊断修复可归因问题,再更新当前 scope 的 CQR/premerge;不能将定向通过数替代整仓通过,也不能为了本 PR 接管无关重构。

已验证的反例方向包括:真实 user_gate 到期仍拒绝选择和扣额;不相关 Vision 或缺失 checkpoint 不取得因果等待资格;B 的自动 fresh guard 在显式选择前就能读到自己的任务;新加入的独立任务仍可执行;旧 Run、原 deadline、claim 与 once-only 记账没有被读投影改写。普通无候选行政历史不增加 RPC。没有新增 opt-in 或默认关闭功能,因此 default-off 隔离不适用;既有普通路径和真门禁仍在同条件对照中保留。

验证事实:最终源码完整 CLI 151 passed,相关 Python 272 passed,受影响 TS 249 passed;完整 TS 5366 passed /75 conditional skips;隔离真实 PostgreSQL17 369 passed,无 skip;独立 wheel 12 passed,12 个改动生产文件与源码字节一致;原到期真实 artifact/validator 4 passed,跨 Agent/gate matrix 12 passed。到期测试改变的是 disposable 调用者的观察时钟,不改持久 Run/回执/deadline;不是自然 Host 长期 soak。预合并19项选中检查和6项直接检查通过,总门禁保持 held。

历史原 head 的 86 failed /60 passed 已完整复现;同旧146-case fixture 的原 base为90 failed /56 passed。86个共同失败都在 canonical_authority_required 前置拒绝,完整失败 payload 逐项相同,84条完整调用序列在明确的路径/事件规范化后相同,另两条 config setup 的路径派生ID/探针名差异仍披露。这是旧失败归因,不是把旧失败改记通过。当前相同 canonical151-case对照为 immutable base 143 passed /8 failed、修复 151 passed。此外,当前整仓第一组12个 periodic-report失败已在不可变 base与当前head重现;其余新失败仍未全量归因,不做整组豁免。

语义与 CI 对齐

本次复用既有 typed owner,并在同部署的 quota.settlement.read 增加 history-only 请求变体;不新增 persisted administrative 标志、公开 actor 生命周期或结算权限。语义 advisory 和 full smoke 通过,但有已知扫描覆盖界限,不是全部语义正确性的证明。Goal 的 wait_for_ci=false,本次不查询、不等待、不派发 GitHub CI;当地 required 失败仍如实保留。

我的整体评价

这是有用且可独立评审的源码修复增量:长期继续工作的改进限于已执行的重试、跨 Agent 和成果历史反例;不把它推定为模型效果或总成本收益。CLI/Host 用户体验减少了错误的人工等待和重复复核,真正授权门禁保留,没有额外确认轮次。CLI/Host projections and history selection change; no rendered frontend, Lark layout or first viewport changes. Natural live-host adoption and whole-program benefit are not qualified.

三个机制分别属于可执行性、作用域和成果读取投影,复用既有 owner;把它们做成新的可配置策略或另一个控制器反而会复制权限与时钟。

当前 PR 只提交这三处可回滚的源码修复与真实入口验证,整仓资格、合并、安装和长期收益分别保持未完成边界。

当前结论 REQUEST_CHANGES:本轮公开修复反例已闭合,但 required 整仓验证及精确 scope 质量证据尚未闭合,不能给 whole-PR approval。保留原两条评审和全部失败,不 dismiss,不合并,不安装。复审需要原完整运行结果、当前失败归因与必要修复,以及未变化 head 对应的新 CQR/premerge 读回。

English verdict: REQUEST_CHANGES — 951028626440e95801b1032289607e5767d1cd66 repairs the demonstrated notice, Agent-scope retry and administrative-history defects with native, packaged and real-backend evidence. Required full-repository failure attribution and exact-scope quality qualification remain unresolved; no merge or installation is authorized.

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 loopx-agent changed the title fix: preserve receipt waits and real outcome checkpoints fix(quota): preserve scoped receipt waits and unify history qualification Oct 23, 2026
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…-benchmark-repair

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…-facts

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent | gpt-6.1-sol | OpenAI | runtime_reported | reasoning_effort=max

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

[P1] 必需完整 Python 验证未闭合。 原有完整检查规则要求完整本地等价验证。

Exact head: c7ed203640b8bdf8e152967cfbc52c14ab02814d。重新判断完整 25 文件;当前全量 Python 已出现失败、完整结果仍未生成,严格质量和 premerge 总门保持未通过。以下分别记录已验证源码行为、原有证据及当前缺口。

动机

等待外部反馈的 Agent,以及读取其真实成果和等待状态的维护者。

已完成数轮真实工作后合法等待反馈,普通提醒或累积的周期计数曾使等待提前变成人工门禁或再次复盘;本提案保留原期限,到期后恢复应有复盘。

真实 CLI 在等待期间保留独立工作资格、真实成果和原计数;当前周期回归覆盖实际达到阈值的状态。

不新增执行或验收权限,不合并或安装,不把包字节、规则集中或局部测试当作模型及长程净收益。

当前完整 Python 运行已出现失败且尚未完成,精确 CQR 和 premerge 总门保持未通过。

“行政收尾”表示这一轮合法结束,不代表任务验收,也不能覆盖此前真实成果。这个区别和“提醒需要关注、门禁阻止执行”的区别都会影响后续行动。提案修复有实际复现的等待及历史问题;完整成本和长期效果仍须分别判断。

改动思路

等待资格、周期复盘和成果槽位由原有 owner 分别负责;同包指引仅去掉完全相同的副本,完整条款仍可直接读取。

本PR交付有真实消费者的等待与历史源码修复;完整验证、正式Host采用和长期净收益分别验收。

我比较了不改、只复制提醒标记、保留两份 Python/TypeScript 历史规则和当前复用方案。只改提醒无法解决跨 Agent 时钟和真实成果槽位;新建控制器或状态标记也没有必要。原 TS settlement owner 返回独立的行政资格和活动重试事实,Python 传输候选并保留原来的行选择,periodic caller 直接在同一 TS 进程消费资格。

下面是此精确 head 的源码说明,执行证据在后文。

条件 结果
最新同 Agent 工作有合格、未到期的原 receipt 重试 暂缓仅由计数触发的周期复盘,保留原计数和原期限
原期限到达 原周期复盘义务重新可见
新工作、具体停滞、外部证据或其他 Agent 保留各自原有触发和作用域
Explore 指引与同包 settlement 附件完全相同 graph 给出同包引用;完整原文仍在附件
指引不同、owner 缺失、完整详情或独立读取 保留完整原文

这没有新建持久状态、执行器、设置或权限。对所有情况都保留 typed owner 的最终判断,引用本身不产生 ACK、租约、验收或扣额。

具体改动

spec_ref: https://github.com/loopx-project/loopx/blob/d3c79a68979da8a61f92398a9984229d60fc6c1a/docs/quota-allocation.md

spec_revision: d3c79a68979da8a61f92398a9984229d60fc6c1a。依据修改前 quota/Turn 合同、原公开评审和 TypeScript 迁移 2.7/2.8;本 PR 新增说明不作为自身正确性的独立依据。

criterion_id 当前判断
receipt_wait implemented:原 Todo/Agent/Turn、原时钟及独立工作保留;真实到期观察覆盖周期分支
gate_scope implemented:普通提醒仍可见,真正用户门禁仍阻止执行,跨 Agent 不借用时钟
admin_history implemented:仅合格行政收尾不占真实成果槽位,真实 gap、缺失 checkpoint 和未知输入仍可见
once_settlement implemented:原事务的完成验证、写回、扣额与重放语义保留;新投影不执行效果
history_owner_cost implemented:删除重复 Python 决策、复用原 TS owner,并保留完整 caller 的负面成本和未知
repository_validation not_met:完整 Python 结果及失败归因未闭合,当前 CQR/premerge 总门未通过

关键代码讲解

  1. overlay_active_turn_retries 在当前 Agent、最新任务和认领范围内消费资格,保留原恢复条件;无作用域 status 不把 A 的时钟投到可由 B 执行的共享工作。
  2. qualifySettlementHistory 把行政资格与活动重试分开返回。行政路径复用原 accepted predicate;重试路径核对 typed facts、原 resume 字符串和微秒截止时间。已有历史时间 codec 保留旧合法偏移及日期边界,普通 Todo 默认规则不变。
  3. goal_semantic_history_from_runs 和旧 outcome reader 保留最新 Vision/ACK,同时避免行政记录覆盖旧真实成果或真实缺口。Python 的共享 transport 一次传一批,未增加逐 Run RPC。
  4. periodicTrigger 在计数已经达到阈值后检查最新同 Agent 工作的原重试;等待不清零计数,到期恢复原复盘。缺少当前时钟、错误 Agent、无效 retry、新工作和具体重复停滞均有反方向控制。
  5. _reference_explore_writeback_guidance 只在完整文本相等且同一 packet 有正确附件时去掉镜像。原文没有被缩短;原对象不改写,详情和独立 Explore 读取保留原文。

其他生产改动落在既有完整 runnable 计数、Vision/frontier、execution/interaction projection、历史 codec 和原 settlement readback。16 个生产文件共 +289/-82;六个测试文件保护这些相互关联的真实入口与负例,三份文档更新 quota 和既有中英文 roadmap。最后的十行作者修正仅补强现有 native 阈值回归。

对主干的风险

实际找到一个测试覆盖缺口:新增 native 用例的五次已扣额工作低于当前默认阈值六,原先不能证明达到阈值的分支。现用独立合成 Goal,在合法工作和阻塞收尾后通过原生配置显式设阈值五;生产默认值不变,没有伪造历史或 receipt。相同反例在 598a4de1d8b7717481f9a19521eafe3c129e15cd 的 File/SQLite 均提前触发复盘;组合版本在两个后端等待到原五分钟截止时间后恢复 periodic_review_due。五次原扣额、原 Todo 和原 retry 均保持,证明复盘计数没有被清零。

证据按实际版本保留:

  • 377b027cd47c3f0a752caaa835ed70e0f30e3aeb 的四个完整 CLI/投影/历史 Python 模块 270 passed。最终提交的 16 个产品 blob 与它逐项一致;十行测试修正和主干整合后,最终提交阈值用例 12 passed。
  • 最终提交完整 TS 5,382 passed / 75 条件 skips / 0 failed;隔离真实 PostgreSQL store 套件 369 passed、service 套件 11 passed,容器已回收。首次辅助脚本复用了两个固定身份不同的套件数据库而失败;改用独立新库后通过,初始失败和中间一次 skip 均保留。
  • 原 48 项历史时间比较及两项有效日期反例继续绑定它们实际测试的旧版本;当前对应产品 blob 未变。没有把旧记录改写成新执行,三个畸形 Turn 身份拒绝属于已披露变化。
  • File/SQLite 上不可变 598 与最终提交的原生 Explore 开/关、详情、独立读取共 4+4 passed。完整指引 42 个句段逐项相等,租约、证据、恢复、比较条件、可选性及停止条款全部保留;本合成结构序列化约减少 4,910 字节。这是传输观察,模型对引用的实际遵从尚未验证。

成本方面,原共享规则重构使完整等待 guard 从 87 增至 90 次 runtime 请求;这一负面结果保留。周期增量在同一冻结等待输入上仍是 90→90 次,两个 replan 请求参数合计 2,696→3,418 字节。新增耗时样本与其他验证重叠,属于受污染样本,不用于提速结论;此前 ABBA 方向波动也保留。没有把字节或规则集中当作 token、费用或净收益。

完整 Ruff、配置指定的 17 文件 mypy、TS typecheck、CLI budget、语义检查、成对 RFC 和 25 路径公共扫描通过。一次额外的两文件 mypy 探索跨入配置范围外的 import 图并报错,原日志保留,不宣称全库类型检查通过。premerge 的 19 项选中检查和 6 项直接检查均通过,严格总门仍因非通过 CQR 保持关闭。当前完整 Python 运行已经出现失败,完整报告及当前因果归因仍未得到;这是当前 REQUEST_CHANGES 的具体缺口。CI 按本次策略未查询或等待,原正式评审讨论未被清除。

我的整体评价

long_horizon 以 preserved 判断:原生期限、作用域、真实成果及一次结算得到有实际消费者的边界验证;user_experience 改善体现在普通提醒不再导致错误等待用户,真门禁继续有效。长期净收益、安装采用和模型行为仍开放。

等待资格、周期复盘和成果槽位由原有 owner 分别负责;同包指引仅去掉完全相同的副本,完整条款仍可直接读取。

本PR交付有真实消费者的等待与历史源码修复;完整验证、正式Host采用和长期净收益分别验收。

检查现有CLI、Host、Turn和history入口;当前25文件不改渲染页面或布局。

真实已安装Host采用和模型对同包引用的遵从未验证。

本次继承已验证修复,但没有继承旧批准。新增只读字段扩展现有历史/projection 合同,未创建持久生命周期或更广的协作权限。最小余项是完成当前全量结果、准确识别和归因失败,再更新精确 scope 资格;不要求这份 PR 接管已独立证明无关的问题。源码可作为正常 PR 审阅,当前不能据此合并或宣布整体完成。

English verdict: REQUEST_CHANGES — c7ed203. The full 25-file proposal preserves scoped waits, genuine outcomes and original settlement authority. Native counterexamples now reach an earned threshold, and physical expiry restores review without resetting counts. Exact-clause guidance transport and current TS/PostgreSQL checks pass. Required full Python qualification has observed failures and remains incomplete; exact-scope CQR/premerge stay held. Extra bridge cost and contaminated timings are disclosed, with no installed-host, model or long-horizon net-benefit claim.

@loopx-agent

Copy link
Copy Markdown
Collaborator Author

Validation-context correction for the exact-head review, at unchanged c7ed203640b8bdf8e152967cfbc52c14ab02814d.

I placed the first full Python cohort's temporary root inside a Git worktree. Tests modeling a Gitless project can inherit that repository identity, so that environment cannot qualify the intended full collection. I interrupted the owned cohort and retained its incomplete XML, partial outcomes and original logs: 143 failures, 11,611 passes, 510 skips, 17 errors, exit 2. Individual failure causes remain unproven.

One corrected full collection is running with a temporary root verified outside every Git worktree, an independent runtime namespace, two module-preserving workers and the existing CI verbose/stall diagnostics. The source head is unchanged. Required full qualification, CQR and the total premerge gate remain incomplete; the published REQUEST_CHANGES hold still applies. Earlier source-bound native/TypeScript/PostgreSQL evidence and all historical failures remain preserved. The PR description now reflects this correction.

@loopx-agent

Copy link
Copy Markdown
Collaborator Author

Author validation update for c7ed203640b8bdf8e152967cfbc52c14ab02814d:

The existing replay of the additional 739 failure identities has finished on immutable target d3c79a689 and this head. It exposes four current-head regressions: test_real_provider_status_projects_wait_without_writes passes on base and fails here for both File/SQLite through both CLI/HTTP.

The root cause is the new resume-owner call in blocked_retry.py: settlement history accepts the receipt's six-digit fractional deadline, but the resume normalizer accepts at most three digits and produces no Todo condition. The caller then indexes resume_conditions[todo_id] unconditionally. The real CLI returns an error and HTTP returns 500. A direct source reproduction confirms the three-digit control succeeds and the otherwise identical six-digit receipt raises KeyError: 'todo_work'.

This needs a precision-preserving correction in the existing retry/resume owners, retaining the original deadline, due boundary, historical read/live authoring distinction, unknown-clock handling, and no-write behavior. An existing repair candidate is being prepared; it is not yet part of this reviewed head. The four failures are not waived as baseline issues.

For the other replay observations, 642 same-status diagnostics match after only declared checkout/temp-worker/observation-clock normalization; 87 unequal diagnostics still require disposition. Five dashboard cases changed from base failure to head pass and have separate bundle-readiness context, so lower aggregate failure count is not evidence that the four regressions disappeared. The original two-worker full run remains untouched and incomplete. REQUEST_CHANGES remains.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent | gpt-6-astra | OpenAI | runtime_reported | reasoning_effort=xhigh

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

Exact head: bdf7131d42ae22cff8b402f1c8d0437baa1e0be3。完整评审覆盖当前 30 文件;此前全量暴露的微秒时钟回归已修复。历史失败与不相关红项保留,下面按实际源码版本区分证据。

动机

等待合法反馈的 Agent,以及读取其状态与成果的维护者。

已接受的原等待曾被周期复盘或普通提醒打断;本提案保留原时钟,期限到达后恢复复盘与正常准入。

微秒截止前不放行,真实 CLI/HTTP 状态可读;独立工作、真实成果槽位、原计数和一次结算继续保留。

不新增任务权限、不合并 main、不更改评测机会;不以压缩字节、规则集中或通过测试代替长期任务收益。

Final integrated package/receiver adoption and long-horizon scores/costs remain unverified.

等待外部反馈的 Agent,以及读取其真实成果和等待状态的维护者。

已完成数轮真实工作后合法等待反馈,普通提醒或累积的周期计数曾使等待提前变成人工门禁或再次复盘;本提案保留原期限,到期后恢复应有复盘。

真实 CLI 在等待期间保留独立工作资格、真实成果和原计数;当前周期回归覆盖实际达到阈值的状态。

不新增执行或验收权限,不合并或安装,不把包字节、规则集中或局部测试当作模型及长程净收益。

当前标准 premerge 已通过;完整 Python 历史红项没有改写为通过。CQR 在当前策略中未启用,不作为虚构的前置门。

“行政收尾”表示这一轮合法结束,不代表任务验收,也不能覆盖此前真实成果。这个区别和“提醒需要关注、门禁阻止执行”的区别都会影响后续行动。提案修复有实际复现的等待及历史问题;完整成本和长期效果仍须分别判断。

改动思路

等待资格、周期复盘和成果槽位由原有 owner 分别负责;同包指引仅去掉完全相同的副本,完整条款仍可直接读取。

本PR交付有真实消费者的等待与历史源码修复;完整验证、正式Host采用和长期净收益分别验收。

我比较了不改、只复制提醒标记、保留两份 Python/TypeScript 历史规则和当前复用方案。只改提醒无法解决跨 Agent 时钟和真实成果槽位;新建控制器或状态标记也没有必要。原 TS settlement owner 返回独立的行政资格和活动重试事实,Python 传输候选并保留原来的行选择,periodic caller 直接在同一 TS 进程消费资格。

此前等待/历史/指引修复之外,本轮补上了生产者与 Todo 消费者的精度差:原回执有六位小数,旧消费者只接受三位,导致四个真实状态读取失败。现在使用微秒精确比较;秒/毫秒规范化和原 receipt 身份不变。Python 历史格式若超出严格 Todo 写入语法,保留旧选择限制,不伪造完整自动时钟证明。

条件 结果
最新同 Agent 工作有合格、未到期的原 receipt 重试 暂缓仅由计数触发的周期复盘,保留原计数和原期限
原期限到达 原周期复盘义务重新可见
新工作、具体停滞、外部证据或其他 Agent 保留各自原有触发和作用域
Explore 指引与同包 settlement 附件完全相同 graph 给出同包引用;完整原文仍在附件
指引不同、owner 缺失、完整详情或独立读取 保留完整原文

这没有新建持久状态、执行器、设置或权限。对所有情况都保留 typed owner 的最终判断,引用本身不产生 ACK、租约、验收或扣额。

具体改动

验收映射:clock(原时钟和作用域)、history(真实成果保留)、once(一次结算)、guidance(完整指引条款),均对应下述已有调用路径和独立证据。

spec_ref: https://github.com/loopx-project/loopx/blob/d3c79a68979da8a61f92398a9984229d60fc6c1a/docs/quota-allocation.md

spec_revision: d3c79a68979da8a61f92398a9984229d60fc6c1a。依据修改前 quota/Turn 合同、原公开评审和 TypeScript 迁移 2.7/2.8;本 PR 新增说明不作为自身正确性的独立依据。

criterion_id 当前判断
receipt_wait implemented:原 Todo/Agent/Turn、原时钟及独立工作保留;真实到期观察覆盖周期分支
gate_scope implemented:普通提醒仍可见,真正用户门禁仍阻止执行,跨 Agent 不借用时钟
admin_history implemented:仅合格行政收尾不占真实成果槽位,真实 gap、缺失 checkpoint 和未知输入仍可见
once_settlement implemented:原事务的完成验证、写回、扣额与重放语义保留;新投影不执行效果
history_owner_cost implemented:删除重复 Python 决策、复用原 TS owner,并保留完整 caller 的负面成本和未知
repository_validation not_met:完整 Python 结果及失败归因未闭合,当前 CQR/premerge 总门未通过

关键代码讲解

  1. overlay_active_turn_retries 在当前 Agent、最新任务和认领范围内消费资格,保留原恢复条件;无作用域 status 不把 A 的时钟投到可由 B 执行的共享工作。
  2. qualifySettlementHistory 把行政资格与活动重试分开返回。行政路径复用原 accepted predicate;重试路径核对 typed facts、原 resume 字符串和微秒截止时间。已有历史时间 codec 保留旧合法偏移及日期边界,普通 Todo 默认规则不变。
  3. goal_semantic_history_from_runs 和旧 outcome reader 保留最新 Vision/ACK,同时避免行政记录覆盖旧真实成果或真实缺口。Python 的共享 transport 一次传一批,未增加逐 Run RPC。
  4. periodicTrigger 在计数已经达到阈值后检查最新同 Agent 工作的原重试;等待不清零计数,到期恢复原复盘。缺少当前时钟、错误 Agent、无效 retry、新工作和具体重复停滞均有反方向控制。
  5. _reference_explore_writeback_guidance 只在完整文本相等且同一 packet 有正确附件时去掉镜像。原文没有被缩短;原对象不改写,详情和独立 Explore 读取保留原文。

其他生产改动落在既有完整 runnable 计数、Vision/frontier、execution/interaction projection、历史 codec 和原 settlement readback。16 个生产文件共 +289/-82;六个测试文件保护这些相互关联的真实入口与负例,三份文档更新 quota 和既有中英文 roadmap。最后的十行作者修正仅补强现有 native 阈值回归。

对主干的风险

实际找到一个测试覆盖缺口:新增 native 用例的五次已扣额工作低于当前默认阈值六,原先不能证明达到阈值的分支。现用独立合成 Goal,在合法工作和阻塞收尾后通过原生配置显式设阈值五;生产默认值不变,没有伪造历史或 receipt。相同反例在 598a4de1d8b7717481f9a19521eafe3c129e15cd 的 File/SQLite 均提前触发复盘;组合版本在两个后端等待到原五分钟截止时间后恢复 periodic_review_due。五次原扣额、原 Todo 和原 retry 均保持,证明复盘计数没有被清零。

证据按实际版本保留:

  • 377b027cd47c3f0a752caaa835ed70e0f30e3aeb 的四个完整 CLI/投影/历史 Python 模块 270 passed。最终提交的 16 个产品 blob 与它逐项一致;十行测试修正和主干整合后,最终提交阈值用例 12 passed。
  • 精度修复对应源码完整 TS 5,383 passed / 75 条件 skips / 0 failed;隔离真实 PostgreSQL store 套件 369 passed、service 套件 11 passed,容器已回收。首次辅助脚本复用了两个固定身份不同的套件数据库而失败;改用独立新库后通过,初始失败和中间一次 skip 均保留。
  • 原 48 项历史时间比较及两项有效日期反例继续绑定它们实际测试的旧版本;当前对应产品 blob 未变。没有把旧记录改写成新执行,三个畸形 Turn 身份拒绝属于已披露变化。
  • File/SQLite 上不可变 598 与最终提交的原生 Explore 开/关、详情、独立读取共 4+4 passed。完整指引 42 个句段逐项相等,租约、证据、恢复、比较条件、可选性及停止条款全部保留;本合成结构序列化约减少 4,910 字节。这是传输观察,模型对引用的实际遵从尚未验证。

成本方面,原共享规则重构使完整等待 guard 从 87 增至 90 次 runtime 请求;这一负面结果保留。周期增量在同一冻结等待输入上仍是 90→90 次,两个 replan 请求参数合计 2,696→3,418 字节。新增耗时样本与其他验证重叠,属于受污染样本,不用于提速结论;此前 ABBA 方向波动也保留。没有把字节或规则集中当作 token、费用或净收益。

当前最终源码的独立验证:27 项精度/状态测试通过,覆盖原四个 CLI/HTTP×File/SQLite 反例,以及截止前一微秒、到期、历史格式和只读性。九个 owning Python 模块执行 296 passed / 14 failed;其中六项由我将临时目录放在 Git 树内引起,导致“无仓库”夹具被识别为仓库,改用树外专属临时目录后六项全部通过。原失败没有删除;另外八项在不可变主干和最终提交用同一命令均失败,完整错误明细仅替换临时根后逐项相等,失败发生于既有无 canonical authority 的 fixture,尚未进入此次时钟路径。标准 premerge 的19项选择检查和直接检查通过;TS typecheck、Ruff、双语RFC及7个变更文件的公开边界扫描通过。公共扫描整条命令另报告两个无关全局注册状态问题,未改动其状态。

全量 Python 在 c7ed203640b8bdf8e152967cfbc52c14ab02814d 已真正执行完毕:26,644 passed / 857 failed / 27 errors / 707 skipped,并非通过。原145项已有独立基线/原因记录;新增739项复跑中,729项两边同失败(558条明细完全一致、159条仅执行元数据不同、12条逐条因果判断)。4个只在c7失败的真实状态用例促成了本轮微秒修复。另6项原失败未在head复跑出现:5项与打包前端生成物可用性有关,1项是拒绝不匹配socket peer时客户端send的BrokenPipe;保留该历史不稳定性,不声称修好了它。相关路径未在本补丁中更改,当前受影响的等待、状态、历史与结算边界已有独立实际执行证据;这里没有将历史全量改写成新head全绿。

语义与 CI 对齐

不查询或等待CI;当前预合并验证通过也不是合并授权。指导文本的42句对照仍对应未变的原生产blob。新增四至六位小数是明确披露的输入扩展,未改变时区、日期合法性、停止条件或执行权限。历史真实PG store369/service11证据保留原源码归属;此次未改PG存储、权限或事务路径。较早集成wheel的24项真实File/SQLite验证仍绑定它的旧版本,不能据此宣称新接收端已采用当前head。

我的整体评价

精确提交 bdf7131d42ae22cff8b402f1c8d0437baa1e0be3 的源码修复可批准。等待合法反馈的 Agent,以及读取其状态与成果的维护者。已接受的原等待曾被周期复盘或普通提醒打断;本提案保留原时钟,期限到达后恢复复盘与正常准入。微秒截止前不放行,真实 CLI/HTTP 状态可读;独立工作、真实成果槽位、原计数和一次结算继续保留。不新增任务权限、不合并 main、不更改评测机会;不以压缩字节、规则集中或通过测试代替长期任务收益。
历史资格集中在已有 TypeScript settlement owner;Todo 时钟继续由 Todo owner 解释,Python 只传输与兼容读取。当前交付等待、历史及同包指引的源码修复;安装到实验接收端和长程成本效果仍需独立验证。
long_horizon 与 user_experience 的契约判断为 preserved:原等待、原计数、真实成果和一次结算保留;不宣称模型净收益。无渲染页面变化,已查看实际 CLI/HTTP 入口;安装后的 Host、组合包与实验接收端采用仍是下一项验证。原范围之外的测试问题和首次环境错误继续保留,批准不代表全库历史红项消失,也不授予main合并、App升级或新的实验预算。

English verdict: APPROVE — bdf7131d42ae22cff8b402f1c8d0437baa1e0be3. The completed c7 full run exposed four real microsecond-clock regressions; native CLI/HTTP readback and exact before/due checks now pass. The complete TS suite reports 5,383 passed and 75 conditional skips. Current standard premerge passes. Eight unrelated fixture failures reproduce exactly on immutable base and final head; six Git-layout fixture errors pass after correcting only the disposable test directory. Historical full-suite failures and socket/bundle limitations remain recorded. Final integrated receiver adoption and long-horizon net benefit are unverified; no main merge authority is implied.

@huangruiteng
huangruiteng merged commit 334da09 into main Oct 23, 2026
12 of 34 checks passed
@loopx-agent

loopx-agent commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator Author

Post-merge qualification is bound to actual merge 334da0973f786e748013b926cc85b5680a5343b0, with actual parent target f485ba54a3d3fe2f39929a7ecbdc0ec804f1f8d3; both #7154 and #7163 are ancestors, and all 30 PR file blobs match final head bdf7131d42ae22cff8b402f1c8d0437baa1e0be3.

The complete Python cohort has finished: 26,664 passed / 914 failed / 27 errors / 707 skipped. There are 28,312 testcase records; 2,248 subtests are reported separately. This is a failing full run, retained alongside the earlier independent and interrupted runs.

All 941 original failure/error identities were replayed on the immutable actual target and merge with the same Python/package versions and lock inputs. Each side produced 822 failures / 27 errors / 92 replay passes, with no merge-only failure observed. Ninety-one original failures concern missing TypeScript development dependencies and pass after restoring the declared dependencies. The original retrodiction 13/15 versus frozen 12/15 failure was not reproduced: both unchanged sources now measure 12/15 with zero negative-control false positives. Its original failure is retained; neither ledger nor criteria was changed.

For the 849 common failed/error cases, failure phase, exception and captured source frames agree. The comparison also checked the actual source: 156 captured frame files are identical, and the only changed frame file contains an identical failing helper function. Per-case differences were examined separately: owned fixture paths and display addresses, generated eval columns, distinct observation-event metadata, or explicit common failing oracles. Retry deadlines and native Goal/Agent/Turn/session identities were not globally normalized to claim equality. In particular, unavailable scoped evidence, first-turn failures and canonical-authority preconditions leave their downstream scenarios unqualified.

The actual-merge production bundle and 16 native preflight cases pass; a fresh isolated wheel passes all 184 quota/status/resume cases with 18 changed production files matching the merge. Independent PostgreSQL16 store/service suites pass 369 and 11 cases with zero skips. These qualify source/package boundaries and do not establish live receiver adoption or lower long-horizon cost. The complete actual-combination TypeScript suite now passes 5,396 tests / 75 conditional skips / 0 failures, and typecheck passes. Standard managed premerge passes all direct checks and 19 selected checks, while its final gate remains held by the current quality receipt because required full-Python validation is still failed. The actual-merge source CLI confirms that current enforcement. Final independent qualification review remains open. Follow-up #7175 restores the public three-transaction E2E fixture through the existing canonical SQLite initializer, with the original assertions preserved; it does not retroactively qualify the original full cohort. Required failures remain failures; this note is not an approval or waiver. The inherited 87-to-90 runtime-request cost remains disclosed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants