Repository navigation
Resume original work-session history after an interrupted read - #8633
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.
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · max
本次评审对应提交 48fb5334711a8b61eba3f5d2012666c3ab11c909。
无阻塞发现。真正收到 HTTP 200 后正文截断时,候选两种宽度都从原游标补回较早页;旧绑定和读取位置保留。
动机 / Motivation
在 Personal Workspace 回看原 Codex App Agent 工作会话的人。回看原 Codex App 会话时,服务已发 200 头但正文中断。页面保留已读记录,随后停在通用错误,未自动重读较早页。候选从同一绑定、来源和 before 自动重读;打包前端的桌面和窄屏各从 100 恢复到 200 条,原阅读锚点偏移均小于 0.25 px。本轮独立验证源码打包的 Chat、真实本机 HTTP/SQLite 和合成的原 Codex App 宿主。已安装桌面和真实账户接续未验证;托管 CI 未查询。
改动思路 / Approach
由现有 request 捕获传输事实,由既有 readHistory 保持原来源、续页和锚点。没有第二套恢复路由。同一 TS reader 和现有 Python 合成 peer,只增加可直接验证的断体条件。 现有 request 保留已知 status,再用 interruptedSuccessfulResponse 区分正文读取异常与完整坏 JSON。保留分页的同源验证、generation 和原锚点。 错误分类 分页与重试
具体改动 / Changes
关键代码讲解
收到成功头后的断体进入现有读重试,4xx 仍走拒绝;通过完整读取的坏 JSON 不会重试。分页、会话发现和模型读取共用同一异常事实,send 仍由既有投递回执处理。 发现入口 浏览器 smoke 比对原 binding/source/before,并用实际 Content-Length 不足的 socket 注入故障。 对照烟测 断体夹具
以 base 9ce3a46 的 docs/development/frontend-delivery.md 为准。original_cursor 对应同源同游标;stable_viewport 对应已载记录和锚点;refusal_isolation 对应 403、坏响应和换绑定。 暂态读取合同 阅读连续性
对主干的风险 / Risks
PASS。真实 HTTP 先送 200 头再截断,base 桌面和窄屏各一次分页请求、保留 100 条并显示错误;head 两次 query 相同、恢复 200 条,锚点偏移小于 0.25 px。截断 503 两版仍恢复;完整坏 JSON 和截断 403 均只发一次,后者拒绝原读取。候选换绑后释放旧页,只有新会话内容;零回复 POST、零宿主输入、历史原字节未变。
语义与 CI 对齐
两版源码打包和来源校验通过,11 项关联 native reader 用例两版均通过,候选标准 premerge 通过。PR 描述的 1512 与 390 px 前后图均可读,长正文和已有错误折叠组保留;独立 1440 与 390 px 同样确认原位置和恢复提示。
我的整体评价 / Verdict
代码评审通过。复用现有读状态与来源验证即可完成本次恢复,暂不新增独立重试队列。核对 PR 描述的四张首屏以及独立打包两版 1440×900 和 390×844。原工作会话选择和首条可见内容保留;断流恢复后错误移除,窄屏不横向溢出。真实账户与已安装桌面未独立验证。
English verdict: APPROVE. At 48fb533, interrupted successful history responses retry the original binding and cursor, keep the viewport anchored, and leave denied, invalid and stale-binding responses fenced.
Goal and delivered outcome
When someone scrolls back in a Codex App work session, the server can send HTTP 200 headers and lose the connection before the page body is complete. The transcript used to keep the records already on screen and stop at a generic error until the reader reconnected.
The attached conversation reader now retries the same source and history position automatically. Already loaded records stay visible, and the reader stays at the same position when the older records arrive. A complete invalid response and an interrupted permission denial retain their existing stop behavior.
Author declaration
Written by model_agent, Codex (OpenAI GPT-6).
Implemented against Workspace reading and request continuity at
9ce3a46bfe525aa2167de6699fc676ce8ef60247.Scope and continuation
Complete within the attached transcript read path. It uses the existing TypeScript reader and source validation. The intended base is main. Independent review and installed adoption of this fix are pending.
Validation
48fb5334711a8b61eba3f5d2012666c3ab11c909against9ce3a46bfe525aa2167de6699fc676ce8ef60247attached-host-follow-upscenario covers a truncated 200 history page, a stalled 503, a truncated 403, a complete invalid 200, binding revocation and reply receipt recovery.Frontend visual evidence
First viewports from the same synthetic Codex App fixture on both packaged revisions. The old error stays on screen with 99 work records; after automatic recovery, 199 records are available in the same group. Long dialogue and the existing reconnect control remain in context during the interruption.
Type of change
LoopX area
Personal Workspace, attached Codex App conversation.