Skip to content

refactor(capabilities): share PR dependency observation across entrypoints - #6988

Merged
huangruiteng merged 4 commits into
mainfrom
codex/pr-wait-turn-start-20261021
Oct 21, 2026
Merged

huangruiteng merged 4 commits into
mainfrom
codex/pr-wait-turn-start-20261021

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

PR waits need an exact merge fact before business admission. This change registers the existing issue-fix observer through TurnStart so executing quota guards, native Turns and compatibility prequota consume the same capability configuration, cadence and canonical facts. PR-specific orchestration and summaries move out of core Turn code.

中文:沿现有 TurnStart 注册共享 PR 依赖观察,统一执行性 quota guard、原生 Turn 与兼容 heartbeat prequota;保留既有 TypeScript 权威、默认关闭、正常业务准入和原事务恢复边界。

Current required CI hold: kernel-static-checks fails in merge snapshot b44dcb5 against target a198fd2: 147 root modules exceed the pinned 145 budget. The two extra modules, codex_rollout_cursor.py and codex_rollout_json.py, entered upstream in #6994. The reviewed head has 145 and passes the same seven local invariant tests. The immutable upstream snapshot reproduces the count failure; the current target retains both additions. Required CI remains blocking until the owning change is repaired; no budget increase or baseline waiver is proposed. Dependent qualification jobs fail/skip rather than establishing a CI pass. The quality receipt now records this failure and holds merge.

Behavior and ownership

  • issue-fix owns metadata observation, exact repository/PR checks, failure diagnostics and bounded summaries. Python composition lives in loopx/capabilities/turn_start.py; the control plane retains the existing typed registration, capability availability, PR planning, merge facts, resume evaluation and admission owners.
  • Resolve permission from current Goal declarations, remembered host observations and invocation facts, including revocation. Existing permission does not require another flag at each entrypoint. Filesystem/shell access and Todo requirements do not grant networking.
  • Share a Goal-local single flight and the existing durable 30-minute cadence per dependency, with at most four distinct targets per invocation. Known facts survive restart and history growth. CLOSED, redirects, wrong repositories and missing terminal timestamps cannot attest a merge.
  • An observation can satisfy a condition during business wait/compute pause. Stop, quota, claim, lease and launch checks still govern subsequent work. Observer failure does not gate independent eligible work; unknown/lost effects remain unknown and invalidate the decision cache.
  • Preserve original requirements, ownership, wait expressions and original merge timestamps. Carry the selected Task's complete resume proof through full decisions, the signed envelope and actual protocol-host input. Observation never completes the Task or spends business quota.
  • Generic readback appears in turn_start_capability_hook_dispatch.results[].readback; compatibility prequota retains checks.pr_dependencies. Diagnostic lists/ids declare omissions after complete-source selection; the 64 KiB hook budget is unchanged. Core rendering consumes capability-owned summaries. Post-writeback hooks remain effect-free.

Entrypoint evidence

Entry Observation Verified boundary
Full/thin heartbeat Generated prequota plus executing guard use current owner permission Real generated commands, File/SQLite; same fact/cadence
Executing quota should-run Registered hook before decision collection Goal configuration and remembered host permission work without invocation flags
Fresh turn run-once --execute Same registered hook Actual protocol host, independent artifact validation, one settlement/debit
Managed-step and original-journal recovery Consume existing facts; no fresh polling Read-only controller/refusal and committed replay preserve original transaction; no duplicate host/debit
Status/list/page/context, plan/dry-run No fresh polling Configured permission does not turn reads into observation
App/Lark shared context backend Reads canonical readiness Real File/SQLite backend reads before/after observation; no added provider request

Installed App/heartbeat/Lark execution, sustained live scheduling and recovery of an existing owner's live Goal remain unqualified. Source/wheel/backend evidence does not establish installed adoption. Cross-Goal recovery requires its registered owner. The broader M7.4 convergence work and generic memory lifecycle in #6957 remain open.

Validation

Exact tested head: 9f6f58b7f33e9c59b74e311fd7b87439b33e8174, integrated onto target main at 3e35f83d6f009ad490320d2b525ebecea1605ea4.

  • Selected Python regression: 380 passed. Covers real File/SQLite lifecycle, full-source/history growth, cross-entrypoint cadence, concurrency, revocation, failure isolation, uncertain responses, signed proof transport, validated follow-through and replay.
  • Control-plane TypeScript: 5165 passed, 73 skipped; typecheck passes. Ruff and configured mypy pass.
  • Independent final wheel: 25 relevant tests pass; 13 product/TypeScript blobs equal tested source, 1163 product modules load exclusively from site-packages, child interpreter and console entrypoint checked; obsolete core composition absent. An earlier candidate also passed 68 wheel cases; the final wheel is separately identified.
  • Integrated Personal Workspace contract and chat bundle build pass. Earlier frontend/fixture/architecture/semantic failures are retained as historical evidence; upstream frontend correction and author placement fixes are verified on this head.
  • Maintainability ratchet and semantic vocabulary/legacy budgets pass without new exceptions or budget growth. Paired RFC, whitespace and public/private checks pass.
  • Local exact-scope qualification initially passed, and standard premerge passed 6 direct checks and 19 selected checks against the pinned verified target. Those observations are retained; the current quality receipt records the later required CI failure above and holds merge. CLI differential uses the same verified target baseline.

Local cost and remaining limits

Same paused-native-Turn fixture, three fresh trials per provider/side, explicit polling and an OPEN metadata stub: one provider read initially, zero on cadence reuse. After the full suites finished, first-call medians were approximately 197→197 ms (File) and 215→206 ms (SQLite); cadence reuse was 107→108 ms and 105→108 ms. These small samples establish no speed benefit. Small JSON results grow from about 1.6→3.2 KiB initially and 1.3→2.8 KiB on reuse.

The probe records Python CPU/RSS and OS block counters; it excludes complete child/daemon resources, cached filesystem reads and real network/model costs. Concurrent-suite samples were more variable and are not used to claim latency improvement. No model/solver/benchmark job, installed runtime switch, merge or release was performed.

New CI, independent exact-head review, merge readiness and maintainer merge authorization remain separate gates. Earlier-head approval does not qualify this head.

@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; model=gpt-6.1-sol; provider=OpenAI; declaration_source=runtime_reported; reasoning_effort=max

动机

原生 Turn 调用者希望在 PR 已合并后继续原任务,并能区分等待事实、业务授权和实际执行。 例如原任务等待 owner/repo#42:旧原生入口即使可核验合并,也保留等待;当前入口在明确启用观察能力后采用合并事实,再由原准入门决定能否执行。

源码评审结论为 APPROVE,未发现本次接入的阻塞性缺陷。已验证 File/SQLite 上等待事实的采用、原任务字段保留、独立校验的后续工作及原 journal 幂等重放。 必需的前端断言仍失败,合并资格继续保留阻塞;源码批准不代表可以合并。

本次不执行合并或升级。 安装态 heartbeat/App/Lark 采用、持续网络成本及真实模型收益仍由既有 M7.4 收敛工作验收。

改动思路

事实观察由既有 issue-fix observer 与 TS Todo owner 负责,原生 CLI 只在同步后、业务决策前接入;这样可以补齐真实调用者,又避免建立第二套等待或授权状态。

本 PR 的完成边界是明确启用能力的原生 CLI 接入和读回;安装态 heartbeat/App/Lark 采用、持续网络成本及真实模型收益仍由既有 M7.4 收敛工作验收。

最强的反对理由是:只接通一个调用者仍不能证明部署后的等待会恢复,而且观察增加了网络与本地写入成本。这里确实只验收原生 CLI,但该路径已完成从观察、原等待就绪到校验后续产物及幂等恢复的闭环,足以形成可独立回滚的增量;没有用字段存在或注册 hook 代替实际结果。观察仍最多读取四个到期目标、按既有30分钟节奏重试。受控元数据测试不能证明真实网络延迟或长程收益。

具体改动

完整评审 edd589061f70c5f67f20107f532e7be0476d1eed 的六文件、+503/-4。独立规范先于实现读取:docs/reference/todo-continuation-readback.md; docs/architecture/rfcs/agent-loop-effect-interpreter-v0.md 在 5706ef0552d5c22af805f264ae891556a0f819cf 的既有内容;本次新增说明没有反过来充当独立验收依据。

  • PR dependency observation / PR 依赖观察:implemented。沿用精确仓库/PR 身份、原合并时间、完整保留历史和既有30分钟/四目标边界。关闭但未合并、超时、认证失败、错误仓库或缺少合并时间均不能当作合并。
  • PR dependency observation / explicit capability:implemented。只有显式 external_evidence_poll 加新鲜 run-once --execute 才进入观察;文件系统或 shell 能力、计划、试运行、原 journal 恢复均不激活。
  • Selection boundary:implemented。观察不改原任务要求、状态、归属或 resume_when。就绪事实与普通配额、停止、claim、lease、host 启动权限分开,观察成功不能给后续业务授权。
  • Heartbeat and Turn Envelope convergence / M7.4:原生 CLI 的共享决策/效果与 journal 身份保持,implemented;安装态 App/其他 host 采用、默认迁移、可比完整成本和真实任务收益仍 deferred(M7.4 remaining convergence acceptance),保留既有 M7.4 的验收缺口。

关键代码讲解

  • handle_turn_command 在原 turn-start 同步完成后调用既有 observer,再让原决策 owner 处理业务。顺序有实际意义:同步刚产生的依赖也能被看到;恢复原 journal 的分支提前返回,避免重复观察、重新启动 host 或扣费。
  • _attach_pr_dependency_observation 统一附加可选读回。没有观察时保留旧 schema;已知写入为 true、无法确认部分效果为 unknown。尤其合并事实写入后、本地观察回执丢失时,不能伪报“无写入”,也不能把其他 hook 已确认的写入改成 unknown。
  • _pr_dependency_observation_lines 让 CLI 能读到目标数、耗时、失败、下次观察时间及已知/未知写入;失败后的节奏仍来自既有 owner。它只做投影,没有创建后台轮询器或新的准入规则。

已检查原生 CLI、既有 issue-fix catalog/能力设置边界。这里修复已有调用者,没有新增独立配置项、用户操作或首屏页面;已声明能力的调用者不需重新填写目标、复制上下文或增加确认轮次。移除能力声明即可关闭本次新观察,保留的已验证事实不会因此失真。

对主干的风险

重点风险是误把“合并已核验”当作“业务可以运行”,或恢复时重复执行。184项相关测试全部通过,包含实际 canonical File/SQLite、受控协议 host、独立产物验证和原 journal 重放。把同一新增正向用例放到不可变基线,两种 backend 都在等待路径无法提交处失败,当前 head 则通过,说明该验证能区分原缺陷。

另独立执行24次真实源 CLI 调用,即 File/SQLite 上启用、关闭、试运行、计划、他人 claim、部分写入失败六类输入的基线/head 对照。启用后观察到合并并使原等待就绪;compute=0仍无业务启动或扣费;他人任务没有远端读取;部分回执丢失时仍保留真实合并事实并报告 unknown。原任务文本、状态、claim 和依赖声明保持原样。关闭/试运行的完整返回只差运行期 journal 标识;计划还差隔离 fixture 路径与派生签名/provider revision,决策、错误、提示和副作用语义没有变化。所有差异保留在比较记录中。

语义与 CI 对齐

标准预合并6项直接检查及17项 canary/边界检查通过,包括提交态双语 RFC、编译、语义漂移和公开边界。已有 observer 的规范化身份、完整历史与 TS resume owner 被直接复用;没有新 Enum、prose 关键词分类器、权限 owner 或持久化兼容分支。新增字段只陈述观察,不扩大协议的角色或生命周期范围。

必须保留的失败是前端注册 Goal 名称断言:对精确基线和 head 独立执行同一命令,两边均 exit 7、同一未改动的第378行失败;仅替换各自源码根路径后,完整 stderr 逐字相同,SHA256 84b2b2dce6e4b9c4b478b1d937ba91cd9b1763e3a491fc7c14bf24da985da04e。因此可归因为既存无关失败;没有删除断言、降低预算或要求此 PR 修复无关 UI。必需验证仍红,作者披露的非通过质量回执也继续阻止合并。作者的 wheel/其他静态检查是其独立声明,本次不借用它们充当安装态证明;本轮没有查询、轮询或等待 CI。

我的整体评价

对 edd589061f70c5f67f20107f532e7be0476d1eed 的结论为 APPROVE。长程维度为 preserved:采用既有合并事实后,原工作仍受原门禁约束,实际验证后续产物和 journal 重放各执行一次;用户体验维度为 preserved:已有授权和能力声明得到复用,没有新增必答问题、状态重填或额外确认,失败和恢复时间也能读回。

事实观察由既有 issue-fix observer 与 TS Todo owner 负责,原生 CLI 只在同步后、业务决策前接入;这样可以补齐真实调用者,又避免建立第二套等待或授权状态。 本 PR 的完成边界是明确启用能力的原生 CLI 接入和读回;安装态 heartbeat/App/Lark 采用、持续网络成本及真实模型收益仍由既有 M7.4 收敛工作验收。 有限简化已经通过直接复用 observer,以及两个集中处理读回的窄 helper 完成;再创建抽象或第二套状态没有必要。当前证据支持原生接入的正确性与恢复,不支持持续网络成本、模型遵从或整体 M7.4 已完成的结论。源码批准、平台正式批准、合并资格和本机安装仍各自独立,本次不执行合并或升级。

English verdict: APPROVE — edd5890. The explicitly opted-in native caller adopts exact PR facts before ordinary business admission and preserves original task authority and journal replay.184 focused tests,24 real CLI probes and standard premerge passed; the same native regression fails on both baseline backends. The required frontend assertion fails identically on base/head and remains a separate merge/quality hold. Installed host adoption, sustained network cost and model benefit are unqualified.

@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; model=GPT-6 family; provider=OpenAI; declaration_source=self_reported; reasoning_effort=effort_unavailable

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

REQUEST_CHANGES — P2:把 PR 依赖观察接到共享、受授权的预选择生命周期,并覆盖实际 LoopX 执行路径;不要以 turn run-once 专用接线作为本轮交付终点。 这是本轮明确的跨路径修订要求,区别于此前仅验证原生 CLI 的边界;不把该局部修复说成没有价值。当前账号为 PR 作者,因此此记录为 COMMENTED 的请求修改结论,不是 GitHub 正式阻断式 review。

动机

等待某个 PR 合并的使用者,希望既有任务在合并事实被核验后,通过所用的 LoopX 执行入口继续。
当前补丁修好了新的原生 Turn,但已安装 heartbeat、App/Lark 及其他入口没有在本 PR 获得相同接入保证。
本次要求的结果是同一已授权的观察配置,在相关执行路径上消费同一依赖事实和节奏,并使被业务等待挡住的任务能够恢复。
不把只读查询改成后台轮询,不授权合并,也不要求建设覆盖所有事件种类的新框架。

改动思路

既有 reconcile_pr_wait_dependencies、TS 计划和原合并事件已是正确复用对象,补丁没有另建 Todo 权威。需要修订的是调用组合:新原生分支直接调用 observer,heartbeat-prequota 则另有组合;每增加一个入口仍要再次接线和核对能力声明。单个入口“在 quota 前调用”不能保证整套产品路径采用。

要求本 PR 复用现有 turn-start 注册/分发边界和既有 observer,统一相关执行入口的能力解析与调用,再交还原业务准入。 这是当前修订边界。观察应在普通业务因等待而无法运行时仍可由获准的现有执行生命周期触发;不能依赖被阻挡的业务 Host 先启动。保留外部读取权限与 default-off 语义,不通过自动给所有入口塞声明来扩大授权。status/list/plan/dry-run 和原 journal 恢复继续只读已有事实,不暗中联网或改写原 Turn。

具体改动

完整核对六文件 diff:原生 CLI、Markdown 投影、一处测试及三份文档。独立规范是 PR dependency observation / PR 依赖观察,spec_revision=5706ef0552d5c22af805f264ae891556a0f819cf;本次新增“仅原生 CLI”说明不能替代本轮跨路径要求。

  • PR dependency observation / PR 依赖观察:精确仓库/PR 身份、原始合并时间、完整依赖源和持久节奏继续复用;关闭未合并、错误仓库、缺合并时间和 provider 失败不得解除等待。
  • 原生 CLI 的显式开启、只读拒绝、业务授权分离:本轮相关测试通过,属于有效局部成果。
  • 文档当前边界 明确把安装态 heartbeat 声明、App/Lark 采用及持续调度列为后续。这是本轮要求补齐的范围,不能只用 native 测试宣布交付完成。

关键代码讲解

  1. handle_turn_command 仅在 fresh run-once --execute 内、调用者传入 external_evidence_poll 时直接 import 并调用 observer;managed-step 提前返回,其他入口不会因这里多了分支自动采用。P2 触发点是相同获准能力经另一执行入口运行:本 PR 没有共享接入结果或实际采用证据。最小修订是把注册与解析放到共同生命周期,逐一验证真实调用者。
  2. _attach_pr_dependency_observation 保留已知/未知本地效果,Markdown helper 展示耗时、失败和下次核验。这些有用读回应保留,但应投影共同分发结果,不在各命令重复判定观察是否发生。
  3. reconcile_pr_wait_dependencies 继续是 provider IO 适配层:完整 canonical Todo 交给 TS 计划、精确校验远端身份、追加既有事实,不改 Todo 状态/claim/lease。应由共享注册复用它,而不是另造事件或等待 owner。

对主干的风险

本轮在精确 head 独立运行 tests/capabilities/test_pr_wait_observation.py,47 passed。覆盖真实 File/SQLite 的 native/prequota、业务零额度、错误仓库、关闭未合并、缺时间、认证失败、超时、丢失写回响应、另一 Agent、Stop、持久节奏和原 journal 重放;GitHub 元数据和协议 Host 使用合成实现。它证明原生局部修复有效,不能证明安装态 App/Lark/managed 路径或跨入口并发去重。本轮未重跑此前全套184项、wheel、baseline/head 对照及完整仓库检查,不借作者声明补齐缺失证据。

修订验收应列出实际执行入口和授权来源,至少覆盖 full/thin heartbeat、原生 Turn、managed 及 App/Lark 实际后端;适用入口从观察、原等待就绪到合法后续效果与读回形成闭环。只读入口、关闭能力、跨 Goal/Agent、同号不同仓库、失败、并发与重启保持负例。采用现有每次四目标、30分钟节奏意味着有网络与本地记账成本,并非实时推送;共享 hook 不会自动消除这些成本,跨调用者不得重复轮询或借用业务额度。

语义与 CI 对齐

保持 TS resume 与原事件事实 owner、provider 失败隔离以及原业务准入;不把“观察到合并”当成“已授权或已完成业务”。现有 RFC 的全产品采用原本未宣称完成,本轮跨路径要求是新的明确交付边界。当前远端失败/待完成检查尚未归因,本轮不借它们证明缺陷,不等待 CI,也不豁免必要检查。

我的整体评价

按本轮跨路径要求,当前版本仍需修改;architecture_assessment=simplify_now。共享调度必须交付真实可用入口,不能只增加空 hook/schema,也不要求同时完成整个 M7.4 或付费模型长测。保留已有 observer、typed owner、局部正负例和可观测性,删除命令专用的业务组合责任。

长程与用户体验的跨入口闭环仍为 not_yet_proven:native 上的恢复证明不能代表使用其他入口的任务也会恢复。修改后重跑本模块及相关 heartbeat/Turn 入口测试,再以实际安装调用者和跨入口去重证据复审新 head。该结论不授予额外外发、合并权限,亦不允许改写已捕获 journal。

English verdict: REQUEST_CHANGES — edd5890. The native-only bridge does not meet the newly requested cross-entrypoint delivery. Register the existing observer through shared authorized pre-selection lifecycle dispatch, adopt it in the actual execution callers, and retain read-only/replay isolation and ordinary business admission.47 current real File/SQLite and synthetic-provider cases pass. Installed caller adoption and concurrent cross-entrypoint qualification remain unverified; this is not a claim that the native repair is functionally broken.

@loopx-agent
loopx-agent force-pushed the codex/pr-wait-turn-start-20261021 branch from edd5890 to 5184644 Compare October 21, 2026 08:14
@loopx-agent loopx-agent changed the title fix(turn): observe PR waits before business admission fix(turn): observe PR waits and deliver their signed resume proof Oct 21, 2026
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…oints

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 force-pushed the codex/pr-wait-turn-start-20261021 branch from 5184644 to 9f6f58b Compare October 21, 2026 10:34
@loopx-agent loopx-agent changed the title fix(turn): observe PR waits and deliver their signed resume proof refactor(capabilities): share PR dependency observation across entrypoints Oct 21, 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; model=gpt-6.1-sol; provider=OpenAI; declaration_source=runtime_reported; reasoning_effort=max

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

APPROVE — 9f6f58b7f33e9c59b74e311fd7b87439b33e8174。 已按新的共享入口要求重新审阅全23文件;旧 head 的批准没有沿用。当前源码证据支持共享观察、原任务证明交付与合法后续工作的闭环;安装采用和合并资格另列。

动机

等待某个 PR 合并后继续原任务的用户,可能经 heartbeat 或原生 Turn 进入系统,已有授权应在这些入口一致生效。

此前,同一项依赖在一个入口被观察,其他执行入口未必采用;当前实现先共用已授权观察及持久节奏,再由原准入判断是否允许原任务继续。

File/SQLite 中,同一依赖经生成的 heartbeat 或原生入口进入,完整证明到达真实协议宿主,后续产物被独立验证,旧 journal 重放没有再次启动宿主或扣额。

本批不证明已安装 App/Lark 执行器、既有真实 Goal 自动恢复、持续网络成本、模型收益或整个 M7.4 已完成,也不授权合并和升级。

安装态执行器采用、原 owner 的真实等待恢复及持续成本仍需原 M7.4 验收;App/Lark 当前只验证共用上下文后端的就绪读回。

保持原状会让用户重复核验或手工补旗标;再给每个命令直接接一次 observer 也会重复权限、节奏和诊断规则。本次有用增量是已有授权的同一个任务在实际源码入口继续完成可验证工作,不是仅有 hook 注册或绿色测试。

改动思路

观察权限、目标选择和结果摘要归能力,准入、事实与结算归既有 typed owner;共享注册替代各命令的 PR 专用接线,避免第二套规则。

当前 PR 验收共享源码入口到已验证后续工作的闭环;安装态采用与整个 M7.4 的持续收益仍由原有验收负责。

先读当前注册 Agent 的能力来源,再注册原 issue-fix observer;它使用完整 Todo 和保留事件日志交给原 TS 计划,核验精确仓库和 PR 后写入原合并事实。随后仍由原 quota、stop、claim、lease 与 host 准入决定工作能否运行。“等待条件已满足”没有变成“工作已授权”。每次最多四项、每项30分钟持久节奏没有放宽,Goal 内 single-flight 只协调并发,不成为另一份事实账本。

调用场景 当前语义
执行 guard、fresh native Turn、兼容 prequota 有当前权限才调用同一注册观察,共用事实和节奏
业务额度暂停或业务 stopped 可建立获准观察事实,仍不得因此启动业务
status/list/context、plan/dry、managed-step、原 journal 恢复 只消费已有事实,无新轮询
provider 失败或响应丢失 不阻挡无关合法工作;效果不明保留 unknown

没有新增配置页或要求用户重填已知信息。已检查既有 capability editor 与 App/Lark 共用上下文后端;后者当前验证的是相同 canonical 就绪读回,不能据此宣布安装态执行器已采用。

具体改动

独立规范先于 patch 读取:docs/reference/todo-continuation-readback.md 与 docs/reference/protocols/loopx-turn-v0.md,固定于 3e35f83d6f009ad490320d2b525ebecea1605ea4;并复核原 RFC 的 M7.4 边界。当前修订 frame 是 review5596753381:共享获授权的预选择生命周期,而非仅保留 native 专用桥。新增规范段落作为变更披露,没有反过来充当独立证明。

逐项判断:PR dependency observation implemented,精确仓库、原合并时间、四项/30分钟、完整历史及任务声明保留;Authority Boundary implemented,事实与业务权限分离;Turn Lifecycle implemented,实际 guard/native/prequota 采用同一注册,读与恢复不轮询;M7.4 remaining convergence deferred,由既有 maintainer/operator 验收安装态调用者、合法原 owner 恢复与完整成本,不另造任务,也不将这些未来验收改称已通过。

关键代码讲解

  1. extend_turn_start_dispatch:13 是能力层的组合点。三个执行调用者复用它,core Turn 中旧的 PR 观察、计时、attachment 与专用摘要已删除。它没有复制远端资格或 resume 规则。
  2. turn_start_hook:57 在注册和调用时均读取原 typed capability owner。已有 Goal/host 权限无需逐命令补 flag;但 Todo 要求、filesystem/shell 或单独运行 prequota 都不授予联网。已记住的撤销会阻止继承;移除某条 invocation flag 并不撤销仍存在的 owner grant。
  3. reconcile_pr_wait_dependencies:28 保留原完整源计划、精确 URL/终态校验和 merge fact,只外加原锁 owner 的 Goal 内单次执行协调。并发调用返回 in-progress;诊断只在计划与效果结束后裁剪,并声明省略数量。
  4. validateTurnStartHookInvocation:485 限定可选 readback 与摘要预算,仅失败/退化/不可用结果可报告读取或本地效果 unknown;远端写入仍为显式布尔,post-writeback 不获写权限。响应丢失或契约拒绝不能被解释成零效果。
  5. selectedTodo:227 与完整选择投影一起携带原 resume_when、resume_ready、完整 resume_condition,纳入原动作签名。实际协议子进程检查精确仓库、事件时间、长要求尾部和产物,篡改 readiness/证明会拒绝;历史无字段输入和旧 journal 保持原样。

相对旧 edd589061f70c5f67f20107f532e7be0476d1eed 的修订不只是增加测试:删除 native 专用组合,新增共享能力注册、跨入口并发和能力继承/撤销,补齐选中任务证明。当前全量差异 +1408/-54,其中两处新模块136与57行均有实际调用者;文档和集中回归解释其新增成本,没有新增 scheduler、队列、事实库或权限 owner。

对主干的风险

主要反例是:观察确实成功,却给错误任务使用证明、越过 stopped/零额度、恢复时重复启动,或 optional provider 失败挡住合法工作。当前独立运行74项聚焦生命周期与消费者测试、204项邻接准入/driver/能力记忆/post-writeback 回归,全部通过;另61项改变边界的 TS 与17项能力 owner TS、typecheck、当前前端 contract 通过。之前旧 head 的前端失败保留为历史,当前源码同一真实测试已通过。

相同输入的32次原生 CLI 对照覆盖 File/SQLite 的开启、配置继承、关闭、只读 plan/dry、另一 Agent、部分写入响应丢失及撤销。当前 on/configured 每项核验一次并使原等待就绪;零业务额度仍无 host、扣额或任务完成。off/dry/revoked 的完整输出只差 journal 身份;plan 另差隔离路径及其派生签名/源哈希,原始差异均保留,未抹除权限、错误、文本或效果。部分响应丢失保留已经提交的原事实,同时报告 null,不能写成“无写入”。

同一真实消费者用例在不可变基线四项均失败,在当前四项均通过:生成的 full/thin heartbeat 或 native 入口把不同仓库同号 PR 的原证明送到协议宿主,独立校验后续产物;原 journal 重放既不再次轮询,也不启动 host 或重复扣额。500项源选择/16项诊断、跨入口持久 cadence、并发单次读取、失败后的无关合法工作和 App/Lark 后端相同事实读回也已实际执行。GitHub 元数据与协议 host 是合成实现,未冒充真实模型或安装采用。

语义与 CI 对齐

diff-scoped advisory 识别出三个 selected resume 字段;它们复用原 Todo/resume vocabulary。人工审阅另外核对 generic readback、条件化 null 效果和 goal_event_log scope,它们扩展原注册契约,没有建立第二个决策 owner。状态提示是诊断,不是新工作义务;正常权限、签名和结算仍是机器约束。源码标准 premerge 六项 direct 与十九项 selected 检查通过,无 manual hold,双语 RFC 和公共边界检查保留。

按当前策略没有查询、轮询或等待 CI。PR 作者披露的目标合并快照 root-module/required-CI hold 仍须由原 owner 处理;本次没有独立查询那份 CI,也没有以源码通过豁免它或声称合并已就绪。安装态与持续成本验收仍未运行。

我的整体评价

当前源码为 justified_increment,范围与问题相称;新增工作已经通过真实调用者和独立产物校验形成闭环。long_horizon=improved 指有界的跨入口事实采用、同一节奏和幂等后续工作,未证明持续模型净收益;user_experience=improved 指复用已知授权和原任务,减少重复手工 flag/检查,不增加必答确认轮次。

观察权限、目标选择和结果摘要归能力,准入、事实与结算归既有 typed owner;共享注册替代各命令的 PR 专用接线,避免第二套规则。

当前 PR 验收共享源码入口到已验证后续工作的闭环;安装态采用与整个 M7.4 的持续收益仍由原有验收负责。

较小且有效的简化已经实施:领域观察与摘要回到能力,通用 core 保留契约校验、权限和结算。更广泛 memory 生命周期、安装采用和 M7.4 长程效果不由此批准完成。采纳了包中关于“恢复后有用工作”的经验,以实际 host 采用和独立校验作证;经验投递本身不证明记忆收益。无阻塞 finding,当前准确 head 已重新核对,发布前仍再验;此批准不授予 merge、dismiss、bypass 或升级权限。

English verdict: APPROVE — 9f6f58b7f33e9c59b74e311fd7b87439b33e8174. Full23-file re-review satisfies the shared source-lifecycle frame: authorized quota/native/prequota observation reuses canonical facts/cadence, exact proof reaches validated subsequent work, and original-journal replay is idempotent.74 focused+204 adjacent Python,78 TS,32 CLI comparisons, matched4-case host adoption, typecheck/current frontend and6+19local premerge pass. Installed adoption, sustained model/cost outcomes and the author-reported target-merge CI hold remain separate; CI was not queried.

@huangruiteng
huangruiteng merged commit 973914e into main Oct 21, 2026
27 of 32 checks passed
@huangruiteng
huangruiteng deleted the codex/pr-wait-turn-start-20261021 branch October 21, 2026 12:28
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