Repository navigation
Keep native Inbox delegation reads complete across host budgets - #9204
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 · xhigh
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机 / Motivation
托管 Agent 需要在执行前发现未完成委派和回执异常,并按实际工具容量读全请求。 未明确声明的 shell 可能截断页。单独使用 #9195 的固定 reader 预算会把已声明的大页路径降为小页。 原先 #9169 的候选实现,在外发记录只剩一条不可读、且没有下一页时,首次注意视图没有发出恢复计数。当前头在完全相同的 TypeScript 事务测试返回 unavailable_count=1,普通 Inbox 仍保留原输出。 当前提案把默认 Markdown 开场和保底 reader 限在 5,000 字节。明确声明的 64,000 字节继续经现有 capture reader 使用。注意视图终页同时携带不可读记录的异常数。 独立验证采用真实 File/SQLite 源码 CLI 和类型化事务。官方 Desktop、实时 Feishu 及 Windows 仍未在本轮复验。
改动思路 / Approach
在 Inbox 的现有 TypeScript 事务中处理摘要、精确送达和末页恢复状态。在 Markdown 适配器组合保底上限与已声明的 reader 容量。 工作摘要与完整请求继续共享原始回执与游标;读取分页沿用原执行权限。 复用 #9095 既有声明和同一不可变 capture,通过两条预算路径保全不同宿主的读取合同。
具体改动 / Changes
准确头 de5a83d,merge base d772190,13 个文件,+561/-108。当前主干 a6ffb3b 的整合预演无冲突,合并树独立通过 7 项聚焦回归。原候选的末页异常路径另用同一断言与 #9169 对照。 预算契约 按修订 de5a83d 的仓库规范核对各项要求。 目标规范
- attention-receipt · Preserve full requests unless the exact current partial result is delivered.
- terminal-unavailable · Report unavailable records including on a terminal attention page.
- profile-parity · Bound fallback responses while preserving the qualified declared reader and exact digest recovery.
关键代码讲解
- 分支预算 界定保底开场与已声明 capture reader。
- 末页异常 在无请求续页时也保留外发不可读计数。
- 部分交付摘要 读取已验证的当前部分结果并保留剩余工作。
- 原提交绑定 以当前请求和精确结果核对原送达回执。
对主干的风险 / Risks
本头实跑 75 项 Python(2 项 PowerShell 跳过)、87 项 TypeScript 和本地 quick premerge。File 和 SQLite 的已声明 64,000 字节输入均在 5 次 reader 调用内读完 23 条请求和两张逻辑页。默认 5,000 字节分支验证开场、摘要恢复、续读偏移及整页回读。 终页反例在 #9169 缺少 unavailable_count,在本头通过。精确结果旧回执与错误绑定保持全文并可区分恢复,另一 Agent 的请求游标被拒绝,外发续页不追加交付或消费。 File/SQLite 发起同一实际生成的命令,在 5,000 字节和声明 64,000 字节两支均完整重建源数据。修过的末页断言独立通过。 此次验证不是正式安装版 App 或实时飞书的采用凭据。涉及更宽的工作流验收时应继续保留这两项实际入口的证据需求。
我的整体评价 / Verdict
批准当前准确头。默认小窗、声明大窗与外发末页恢复在同一个实现入口通过测试。精确请求来源和回执消费仍由既有流程负责。可用这一个准确头承接两项早期候选的集成验收。
English verdict: APPROVE at de5a83d. Approve this exact head. It preserves the existing declared 64 KB capture route and bounds the default Inbox reads at 5 KB. The same terminal-page witness fails on the earlier proposal and passes here, and seven focused tests pass on a clean current-main integration.
|
This pull request has merge conflicts with Choose the remote for the base repository, not an out-of-date fork. 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 HEADFor a same-repository clone whose Keep the DCO |
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 · exact head 3ba419215f80ce18678fac8e26308251fb0afa14\n\nApproval conclusion (author-owned PR; GitHub blocks formal self-approval). This integration keeps attention continuation and unavailable-count reporting while adopting main terminal-return identity checks and reader budget behavior. The terminal-only attention regression is retained, and adopted Incoming requests follow current main step precedence without rewriting source Inbox records.\n\nValidation: 29 TypeScript Inbox/return tests passed; 32 delegation Python tests passed with 2 platform skips; focused Ruff checks passed.
Goal and delivered outcome
A managed Turn can read outstanding delegations through the existing Inbox, including the latest verified partial result and pending work. Readers can page through full incoming briefs, partial summaries, and outstanding sent requests. The Inbox checks each exact request and operation cursor against its registered scope. If the sent request record is unavailable on the final page, the response exposes the unavailable count.
This integrates the changes from #9169 and #9195 with the host reader declaration already on main in #9095.
Author Declaration
Written by model_agent · GPT-6 · OpenAI.
Required work context and operator Inbox contract
Validation
Tested candidate
de5a83d4d533571f3d8b1b38da7178087cfda82cagainst maind772190747d6d39d7f896ea37a52d518d257e571.The same UTF-8 workload was run with Codex app-server
0.171.0-alpha.13over stdio, with isolated File and SQLite stores and loopback fixture inference. Each run recovered all 24 original briefs. Reader call counts include same-capture retries and exclude the Inbox openings.Each backend produced the same call counts. The candidate's default reader responses were at most 4,999 serialized bytes. The same cursor failed across Agents with no receipt writes. The package included the verified Chat bundle and the candidate was installed into a separate test environment.
Hosted checks
The inspected release and Chat browser jobs stopped at the shared ExecutionObservationReadback assertion. The fix is already on main in #9210. Release browser job · Chat browser job
Windows reported WinError 10038 while the shared canonical fixture waited for its subprocess pipe. #9218 addresses this fixture failure. Its native Windows job passed at
843e531. Windows jobLocal integration with main and the shared fixture
The local wheel pairs the published
de5a83dwith mainb4e1dedand the fixture proposal #9218 at843e531. Its verified Git tree is1ebaf4565ef5e36af6aa8f38876921c0395c21aa.On isolated File and SQLite stores, real Codex app-server
0.171.0-alpha.13completed two native Turns per configuration using local fixture inference. Each configuration recovered all 24 original briefs. Continuing from the old cursor returned its original remainder. A fresh scan found the newly inserted brief, and an attempt to use the old cursor from another Agent was refused without writing a read receipt.The default reader used 44 calls with a maximum serialized response of 4,999 bytes on each store. The declared 64 KB reader used five calls with a maximum of 63,999 bytes. Both paths completed without truncation recovery. The packaged Chat browser checks passed late conversation return and team evidence reading. The shared execution-observation contract also passed on this tree.
The combination was qualified locally. The shared fixture passed its own native Windows job. Hosted checks for a future integrated head are pending.
Hosted candidate interruption recovery
The hosted candidate artifact contains the wheel built from GitHub merge commit
4febfe3with PR headde5a83d. Its SHA-256 isddb91b03d37243006ac2a2d54a177f7e2ec42ba9231af4dd0528eed311808fa7.An isolated install used real Codex app-server and loopback fixture inference on File and SQLite. After the first 56,038 bytes of the saved Inbox page reached Codex, changing a byte in the captured file made the next reader return an explicit digest error. Restoring the original bytes allowed the same reader to continue at the same offset. Two native Turns on each store recovered all 23 exact briefs across two Inbox pages. Recovery caused no additional Inbox read or collaboration receipt write.
Three source Dashboard browser shards and Dashboard acceptance passed. The hosted failures described above still apply to this head. The shared fixture's current
843e531has an independent approval conclusion, and its native Windows job passed. The combined candidate still needs its own hosted qualification.App and CLI readback from the same request batch
On the isolated combined wheel above, the App request-inventory HTTP endpoint and installed
manager-inboxread the same six requests on each of File and SQLite. Both preserved the original briefs. The App also resolved each original conversation and Turn. Three requests remained pending, including an adopted request without a conclusion and a conclusion queued for delivery. Three confirmed returns left the unfinished lists and remained available through history or exact request lookup. A foreign App audience and a different receiving Agent could not read the requests. A malformed return receipt kept its request pending on both surfaces. Restoring the receipt recovered the original App snapshot, and repeated reads did not repeat delivery.One acceptance gap reproduced on both the combined wheel and main
b4e1dedon both stores. The two surfaces still count a terminal return as delivered when its receipt points to another request's message. The check for mismatched partial return receipts on the candidate passed. Terminal receipt binding, hosted checks for the combined head, and verification on the installed App and Feishu remain open.