Repository navigation
fix(quota): retain receipt retries beside existing wait lanes - #6299
Conversation
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · reasoning_effort=xhigh
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
Reviewed exact head: 43abc6d
动机
已处于等待状态、随后新增 blocked retry,并同时收到普通 user_action 提醒的 Goal Agent 与操作员。
stored resume lane 非空或被显示上限截断时,后来叠加的 receipt retry 可能缺席 frontier projection,普通提醒被解释为 human gate,退避不再保留原重试期限。
当前真实隔离 File/SQLite CLI 均保留原 pending_retry 身份/期限,重复 guard 复用同一事件,独立 monitor 的时间/hash/material generation 和其它 wait 不变,spend仍为0;1与12个已有等待的组合都保持quiet_wait及周期下限。
不新增配置、wire schema、持久字段、执行授权或安装态 host 资格;不重置原 Goal/Todo/lease,也不靠改 monitor clock 规避等待。
源代码与隔离真实 File/SQLite 资格已完成;安装升级后的 App/其它 live host 采用未在本轮验证,具体 merge/部署仍需 maintainer 授权。
改动思路
Source and isolated File/SQLite CLI repair; no installed/live host upgrade claimed。Only existing owner composition lacked one current receipt row。
Reuse the existing claim-scoped full source in the one typed quota batch; extract the identical bounded receipt qualification into one private helper for visible and full-source paths. No new source/registry/persistence/configuration required.
这是已有 receipt retry journey 的完整源修复,原 owner/存储/调度端到端负例可单独回滚和核验;不会以源码通过冒充安装态收益。
问题在已有完整来源与 stored resume lane 的组合,不在 receipt 或 monitor 的存储 owner。派生 blocked_retry_wait 不能依赖显示列表是否非空;最早唤醒与等待中的 Todo 是两个事实,复用原来源即可计算。相关前瞻整理已应用:相同资格检查收敛成一个私有 scopedReceiptRetry,通用决策仍留在 TypeScript,Python只传输事实;不增加新模块、配置或平行状态机。
具体改动
修改前判断依据是 docs/quota-allocation.md@38cb407edc39752d3ad6b4d414ca5c5255aba177 的 receipt-owned bounded retry 段落及其实际反例,条款没有编号,按段落名称映射:完整合格来源独立于 frontier、普通 notice 非人工 gate、retry 身份/原期限保留、真正 gate/独立工作/周期下限各守原 owner。新增 S7 checkpoint 明确源码与隔离真实 store 通过不等于安装态采用,不用修改后的文档代替原义。
对应段落:Receipt-owned waits / full-source qualification;Receipt-owned waits / no new authority。
Source and isolated File/SQLite CLI repair; no installed/live host upgrade claimed。Only existing owner composition lacked one current receipt row。
关键代码讲解
- loopx/control_plane/todos/quota_selection.ts:328 scopedReceiptRetry:复用原 open advancement、相同 Agent/Todo、有界receipt、完全匹配resume/due检查;无新权威,只返回原合格receipt。
- loopx/control_plane/todos/quota_selection.ts:427 projectTodoQuotaPlanning:从同一个未截断 selection.items 解码当前来源,经 executableBy/claimAllowsAgent 的claim/exclusion过滤,合格receipt与旧waitlane在选择frontier前合并。
- loopx/control_plane/todos/quota_selection.ts:340 projectTodoFrontier:过期/已到期过滤及identity+due去重保留;已有cache可继续保存更早隐藏monitor,新retry另投影blocked_retry_wait,不改canonicalclock。
- tests/control_plane/test_quota_retry_monitor_journey.py:23:原CLI对隔离 File/SQLite写回、再准入和相同Turn重放;回读原Todo、独立monitor和已有wait,确认原期限/hash/material generation及零扣费。
对主干的风险
当前48项Python和19项TypeScript验证通过,没有skip。真实CLI由所选sys.executable运行当前source,使用隔离真实File/SQLite和合成业务资料,未触碰活动Goal。相同冻结用例在修改前基线的1/12已有wait组合、File/SQLite notice_existing_wait各复现丢失blocked_wait;当前均通过。其余普通notice、真实gate、独立工作、较早/同刻monitor、due/被新run替代、foreign/excluded/身份与resume不符、6分钟floor都覆盖;原canonicalmonitorclock/hash/material generation、已有wait和spend=0逐项读回。原生premerge4项直接和19项选中执行检查通过。完整成对矩阵在基线为4项预期失败、44项通过,当前48项通过;其它原分支没有额外失败。
仍有线性full-source读取成本,没有CPU收益/实验收益声称;现有完整selection已经在同一batch,新增一次有界资格扫描没有复制持久事实。安装升级后的livehost并未在本轮验证,保留为原S7 checkpoint;没有UI/新配置入口或新的可选能力。当前未发现可行动code blocker,不把已通过的隔离source资格外推为installed运行证明。
语义与 CI 对齐
开发期advisory先于完整semantic-vocabulary检查;没有新协议literal/Enum或共享closedset,复用既有receipt/任务分类。无substring新分类、产品/benchmark专属通用规则或第二Python决策owner。默认改变是修正被非空lane遗漏的新retry,已在PR与双语quota文档披露;无retry分支及legacy wire保持原契约。machine-enforced wait/gate与deadline recheck说明区分,不称授权为guidance。CI策略not_consulted,不查询/轮询/等待。Core合并仍需exact-head readiness和显式maintainer授权,本次不merge。
我的整体评价
long_horizon=improved:已有wait不再吞掉新receipt期限,真实store重放保留canonical事实;user_experience=improved:普通notice仍可提示但不制造human gate,真实gate和独立工作照原规则决定。
交付为justified_increment,五条路径围绕同一已有projection缺口,源修复、负例、真实store和文档边界构成完整可逆切片。已应用小范围共享资格helper,无需新状态/调度框架;后续安装态采用沿现有checkpoint,不新建仪式性Todo。当前代码与有界资格可以批准,明确的merge授权仍独立。
English verdict: APPROVE - The existing typed quota batch now retains qualified receipt retries beside nonempty or capped wait lanes. Independent base/head and real File/SQLite CLI replay preserve original clocks, scope/gates and zero-debit semantics; installed/live-host adoption remains separate.
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=xhigh
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机
遇到暂时无法继续的任务、同时已有其他等待事项与普通提醒的自动工作操作者。
系统已经保存稍后重试的时间,但已有等待列表会遮住这条新重试;普通提醒于是被解释为必须等待人的门禁,原截止时间丢失且周期退到 15 分钟。修复后保持原重试依据并按当前周期下限重新检查。
同一真实 File/SQLite CLI 反例在基线两项失败、当前两项通过;当前安装候选的实际 CLI 也通过。普通提醒保持非阻塞,真实 gate、独立任务、监控时钟、到期与旧回执覆盖仍分别遵守原规则。
这是已有 receipt 等待的投影修复;不恢复业务数据、不授予执行或扣费权限,不证明自然宿主和持续模型净收益。
本次判断针对实际展示层漏掉权威重试的具体触发,而不是用领域名称、profile 或一个强提醒创造权限。无变化等待能保持安静,同时到期必须重新核验当前业务与权限,才是这里有用的结果。
改动思路
现有 typed Todo planner 足够:资格来自原 Run/Goal/Agent/Todo 及 claim 规则,完整来源负责等待时钟,显示列表仅供展示;scheduler 继续决定周期并保留真实 gate。
Existing retry projection/notice/deadline repair only; native source and installed synthetic qualification, no natural business/whole-Goal closure.
已有 resume_blocked_items 不为空时,旧路径不会从完整 selection 补入新 overlay 的 retry。修复把合格的当前源合并到 frontier 输入,保留缓存表示的更早监控时钟和真实 receipt 的独立身份。private helper 抽取原条件,两个读取面复用同一资格规则;没有另加 Python 调度器、public switch 或新的 persisted 状态。
具体改动
独立规格:docs/quota-allocation.md,修改前固定版本 38cb407edc39752d3ad6b4d414ca5c5255aba177,S7 持续运行方向;新增说明不作为自己的验收依据。
- QR-RETRY — implemented:Retain original bounded retry independently of earliest monitor wakeup and visible lane size.
- QR-AUTH — implemented:Retry is a recheck deadline, not execution authority; genuine gates and independent work retain rules.
- QR-STATE — implemented:Canonical Todo validator/claim and independent monitor clocks remain unchanged; blocked closeout has no spend.
- QR-HOST — implemented:Installed/live-host adoption remains separate from source repair.
关键代码讲解
blocked_retry.py:overlay_active_turn_retries(86 行,未改)从同一 Goal/Agent/Todo 的有效原 Run 取 bounded retry,仅在 canonical Todo 没有自己的 resume 条件时做只读 overlay;原任务、validator 和 lease 不写入替换。quota_selection.ts:scopedReceiptRetry(328 行)把原来的 open/advancement、false-ready、actor/Todo、resume/time 和 bounded receipt 条件抽为私有 helper。Goal 关联仍由原 Run/source producer 负责;helper 不是 actor 生命周期或授权入口。projectTodoQuotaPlanning(390 行)从完整 selection 解码并经现有executableBy过滤 claim、exclusion、removed source,把合格receiptWaits与已有 resume lanes 合并;显示 cap 不限制新 retry。projectTodoFrontier(339 行)维持最早 wakeup 和blocked_retry_wait两份不同事实,去重、过期、早于 cache 的新 retry 规则保留。真实 gate 和当前 floor 仍由既有消费者决定。
完整差异 5 文件 +103/-16:一处 typed owner、两个聚焦 fixture、双语 quota 说明和 S7 checkpoint;没有新 CLI/schema/provider/activation 模式,未使用业务专属字符串推断通用职责。
对主干的风险
没有阻塞发现。 原错误已被独立红/绿复验:同一 source oracle 在 immutable base 的 1/12 个已有 wait 情况都失败;真实 File/SQLite CLI 的 notice_existing_wait 在 base 也各失败,当前相同路径通过。native oracle 第一次 helper 导入失败属于装配问题,修正 source helper 路径后才取得上述语义失败,未把装配失败当产品故障。
当前精确 head:48 个 Python 场景通过,其中 22 个真实 File/SQLite CLI journey;19 个 typed planner 测试通过;typecheck、changed-diff advisory 后 full semantic、turn generation、focused Ruff/diff 通过。实际安装候选的 CLI 可执行入口再跑隔离 File/SQLite 场景,两项通过(11.08s),并保留完整 receipt/clock/readback。候选 manifest 和实际 typed-owner bytes 对应本 head;这是本机候选证明,公开 PR 尚未合并,不称公开 release 或自然业务验收。未查询或等待 CI。
14 个完整 source packet 基线/当前对照保留全部原始输出。8 个未受影响或被拒绝的路径只出现 39 个逐字段列明的 resume_condition.evaluated_at 诊断时钟差异,普通单 retry 原始输出完全相同;恢复的 wait 文本、身份、截止时间以及 scheduler 的 ACK/failure facts 都作为有意变化保留,没有用广泛 normalization 擦掉语义。
边界反例含:foreign claim/actor、excluded、不同 Todo、canonical wait 替换、过期/新工作覆盖、真实 user gate、独立可执行任务和更早/同刻 monitor。真实 gate 仍 human_gate,普通提醒不再挡 retry;原 monitor due/hash/gen7 与 canonical 等待未变化,零业务 debit。到期只要求重查,不直接授予执行。
另依据当前项目 registry 的 5 个 Goal / 12 个注册绑定及已有 profile、work-mode 上下文运行 24 个合成 case,验证普通提醒/真实 gate 随 actor、Goal 与事实分离。profile 没有给它们新的执行权限;这些是真实登记元数据下的合成 active-lane 情景,不代表所有本机 Goal、运行历史或自然宿主已合格,也没有激活原 Goal。
[P2,非阻塞] 当前新增一次 rows(selection.items) 完整 decode/filter,已有 selector 刚做过相近读取。可在同一 owner 内进一步复用已解码的完整 scoped facts;先保留 raw/sorted source 在同截止时间下的顺序、缓存和 claim/exclusion 特征化,不为去掉一次遍历增加公共字段或 speculative framework。本轮没有证明它导致实际延迟回归,故不制造新的 merge gate。
语义与 CI 对齐
修复复用现有词汇;private helper 不创建共享 actor 协议。机器仍给 delivery_allowed=false、pending_retry.execution_authority_granted=false;非阻塞通知与真门禁分开,义务不是“可忽略建议”。静态 semantic/generation 通过不能替代上面的实际 source、store 和文字对照。
我的整体评价
APPROVE 43abc6db8c0741c433ee31e5915abc78c3944922,通过 author-owned COMMENTED 记录结论,不能自授 formal approval 或 merge 权限。
长程效果和体验的正向证据是:原截止时间与正确后续动作不会被已有等待列表吞掉,不再让普通提醒迫使操作者介入,也不靠二次扣费或忽略 gate“继续跑”。效率上减少了错误等待与重复人工恢复的来源,增加的 O(n) source pass 和自然模型/多 Goal 长期净成本尚未量化;不把测试数或已安装当总体收益证明。
现有 typed Todo planner 足够:资格来自原 Run/Goal/Agent/Todo 及 claim 规则,完整来源负责等待时钟,显示列表仅供展示;scheduler 继续决定周期并保留真实 gate。
Existing retry projection/notice/deadline repair only; native source and installed synthetic qualification, no natural business/whole-Goal closure.
原业务数据缺口、自然宿主采用与公开合并/发布仍分别验收。相关未来重构已做私有资格 helper 提取;进一步 decoded-row 复用是有明确边界的建议,保留原协议和回放义务。
English verdict: APPROVE - 43abc6d. Independent old/new source and real File/SQLite failures/passes confirm the missing receipt retry is restored with original deadlines, non-gating notice semantics and unchanged authority/clocks. Current48Python/19TS,14full-packet comparisons,24metadata-scoped synthetic cases and2actual installed-CLI cases pass. Optional decoded-source reuse is non-blocking; no live-business, public-release, merge or fleet-utility claim.
43abc6d to
6f1f40a
Compare
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent; gpt-6.1-sol; OpenAI; runtime_reported; reasoning_effort=xhigh
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机
这是已有receipt等待的投影修复;不恢复业务数据,不授予执行或扣费权限,不证明自然宿主或持续模型净收益。
新6f的48 Python、19 typed、14完整packet及24注册绑定下合成场景通过;File/SQLite保留原等待、监控时钟与零扣费。实际安装的两项检查仍归旧43,新6f未安装。
自动工作操作者:任务暂时无法继续,同时已有其他等待事项和普通提醒。
自动工作已经保存了稍后重试的时间,却因为另一个等待列表不为空而丢掉新重试,普通提醒于是被解释成必须等待人的门禁,原截止时间丢失,周期也错误退到15分钟。操作者会被迫介入本可自动重新检查的工作。这项PR恢复现有等待投影,修复后仍按原截止时间、当前门禁和周期下限检查。
本次独立结论针对 6f1f40a8a53973f13e4052cee211f7b10811d90b。先前针对 43abc6db8c0741c433ee31e5915abc78c3944922 的 评审 只保留为历史;发布后 head 变化已由 closeout 捕获,新结论经过新 head 验证。
改动思路
本次交付现有retry投影修复与源路径资格;旧43安装候选、新6f源码、自然业务采用和公开merge/release分别验收。
现有 TypeScript Todo planner 已拥有资格和时钟规则。新 overlay 不应只依赖已建立的 resume_blocked_items,应从完整、经过现有 claim/exclusion 过滤的 selection 补入当前合格 receipt,再交给同一 frontier owner。private helper 抽取既有条件,两读取面共用;没有新 Python 决策源、配置开关、CLI/schema 或 persisted state。
已查重基到 ffbd579502e6559ecf4d551b8837da1d6dd40a90 后的 source/规则/消费者/平台/依赖/claim:retry owner、两 fixture、scheduler/Todo/status owner保持逐blob一致;上游 replan/turn envelope 增加 stride context,默认off,没有改变 retry/deadline/授权。重新执行完整 caller 验证,未继承旧 verdict 或把旧执行重标成新版本。
具体改动
完整差异5文件 +103/-16:quota_selection.ts +24/-8、两个聚焦fixture、双语quota说明与S7 checkpoint。独立依据是修改前 docs/quota-allocation.md 的 bounded retry、非阻塞提醒、当前floor及原receipt规则,固定版本38cb407edc39752d3ad6b4d414ca5c5255aba177;新baselineffbd的retry owner和两fixture与该基线完全一致。以下QR只是本评审映射标签:
- QR-RETRY,已交付:已有等待列表和显示上限不能吞掉当前原始重试;1/12个等待、早/同刻monitor反例验证。
- QR-AUTH,已交付:到期要求重查,不授予执行;foreign claim/actor、excluded、不同Todo、canonical replacement、真实gate及独立任务保留规则。
- QR-STATE,已交付:原Todo/validator/lease、monitor due/hash/gen7与无扣费回放保留。
关键代码讲解
blocked_retry.py:overlay_active_turn_retries(86行,未改)先绑定原Goal/actor/Todo/Run,只在canonical Todo没有自己的resume条件时生成只读overlay。Goal来源仍由这个producer负责。quota_selection.ts:scopedReceiptRetry(328行)复用open/advancement、false-ready、actor/Todo、resume/time及bounded receipt条件;返回等待事实,不是授权入口。projectTodoQuotaPlanning(390行)从完整selection读取,并用既有executableBy过滤claim/exclusion,合并receiptWaits到resume来源。display cap只用于显示。projectTodoFrontier(339行)保留最早一般wakeup和receipt身份两份不同事实,维持去重、expiry和cache顺序,scheduler继续拥有当前floor和真正gate。
对主干的风险
没有阻塞发现。 当前新6f head独立48 Python通过(109.02s,含22真实File/SQLite CLI journey)、19 typed通过;typecheck、diff、focused Ruff、changed-diff advisory后full semantic、turn generation通过。基线38cb的同一1/12wait oracle两项红、实际File/SQLite两项红仍保留原来源;新基线的相关文件逐blob相同,新head对应路径绿。首次native oracle导入失败属于测试装配,修复后才取得语义红,未混记为产品故障。
14个新head完整packet与旧43对照,只有87个逐字段列明的resume_condition.evaluated_at诊断时钟叶和两个source/interpreter来源变化;控制文本、身份、截止、effects及scheduler ACK/failure事实一致。原38cb/43对照的八个未受影响/拒绝路径仅39个诊断时钟叶差异也保留。恢复的wait义务是文档已有要求的修复,未用字符串裁剪或广泛normalization遮掉语义。
依据当前registry的5个Goal/12个注册绑定、实际profile及workmode上下文,在新6f重新跑24个合成场景全部通过;普通提醒与真正gate按当前事实区别处理。登记元数据是真实的,active候选事实是合成的,没有激活原Goal、取得新lease或证明所有本机自然宿主。
当前另外构建真实dashboard/chat assets并跑packaged Goal-showcase:2988ms通过,独立查看概览与区域失败截图,验证composer焦点/virtual clock、精确usage和局部503恢复。它使用拦截的synthetic workspace API,资格限于重基带来的UI消费者,不能当作retry业务或真实Goal backend的采用证明。
实际安装候选CLI的两项隔离File/SQLite检查(11.08s)仍归旧43的manifest/owner bytes;本机候选未合并,新6f未安装,不称公开release或自然业务验收。本次未查询/等待CI,作者所报CI不是独立证据。
[P2,非阻塞] 新增一次完整rows(selection.items) decode/filter,可在现有owner内进一步复用已解码的scoped facts。先保持同刻deadline的raw/source顺序、cache和claim/exclusion特征化,再做有界复用;本次未测得实际延迟回归,不能将建议制造为新门禁。
语义与 CI 对齐
复用现有typed词汇,没有新actor生命周期。机器仍delivery_allowed=false、pending_retry.execution_authority_granted=false;普通提醒不是阻塞,真正gate仍有效,必须遵守的义务不称可忽略guidance。无optional capability新增,但无合格retry的共享分支已全packet配对。静态semantic通过不能代替实际caller、store和义务文字对照。
我的整体评价
现有 TypeScript Todo planner 已拥有资格和时钟规则。新 overlay 不应只依赖已建立的 resume_blocked_items,应从完整、经过现有 claim/exclusion 过滤的 selection 补入当前合格 receipt,再交给同一 frontier owner。private helper 抽取既有条件,两读取面共用;没有新 Python 决策源、配置开关、CLI/schema 或 persisted state。
本次交付现有retry投影修复与源路径资格;旧43安装候选、新6f源码、自然业务采用和公开merge/release分别验收。
APPROVE 6f1f40a8a53973f13e4052cee211f7b10811d90b,通过author-owned COMMENTED记录,GitHub阻止formal self-approval;它不授予merge权限。
长程效果和体验的有界方向为正:原截止时间与正确下一步不被另一个等待列表吞掉,不再因普通提醒要求额外人工恢复,也没有通过忽略gate或二次扣费“继续跑”。效率上消除了错误等待与重复介入的来源;新增O(n)source pass、持续模型/多Goal净成本仍未量化,不用测试数量或安装状态证明总体收益。
已采用当前owner、首次实际使用和恢复场景的经验建议,但建议送达不等于已测记忆价值。相邻有界重构已抽取私有资格helper;进一步decoded-row复用建议保留为非阻塞改进。源修复、旧候选安装、自然宿主业务、公开merge/release各自保留证据边界。
English verdict: APPROVE - 6f1f40a. Fresh48Python/19TS,14complete source packets,24metadata-scoped synthetic cases and packaged showcase pass after rebase; immutable base failures and unchanged-owner qualification retain their original revisions. The original retry/deadline and non-gating notice are restored without widening authority. Installed2-case evidence belongs to old43, not new6f. Optional decoded-source reuse is non-blocking; no live-host, fleet-utility or merge claim.
A receipt-owned retry can be added after a stored resume lane was built. When that lane is already nonempty, the planner can omit the retry, classify an ordinary user notice as a human gate, and lose the original recheck deadline.
The existing typed Todo planner now reads qualified receipt waits from its full claim-scoped selection source as well as visible lanes. It preserves receipt identity, canonical waits, monitor clocks and cadence floor while rejecting foreign, excluded, mismatched or superseded waits. The bounded receipt qualification is shared through one private helper; configuration, wire schemas, persistence and execution authority remain unchanged.
Validation: the shipped-source and real File/SQLite failures were reproduced before the fix. On the current main baseline, 48 focused Python regressions and 19 TypeScript planner tests pass, including claim/scope rejection, existing waits beyond display limits, real user gates, independent work and expiry. Semantic vocabulary validation, public boundary checks and diff checks pass. The rebuilt packaged workspace goal-showcase scenario also passes the input-focus regression fixed by the existing main owner in #6255.
The earlier immutable candidate passed actual installed CLI qualification; source rebase does not change that installation or certify long-lived App pairing. The CLI and heartbeat projection consumers continue to share the same typed owner. This Core PR remains for maintainer review and is not self-merged.