Skip to content

fix(chat): preserve global registry order on sync and auto-replay pre-execution scope churn - #7931

Merged
loopx-agent merged 2 commits into
mainfrom
codex/steward-scope-autoreplay-20261102
Nov 2, 2026
Merged

loopx-agent merged 2 commits into
mainfrom
codex/steward-scope-autoreplay-20261102

Conversation

@loopx-agent

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

Copy link
Copy Markdown
Collaborator

Fix repeated local manager-context failures and let the original reply worker safely continue pending requests.

  • Preserve existing Goal/Project positions during registry merge, so unchanged cross-project syncs do not rewrite the global registry or churn authorization snapshots.
  • Qualify private steward preparation failures on Codex and Antigravity using the complete canonical Core event sequence, current source/binding/scope, and deterministic retry lineage. Reuse the original queue and three-attempt backoff; hold edited, stopped, resubmitted, incomplete or unknown-effect work.
  • Keep preparation attempts separate from native routing/quota budgets, retain original failure/delivery records, and pass prior replies plus no-repeat guidance through the existing all-adapter context and recovery identity decoder.
  • Make the original private failure notice describe conditional continuation. Other failures keep their existing replay boundary. Document the behavior in both RFC mirrors.

Validation: 136 Python owner regressions, 46 TypeScript owner tests, TS typecheck, Ruff and standard premerge passed. An earlier 410-test adjacent run passed on the predecessor source; the final integration and changed branches have their own owner coverage. Identical real sender fixtures fail old main (no recovery) and the original PR head (duplicate selection after human resend), then pass the hardened source. The registry counterfactual reproduces two unnecessary baseline writes and zero head writes. Actual Antigravity request text includes the original recovery context; synthetic endpoints do not prove live business completion. CI was not queried or waited under wait_for_ci=false.

…-execution scope churn

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 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)

动机 / Motivation

跨项目无变化同步仍重排 registry 列表,造成授权快照反复变化;准备阶段失败已送达失败通知,却不能由原队列继续。 无变化同步保持原顺序与字节;已证明未交给模型的原请求,在当前来源和授权恢复后限次接续,并由原消息回传。 受影响者:原本人私聊管家及共享 registry 的项目同步。不代办业务或重放未知效果,也不启动第二消息消费者。真实历史积压的业务完成和外部飞书客户端的最终读回需要安装后逐条确认;本审阅不声称全部完成,也不证明模型理解了恢复指令。

改动思路 / Approach

合并顺序由 global_registry 持有;typed conversation planner 持有恢复准入和次数;Python 只收集 Core、来源与当前范围事实,原队列和 Inbox 继续执行与回传。 只修 registry 默认合并和原会话恢复、上下文与失败通知;不代办业务,不启动消费者,不恢复未知副作用的失败。 以变更前 RFC 中“失败通知送达不等于业务请求完成”“未改变的原消息及当前授权核验”“原失败与原消息送达记录保留”为验收依据。准备阶段失败单独命名为 preparation,复用一、二、四分钟的原有三次退避;不是把没有上游 Turn 的请求当成原生失败。新的完整 Core 准备序列、来源、范围与后续输入共同限定准入。

具体改动 / Changes

  • merge_goal_entries / merge_project_entries:Update existing rows at their original positions; append genuinely new rows. Cross-project redundant sync writes zero bytes; actual change writes once.
  • planPreparationRecovery:Same-source pre-dispatch proof, retry lineage and family isolation. Stop, duplicate, missing proof, active queue, unknown effects and cap block new work.
  • recover_failed_request / recovery_context:Fresh scope and source outside route fence; persist correlation and deliver context across adapters. No native failure lookup for a Turn that never dispatched; preparation suffix retains actual replies and no-repeat guidance.
  • manager_failure_reply:Qualified original private manager gets conditional continuation text. Other failures and audiences retain their no-automatic-replay statement.

原来的 request_recovery 解码器未识别 preparation 后缀;现已接入同一持久关联,并在实际 Antigravity 输入中核验原回复与不重复已完成工作的指令。已经受理的关联修复不会再次创建请求;原失败与已核验失败通知保持不变。

对主干的风险 / Risks

最强风险是重复已重交的工作,或换一类错误重新获取重试次数。旧 a36ff0c 在相同的真实 sender fixture 中仍选中已被用户重交的旧请求;最终 head 已拒绝,且新增缺证据、额外事件、编辑、撤权、停止、排队及跨类型预算反例。Registry 的同一跨项目无变化同步用例在不可变旧 main 观察到两次写入,最终保持零写入;有真实改动仍只写一次。

最终 136 项 Python owner 回归、46 项 TS owner 测试、类型检查和 Ruff 通过;先前 410 项相邻回归通过,差异和新分支另由最终 owner 用例覆盖。 最初整合检查中的断言改错和恢复解码遗漏均保留失败记录,修复后最终 owner 回归通过;不把这些历史失败隐去。标准 premerge、类型检查、Ruff 与双语文档检查通过。按 wait_for_ci=false,没有查询、轮询或等待 CI。所有源和影子路径都保留未知效果、其他恢复类型和原来源保护;回滚保留原请求与送达 journal。

我的整体评价 / Verdict

这是 justified_increment:不增加使用者设置或重输,不另建队列,默认修复由原 owner 持有的抖动与漏答路径。持久次数承担跨重启防重,事实收集不替代 typed 准入;纯文字提示只说明实际条件。真实历史积压的业务完成和外部飞书客户端的最终读回需要安装后逐条确认;本审阅不声称全部完成,也不证明模型理解了恢复指令。 发送上下文测试证明指令到达,不声称真实模型理解或历史业务已经完成。

English verdict: APPROVE — preserve stable registry publication and continue only proven pre-dispatch failures through the original source-bound queue.

@loopx-agent
loopx-agent merged commit f76e839 into main Nov 2, 2026
7 of 9 checks passed
@loopx-agent
loopx-agent deleted the codex/steward-scope-autoreplay-20261102 branch November 2, 2026 19:15
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