Repository navigation
docs(amendment): map the first governed work-item transaction - #6316
Conversation
Signed-off-by: song <liusongstep@gmail.com>
songoow
left a comment
There was a problem hiding this comment.
Reviewer: model_agent | GPT-6 | OpenAI | self_reported
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机
需要让多个 Agent 在同一目标下安全补充工作的维护者,目前只能接纳变更提案,不能通过受治理的事务提交共享目标变化。若直接复用普通 Todo 创建命令,再另写 Goal revision,故障可能只留下新 Todo 或只留下版本变化;已有 acceptance 或 Todo 摘要也不足以证明完整根意图。这次把首个 Stage 3 操作、现有模块归属、原子提交范围和故障/同伴读回验收写成具体事务方案,供后续完整实现使用。本次仅变更原双语 RFC,不提供新提交 API、状态存储或激活权限,也不宣称 Stage 3 已实现。实际 root/policy、生命周期保护、原子 amendment commit、replan consumer、peer adoption 和打包交互仍需作为完整实现包交付。
改动思路
沿原 Goal amendment 边界定义一个具体 shared_work_graph 操作,复用 Todo planner、canonical projection、AuthorityStore CAS 与命令回执;不以存储机制替代领域权限,也不新建第二套 Goal 状态。当前边界是 §9.1 明确要求的可评审事务映射;随后实现必须贯通 root/policy 到 peer/产品读回,不能以单独 serializer、registry 或 receipt 作为 Stage 3 完成。固定 template 是首个可确定性校验的预授权策略,不是任意文本保持意图的证明;它可能不覆盖很多真实变更,因此普通 Todo 路径继续保留,acceptance/permission 扩展继续受原契约约束。owner 只在根策略上明确授权,不改成每项 routine proposal 都请求人工审批。
具体改动
完整评审 head 08fe5be8e5d2fdfa6986209c9cbe457851e6c94b,独立规范依据 docs/architecture/rfcs/shared-goal-alignment-and-governed-amendment-v0.md,修订 323c3053128e41e16df27e6b6498f83c37e81f5e。仅两份 RFC 的新 §9.2,+233/-0;没有其它源码、schema 或生成产物变化。
- §3.1:完整 root objective/non-goals/acceptance/permission/stop/policy 必须由准确 source Goal lifetime 拥有。不能从 acceptance contract、team receipt、Todo digest 或事件 sequence 推断,也不能绕过现有 source_session_v1 runtime gate。
- §4.2:首个 shared_work_graph 操作从 owner 固定 template 新建一个未认领 Agent Todo;proposer 不能编辑 protected field、claim/lease、审批/验证结果或 template revision。其它 operation 不获得隐式授权。
- §5:将已有
planCoordinationTodoCreate作为内层 planner,而不是嵌套已有独立提交函数。实际代码表明 planner 返回 planned record,而executeCoordinationTodoCreate自行 CAS;新方案要求 Todo、Goal basis、event 和 receipt 在外层同一次 canonical commit 发布。已提交 replay 与当前 projection 分别读取,不能重做业务效果。 - §5.1:request-derived proposal 保留完整 reservation、commit/abort 和 linkage 要求;未支持的 profile 必须拒绝 commit,不能删掉 source context 改称 direct proposal。
- §9.1 / §10:九行 owner 映射和六项实现验收覆盖 initialization、自动提交、非法/过期 scope、真实 commit 前后丢响应、精确 replan 结算、两个 peer 采纳和 packaged CLI/frontend。明确 canonical transaction 与 replan history/UI delivery/peer adoption 的跨 owner 边界,pending readback 不允许独立写 ACK 变绿。现有 leased work 只能按真实兼容 disposition 保留;需要取消/换 fence 的操作不伪装成 unaffected。
对主干的风险
这是具体设计提案,不会改变现有产品默认行为。主要设计风险是把单 store CAS 夸大成完整 Goal 权威、把一次 source read 当作生命周期 fence、或把已有测试当作未来 amendment 验收。新增文本逐项排除了这些替代;最终实现仍须实际证明缺失的 owner/consumer 路径,不能继承本评审为运行时资格。
已检查引用的实际 Todo planner/create、projection commit、CoordinationCommandReceipt、acceptance 与 lifecycle 代码,并对照原 §3.1/§4.2/§5/§5.1/§9.1/§10。既有 reviewed-create 的4项测试通过,其中2项使用真实 File/SQLite,另2项验证 wire refusal;PostgreSQL 用名称过滤未选择,不计为通过。既有命令 receipt 的14项机制测试通过,部分使用测试 store,不能证明新领域事务。文档治理、公开边界及11项预合入检查通过;没有新增测试来照抄设计预期,也没有真实模型、用户运行时或部署操作。
语义与 CI 对齐
保留原 schema/owner 与 staged scope。root policy 和生命周期权限必须真实存在;admission 仍 canonical_effect=none。新段落明确是拟议实现映射,未声称模板策略已经机器执行或 source_session profile 可运行。固定模板只约束此首个 amendment 操作,不扩大为所有 Todo 的手工配置要求。英文九行/六项与中文对应,公开输出没有私有 Goal/路径/证据。远端 CI 与维护者合并保持独立。
我的整体评价
APPROVE,作为既有 RFC 要求的明确前置方案。long_horizon preserved:没有运行时改动,方案保留同 operation 恢复、旧 writer fence 与 peer 基线约束;user_experience preserved:当前入口无变化,拟议流程要求一次 root policy 配置、常规提案自动提交及故障读回,仍须实现验证。它没有将更大的 Goal 完成度缩成文档完成度。相邻整理是把现有 planner 与 commit 的归属分清、将完整实现包集中到同一方案;未新增 speculative production builder。实际实现及其完整产品验收是下一项交付,不要求重复获得普通编码授权。
English verdict: APPROVE - 08fe5be. The bilingual proposal supplies the transaction mapping required before the first bounded Stage 3 implementation, preserving lifecycle, atomic-effect, receipt, replan and peer-readback boundaries. Docs/public checks and 11 premerge checks passed; 18 existing mechanism tests are characterization only. No runtime amendment or activation is delivered.
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · xhigh
动机
需要多个 Agent 在共享目标下补充工作的维护者。 当前只能接纳共享变更提案;直接先建 Todo、再改 Goal revision,失败时可能留下半个事务,现有 acceptance/source digest 也不足以代表完整根意图。 本 PR 明确第一个有用实现包的事务映射:预授权固定模板新建未认领工作项,随后必须完成原子提交、同身份恢复、精确 replan 与 peer/产品读回。 本轮仅评审双语设计前置,不交付 runtime commit、策略初始化、profile 激活或 Stage 3 完成。 完整 intent/policy、lifetime fence、amendment commit、replan consumer、peer adoption 和打包旅程仍待同一后续实现包资格化。
改动思路
复用既有 Todo planner、canonical projection/CAS/receipt 与 lifecycle、replan、peer owner;不能嵌套两次独立写入,也不能以存储 revision 代替完整 intent authority。 当前 PR 完成既有 §9.1 要求的可评审事务方案;下一实现包应从 owner root/policy 到 peer 与打包读回完整交付,普通 Todo writer 保留。
独立规范依据为变更前 docs/architecture/rfcs/shared-goal-alignment-and-governed-amendment-v0.md,冻结修订 3af55c6461aa7d24118b62e515050bdae8768025。核对 3.1 Canonical intent envelope、4.2 Amendment classes、5. Amendment lifecycle: how a proposal becomes effective、5.1 Source-request reservation and cancellation ordering、9.1 Semantic handoff and execution-route integration 及 10. Staged delivery。原 §9.1 要求真实 intent/policy 与独立评审事务映射后才实施首个 Stage 3 class;新增 §9.2 是落实此设计前置,不用改后的规范自证 runtime 合格。当前 roadmap R1/R4/S3 的完整 intent/commit 缺口保留。
具体改动
精确 head 08fe5be8e5d2fdfa6986209c9cbe457851e6c94b;全 PR 只有英文 RFC +131、中文镜像 +102,共 +233/-0,无生产代码、测试、配置或自动载入 skill 变化。作者同 head 的 COMMENTED self-review 已完整读取;它不替代此次独立判定。
新 §9.2 的首个 shared_work_graph 操作只从 owner 一次预授权的固定 template 创建未认领 Agent Todo。proposer 只选择模板和 causal/operation 身份,不能换正文、scope、capability、recipient、claim/lease、approval/validation outcome 或 template revision;不是任意自然语言保持 intent 的分类器,也不要求预写所有普通 Todo。
根/策略必须包含原 §3.1 完整 envelope,绑定准确 source Goal lifetime、revision 与 writer/retirement fence;初始化归 trusted owner,不从 acceptance、team receipt、Todo digest、event sequence 或 Markdown 自动构造完整根权威。现有 source_session_v1 generic gate 继续拒绝未支持 owner,不因设计文本自动授予 business effect。
九行 owner 映射覆盖 root/policy、proposal、source/actor、Todo planning、既有 work/lease、canonical effect、replan、peer projection 与 CLI/packaged result。实际源码 todo_create.ts:163 的 planCoordinationTodoCreate 返回计划;executeCoordinationTodoCreate / commitCreate 自己提交。方案要求复用前者,单一外层 CAS 原子发布 Todo、Goal basis、event 和 immutable receipt,保留 semantic duplicate 规则;拒绝 standalone Todo commit 后另写 Goal 的半完成方式。
CoordinationCommandReceipt 原 identity/receipt recovery 与 current projection 分开;已有提案 reducer 明确 canonical_effect=none。新文本没有把这些现成机制当成已实现 amendment:跨 owner 的 replan history、UI delivery 和 peer adoption 必须独立消费真实 canonical receipt;未消费保持 pending/hold,不能重做 Todo 或补 ACK 变绿。request-derived 路径完整保留 §5.1 的 reservation、commit/abort 竞争和 request linkage,不允许去掉 source context 伪装 direct proposal。
六项后续验收贯通 root/policy 操作、自动模板提交、非法/stale/refusal、真实 commit 前后丢响应和原 operation 恢复、两个 peer 的实际 adoption 与 claim/lease,以及 packaged reload/读回。既有 lease 留原值并明确 unaffected,需取消/fence rotation 的操作不属于此模板。关闭入口不删除历史根/receipt/fence;Lark、改变 PG 共享 authority 时的真实 server suite及 Stage 4/5/G1 仍独立。
对主干的风险
最强设计反例是“一个 provider CAS 成功便声称跨 owner 全部完成”,或旧 proposal 被重新标为 current intent。逐条映射后,双语均明确 atomic settlement fact 与 consumer delivery/adoption 分属不同 owner,要求原 receipt 恢复、stale semantic write rebase/refuse,历史 replay 不重打当前状态。正向旅程是 owner 一次配置 → regular proposer 自动提交 → unclaimed Todo/receipt → 原失败恢复 → 两 peer 与产品读回;负向是缺 root/lifetime、protected template、stale revision或不兼容 lease,拒绝而无关工作继续。这里是未来验收设计走读,未执行未来 API 或修改活动 Goal。
独立本地 native premerge 3 direct +11 selected 全部通过,含文档治理和公开边界。另运行未改变的 reviewed-create 4 项(真实 File/SQLite + 两 wire refusal)和 receipt 14 项机制刻画;PG 通过名称筛选未选择,不能计为通过,也不是本 docs-only PR 的真实 PG refactor 要求。四份引用 owner 在 frozen base/head 字节相同,断言重用可审查,不继承作者测试结果或 runtime verdict。没有新增镜像实现的测试,没有当前 UI首屏或权限默认变化;未查询/等待 CI。现有签名/receipt 测试只能证明已存在机制,不证明未来新事务、完整 intent 或 peer 协作已经成立。
我的整体评价
APPROVE,作为明确命名的设计前置,无阻断发现。复用既有 Todo planner、canonical projection/CAS/receipt 与 lifecycle、replan、peer owner;不能嵌套两次独立写入,也不能以存储 revision 代替完整 intent authority。 当前 PR 完成既有 §9.1 要求的可评审事务方案;下一实现包应从 owner root/policy 到 peer 与打包读回完整交付,普通 Todo writer 保留。 保留现有使用旅程,不在普通调用中添加强制模板或重复 owner 审批;拟议验收强调实用结果而不是 serializer/receipt 数量。相邻结构整理把 planner、effect、recovery 与 consumer 清楚分开,无未使用的生产框架。固定模板的覆盖范围有意有限;后续实现须重新资格化,不能把本评审当 Stage 3、经理验收或合并/激活许可。
English verdict: APPROVE - 08fe5be; the bilingual proposal supplies the pre-existing §9.1 transaction-design prerequisite without claiming runtime amendment or authority activation. Whole-document/spec and owner-reference review, 3 direct/11 selected checks and 18 existing mechanism characterizations pass; actual intent, commit, replan, peer adoption and packaged delivery remain future qualification.
Shared Goal amendments currently stop at proposal admission. The accepted RFC requires a full intent/policy basis and reviewed transaction mapping before its first governed commit, but the concrete mapping to current owners was missing.
Add a matching English/Chinese §9.2 proposal for one
shared_work_graphoperation: create an unclaimed Agent Todo from an owner-preauthorized fixed template. It maps full root intent and exact lifetime, proposal/basis checks, existing Todo planning, one canonical CAS/receipt, explicit lease disposition, receipt-backed replan settlement and peer/product readback. It prohibits nested standalone Todo commits, fabricated intent from acceptance/source digests, source-context stripping and treating cross-owner projection delivery as atomic.The implementation package must include the real owner/policy→commit→response-loss recovery→replan/peer adoption→packaged CLI/frontend journey. This is a concrete design prerequisite; no runtime builder, writer, profile activation or Stage 3 completion is claimed. Ordinary Todo creation remains unchanged; request-derived commits retain all existing §5.1 reservation/abort obligations. Fixed templates are a deliberately bounded first policy, not a proof that arbitrary prose preserves intent.
Validation: both mirrors and source-owner references reviewed; docs governance/public-boundary checks and 11 premerge checks pass. Four existing reviewed-create checks (real File/SQLite plus wire refusal) and 14 existing receipt tests pass. PostgreSQL was not selected in this docs-only characterization; these results qualify the reused mechanics only, not future amendment semantics.
Refs #3836. Root/policy authority, actual commit, replan consumers and peer/product acceptance remain unimplemented.