Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
696af80
fix: preserve receipt retry waits across vision replanning
loopx-agent Oct 23, 2026
4a1de4c
test: initialize canonical retry lease fixtures before public reads
loopx-agent Oct 23, 2026
747736e
Merge remote-tracking branch 'origin/main' into codex/receipt-retry-v…
loopx-agent Oct 23, 2026
9c94bc9
fix: preserve outcome checkpoints across blocked replans
loopx-agent Oct 23, 2026
e14a541
Merge remote-tracking branch 'origin/main' into codex/receipt-retry-v…
loopx-agent Oct 23, 2026
e8e4229
Merge remote-tracking branch 'origin/main' into codex/receipt-retry-v…
loopx-agent Oct 23, 2026
b9ca41b
fix: preserve scoped receipt waits with nonblocking notices
loopx-agent Oct 23, 2026
9510286
Merge remote-tracking branch 'origin/main' into codex/receipt-retry-v…
loopx-agent Oct 23, 2026
7bdf39e
Merge reviewed receipt wait repair into current target baseline
loopx-agent Oct 23, 2026
89c0d7d
refactor(quota): centralize receipt retry history qualification
loopx-agent Oct 23, 2026
598a4de
fix(quota): preserve aware history clock range comparisons
loopx-agent Oct 23, 2026
87206c2
fix(quota): preserve receipt waits across periodic review
loopx-agent Oct 23, 2026
377b027
Merge remote-tracking branch 'origin/pr-7117' into codex/receipt-wait…
loopx-agent Oct 23, 2026
8262862
test(quota): exercise an earned review during receipt wait
loopx-agent Oct 23, 2026
c7ed203
Merge remote-tracking branch 'origin/main' into codex/receipt-history…
loopx-agent Oct 23, 2026
bdf7131
fix: preserve receipt clock precision in Todo wait projections
loopx-agent Oct 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions docs/architecture/rfcs/loopx-overall-roadmap-v0.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,27 @@ visibility limits, ordinary notices, current cadence floors and unchanged
canonical waits/monitor clocks. Installed adoption and live host readback remain
separate from this source repair.

**S3/S7 administrative closeout proposal.** [#7117](https://github.com/loopx-project/loopx/pull/7117)
also separates an accepted blocked replan from the preceding real outcome
checkpoint. File/SQLite CLI readback and long/compacted history regressions retain
the previous milestone or genuine gap without creating a new outcome obligation
from administrative closure. Source coverage now includes notice/gate overlap,
original-deadline recovery and fresh canonical unclaim/reassignment with each
Agent's own Vision and clock. The complete affected CLI suite passes after
canonical-fixture integration and original-Turn accounting checks; preserve the
earlier failures and their base/head attribution. The follow-on refactor removes
Python retry qualification and batches administrative/retry history facts through
the existing TypeScript settlement owner for semantic retention and legacy status.
It preserves independent outcomes, original clocks and historical microsecond
expiry; malformed Turn identities no longer establish a positive retry proof.
The periodic-history caller also respects the latest same-Agent accepted retry
until its original deadline without resetting earned review counts. File/SQLite
real CLI tests cover the threshold, independent work, real user gates and natural
deadline recovery. Identical Explore guidance is referenced within the same CLI
packet, preserving all clauses and standalone reads.
Full-repository qualification, comparable full caller cost, installed adoption
and measured long-horizon benefit remain distinct and incomplete.

**S5/S11 long-horizon progress design.** The [research measurement refinement](long-horizon-harness-benchmark-research-program-v0.md#evidence-based-episode-evaluation-proposed-refinement)
and [product reading journey](../../product/use-cases/auto-research/long-horizon-progress-design.md)
connect native outcomes to research episodes, evidence and actual adoption.
Expand Down
13 changes: 13 additions & 0 deletions docs/architecture/rfcs/loopx-overall-roadmap-v0.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,19 @@ managed 与 attached 的工作对话都应能持续在 LoopX 中进行:沿用
| **S12 发布、开发体验与社区治理 · P0 卫生/P1** | 安装、源码验证、扩展注册、DCO/PR、测试层级、contributor route 与双语文档已存在 | 从干净机器/发布包验一条首次工作和一次升级/回滚;host/OS 支持以 release contract 为准。缩短合理改动的定位、测试和 review 成本;公开精确 head、可重复 fixture、兼容窗口、维护者路由和贡献归属,退休重复协议及过时证据 |
| **S13 采用、生态与商业可持续性 · P1 发现/P2 试点** | 公开 adoption loop、showcase、license/governance、observer-first 产品合同已存在;付费 PMF 未证明 | 先收集真实独立首次使用/重复使用/退出原因,做可复现案例和有固定预算/验收/回滚的试点;沉淀 reusable adapter 与交付手册。核算模型/计算/存储/支持成本及维护负担;满足重复需求后再决策商业托管边界、支持等级和分发,不承诺 SLA 或擅改开源条款 |

**S3/S7 行政收尾提案。** [#7117](https://github.com/loopx-project/loopx/pull/7117)
进一步区分已验收的阻塞重规划与前一个真实成果 checkpoint。File/SQLite CLI 回读和
长期/压缩历史回归保留原里程碑或真实缺口,避免行政收尾制造新的成果义务。源码
覆盖已包括通知/真门禁叠加、原截止恢复,以及各自持有 Vision 和时钟时的原生取消
认领/转派。canonical fixture 整合及原 Turn 记账检查后的完整受影响 CLI 套件通过;
保留此前失败及 base/head 归因。后续重构删除 Python 重试资格判定,由已有 TypeScript
结算 owner 批量核对行政/重试历史事实,供语义保留和旧状态读路使用。各维度仍独立,
保留原时钟及历史微秒到期边界;畸形 Turn 身份不再取得重试活动的正向证明。
周期历史调用者也尊重同 Agent 最新工作的已接受重试直至原期限,不清零已累积的复盘
计数。File/SQLite 真实 CLI 覆盖阈值、独立工作、真实用户门禁与自然到期恢复。
完全相同的 Explore 指引改为同一 CLI 包内引用,保留全部条款及独立读取。整仓
资格、可比完整调用成本、安装采用与长程实测收益仍是分别验证的未完成项。

**S5/S11 长程进展设计。** [研究计量细化](long-horizon-harness-benchmark-research-program-v0.zh-CN.md#基于证据的研究片段评估拟议细化)
与[产品阅读旅程](../../product/use-cases/auto-research/long-horizon-progress-design.zh-CN.md)
把原生结果关联到研究片段、证据与实际采用。研究侧牵头方法、基线/窗口/成本口径及独立
Expand Down
84 changes: 84 additions & 0 deletions docs/quota-allocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,20 @@ The cadence does not interrupt a host, schedule a Turn, spend quota or grant
authority. The executor must settle work and re-enter quota before starting the
next work Turn for the review obligation to take effect.

A reached periodic count alone does not preempt the latest same-Agent work's
accepted, unexpired receipt retry. The shared settlement owner qualifies that
retry and its original deadline. The counter is not acknowledged or reset:
review becomes due again at expiry. New work or evidence-driven triggers and
independent runnable Todos retain their normal paths; another Agent's wait
cannot suppress this Agent's review.

The compact CLI packet may replace an identical Explore writeback-guidance
mirror with `result_writeback_guidance_ref`, pointing to the complete settlement
attachment in the same packet. Every clause remains available without another
guard call. Differing text, standalone Explore reads and `--include-detail vision`
retain the original guidance. This changes presentation, not work or settlement
obligations.

```bash
# Preview, apply, and read back an explicit Goal threshold (supported: 1–6).
loopx configure-goal --goal-id example --execution-replan-after-turns 5
Expand Down Expand Up @@ -241,6 +255,40 @@ selection of independent work remain unchanged. A previously committed debit
is retained, and neither a bare blocker declaration nor an unqualified ACK
closes the Turn.

History selection also distinguishes this accepted administrative blocked replan
from a delivered milestone. The existing TypeScript settlement owner qualifies
the persisted Run facts in one batch; a bare blocker, unaccepted ACK, mismatched
identity or unsupported checkpoint remains outcome-relevant. Both semantic
history and the legacy recent-Run reader retain the preceding real outcome
checkpoint, including any unresolved gap, instead of manufacturing a new
final-outcome obligation from the administrative closeout. The latest vision,
checkpoint and replan ACK remain visible. Missing checkpoints and genuine
delivery gaps still require their original review; this read classification
grants no execution, completion, acceptance or settlement authority.

历史选取将已验收的行政阻塞重规划与成果里程碑区分。复用 TypeScript 结算 owner 批量
核对持久 Run 的类型化事实;裸阻塞、未验收 ACK、身份错配和未知 checkpoint 均不能
取得行政豁免。语义历史和旧 recent-Run 读路都保留前一个真实成果 checkpoint 及其
未解决缺口,避免行政收尾反复制造新的成果复核义务。最新 vision、checkpoint 和
重规划 ACK 仍然可见;缺失 checkpoint 与真实交付 gap 保持原复核要求,这一读取
分类不授予执行、完成、验收或结算权限。

The same settlement owner qualifies active receipt retries for semantic-history
selection and the legacy status overlay. Each reader sends one candidate batch;
ordinary history without candidates needs no runtime request. Administrative
acceptance and retry activity remain separate results. Python transports facts
and applies existing row selection instead of maintaining a second retry rule.
Historical reads retain aware timestamps, microsecond expiry and the original
deadline; live settlement validation is unchanged. A non-string or blank Turn
identity cannot establish an active retry. Full caller cost and installed
adoption require separate qualification.

同一结算 owner 也为语义历史选取和旧状态叠加核对活动回执重试。每条读路只发送一批
候选;没有候选的普通历史无需 runtime 请求。行政验收和重试活动分别返回,Python
传递事实并沿用已有行选取,不再维护第二套重试规则。历史读取保留带时区时间、微秒
到期边界和原截止时间;实时结算校验不变。非字符串或空白 Turn 身份不能证明重试
活动。完整调用成本与安装采用仍需分别验证。

An accepted `vision_checkpoint_v0` for `outcome_progress` also closes its exact
Todo-bound Turn after the matching writeback and spend receipts commit. Both
`in_flight_continuation` and `semantic_closeout` use their corresponding typed
Expand Down Expand Up @@ -479,6 +527,15 @@ Turn without spending quota. The retry suppresses only the blocked Todo for
the same Agent until due or superseded by newer work, so independent eligible
Todos can still be selected. Historical blocked writebacks without a bounded
retry retain their prior spend readback; no debit is retroactively erased.
Receipt clocks can contain microseconds. Todo `resume_at` authoring and readback
accept up to six fractional digits and compare the exact instant; existing
second/millisecond normalization and receipt identities are unchanged. A valid
historical receipt with a Python datetime spelling outside Todo authoring syntax
retains its original selection fence, without fabricating an automatic clock
proof or rewriting the receipt.
回执时钟可能包含微秒。Todo `resume_at` 的写入与读取接受最多六位小数并精确比较,
原有秒/毫秒的规范化和回执身份保持不变。合法历史回执若使用 Todo 写入语法之外的
Python datetime 格式,仍保留原选择限制,不伪造自动时钟证明,也不改写历史回执。
Automatic no-spend stall writeback uses the same receipt-owned retry projection
as live selection, including its post-writeback readback. A future unchanged
monitor therefore stays quiet during that wait without failing the heartbeat
Expand All @@ -494,11 +551,32 @@ monitor clock, genuine gate and independent runnable work keep their own rules.
This corrects the automatic notice explanation without adding configuration or
persisted state. The pending retry is a recheck deadline, not execution authority:
current gates and the configured cadence floor still apply at and after due time.

A causal Vision wait retains the same non-gating notice and original retry
deadline; it must not emit a response plan asking the worker to wait for that
user action. Unscoped status overlays apply a receipt retry only to its current
claimant. An unclaimed Todo remains available to other Agents; the requesting
Agent's admission overlays only its own retry. History retains the original
Run and clock, and genuine gates still block their declared scope.

关联 Vision 的等待保留同一非阻塞通知与原重试期限,不得再投影“等待用户”的响应
计划。未分 Agent 的 status 只向当前认领者投影其重试;未认领 Todo 仍可由其他 Agent
选择,各 Agent 的准入只叠加自己的重试。原 Run/时钟和真正授权门禁保持原边界。
Receipt waits added after stored resume lanes were built are read from the same
claim-scoped full selection source. An existing wait lane or its display limit
cannot hide a new retry; foreign, excluded, mismatched and replaced waits do not
qualify through this path.

Ordinary open-Vision wait projection uses the same complete, Agent-scoped
runnable-work counts as selection. Commitment counts still include unfinished
work and cannot establish that it can execute during a receipt retry. The
existing resume owner supplies the retry's complete pending-clock proof to
Vision and host supervision. A causally linked pending retry can therefore
defer the open acceptance gap until its original due time; it neither closes
the Vision nor suppresses independent work, a missing checkpoint or an unrelated
acceptance obligation. Incomplete or differently scoped counts retain the
existing conservative frontier behavior.

类型化 deadline owner 会把新叠加的、更早到期的 Turn 重试纳入已有的完整来源
缓存,同时保留显示列表之外的更早监控时钟和未变化的缓存。同一个 typed batch
从完整且合格的 receipt 来源独立投影 `blocked_retry_wait`;`frontier_deadline`
Expand All @@ -511,6 +589,12 @@ stored resume lane 建立后新增的 receipt wait,沿同一个 claim-scoped
selection 来源读回。已有等待列表及其显示上限不能隐藏新重试;其它 Agent、
被排除的执行者、身份不匹配或已被替换的等待不能由这条路径取得资格。

普通开放 Vision 的等待投影复用 selection 的完整 Agent 范围可执行工作计数;
未完成承诺仍保留在 commitment 计数中,但不代表 receipt retry 期间可执行。
既有 resume owner 向 Vision 和 Host 监督提供完整的未到期时钟证明;具有因果关联的
retry 可暂缓普通开放验收缺口至原到期时间,不关闭 Vision,也不遮蔽独立工作、
缺失 checkpoint 或无关验收义务;计数不完整或范围不匹配时仍保留原有保守判断。

`quota should-run` also separates long-running observation from work that should
advance the selected goal. When the selected goal's current projection is a
dependency-only observation, the payload includes `work_lane_contract` with
Expand Down
8 changes: 8 additions & 0 deletions loopx/control_plane/agents/agent_scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
todo_item_is_deferred,
todo_item_task_class,
todo_presentation_sort_key,
todo_scoped_runnable_advancement_count,
)
from ..todos.summary_item import compact_todo_summary_item, compact_todo_summary_items
from ..todos.user_gate import (
Expand Down Expand Up @@ -1350,6 +1351,7 @@ def _agent_scope_no_candidate_frontier(
agent_lane_next_action: dict[str, Any] | None,
work_lane_contract: dict[str, Any] | None,
candidate_should_run: bool,
vision_wait_state: dict[str, Any] | None = None,
) -> dict[str, Any] | None:
if not candidate_should_run or not _agent_identity_has_scoped_lane(agent_identity):
return None
Expand All @@ -1376,6 +1378,12 @@ def _agent_scope_no_candidate_frontier(
agent_todo_summary,
agent_id=agent_id,
)
if vision_wait_state and todo_scoped_runnable_advancement_count(
agent_todo_summary, agent_id=agent_id,
) == 0:
# A committed retry keeps its unfinished commitment while selection
# proves there is no runnable work. Preserve the exact wait route.
current_count = unclaimed_count = 0
if current_count > 0 or unclaimed_count > 0:
return None
context = _AgentScopeNoCandidateContext(
Expand Down
17 changes: 13 additions & 4 deletions loopx/control_plane/goals/goal_frontier/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from ...todos.todo_semantics import (
todo_advancement_frontier_counts,
todo_item_is_watch_only_monitor,
todo_scoped_runnable_advancement_count,
todo_summary_open_task_counts,
)
from ...todos.succession_warning import (
Expand Down Expand Up @@ -1544,15 +1545,23 @@ def build_goal_frontier_projection_context_from_status(
agent_todo_summary=agent_todo_summary,
agent_id=agent_id,
)
# Commitment floors include open work held by a receipt-owned retry. The
# typed selection projection, when complete for this lane, owns how much
# work is actually runnable; a commitment is not an execution candidate.
selectable_advancement_count = todo_scoped_runnable_advancement_count(
agent_todo_summary, agent_id=agent_id,
)
if selectable_advancement_count is None:
selectable_advancement_count = (
frontier_counts["current_agent_claimed_advancement_count"]
+ frontier_counts["unclaimed_advancement_count"]
)
vision_wait_state = build_goal_vision_wait_state(
agent_todo_summary=agent_todo_summary,
source_items=agent_todo_source_items,
agent_id=agent_id,
acceptance_gaps=source_acceptance_gaps,
selectable_advancement_count=(
frontier_counts["current_agent_claimed_advancement_count"]
+ frontier_counts["unclaimed_advancement_count"]
),
selectable_advancement_count=selectable_advancement_count,
)
acceptance_gaps = (
[gap for gap in source_acceptance_gaps if gap.get("kind") in GOAL_ACCEPTANCE_HOLD_TRIGGERS]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from typing import Any

from ...agents.agent_scope import agent_scope_item_claimed_by
from ...work_items.autonomous_replan_ack import accepted_blocked_replan_history_indexes
from ..goal_vision_policy import (
COMPLETED_TODO_CHAIN_REPLAN_THRESHOLD,
)
Expand Down Expand Up @@ -102,7 +103,9 @@ def _outcome_checkpoint_runs_for_goal(
else None
)
return [checkpoint_run] if isinstance(checkpoint_run, dict) else []
return _latest_runs_for_goal(status_payload, goal_id=goal_id)
runs = _latest_runs_for_goal(status_payload, goal_id=goal_id)
administrative = accepted_blocked_replan_history_indexes(runs)
return [run for index, run in enumerate(runs) if index not in administrative]


def latest_outcome_vision_checkpoint_from_status_payload(
Expand Down
Loading
Loading