Repository navigation
Verify quota gate scope through signed lane references - #9101
loopx-agent wants to merge 2 commits into
Conversation
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.2-sol · OpenAI (runtime_reported, max)
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机 / Motivation
维护 quota CLI 的开发者要检查用户审批是否指向正确的 Agent 或 Goal。 旧测试直接索引门禁数组。当前 CLI 可以用同一份签名结果中的引用表示等价门禁,导致主干六项测试在核对门禁身份前报错。 新测试先验证完整签名结果,再检查相同的门禁 ID、作用域和显示文件。File 和 SQLite 都覆盖当前、空和陈旧显示。 此提交恢复现有集成测试,生产文件逐字节一致。
改动思路 / Approach
复用 TypeScript complete Turn consumer 验证原始载体。出现 gate_open_items_ref 时,测试要求它指向同一摘要里的 first_open_items。然后用 fixture 给定的 todo_gate、user_gate 和预期 scope 核对实际结果。继续支持 literal 分支,让两种公开表达都能检查同一个业务结果。完整载体约定
具体改动 / Changes
精确 head d26c1c80e6631a64e954a4dde43d1ee567a309ba,diff base 8e9a28a866da06cc6fd63e78709910fe35dad564。只改 tests/control_plane/test_quota_selection.py,新增 20 行、删除 4 行。原来 6 个 File 组合扩为 12 个 File/SQLite 组合。分别读回当前、空和陈旧 Markdown 情形,再核对展示文件字节保持原样。逐项复核 Explicit user gate scope 和 Complete signed Turn references。作用域约定 · 聚焦用例
对主干的风险 / Risks
主干六项在直接索引 gate_open_items 时同样报 KeyError。候选 40 项 quota selection、66 项 TypeScript、预合并 5 项直接检查和 3 项选中检查、变更 Ruff 均通过。TypeScript 拒绝错摘要、引用链和缺少 literal owner。双存储补充对照中,另一 Agent 有独立工作时继续执行,global gate 仍保持审批。
另一 Agent 空闲时,File 和 SQLite 的主干及候选都在当前门禁列表为空时返回 operator_gate_notify。 有工作时 A 正常执行。scope override 在找不到 selected_action 时提前返回;这是未改动的等待分支。现有分支
我的整体评价 / Verdict
同意此精确提交。它恢复了真实 CLI 在签名结果后的业务断言。两种存储共用一组已有测试,并沿用生产验证器,便于今后定位作用域与载体两种错误。空闲 lane 的既有通知另有生产分支可定位。
English verdict: APPROVE. The test restores independent scope checks behind the signed Turn on File and SQLite. The idle-lane notification predates this test change.
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Goal And Delivered Outcome
The public quota CLI can use the approved quota packet or an explicitly requested Complete Turn. The scoped-gate test now exercises both entry points on real File and SQLite authorities. Both views must preserve the designated gate when the Markdown display is current, empty or stale. Complete Turn is selected explicitly before its signed decision is validated.
The cases accept the complete gate reference when the packet points to the retained open items. They still verify the exact Todo, task class and gate scope, and confirm that the read leaves the display bytes intact.
Author Declaration
Written by
model_agent(OpenAI Codex, GPT-6).Implemented against
Validation
Author-tested head
ab192e099ec7326abc3058d9a6c0015b984f4e02against8e9a28a866da06cc6fd63e78709910fe35dad564onmain.real_entrypointpassedintegrationpassedregression_paritypassedintegrationpassedstaticpassedintegrationnot_runThe local compatibility check integrates exact heads from #9084 (including #9082), #9078, #9086, #9005 and #9103 with current main and this test. The source tree is
ee583ad6df9230615958e068c3bc59463eb6a810. The combined tests ran the release default probe and the native File/SQLite selection-to-readiness and historical receipt paths. The #9084 public-default change and its independent review are tracked in the existing PR.Frontend / Visual Evidence
UI impact is
none.Type of Change
LoopX Area
Both commits carry DCO sign-off. Independent review is pending.