Skip to content

Observe Antigravity progress with fewer duplicate reads - #8528

Merged
huangruiteng merged 3 commits into
mainfrom
codex/steward-idle-boundary-20261110
Nov 11, 2026
Merged

huangruiteng merged 3 commits into
mainfrom
codex/steward-idle-boundary-20261110

Conversation

@loopx-agent

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

Copy link
Copy Markdown
Collaborator

Goal And Delivered Outcome

Antigravity can resume work between the last trajectory poll and LoopX's idle deadline. The adapter previously cancelled the invocation before reading the new native step. The candidate makes a final observation of the original invocation within the existing timeout and interruption rules.

During ordinary running polls, Antigravity can already include the complete steps in its trajectory response. When the cascade, input, and step coverage match, the adapter now uses those steps directly. Older or incomplete responses still go through the existing detailed read. Idle boundary and final answer checks continue to use that path.

Author Declaration

OpenAI Codex, GPT-6 family. The scope is the existing Antigravity polling and final reply path.

Criterion Disposition Validation
Observe the original invocation before idle cancellation Implemented Original Lark request regression with the native HTTP fixture
Reuse complete running steps from the original input Implemented Running snapshot test covers short, foreign, incomplete, and different-input responses
Preserve hard deadlines, interruption, final proof, and original reply ownership Implemented Native adapter and original steward reply suites

Scope And Continuation

The change stays in the native adapter and its existing tests. Production adoption and delivery verification remain the next stage.

Validation

  • Tested revision a215d42
  • 297 tests passed across the native adapter and interrupted-answer suites. Standard premerge checks passed.
  • The current base reproduces both the redundant running read and premature idle cancellation. The candidate keeps the original stream and final reply while avoiding four duplicate running reads in the representative test.
  • Read-only production observation found identical embedded and detailed steps in a settled trajectory. A naturally running request also supplied complete steps whose original input matched the recorded anchor. These observations used the installed release and the candidate was evaluated offline.

Frontend / Visual Evidence

No visual change.

Type of Change

  • Bug fix
  • Test update

LoopX Area

  • Capability or extension (providers, adapters, skills)
  • Host or runtime integration

Shared-authority RFC fixture impact

N/A. This change stays in the native adapter.

Boundary Checklist

  • Diff and public text contain no private state or raw traces.
  • Scope is limited to polling, timeout, and original reply behavior.
  • No paired RFC changed.
  • DCO sign-off is present for every candidate commit.

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 family, OpenAI, self_reported

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

动机 / Motivation

通过飞书向管家交办任务的人会遇到这条路径。管家在本机通过 Antigravity 运行,飞书收到的是同一轮次的正式答复。 当原生助手在上一轮读取后刚恢复工作,旧代码会先按空闲时限取消原轮次。新代码先读回同一轮的当前步骤,再根据看到的进展决定是否继续。 在相同的原会话回归用例中,旧版失败,新版只提交一次原输入并向原会话回传一次完整答复。 这次交付只修复本地空闲判定,模型上游的连接中断与任何既有失败业务的处理仍由各自的原有路径承担。 现网采用及自然恢复后的原消息回传仍待验收。

改动思路 / Approach

决定点留在拥有原生取消权的适配器,因为只有这一层同时持有当前执行的原始轨迹、空闲时钟和硬截止。 本次范围是同一调用在空闲截止前后的只读观察、既有结果验证,以及经过原飞书入口的回归。 截止时的状态和步骤共用原有一次读取的时间预算。一次读取失败会沿旧超时终态收尾,连续原生错误也无法推进空闲时钟。提高时限只能把竞态移到另一个时间点。共享已有读取和错误处理,可以在这里直接修正判断。

具体改动 / Changes

没有单独的书面规格。本 PR 按可以复现的空闲取消问题验收。正常轮询、用户停止、硬截止、完整轨迹的判定和原路回传均复用现有入口。新增的集成回归从飞书原请求进入 Core,经实际 HTTP 测试端点执行,再通过原回传服务验证回复正文和归属。

关键代码讲解

  • AntigravityAdapter._run_turn 在空闲时限到达时使用同一个原生 Session 的完整步骤,只有有效变化或已经核实的终态才改变原有结算。证据不可用时使用已有的 response_timeout。 适配器
  • observe 集中原有两种读取的传输错误处理,普通轮询保留原来的等待。空闲时限处的一次读取有共同预算,读不到时不重复请求。 读取函数
  • test_original_steward_observes_native_work_at_idle_deadline_and_replies_once 同时检查旧版失败、新版完整回传、一个原生提交以及第二次对账没有重复回复。 原会话回归

对主干的风险 / Risks

读取到原生错误、停滞的工具或临时空闲状态时,误续跑会拖住后面的请求。适配器继续使用同一个原生调用和完整轨迹规则,并保留硬截止与停止。对照验证在旧适配器上得到一项预期失败、七项既有用例通过。当前改动的八项用例均通过,包含超时原因与原飞书回传。Ruff 和标准提交检查通过。现网证据用于定位,候选版验证使用受控 HTTP 测试端点和模拟飞书。

我的整体评价 / Verdict

对长程任务的改善是恢复后的原调用能够继续,调用和回传次数仍可对账。对用户的改善是同一请求可以收到完整结果,无需再次提交。原飞书终态仍通过已有答复或超时模板呈现,变更点是 Antigravity 适配器取消前的证据读取,没有页面布局或交互变化。 变更复用已有结果类型和回传规则,后续在合入和正常采用后核验自然请求。

English verdict: APPROVE

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
@loopx-agent loopx-agent changed the title fix(chat): observe Antigravity progress at the idle deadline Observe Antigravity progress with fewer duplicate reads Nov 11, 2026

@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 family, OpenAI, self_reported

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

Reviewed exact head: a215d42

动机 / Motivation

在原私聊等待管家结果的用户。原生服务运行中已提供完整轨迹,随后调用有新的进展或靠近空闲截止。原生服务已附完整步骤,旧版仍再读一次。同一调用也可能刚到空闲边界就被取消。同一合成运行的额外详细读取从四次降为零,原调用在边界的进展仍可产生原会话答复。范围限于原调用观察,不新增执行、权限、并发或发送路径。线上只读核验了原生快照,候选尚待独立评审和安装。

改动思路 / Approach

原生宿主持有输入、轨迹与终态,Core 持有原请求和回传回执。原 Antigravity 调用的轮询、超时和原回复。正常轮询复用同会话、同输入的完整步骤。空闲边界继续核对原调用,既有终态读保留。完整快照只负责当次观察,来源、截止时间和原生停止仍由现有路径处理。等待终态时继续核对详细轨迹。

具体改动 / Changes

  • C1 恢复边界上的真实进展。loopx/capabilities/native_chat/antigravity_adapter.py:1035 在空闲截止点读同一原生调用一次,沿现有预算检查是否有进展或完整结果。
  • C2 省去正常轮询的重复读取。loopx/capabilities/native_chat/antigravity_adapter.py:113 校验原会话、输入文本和轨迹范围。tests/test_steward_interrupted_answer.py:248 覆盖短页、其他会话、输入不匹配和缺步骤正文。tests/test_steward_interrupted_answer.py:340 核对原请求只提交一次,结果在原私聊读回。原会话与恢复契约

对主干的风险 / Risks

关键风险是把不完整快照当作真进展,或把运行中正文当成终态。候选对来源和覆盖有检查,普通失败继续详细读取,原截止和终态复核走现有路径。当前主干的两项回归按预期失败,候选 297 项通过。线上实际运行快照已在隔离读取中验证原输入与覆盖,原服务仍待采用候选。早期许可等待和用户停止也走现有判断。

我的整体评价 / Verdict

两处改动服务同一原生轮询,合在现有 PR 可一次验证进展、截止和原回复。该版本的作者复核已覆盖两个改动文件,合并与生产验收仍需各自的证据。

English verdict: APPROVE

@huangruiteng
huangruiteng merged commit cb5a49d into main Nov 11, 2026
6 of 9 checks passed
@huangruiteng
huangruiteng deleted the codex/steward-idle-boundary-20261110 branch November 11, 2026 07:16
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.

2 participants