Skip to content

Let Chief start-next reference validated continuation facts instead of copying snapshot fields #2560

Closed

Description

@zy95-12

Written-by: Codex

目标与负责人

  • 实现/PR 目标:delivery/ai-centric-development-service;@zy95-12。
  • Owner 确认先实施快照引用,复用现有只读 continuation 查询;原生与 SDK Chief 使用同一契约。
  • 仅源码交付:不授权现场重启、手改 OpenToday/凭据/binding、付费模型调用或中断健康工作。

场景与确认

OpenToday task-8cf81a8d / attempt-b573bb83 已合入且 attempt.accept durable(#2549),start-next=ready。Chief 为开下一轮必须复制 previousAttemptId/generation/expectedWorkspace/expectedBaseSha,重复机械错误耗尽 correction。PA 贴字段仍不稳定。
当前基线80cf5795 的真实Git/Runtime两轮Chief回归:省略continuation、仅start-next(+可选目标),在旧协议下失败,未新建Attempt。只输出动作时还被要求抄target,即使目录仅有一个获准实施角色。

方案与边界

  1. start-next 是 Chief 的业务选择。引用该次调用已看过的 continuationOptions,唯一合法 next 时可省略快照字段;不是执行时随意采用最新事实。
  2. 只有一个当前获准实施角色时可以唯一解析目标;多个候选必须由 Chief 选择,显式错误/失效目标拒绝。route/return 的显式目标约定不变,不引入默认 Developer 回退。
  3. 宿主读取当前 continuation-state,与原快照复验;代次、Attempt、workspace、provider target、权限/角色目录变化继续反馈 stale,不静默换基线。
  4. 保留完整显式 continuation 兼容路径;显式错误字段不代填、不纠偏。可选 continuationRef 只引用原快照作用域,不注册新状态/凭证。
  5. 审计保存实际绑定的 target/continuation/原快照作用域。模型原始决定不被改写,重复结果与调度回执继续使用原幂等语义。
  6. 复用现有 attempt.continuation-state / attempt.context 只读入口;不新增 prepare 状态库、执行器或通用字段修复引擎。外部程序的 task.run 显式快照契约保持兼容。

验收

  • 仅 start-next 在已验收、ready、唯一next和唯一实施角色时,通过实际Chief回调/宿主链路创建下一轮;无需抄workspace/SHA。
  • 多目标/多mode、无可用快照、错误ref/显式字段、权限撤销、角色变化、远端/本地快照变化均不会误派发或静默选新事实。
  • 审计记录实际绑定;重复/迟到回调、队列配额/保存失败沿用既有机制,旧显式continuation及route/return不回退。
  • 补红绿、真实隔离Git/Runtime与回归;更新长期记忆、架构、API/OpenAPI(受影响部分)、canonical mirrors与changelog,不提高必读预算。

非目标

不放松settlement/provider target/配额/退出等闸;不自动close/rework已合PR或转人工;不混修 stale-snapshot@dispatch/inbox竞态;不改变#2327的拒绝无效语义决定与可靠反馈边界。

Activity

  1. self-assigned this
    on Nov 6, 2026
  2. added a commit that references this issue on Nov 6, 2026
    a595472
  3. zy95-12 commented on Nov 6, 2026

    @zy95-12
    CollaboratorAuthor

    Written-by: Codex

    Implemented and merged as PR #2563 into delivery/ai-centric-development-service, merge a59547226eb07f9bce96d8953f64bb7b0b657158. Fetched merged tree exactly matches tested head 248bf92f3 (tree 78a2292361a079ae3f9d309c5f33775751ed9ecc).

    All four acceptance items delivered: minimal start-next uses the observed validated snapshot; ambiguous choices remain explicit; changed facts/permissions/catalog retain strict refusal; actual execution binding is separately audited/readable through chief.state. Legacy explicit/route/return contracts retained. Memory, architecture, API/OpenAPI, decision/changelog and canonical mirrors updated without increasing mandatory context cap.

    Final-head root verification: 5197 passed, 0 failed/skipped including 8 actual DSH runtime checks. Affected coverage suite 269/0, Chief/budget94/0, API10/0; exact-head GitHub Test42148483272 Node24 and tests-ok passed. Coverage limitations are recorded in PR, not claimed100%. Four isolated real Git/Runtime Chief flow forms pass; this is not live vendor-model acceptance.

    Source delivery only: live service not restarted/deployed; OpenToday tasks, bindings, credentials and provider untouched. Context slimming and dispatch/inbox races remain outside this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions