Skip to content

fix(native-chat): avoid redundant cancel and progress resets on Antigravity step errors - #8438

Merged
loopx-agent merged 2 commits into
mainfrom
codex/antigravity-idle-step-error-20261109
Nov 9, 2026
Merged

loopx-agent merged 2 commits into
mainfrom
codex/antigravity-idle-step-error-20261109

Conversation

@loopx-agent

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

Copy link
Copy Markdown
Collaborator

A native retry loop could keep extending the no-progress deadline with error-only steps, then send a second cancellation after its terminal error. This change keeps the existing idle deadline and returns the original structured failure without cancelling a fully settled invocation again.

The adapter retires the cancellation target only when the current trajectory is fully observed and idle, the final error is done, and every current step has a known settled status. Running, generating, permission-waiting and unknown states keep the existing cancellation and permission handling. This grants no replay or result-adoption authority.

Validation:

  • Real local HTTP fixture: the original base fails four settled-error cases; the initial proposal fails four running/unknown-state counterexamples. The final candidate passes the focused positive/negative cases.
  • Core integration retains the original failed Turn and allows a later, separate question to finish, with exactly one send per input.
  • The exact built wheel passes 12 isolated checks, including unknown submission and cancellation failure. Its adapter bytes match the reviewed source.
  • Focused native/Core checks: 34 passed. Full original-private-conversation, adapter and API regression: 675 passed, with one preserved server-close BrokenPipe warning in a test cleanup path.
  • Standard premerge passed at the exact head: 6 direct and 11 selected checks. Two earlier semantic-vocabulary scans hit the stock 120-second timeout; both baseline/head standalone scans subsequently completed, and the standard retry passed without changing the original limit.

This is a transport cleanup and progress-accounting fix within the existing adapter. It reuses the settled-status owner and existing entrypoints; it adds no provider, consumer, setting or UI. The package has not been installed into a live service. Upstream network reliability, existing unknown effects and the original requests' outstanding results remain separate.

The original signed proposal is retained, followed by a signed safety correction and regression coverage. No force push or branch-history rewrite is needed.

…ravity step errors

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…tion

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 · OpenAI · self_reported

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

Reviewed exact head: 341a4d1d27338649feee9b095ba2edbfe8b62baf

动机 / Motivation

使用原生 Chat 或飞书私聊的管家用户会遇到这类失败和迟迟没有正文的等待。已有任务在上游反复报错时长期不退出,结束后还可能被多发一次取消,掩盖原始错误。错误记录不再延长无进展时钟,已确认结束的调用保留原失败并退出;后续独立消息仍可处理。本改动不修复上游网络、不重放旧业务、不授予恢复资格,也不改变原受众或权限。真实服务采用、上游网络稳定性和旧请求的实质结论仍需分别验收。

改动思路 / Approach

两个行为都留在现有原生传输适配器,复用已有步骤状态与错误 owner,未引入第二个决策或存储来源。当前 PR 交付错误步进展计时与安全终态清理,未知效果和受保护采用仍由既有 owner 负责。无进展时钟只观察原调用的有效非错误步骤,错误重试记录不延长等待。清理分支还要求完整空闲轨迹、最终错误 DONE 以及所有当前步骤已结束;因此它既消除重复取消,也保留运行中、等待批准和缺失状态的旧保护。未增加状态文件、路由、消费进程或配置界面。

具体改动 / Changes

关键代码讲解

  1. AntigravityAdapter._run_turn 过滤错误步骤对进展时钟的影响,并使用既有 _SETTLED_STEP_STATUSES 核验清理目标。单看 IDLE 不足以推出工具结束,原提案在这方面的四个反例已由当前条件修复。
  2. AntigravityAdapter.start_turn 仍保留原结构化错误;未确认提交或运行中工具仍沿 interrupt_turn 发有界取消。真实 Core 测试证明原失败字节不变,后续另一条问题完成且每条输入只发送一次。

规格依据为 docs/architecture/rfcs/app-conversation-and-async-inbox-v0.md,接受版本 6787fc8d51a24dc7ab7713c8602d46226d2bafae,使用变更前的要求审阅:failure-retention 保留原失败和通知;no-replay-from-cancel 不从清理状态推导重放资格,均有 HTTP/Core 证据。stable-native-evidence 的正常结果采用规则保持在原恢复 owner,本 PR 不采用任何失败结果。两份 RFC 同步解释边界,没有把目标改写为更容易通过的标准。

对主干的风险 / Risks

最强反例是轨迹已空闲、末尾有错误,但之前仍有 RUNNING 或 GENERATING 工具,或者步骤状态缺失。旧的无条件清空目标会漏掉这些情况;当前矩阵逐项保留取消,WAITING 仍先落到宿主权限门。未知提交继续保留取消失败和执行效果未知,不能据此补跑。

PASS:34 项定向检查、12 项精确 wheel 隔离检查、675 项原私聊与适配器回归,以及原上限下的标准检查。早先两次语义扫描 120 秒超时均保留;随后同版本主干与候选独立完成,标准检查在未增限、未改断言下通过,不将超时解释为已修复的语义错误。完整回归另记录一次测试收尾的 server_close BrokenPipe 警告,675项断言均通过,警告原样保留。原生服务及外部模型由本地 HTTP fixture 替代,网络可靠性与真实采用仍没有由这些测试证明。CI 按本 Goal 策略未查询。

语义与 CI 对齐

复用现有原生步骤词汇,未引入新 actor、协议或恢复授权。检查覆盖原失败、权限、独立后续输入和 RPC 数量;没有用元数据健康或一次成功调用代替原用户收到业务结论。

我的整体评价 / Verdict

当前完整版本相对原问题是 justified_increment:long_horizon 与 user_experience 均在被测路径改善,原消息输入、失败记录与后续独立工作保持。实现规模 proportionate,兼容性无需新增版本分支;局部改动留在原 IO owner,无额外重构需要。检查了原生适配器、Core 错误回传及两份 RFC;没有渲染布局或新的交互控件变化。Live installed frontend and original-message recovery remain outside this source/package qualification.

没有剩余阻断代码发现。批准当前源码与包内边界;安装采用和原请求真实补办继续单独验收,不能由本 COMMENTED 意见代替 GitHub 独立批准或合并授权。

English verdict: APPROVE — the reviewed head preserves native cancellation safety and original failures; live adoption remains separate.

@loopx-agent
loopx-agent merged commit 5f132dd into main Nov 9, 2026
21 of 25 checks passed
@loopx-agent
loopx-agent deleted the codex/antigravity-idle-step-error-20261109 branch November 9, 2026 12:04
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