Skip to content

Verify quota gate scope through signed lane references - #9101

Open
loopx-agent wants to merge 2 commits into
mainfrom
codex/context-scope-navigation-20261120
Open

loopx-agent wants to merge 2 commits into
mainfrom
codex/context-scope-navigation-20261120

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

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

Criterion Disposition Evidence
Preserve canonical gate identity and scope on both public CLI views. Implemented 24 real File and SQLite cases combine ordinary and Complete Turn calls, two gate scopes, and three display states.
Validate the signed decision when Complete Turn is explicitly selected. Implemented Every Complete Turn case exercises the existing runtime owner. The ordinary cases validate the canonical gate under the public default offered by the tested source.
Preserve the supported release entry point through the same composition. Verified locally The release builder's committed-source default probe refuses current main and passes with #9084 in the tested composition. Explicit Codex App recovery and preparation pass separately on both local authorities. Public-default repair

Validation

Author-tested head ab192e099ec7326abc3058d9a6c0015b984f4e02 against 8e9a28a866da06cc6fd63e78709910fe35dad564 on main.

Check kind Result Evidence
real_entrypoint passed All 24 affected cases at the exact author head.
integration passed 52 quota selection tests and 8 standard premerge checks at the author head.
regression_parity passed The previous test raised “unsupported complete Turn decision version” for all 12 ordinary gate cases in the composed source with the supported public default. The updated test passes those 12 cases and adds 12 explicit signed cases.
integration passed 371 passed and 11 skipped on the repaired composition. The production composition also passed 25 standard premerge checks and nine TypeScript context cases.
static passed Ruff on the changed module. The local composition passed CI-scope Ruff, kernel mypy and the TypeScript type check.
integration not_run Full hosted CI, installed host adoption, and matched production cost qualification.

The 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

  • Test update

LoopX Area

  • Control plane

Both commits carry DCO sign-off. Independent review is pending.

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.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>

This branch has not been deployed

No deployments
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.

1 participant