Skip to content

Use scheduler observations for Antigravity Stop recovery - #8734

Merged
loopx-agent merged 1 commit into
mainfrom
codex/antigravity-stop-scheduler-observation-20261114
Nov 14, 2026
Merged

loopx-agent merged 1 commit into
mainfrom
codex/antigravity-stop-scheduler-observation-20261114

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

Goal And Delivered Outcome

The Antigravity Stop hook asks Core whether a retry is allowed. Its full quota response includes work context that the hook never reads. Use the existing scheduler observation for this check and preserve Core's should_run value in that response. After a retry is permitted, the existing heartbeat bootstrap reads the current work and settlement contract.

Author Declaration

  • Written by OpenAI Codex (model_agent).
  • Basis is the existing Stop hook and the quota should-run --scheduler-observation contract at 78e936f9d1f1.
Criterion Implementation Evidence
Check the original retry against Core loopx/agy_goal_mode/host_runtime.py invokes the observation with the same Goal, Agent and runtime profile Ready, user gate and exhausted quota produce the same decisions
Keep observation separate from work delivery loopx/cli_commands/quota_presentation.py includes Core's existing decision field The observation carries no work context, capture or admission receipt

Scope And Continuation

This removes the ordinary quota work response from the native Stop retry gate. The sidecar and interactive heartbeat remain distinct consumers of the shared admission policy. Related to #8266.

Validation

  • Tested 0f6f45a49d409609a04418df8c2dd4ece6fbff8c with synthetic input and the production CLI.
  • 32 Antigravity runtime and host-surface tests and 20 scheduler/recovery regressions passed. Standard premerge passed.
  • In 12 matched File/SQLite cases with context delivery on and off, the main checkout and an isolated installed candidate returned identical retry decisions. CLI stdout fell from 22,459–24,856 bytes to 1,327–1,393 bytes. Native input was injected in the fixture. The installed Antigravity application and model costs were outside this comparison.
  • UI impact is none.

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.1-sol · OpenAI · runtime_reported · reasoning_effort=max

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

评审提交 0f6f45a49d409609a04418df8c2dd4ece6fbff8c;对照目标基线 78e936f9d1f1a00505c4026ee0a5857de95cee27。

动机 / Motivation

在 Antigravity App 遇到模型连接中断、等待原会话安全续跑的 LoopX 用户。 Stop hook 为原输入判断是否重试。它只消费 Core 的 should_run;真正继续时,才由 bootstrap 读取当前任务与结算契约。 基线为一次判断返回完整任务上下文;允许重试的样本输出 23,672–23,687 字节。 需要保留拒绝条件与原输入再检查,否则较小的响应会掩盖错误的续跑。 当前 head 在 File、SQLite 与两种上下文设置下保留所有允许或拒绝结论;允许重试的输出缩为 1,377 字节。 源码命令与隔离 Standard wheel 均验证;原生 RPC 用本地 HTTP 夹具。未查询托管 CI、未启动实际 Antigravity 应用或模型,也未测量 token、长期成本或重试后的任务成果。

改动思路 / Approach

Core 保持准入与状态所有权;本地 Stop adapter 只观察并保留已有的重试约束。 沿用现有 scheduler-observation,不复制 Core 的决策,也不把原输入确认下放给新入口。 Read and project original facts through the existing owner. No additional execution.

具体改动 / Changes

关键代码讲解

Stop 入口 继续按 Goal、Agent 与 Antigravity runtime profile 读取 Core;调度投影 把现有 should_run 交给同一个条件。Stop 再读原输入、限频及准入后的 bootstrap 均沿原流程。File/SQLite 原入口覆盖

基线 docs/reference/shell-worker.md 的现有约束:同一重试决定 已验证;先观察后执行 已验证;同一原输入与重试限额 已验证。基线验收依据

对主干的风险 / Risks

主要兼容点是已绑定 hook 与 CLI 来自同一安装。用候选 wheel 在另一目录执行生成的原生命令,让真实本地 HTTP 提供相同输入、变化输入与取消;仅稳定且有权重试的输入取得 bootstrap。与本轮更新后的主干没有同文件冲突。

语义与 CI 对齐

本地 21 项 Antigravity 测试通过;两版各 16 个条件核对;隔离 wheel 完成 8 个实际 Stop/RPC/CLI 场景。Standard premerge 六项直接检查和十八项选中检查均通过。 源码命令与隔离 Standard wheel 均验证;原生 RPC 用本地 HTTP 夹具。未查询托管 CI、未启动实际 Antigravity 应用或模型,也未测量 token、长期成本或重试后的任务成果。

我的整体评价 / Verdict

批准当前提交。改动缩小机器读取,保持同一判断、同一原输入和明确的恢复入口。现有 Stop 配置应继续使用同一 LoopX 安装的 Python 和 CLI。 合并与正式运行采用仍须按仓库权限和发布流程另行核对。

English verdict: APPROVE at 0f6f45a. The Stop hook preserves Core's retry decisions and original-input checks while using a much smaller observation.

@loopx-agent
loopx-agent merged commit c8631ce into main Nov 14, 2026
41 of 47 checks passed
@loopx-agent
loopx-agent deleted the codex/antigravity-stop-scheduler-observation-20261114 branch November 14, 2026 09:37
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