Repository navigation
Define the verifier Hook co-design contract - #9262
Conversation
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · Gemini · Google DeepMind · self_reported
动机 / Motivation
在长程求解任务中,控制面与宿主维护者在启用多轮探索与独立验收时,往往只能在粗糙的 Stop-Hook 兜底验证与同步逐工具拦截之间二选一;缺乏跨宿主的四边界验证 Hook 协同契约,也缺乏“子作用域须经独立 Oracle 回执且满足低重叠后才折叠”的 VerifiedClose 约束,因此本 PR 试图把验证接入收敛到既有 C1 与历史上下文边界之下。
如果不做任何改动,外部宿主(如 Codex、Claude Code、DSH、Antigravity)上的验证探测、子作用域折叠以及领域快尺(yardstick)试跑仍各自依赖局部协议或散落脚本,既难对齐能力协商档位,也容易让未验证的代理结果或跨作用域回执污染主干上下文。
- 受影响对象(affected_caller_or_operator): 接入宿主 Hook 生命周期(启动、里程碑、压缩/子作用域与停止边界)并消费独立验收回执的 LoopX 控制面、宿主适配器与实验评估维护者。
- 前后对比场景(before_after_scenario): 改动前,不同宿主各自实现启动上下文恢复、里程碑采样、压缩后恢复与停止验收,子工作折叠与快尺试跑缺少统一的不变式边界;理想改进是先建立双语架构提案再沿真实拥有者接线,而当前 PR 在没有任何生产调用方的情况下提前向控制面运行时放入未接线的 TypeScript 契约文件,且新增 RFC 头部未满足仓库治理检查,导致主干
docs-governance-smoke.py与generate_rfc_status_index.py --check从基线通过退化为失败。 - 可观测结果(observable_outcome): 文档侧新增了四边界能力协商(L0–L2)、
VerifiedClose(FoldToReceipt/KeepRaw)及领域插件试跑的中文/英文双语提案;代码侧新增了纯内存/纯类型的verifier_hook_contract.ts及其 3 条单元测试,但尚未接入任何生产入口(turn_driver、progressive_context.ts、goal_capability_organization.ts或宿主插件),同时recommendVerifiedClose在空身份与空引用输入下仍会误返回FoldToReceipt。 - 非目标(non_goals): 本次变更不改变
C1准入、传输或结算所有权,不实现具体宿主适配器(Codex、DSH、Claude Code、Antigravity)运行时代码,不启用新默认开关,也不开展跨宿主或同宿主模型效果/缓存对照实验。
改动思路 / Approach
从控制面所有权看,本 PR 提出了一个跨宿主验证 Hook 协商与子作用域验证折叠的设计方案:策略默认关闭(enabled !== true 返回 null),启用后按宿主实际观测能力协商 L0 / L1 / L2,并坚持 pre_tool_use 默认关闭、只有策略显式开启且宿主观测到对应能力时才激活;在子作用域结束时,由 recommendVerifiedClose 比对外部 Oracle 回执的六元组身份与 verdict、open_obligations、overlap,决定 FoldToReceipt 或 KeepRaw。
然而从架构与比例性(architecture_assessment)角度拆解现有机制,本次提交把“尚未落地的 RFC 设计”与“过早进入生产目录的未接线 TypeScript 源码”混在了同一个 PR 中:verifier_hook_contract.ts 的两个纯函数与 12 个仅作类型声明的导出没有任何生产调用方,FoldToReceipt / KeepRaw 脱离了既有的上下文策略拥有者 progressive_context.ts 与 context_delivery.ts,DomainPluginTrial 则与既有的能力组合/改进规划拥有者 goal_capability_organization.ts 平行另立一套阶段类型,且边界函数缺少仓库通行的 runtime_decode 非空校验;当前 PR 应先修正 RFC 治理头与索引、移除尚未接线的生产 .ts 雏形(或完整接到真实调用链并修复校验与所有权归属),不应把无调用方的孤立契约代码合入 loopx/control_plane/turn_driver/。 当前 PR 边界(current_pr_boundary):仅建议保留且修全双语 RFC 设计与目录索引,或将代码切片收口为带真实调用方和边界解码的最小端到端变更;在未完成接线与验证前,宿主适配器接入、真实缓存收益测量和生产开关均保留在后续切片。
与既有实现对比,仓库在 loopx/control_plane/quota/progressive_context.ts 与 docs/architecture/rfcs/history-working-set-context-policy-v0.md §5.1 中已明确将 KeepRaw / FoldToReceipt / EpochReset 归属为共享 TypeScript 投影拥有者;在 loopx/control_plane/capabilities/goal_capability_organization.ts 中已实现 goal_capability_improvement_plan_v0 及 planCapabilityImprovement 试跑—反馈—回滚追踪;在 loopx/control_plane/work_items/yardstick_decision.ts 中已实现 WorkYardstickProfile 与 proxy_order_reversed 判定;在 loopx/control_plane/capability_hooks.ts 与 post_writeback_hook_transaction.ts 中已有标准 Hook 注册与事务边界。本 PR 仅复用导入了 WorkYardstickProfile 一个类型,其余均处于未接线状态。
| 提案边界 | RFC 设计职责 | 本 PR 代码覆盖现状 | 既有所属拥有者 |
|---|---|---|---|
| Start / resume | 在真实恢复/换阶段交付有界求解视图 | 仅类型 VerifierHookEvent(无实现) |
progressive_context.ts / turn_start Hook |
| Milestone probe | 异步采样并回传平台期/快尺反转 | 仅联合类型 VerifierTransition(无实现) |
yardstick_decision.ts / stride_policy.ts |
| Compaction / subscope | 独立 Oracle 回执门控 FoldToReceipt / KeepRaw |
纯函数 recommendVerifiedClose(无调用方) |
history-working-set-context-policy-v0.md §5.1 (progressive_context.ts) |
| Stop / Domain plugin | 独立 Oracle 验收及内容寻址试跑准入 |
DomainPluginCandidate/DomainPluginTrial 仅类型(无调用方) |
settlement.ts / goal_capability_organization.ts |
具体改动 / Changes
本次精确审查头 8a6fa6c68ea8745325b615e668fb5caa26811295 相对 origin/main(d38052695c2c8a2e67cdb2c1eb6f4c6651eabd4d)共新增/修改 5 个文件(+331 / -0):
- 文档与索引(3 个文件,+116/-0): 新增
docs/architecture/rfcs/verifier-hook-co-design-v0.md(57 行)和中文镜像docs/architecture/rfcs/verifier-hook-co-design-v0.zh-CN.md(57 行),并在docs/architecture/rfcs/README.md第 204–205 行添加条目链接;但未运行scripts/generate_rfc_status_index.py --write更新STATUS.md/STATUS.zh-CN.md。 - 控制面 TypeScript 源码(1 个文件,+142/-0): 新增
loopx/control_plane/turn_driver/verifier_hook_contract.ts。 - TypeScript 单测(1 个文件,+73/-0): 新增
tests/control_plane_ts/verifier_hook_contract.test.ts,也是全仓唯一导入verifier_hook_contract.ts的文件。
关键代码讲解
negotiateVerifierHooks(loopx/control_plane/turn_driver/verifier_hook_contract.ts#L19-L32): 读取VerifierHookPolicy与可选HarnessVerifierCapabilities。当policy.enabled !== true时返回null;当启用后,仅当session_lineage === true && boundary_context === true时进入L1,并在同时满足milestone_observation && isolated_subscope && verified_return全为true时升级为L2,否则退化为L0;pre_tool_use仅在策略与宿主观测能力双双显式为true时才返回true。当前无生产调用方,也未做运行时对象解码校验。recommendVerifiedClose(loopx/control_plane/turn_driver/verifier_hook_contract.ts#L101-L128): 根据VerifiedCloseRequest与调用方注入的readVerifierReceipt读取回执。先比对receipt?.identity的 6 个字段与request.identity是否逐一全等,不匹配或缺失则返回KeepRaw;receipt.verdict === "failed"时返回带counterexample_ref的KeepRaw;仅当verdict === "passed"、open_obligations === false且overlap === "low"时返回FoldToReceipt。缺陷在于只做全等比较而不校验身份或引用是否非空/合法,空字符串也能通过折叠条件。VerifierTransition与VerifierHookEvent(loopx/control_plane/turn_driver/verifier_hook_contract.ts#L48-L65): 定义了completion_claim、yardstick_plateau_or_regression、proxy_order_reversed和protected_boundary_touch四类转移与四边界事件结构,但VerifierHookEvent仅在boundary === "stop"分支引用了completion_claim,其余三类转移与VerifierSolverView在当前分支没有任何生产者或消费者。DomainPluginCandidate与DomainPluginTrial(loopx/control_plane/turn_driver/verifier_hook_contract.ts#L130-L142): 声明了yardstick/diagnostic_probe/verification_recipe候选产物及staging/trial/adopted/retired四态联合类型,但未绑定verifier_version或作用域,也没有关联或复用既有拥有者goal_capability_organization.ts。
规范基线映射(spec_basis)
依据基线 d38052695c2c8a2e67cdb2c1eb6f4c6651eabd4d 上的规范入口 docs/architecture/rfcs/README.md(以及其引用的 docs/development/README.md Scope-Fit Review 与 history-working-set-context-policy-v0.md §5.1)逐项映射当前 HEAD:
RFC-INDEX-HEADER->not_met:docs/architecture/rfcs/README.md要求合入 RFC 使用Accepted生命周期值、声明Supersedes / closes、携带semantic mirror/语义镜像互链并通过generate_rfc_status_index.py --write同步STATUS.md;当前 HEAD 使用Proposed、缺少Supersedes / closes与semantic mirror/语义镜像字样且未更新状态索引,README.md新条目亦缺少Delivery on main/Current boundary说明。RFC-BILINGUAL-PAIR->implemented:docs/architecture/rfcs/README.md要求英文与中文镜像在同一 PR 成对变更并通过scripts/check_rfc_bilingual.py --base origin/main --head HEAD(本地实测 PASS)。RFC-MATURITY-SEPARATION->not_met:docs/architecture/rfcs/README.md要求严格区分设计提案与已实现边界(且docs/development/README.md要求新增控制面模块必须有真实生产调用方并复用既有拥有者);本 PR 将无生产调用方的 TypeScript 模块放入loopx/control_plane/turn_driver/并在 RFC 头部标注Delivery maturity: TypeScript contract,同时未接入history-working-set-context-policy-v0.md§5.1 的progressive_context.ts拥有者。
对主干的风险 / Risks
阻塞发现(Findings)
-
[P1 · 阻塞] RFC 生命周期头、镜像声明与派生索引破坏仓库文档治理检查
- Problem: 新增 RFC 头部违反了仓库 RFC 索引与双语治理规范,导致基线原本通过的门禁脚本在 HEAD 上直接失败。
- Evidence: 在同一本地环境对比基线
d38052695c2c8a2e67cdb2c1eb6f4c6651eabd4d与 HEAD8a6fa6c68ea8745325b615e668fb5caa26811295:基线运行scripts/generate_rfc_status_index.py --check和examples/docs-governance-smoke.py均退出 0(docs-governance-smoke ok);HEAD 上generate_rfc_status_index.py --check退出 1,报错verifier-hook-co-design-v0.md: status 'Proposed' does not begin with a lifecycle state (Accepted, Superseded, Retired, Rejected)及missing '**Supersedes / closes:**' declaration;examples/docs-governance-smoke.py在check_rfc_language_mirrors()第 202 行因缺少"semantic mirror"抛出AssertionError: verifier-hook-co-design-v0.md(且中文镜像第 203 行同样缺少"语义镜像")。此外docs/architecture/rfcs/README.md第 204–205 行缺少同级条目均有的Delivery on main与Current boundary描述。 - Impact: 合入主干后
examples/docs-governance-smoke.py与scripts/generate_rfc_status_index.py --check会持续红灯,影响所有后续 RFC 与文档治理门禁。 - Fix: 在
verifier-hook-co-design-v0.md与.zh-CN.md头部将RFC status改为Accepted/已接受(保留Delivery maturity: Proposal描述当前无运行时实现),补齐**Supersedes / closes:** none与**替代 / 关闭:** 无,补充semantic mirror/语义镜像互链声明,运行uv run --extra test python scripts/generate_rfc_status_index.py --write更新STATUS.md与STATUS.zh-CN.md,并在docs/architecture/rfcs/README.md补全Delivery on main与Current boundary说明,最后重跑scripts/generate_rfc_status_index.py --check与examples/docs-governance-smoke.py。
-
[P1 · 阻塞] 生产目录新增未接线的
verifier_hook_contract.ts违反scope_fit与所有权边界- Problem:
loopx/control_plane/turn_driver/verifier_hook_contract.ts仅被自身单测导入,全仓没有任何生产调用方,且在错误的模块边界平行定义了已被既有模块拥有的语义。 - Evidence: 全仓搜索确认
loopx/、packages/、apps/、scripts/中对verifier_hook_contract.ts、negotiateVerifierHooks、recommendVerifiedClose、DomainPluginTrial的生产引用数为 0;14 个导出中 12 个为纯编译期 TypeScript 类型,PR 描述亦自述“TypeScript seam is a contract proposal”。同时FoldToReceipt/KeepRaw的所有者在history-working-set-context-policy-v0.md§5.1(progressive_context.ts+context_delivery.ts),领域能力试跑与采纳/退役的所有者在goal_capability_organization.ts(goal_capability_improvement_plan_v0)。 - Impact: 在没有真实宿主适配器或投影消费者验证前过早冻结生产 TS 类型与不完整状态机,违反
docs/development/README.mdScope-Fit Review(无真实调用方的设计应保留在文档中)与change_proportionality,增加后续迁移与兼容性负担。 - Fix: 最简修复是把本 PR 收敛为纯双语 RFC 提案(移除未接线的
verifier_hook_contract.ts与verifier_hook_contract.test.ts,必要示例接口内嵌于 RFC 正文);若需保留代码,则必须移除孤立的DomainPluginTrial等平行类型,将其对接至少一个真实生产入口(如progressive_context.ts或宿主能力协商读回)并配合runtime_decode.ts完成端到端验证。
- Problem:
-
[P1 · 阻塞]
recommendVerifiedClose缺少非空身份与引用校验,空字段可触发FoldToReceipt- Problem:
loopx/control_plane/turn_driver/verifier_hook_contract.ts第 101–128 行的recommendVerifiedClose仅做字符串全等比对,不校验核心绑定标识与引用是否非空、有效。 - Evidence: 在本地使用
node --no-warnings --experimental-strip-types直接运行反例探测:向recommendVerifiedClose传入全空VerifiedScopeIdentity(goal_id: "",todo_id: "",parent_epoch_ref: "",child_scope_ref: "",candidate_sha: "",verifier_version: "")与空receipt_ref: ""、oracle_evidence_ref: ""、source_ref: ""、summary_ref: "",在verdict: "passed"、overlap: "low"、open_obligations: false下函数返回{"action":"FoldToReceipt","receipt_ref":"","source_ref":"","summary_ref":""}。同样,negotiateVerifierHooks与recommendVerifiedClose均未使用控制面通行的runtime_decode.ts(requireJsonObject、requireNonEmptyString、isExploreEvidenceRef)进行边界解码。 - Impact: 一旦未加额外校验的桥接或宿主回执返回空身份/空引用,就会越过
KeepRaw保护生成指向空source_ref/summary_ref的折叠建议,破坏可追溯性。 - Fix: 若保留代码实现切片,必须通过
runtime_decode.ts强制校验非空VerifiedScopeIdentity、非空receipt_ref/oracle_evidence_ref/source_ref/summary_ref(及failed下的非空counterexample_ref),令空值/空白串快速失败或保持KeepRaw,并补齐负向单测;若采纳 Findings 2 的纯 RFC 方案移除.ts文件,此问题一并消除。
- Problem:
边界隔离与权限语义检查
- 默认关闭隔离(
default_off_isolation):negotiateVerifierHooks({ enabled: false, pre_tool_use: true }, l2)返回null,且生产代码无任何调用点导入verifier_hook_contract.ts,既有默认执行、上下文编码与结算行为保持未变(相关既有 TS 测试 87 条均通过)。但需指出生产侧尚未实现与 Goal 配置绑定的权威开关。 - 权限与生命周期命名(
authority_semantics):DomainPluginTrial暴露adopted/retired阶段且 RFC 将Delivery maturity标为TypeScript contract,在没有任何运行时事务、权限门控或goal_capability_organization.ts接入的情况下,命名与成熟度标签高于当前代码实际提供的生命周期能力。
语义与 CI 对齐
- 语义词表扫描边界:
scripts/generate_semantic_inventory.py --changed-from origin/main报告supported candidates: 0,examples/semantic-vocabulary-drift-smoke.py通过(29/29 词表、56/56 拥有者符号均通过)。但该工具仅扫描 PythonEnum/Literal/命名集合与 TypeScriptas const数组;verifier_hook_contract.ts使用内联 TS 字符串联合类型(如"L0" | "L1" | "L2"、"KeepRaw" | "FoldToReceipt"、"staging" | "trial" | "adopted" | "retired"),未纳入 AST 自动化发现,而这些字面量在语义上分别与既有上下文策略及能力组合生命周期重叠,接入生产前须统一到既有词表或显式评审登记。 - CI 阻断项实测: 本 PR 修改了
docs/architecture/rfcs/,虽然scripts/check_rfc_bilingual.py --base origin/main --head HEAD通过,且canary premerge选择的 15 项检查全部通过(返回quality_receipt_missing,因尚未记录精确 diff 的 change-quality 回执),但canary premerge未自动触发examples/docs-governance-smoke.py与scripts/generate_rfc_status_index.py --check,而这两项在 HEAD 上均实测FAIL(基线origin/main均PASS)。
本地验证汇总(精确头 8a6fa6c68ea8745325b615e668fb5caa26811295,wait_for_ci: false)
npm run typecheck:control-plane:PASSnode --no-warnings --experimental-sqlite --experimental-strip-types --test tests/control_plane_ts/verifier_hook_contract.test.ts:PASS(3/3)- 关联 TS 回归套件(
yardstick_decision.test.ts、post_writeback_hook_transaction.test.ts、context_delivery.test.ts、progressive_context.test.ts、verifier_hook_contract.test.ts):PASS(90/90) uv run --extra test python scripts/check_rfc_bilingual.py --base origin/main --head HEAD:PASSuv run --extra test python examples/semantic-vocabulary-drift-smoke.py:PASSuv run --extra test python -m ruff check tests/control_plane_ts loopx/control_plane/turn_driver docs/architecture/rfcs:PASSuv run --extra test python -m mypy:PASS(17 source files)uv run --extra test loopx check --scan-path ...(5 个改动文件公开边界扫描):PASS(0 errors)uv run --extra test python -m pytest -q tests/canary/test_rfc_bilingual.py tests/architecture/test_rfc_status_index.py tests/architecture/test_contributor_task_board.py:PASS(55 passed;注:test_rfc_status_index.py使用临时夹具而非仓库实时索引)uv run --extra test python -m pytest -q tests/architecture/test_top_level_module_budget.py tests/architecture/test_control_plane_import_boundaries.py tests/architecture/test_content_digest_single_owner.py tests/architecture/test_semantic_vocabulary_drift.py:PASS(405 passed)uv run --extra test loopx canary premerge --from-git-diff --git-diff-base origin/main:直接检查 4/4、catalog canaries 6/6、risk profile smokes 8/8、公开边界 1/1 PASS;总状态因精确 diff 缺少change-quality回执返回quality_receipt_missing(退出码 1)uv run --extra test python scripts/generate_rfc_status_index.py --check:FAIL(HEAD 退出码 1;基线d38052695c退出码 0)uv run --extra test python examples/docs-governance-smoke.py:FAIL(HEADAssertionError: verifier-hook-co-design-v0.md;基线d38052695c退出码 0)- 反例探测(
recommendVerifiedClose传入全空VerifiedScopeIdentity与空引用):FAIL(误返回FoldToReceipt)
我的整体评价 / Verdict
综合精确头 8a6fa6c68ea8745325b615e668fb5caa26811295 的设计与验证证据,PR 提出的四边界 Hook 协商与独立回执门控方向本身贴合控制面演进,但当前交付切片存在治理门禁退化与生产代码未接线问题,不能合入,建议 REQUEST_CHANGES。
- 长程与用户体验影响(
outcome_impact):long_horizon为not_yet_proven(verifier_hook_contract.ts未接入任何运行时/Turn 驱动或上下文投影入口,且recommendVerifiedClose允许空身份折叠,尚无法证明真实长程任务下的端到端成本与验收增益);user_experience为not_applicable,且visual_review为not_applicable(本次审查覆盖docs/architecture/rfcs/...、loopx/control_plane/turn_driver/verifier_hook_contract.ts与tests/control_plane_ts/verifier_hook_contract.test.ts,未改动任何前端、Dashboard、Chat 或 CLI 渲染界面,无 UI 截屏范围未验证项)。 - 可观测语义与代码体积(
observable_semantics/code_volume/change_proportionality): 现有主干运行时行为虽未被未接线代码改变,但仓库文档治理语义已从基线d38052695c的 PASS 退化为 FAIL,且recommendVerifiedClose在空字段反例下存在折叠绕过,因此可观测语义为not_yet_proven。142 行.ts代码与 73 行测试在当前无任何生产调用方、无宿主适配器、无runtime_decode防护的条件下属于过早固化(partly_avoidable/simplify_now/disproportionate),其中compatibility_assessment为not_applicable(纯新增未调用文件,不涉及历史持久化格式迁移)。 - 词表归属(
semantic_alignment): 新增状态值目前为仅存在于未调用 TS 文件中的local_only联合类型(AST 词表脚本未覆盖 TS 内联联合,暂未在vocabulary_v0.json注册),但在概念上与既有KeepRaw/FoldToReceipt(history-working-set-context-policy-v0.md)及goal_capability_organization.ts重叠,后续正式接线时须统一归口既有拥有者并补齐登记。 - 复审与合入所需证据: (1) 修复 RFC 状态头(
Accepted、Supersedes / closes、semantic mirror/语义镜像)、更新STATUS.md/STATUS.zh-CN.md并在docs/architecture/rfcs/README.md补充Delivery on main/Current boundary,确保scripts/generate_rfc_status_index.py --check与examples/docs-governance-smoke.py实测通过;(2) 移除尚未接线的verifier_hook_contract.ts与其单测使本 PR 成为自洽的设计 RFC,或者将其接入至少一个真实生产调用方、复用progressive_context.ts/goal_capability_organization.ts既有边界、补齐runtime_decode.ts非空身份/引用校验并新增负向单测;(3) 补齐精确 diff 的canary premerge与公开边界验证。 - 声明与新鲜度: 本评审在绑定信息不可用(
session_not_bound)的情况下以self_reported声明模型身份;未等待也未查询远端 GitHub Actions CI(wait_for_ci: false)。当前结果仅对应精确提交8a6fa6c68ea8745325b615e668fb5caa26811295。
英文简短结论:
English verdict: REQUEST_CHANGES at head 8a6fa6c. Blocking findings: (1) RFC metadata breaks scripts/generate_rfc_status_index.py --check and examples/docs-governance-smoke.py (Proposed status, missing Supersedes/closes, missing semantic-mirror links, and stale STATUS.md); (2) loopx/control_plane/turn_driver/verifier_hook_contract.ts has zero production callers (scope_fit/proportionality gap) and duplicates/splits ownership from progressive_context.ts and goal_capability_organization.ts; (3) recommendVerifiedClose accepts empty identity and reference strings to return FoldToReceipt. Local verification: npm run typecheck:control-plane, verifier_hook_contract.test.ts (3/3), semantic-vocabulary-drift-smoke.py, check_rfc_bilingual.py, ruff, mypy, loopx check, and canary premerge checks (15/15; change-quality receipt missing) passed; generate_rfc_status_index.py --check and docs-governance-smoke.py failed against a passing origin/main baseline.
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · Gemini · Google DeepMind · self_reported
动机 / Motivation
在长程求解任务中,控制面与宿主维护者在启用多轮探索与独立验收时,往往只能在粗糙的 Stop-Hook 兜底验证与同步逐工具拦截之间二选一;缺乏跨宿主的四边界验证 Hook 协同契约,也缺乏“子作用域须经独立 Oracle 回执且满足低重叠后才折叠”的 VerifiedClose 约束,因此本 PR 试图把验证接入收敛到既有 C1 与历史上下文边界之下。
如果不做任何改动,外部宿主(如 Codex、Claude Code、DSH、Antigravity)上的验证探测、子作用域折叠以及领域快尺(yardstick)试跑仍各自依赖局部协议或散落脚本,既难对齐能力协商档位,也容易让未验证的代理结果或跨作用域回执污染主干上下文。
- 受影响对象(affected_caller_or_operator): 接入宿主 Hook 生命周期(启动、里程碑、压缩/子作用域与停止边界)并消费独立验收回执的 LoopX 控制面、宿主适配器与实验评估维护者。
- 前后对比场景(before_after_scenario): 改动前,不同宿主各自实现启动上下文恢复、里程碑采样、压缩后恢复与停止验收,子工作折叠与快尺试跑缺少统一的不变式边界;理想改进是先建立双语架构提案再沿真实拥有者接线,而当前 PR 在最新精确头
1b6514a6c1773855dcb1a0f921f62f899e6dd63a上虽已将VerifiedClose补强为经VerifiedCloseReader校验引用非空且可读,但仍缺少对VerifiedScopeIdentity六元组身份非空的校验,且依然在没有任何生产调用方的情况下于控制面保留未接线的 TypeScript 契约文件与仅作类型声明的QuotaGoalBoundaryReference,同时新增 RFC 头部未满足仓库治理检查,导致主干docs-governance-smoke.py与generate_rfc_status_index.py --check持续从基线通过退化为失败。 - 可观测结果(observable_outcome): 相对上一轮评审头
8a6fa6c68ea8745325b615e668fb5caa26811295,最新头1b6514a6c1773855dcb1a0f921f62f899e6dd63a补充了VerifiedCloseReader可读性与引用非空校验(单测增至 5/5 通过)及turn_envelope.ts中的QuotaGoalBoundaryReference类型定义;但全仓生产代码对verifier_hook_contract.ts与QuotaGoalBoundaryReference仍无任何运行时调用方,recommendVerifiedClose在全空或空白VerifiedScopeIdentity配合可读引用时仍返回FoldToReceipt,且两个 RFC 治理门禁在当前精确头上依旧失败。 - 非目标(non_goals): 本次变更不改变
C1准入、传输或结算所有权,不实现具体宿主适配器(Codex、DSH、Claude Code、Antigravity)运行时代码,不启用新默认开关,也不开展跨宿主或同宿主模型效果/缓存对照实验。
改动思路 / Approach
本次对精确头 1b6514a6c1773855dcb1a0f921f62f899e6dd63a 执行全包独立复审(rereview_pull_request_exact_head),先区分上一轮(审查 6011637514、8a6fa6c68ea8745325b615e668fb5caa26811295)后的局部修复,再按整包标准裁决当前合并可行性。
从控制面所有权看,本 PR 提出了一个跨宿主验证 Hook 协商与子作用域验证折叠方案:策略默认关闭(enabled !== true 返回 null),启用后按宿主实际观测能力协商 L0 / L1 / L2,并坚持 pre_tool_use 默认关闭;在子作用域结束时,最新改动通过 VerifiedCloseReader(readReceipt + canReadEvidence)和 hasReference() 检查 request.receipt_ref、receipt.oracle_evidence_ref、receipt.source_ref、receipt.summary_ref(以及 failed 路径下的 counterexample_ref)均非空白且可读,否则回退 KeepRaw;此外在 loopx/control_plane/quota/turn_envelope.ts 新增 QuotaGoalBoundaryReference 类型以呼应启动与恢复共用 C1 /goal_boundary 指针的设计约束。
然而从架构与比例性(architecture_assessment)角度重新审视当前精确头,8a6fa6c68e -> 1b6514a6c1 的增补并未消除结构性所有权与接入边界问题:verifier_hook_contract.ts 及其新加入 turn_envelope.ts 的 QuotaGoalBoundaryReference 均没有任何生产运行时调用方,recommendVerifiedClose 对 VerifiedScopeIdentity 仍缺少 hasReference 或 runtime_decode 非空约束(空或空白身份配合可读引用仍返回 FoldToReceipt),FoldToReceipt / KeepRaw 继续脱离既有上下文策略拥有者 progressive_context.ts 与 context_delivery.ts,DomainPluginTrial 继续与 goal_capability_organization.ts 平行定义阶段类型,且 RFC 生命周期头与索引门禁尚未修复;当前 PR 仍应先修正 RFC 治理头与索引、移除未接线的生产 TypeScript 契约文件(或将其真正接入 progressive_context.ts / 宿主边界并补齐身份非空与解码校验),不应把无运行时调用方的孤立契约代码合入主干。 当前 PR 边界(current_pr_boundary):仅建议保留并修全双语 RFC 设计与目录索引,或将代码切片收口为带真实生产调用方、统一拥有者与完整身份/引用解码校验的最小端到端变更;在未完成上述收口与治理修复前,宿主适配器接入、真实缓存收益测量和生产开关均保留在后续切片。
与既有实现对比,仓库在 loopx/control_plane/quota/progressive_context.ts 与 docs/architecture/rfcs/history-working-set-context-policy-v0.md §5.1 中已明确将 KeepRaw / FoldToReceipt / EpochReset 归属为共享 TypeScript 投影拥有者;在 loopx/control_plane/capabilities/goal_capability_organization.ts 中已实现 goal_capability_improvement_plan_v0 及 planCapabilityImprovement 试跑—反馈—回滚追踪;在 loopx/control_plane/work_items/yardstick_decision.ts 中已实现 WorkYardstickProfile 与 proxy_order_reversed 判定;在 loopx/control_plane/quota/context_selection.ts 中已实现 capturedContextSelection 选择器。本 PR 仅用 import type 引用了 WorkYardstickProfile 与 QuotaGoalBoundaryReference,新测试直接在测试文件中调用 capturedContextSelection,生产路径对 verifier_hook_contract.ts 与 QuotaGoalBoundaryReference 的运行时调用仍为 0。
| 提案边界 | RFC 设计职责 | 本 PR 在 1b6514a6c1 覆盖现状 |
既有所属拥有者 |
|---|---|---|---|
| Start / resume | 通过原始 C1 capture 摘要与 /goal_boundary 读取作用域与停止条件 |
新增纯类型 QuotaGoalBoundaryReference(无运行时构造/消费),测试直接调 capturedContextSelection |
turn_envelope.ts / context_selection.ts / progressive_context.ts |
| Milestone probe | 异步采样并回传平台期/快尺反转 | 仅联合类型(无生产实现) | yardstick_decision.ts / stride_policy.ts |
| Compaction / subscope | 独立 Oracle 回执、原件与摘要均可读且非空后才允许 FoldToReceipt |
recommendVerifiedClose 已补引用非空与 canReadEvidence,但身份六元组仍允许空串,且 0 生产调用方 |
history-working-set-context-policy-v0.md §5.1 (progressive_context.ts) |
| Stop / Domain plugin | 独立 Oracle 验收及内容寻址试跑准入 |
DomainPluginCandidate/DomainPluginTrial 仅类型(0 生产调用方) |
settlement.ts / goal_capability_organization.ts |
具体改动 / Changes
上一轮审查至本次精确头的增量变化(8a6fa6c68ea8745325b615e668fb5caa26811295..1b6514a6c1773855dcb1a0f921f62f899e6dd63a)
增量提交(Require readable verifier evidence and bind solver constraints)修改 5 个文件(+95 / -23):
- 解决情况(已修复引用可读性与空引用):
verifier_hook_contract.ts(第 101–145 行)引入VerifiedCloseReader(readReceipt+canReadEvidence)和hasReference(),对request.receipt_ref、receipt.oracle_evidence_ref、receipt.source_ref、receipt.summary_ref以及failed分支的counterexample_ref强制要求非空白且canReadEvidence(ref) === true;verifier_hook_contract.test.ts新增可读性负向单测验证空/不可读引用保留KeepRaw。 - 增量引入的局部补充: 在
loopx/control_plane/quota/turn_envelope.ts(第 74–77 行)新增export type QuotaGoalBoundaryReference(capture_sha256: string; pointer: "/goal_boundary"),在verifier-hook-co-design-v0.md与.zh-CN.md第 10 行、第 43 行补充启动/恢复读取/goal_boundary与引用可读性规则描述,并在verifier_hook_contract.test.ts新增调用capturedContextSelection验证/goal_boundary的第 5 条单测。 - 仍未修复的问题: 未修改 RFC 头部
RFC status: Proposed、缺少Supersedes / closes、缺少semantic mirror/语义镜像、未更新STATUS.md/STATUS.zh-CN.md与README.md边界描述;verifier_hook_contract.ts与新加的QuotaGoalBoundaryReference仍没有任何生产调用方;recommendVerifiedClose对VerifiedScopeIdentity六元组身份字段依然缺少非空校验。
完整 PR 改动清单(相对基准 d38052695c2c8a2e67cdb2c1eb6f4c6651eabd4d,6 个文件,+403 / -0)
- 文档与索引(3 个文件,+116/-0): 新增
docs/architecture/rfcs/verifier-hook-co-design-v0.md(57 行)与docs/architecture/rfcs/verifier-hook-co-design-v0.zh-CN.md(57 行),并在docs/architecture/rfcs/README.md增加条目链接(+2 行);未更新STATUS.md/STATUS.zh-CN.md。 - 控制面 TypeScript 源码(2 个文件,+163/-0): 在
loopx/control_plane/quota/turn_envelope.ts第 74–77 行新增纯类型导出QuotaGoalBoundaryReference(+4 行);新增loopx/control_plane/turn_driver/verifier_hook_contract.ts(159 行)。 - TypeScript 单测(1 个文件,+124/-0): 新增
tests/control_plane_ts/verifier_hook_contract.test.ts(5 条单测),也是全仓唯一导入verifier_hook_contract.ts的文件。
关键代码讲解
VerifiedCloseReader与hasReference(loopx/control_plane/turn_driver/verifier_hook_contract.ts#L101-L108): 新增VerifiedCloseReader端口定义readReceipt与canReadEvidence,hasReference校验typeof ref === "string" && ref.trim().length > 0,要求权威读端对引用字符串做非空白判断再读取。recommendVerifiedClose(loopx/control_plane/turn_driver/verifier_hook_contract.ts#L112-L145): 先用hasReference(request.receipt_ref)决定是否调用reader.readReceipt;随后以!==逐一比对receipt?.identity与request.identity的 6 个字段(goal_id、todo_id、parent_epoch_ref、child_scope_ref、candidate_sha、verifier_version),不相等或缺失回执返回KeepRaw;当receipt.verdict === "failed"时若counterexample_ref非空白且canReadEvidence为真则透传counterexample_ref并保持KeepRaw,否则仅返回{ action: "KeepRaw" };当verdict === "passed"、open_obligations === false、overlap === "low"且[oracle_evidence_ref, source_ref, summary_ref]全部满足hasReference与canReadEvidence === true时返回FoldToReceipt。残留缺陷在于第 119–126 行只检查两端身份全等而不检查六个身份字段是否非空白,因此双端均为空/空白字符串且引用可读时仍会返回FoldToReceipt;此外若外部非类型化调用传入缺失request.identity,直接读取expected.goal_id也缺少runtime_decode.ts对象防护。QuotaGoalBoundaryReference(loopx/control_plane/quota/turn_envelope.ts#L74-L77): 定义了固定pointer: "/goal_boundary"与capture_sha256: string的只读类型,但整个控制面与宿主层没有任何函数构造、解码或消费该类型;verifier_hook_contract.ts仅以import type引入,verifier_hook_contract.test.ts则直接调用既有capturedContextSelection验证原始 JSON 指针选择。negotiateVerifierHooks与未接线类型集合(verifier_hook_contract.ts): 沿用上一轮逻辑,当policy.enabled !== true返回null,启用后按 observed capabilities 协商L0/L1/L2与pre_tool_use;DomainPluginCandidate/DomainPluginTrial、VerifierHookEvent等仍仅有类型声明,全仓 0 生产调用方。
规范基线映射(spec_basis)
依据基准 d38052695c2c8a2e67cdb2c1eb6f4c6651eabd4d 上的规范入口 docs/architecture/rfcs/README.md(及其引用的 docs/development/README.md Scope-Fit Review 与 history-working-set-context-policy-v0.md §5.1)映射精确头 1b6514a6c1773855dcb1a0f921f62f899e6dd63a:
RFC-INDEX-HEADER->not_met:docs/architecture/rfcs/README.md要求合入 RFC 使用Accepted生命周期状态、声明Supersedes / closes、包含semantic mirror/语义镜像互链并通过generate_rfc_status_index.py --write同步STATUS.md;当前头仍为Proposed、缺Supersedes / closes与semantic mirror/语义镜像字样、未同步STATUS.md,README.md条目亦缺少Delivery on main/Current boundary说明。RFC-BILINGUAL-PAIR->implemented:英文与中文镜像在本 PR 中同步增改,并通过scripts/check_rfc_bilingual.py --base origin/main --head HEAD。RFC-MATURITY-SEPARATION->not_met:docs/architecture/rfcs/README.md与docs/development/README.md要求将设计提案与已实现运行时边界严格隔离,禁止将无生产调用方的控制面模块留置主干并须复用既有拥有者;当前精确头仍在loopx/control_plane/turn_driver/保留 0 生产调用方的verifier_hook_contract.ts(并新增同样 0 运行时调用方的QuotaGoalBoundaryReference导出),RFC 仍将成熟度标为TypeScript contract,且FoldToReceipt与插件试跑阶段仍未接入progressive_context.ts与goal_capability_organization.ts。
对主干的风险 / Risks
阻塞发现(Findings)
-
[P1 · 阻塞] RFC 生命周期头、镜像声明与派生索引仍破坏仓库文档治理门禁(未修复)
- Problem: 最新提交
1b6514a6c1仅修改了 RFC 正文第 10、43 行,未修复 RFC 头部元数据与目录索引,导致主干文档治理脚本在精确头上继续失败。 - Evidence: 在精确头
1b6514a6c1773855dcb1a0f921f62f899e6dd63a实测uv run --extra test python scripts/generate_rfc_status_index.py --check退出码 1,报错verifier-hook-co-design-v0.md: status 'Proposed' does not begin with a lifecycle state (Accepted, Superseded, Retired, Rejected)与missing '**Supersedes / closes:**' declaration;实测uv run --extra test python examples/docs-governance-smoke.py退出码 1,在check_rfc_language_mirrors()第 202 行抛出AssertionError: verifier-hook-co-design-v0.md(缺少"semantic mirror",且中文镜像缺少"语义镜像")。此前基线d38052695c两项均退出 0。此外docs/architecture/rfcs/README.md仍缺少同级条目的Delivery on main/Current boundary段落。 - Impact: 合入主干后会立即使
scripts/generate_rfc_status_index.py --check与examples/docs-governance-smoke.py持续失败。 - Fix: 在
verifier-hook-co-design-v0.md与.zh-CN.md头部将RFC status改为Accepted/已接受(Delivery maturity如实标为Proposal),补全**Supersedes / closes:** none/**替代 / 关闭:** 无与semantic mirror/语义镜像互链,运行uv run --extra test python scripts/generate_rfc_status_index.py --write更新STATUS.md与STATUS.zh-CN.md,并在docs/architecture/rfcs/README.md补全Delivery on main/Current boundary,重跑上述两条校验脚本至退出 0。
- Problem: 最新提交
-
[P1 · 阻塞] 控制面新增的
verifier_hook_contract.ts与QuotaGoalBoundaryReference仍无任何生产调用方且分裂既有所有权(未修复)- Problem: 尽管新提交在
turn_envelope.ts导出了QuotaGoalBoundaryReference并新增了capturedContextSelection单测,但verifier_hook_contract.ts与该新类型在生产代码中依然没有任何运行时调用者,且继续在错误目录平行定义既有拥有者的语义。 - Evidence: 全仓搜索
verifier_hook_contract与QuotaGoalBoundaryReference(覆盖loopx/、tests/、packages/、apps/、scripts/)确认:QuotaGoalBoundaryReference仅被verifier_hook_contract.ts以import type引入,verifier_hook_contract.ts仅被tests/control_plane_ts/verifier_hook_contract.test.ts导入,全仓 0 个生产运行时调用方。新测试第 5 条是测试文件直接调用context_selection.ts的capturedContextSelection,并未经过verifier_hook_contract.ts或turn_envelope.ts的新运行时路径。同时FoldToReceipt/KeepRaw的所有者是history-working-set-context-policy-v0.md§5.1(progressive_context.ts+context_delivery.ts),能力试跑生命周期的所有者是goal_capability_organization.ts(goal_capability_improvement_plan_v0)。 - Impact: 在没有真实宿主适配器或投影调用方落地前,向
loopx/control_plane/turn_driver/与turn_envelope.ts预埋未验证、无调用方的导出契约,违反scope_fit、repository_reuse与change_proportionality,并累积过早耦合与迁移成本。 - Fix: 最简修复是收敛本 PR 为合规的双语架构 RFC(移除未接线的
verifier_hook_contract.ts、测试文件及纯编译期占位类型QuotaGoalBoundaryReference,必要接口保留在 RFC 文档中);若坚持在当前 PR 交付代码,则须删除孤立平行类型(DomainPluginTrial等),将recommendVerifiedClose/ Hook 能力协商真正接入至少一条progressive_context.ts/turn_envelope.ts或宿主适配器读回生产路径并补齐端到端验证。
- Problem: 尽管新提交在
-
[P1 · 阻塞]
recommendVerifiedClose虽已校验引用非空与可读性,但对VerifiedScopeIdentity六元组仍缺少非空校验,空身份可触发FoldToReceipt(部分修复、仍有缺口)- Problem:
1b6514a6c1修复了空引用与不可读证据,但recommendVerifiedClose(第 117–126 行)对VerifiedScopeIdentity六个字段仍只检查observed.<field> !== expected.<field>,未复用hasReference或runtime_decode.ts校验身份字段非空。 - Evidence: 在精确头
1b6514a6c1使用node --no-warnings --experimental-strip-types执行反例测试:当request.identity与receipt.identity同时传入{ goal_id: "", todo_id: " ", parent_epoch_ref: "", child_scope_ref: "", candidate_sha: "", verifier_version: "" },配合非空且canReadEvidence === true的receipt_ref: "receipt:21"、oracle_evidence_ref: "oracle:result"、source_ref: "capture:raw-child"、summary_ref: "capture:child-receipt"、verdict: "passed"、open_obligations: false、overlap: "low"时,recommendVerifiedClose返回{"action":"FoldToReceipt","receipt_ref":"receipt:21","source_ref":"capture:raw-child","summary_ref":"capture:child-receipt"}而非KeepRaw。同时边界入口仍未使用runtime_decode.ts(requireJsonObject、requireNonEmptyString)。 - Impact: 若上游未绑定作用域的身份对象退化为空串或空白串,即可在看似合法的
FoldToReceipt返回中绕过作用域与candidate_sha/verifier_version绑定;且缺乏统一runtime_decode防护使畸形输入会在读取expected.goal_id时直接抛错而非稳健落回KeepRaw。 - Fix: 若保留实现代码,必须在身份比对前对
VerifiedScopeIdentity六个字段全量执行非空白校验(或使用runtime_decode.ts解码请求与回执并保持缺省回退KeepRaw),同时在verifier_hook_contract.test.ts补充空/空白身份负向测试用例;若按 Finding 2 收敛为纯 RFC PR,则同步消除此运行时缺陷。
- Problem:
边界隔离与权限语义检查
- 默认关闭隔离(
default_off_isolation):negotiateVerifierHooks({ enabled: false, pre_tool_use: true }, ...)返回null,且生产代码无任何调用点导入verifier_hook_contract.ts或读取QuotaGoalBoundaryReference,既有默认执行、上下文投影、调度与结算行为均未改变(既有 TS 关联套件 175/175 全通过)。但权威控制开关尚未接入任何 Goal 配置边界。 - 权限与生命周期命名(
authority_semantics): RFC 将Delivery maturity标为TypeScript contract,并在verifier_hook_contract.ts导出adopted/retired等DomainPluginTrial阶段,在零生产运行时调用方与零持久化状态转换的现状下,命名和成熟度标签高于当前代码实际提供的能力。
语义与 CI 对齐
- 语义词表扫描边界:
scripts/generate_semantic_inventory.py --changed-from origin/main(基线b375539271b4cb9f34386a77211a944ce6e05ffe)扫描 18 份快照报告supported candidates: 0,examples/semantic-vocabulary-drift-smoke.py通过(29/29 词表、56/56 拥有者符号均通过)。由于该扫描器仅提取 PythonEnum/Literal/命名多值集合与 TypeScriptas const数组,verifier_hook_contract.ts中的内联 TS 字符串联合类型处于扫描盲区之外,后续若进入生产接线仍须与progressive_context.ts及goal_capability_organization.ts的注册词表对齐。 - 门禁脚本对齐(
wait_for_ci: false): 本复审不轮询远端 GitHub Actions。canary premerge在精确头1b6514a6c1执行 4 项直接检查、9 项目录金丝雀、8 项风险烟雾测试与 1 项公开边界扫描全部通过(总状态因缺少精确 diff 的change-quality回执返回quality_receipt_missing,退出码 1);但canary premerge不会覆盖scripts/generate_rfc_status_index.py --check与examples/docs-governance-smoke.py,这两项在精确头上均实测失败。
本地验证汇总(精确头 1b6514a6c1773855dcb1a0f921f62f899e6dd63a,wait_for_ci: false)
npm run typecheck:control-plane:PASSnode --no-warnings --experimental-sqlite --experimental-strip-types --test tests/control_plane_ts/verifier_hook_contract.test.ts:PASS(5/5 passed)- 关联 TS 回归套件(
verifier_hook_contract.test.ts、yardstick_decision.test.ts、post_writeback_hook_transaction.test.ts、context_delivery.test.ts、progressive_context.test.ts、turn_envelope.test.ts、context_selection.test.ts):PASS(180/180 passed) uv run --extra test python scripts/check_rfc_bilingual.py --base origin/main --head HEAD:PASSuv run --extra test python examples/semantic-vocabulary-drift-smoke.py:PASSuv run --extra test python -m ruff check tests/control_plane_ts loopx/control_plane/turn_driver loopx/control_plane/quota docs/architecture/rfcs:PASSuv run --extra test python -m mypy:PASS(17 source files)uv run --extra test loopx check --scan-path ...(6 个改动文件公开边界扫描):PASS(0 errors, 5 checks)uv run --extra test python -m pytest -q tests/canary/test_rfc_bilingual.py tests/architecture/test_rfc_status_index.py tests/architecture/test_contributor_task_board.py tests/architecture/test_top_level_module_budget.py tests/architecture/test_control_plane_import_boundaries.py tests/architecture/test_content_digest_single_owner.py tests/architecture/test_semantic_vocabulary_drift.py:PASS(460 passed)uv run --extra test loopx canary premerge --from-git-diff --git-diff-base origin/main:direct_checks 4/4、catalog_canaries 9/9、risk_profile_smokes 8/8、public_boundary 1/1 均 PASS(总状态quality_receipt_missing,退出码 1)uv run --extra test python scripts/generate_rfc_status_index.py --check:FAIL(HEAD1b6514a6c1退出码 1;对比此前 PR 基线d38052695c退出码 0)uv run --extra test python examples/docs-governance-smoke.py:FAIL(HEAD1b6514a6c1AssertionError: verifier-hook-co-design-v0.md退出码 1;对比此前 PR 基线d38052695c退出码 0)- 反例探测(
recommendVerifiedClose传入全空/空白VerifiedScopeIdentity配合可读引用):FAIL(误返回FoldToReceipt而非KeepRaw)
我的整体评价 / Verdict
对精确头 1b6514a6c1773855dcb1a0f921f62f899e6dd63a 执行全包复审后,确认作者修复了上一轮提出的 VerifiedClose 空引用与不可读证据遗漏,并补充了 /goal_boundary 相关文本与引用可读性单测;但上一轮其余阻塞项仍未解决,且 recommendVerifiedClose 对空身份字符串的校验缺口依然存在,整体仍应给出 REQUEST_CHANGES。
- 长程与用户体验影响(
outcome_impact):long_horizon为not_yet_proven(verifier_hook_contract.ts与QuotaGoalBoundaryReference仍没有任何生产运行时调用方,recommendVerifiedClose仍允许全空/空白VerifiedScopeIdentity触发FoldToReceipt,尚无法证明长程任务下真实宿主与投影收益);user_experience为not_applicable,且visual_review为not_applicable(本次复审检查了全部 6 个改动文件,未修改任何前端、Dashboard、Chat 或 CLI 交互/渲染表面,无未检查 UI 截屏项)。 - 可观测语义与代码体积(
observable_semantics/code_volume/change_proportionality): 主干现有运行时行为虽未被未接线代码改变,但文档治理检查从基线d38052695c的 PASS 退化为 FAIL 状态至今未修复,且recommendVerifiedClose在空身份反例下仍能越过作用域绑定校验,故observable_semantics为not_yet_proven。163 行生产目录 TS 代码(+124 行单测)在无生产调用方、无宿主适配器、无统一runtime_decode防护的条件下仍属过早固化(partly_avoidable/simplify_now/disproportionate),compatibility_assessment为not_applicable(新增文件/新增纯类型无存量格式迁移边界)。 - 词表归属(
semantic_alignment): 当前词表仍为停留在未调用 TS 文件内的local_only联合类型(AST 词表脚本未覆盖 TS 内联联合,vocabulary_v0.json未受直接破坏),但后续接线时须统一到progressive_context.ts与goal_capability_organization.ts的注册词表。 - 下一轮复审与合入所需证据: (1) 修复 RFC 头部字段(
Accepted、Supersedes / closes、semantic mirror/语义镜像)、运行scripts/generate_rfc_status_index.py --write同步STATUS.md/STATUS.zh-CN.md并在docs/architecture/rfcs/README.md补全Delivery on main/Current boundary,使generate_rfc_status_index.py --check与docs-governance-smoke.py实测通过;(2) 要么移除尚未接线的verifier_hook_contract.ts、QuotaGoalBoundaryReference与其单测使本 PR 成为纯粹规范的双语设计 RFC,要么将其接入真实生产调用方与既有拥有者并补全VerifiedScopeIdentity非空 +runtime_decode校验与负向单测;(3) 在最终提交后补齐精确 diff 的canary premerge与公开边界验证。 - 声明与新鲜度: 本评审在绑定信息不可用(
session_not_bound)的情况下以self_reported声明模型身份;未等待也未查询远端 GitHub Actions CI(wait_for_ci: false)。当前结果仅对应精确提交1b6514a6c1773855dcb1a0f921f62f899e6dd63a。
英文简短结论:
English verdict: REQUEST_CHANGES at head 1b6514a. Compared with prior head 8a6fa6c, this update resolved empty/unreadable receipt/evidence refs via VerifiedCloseReader and hasReference (5/5 unit tests pass), but the core PR blockers remain: (1) RFC headers and derived index still fail scripts/generate_rfc_status_index.py --check and examples/docs-governance-smoke.py against the passing base d380526; (2) verifier_hook_contract.ts and the newly added compile-only QuotaGoalBoundaryReference in turn_envelope.ts still have zero production callers and split ownership from progressive_context.ts and goal_capability_organization.ts; (3) recommendVerifiedClose still compares the 6 VerifiedScopeIdentity fields only with !== and returns FoldToReceipt on empty/whitespace identities when refs are readable. Local checks: npm run typecheck:control-plane, 180/180 targeted TS tests, check_rfc_bilingual.py, semantic-vocabulary-drift-smoke.py, ruff, mypy (17 files), loopx check (6 files), 460/460 architecture pytest cases, and canary premerge suites (22/22 checks pass; exit 1 only on quality_receipt_missing) passed.
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh
动机 / Motivation
维护者需要评议可关闭的 verifier hooks 契约,并确保日常文档校验能继续运行。 主干上的 RFC 检查以接受后的规范生命周期为输入。现有 Goal 与 settlement 继续由 C1 持有。 同一套 RFC 检查在 merge base 均通过,在当前头均失败。状态索引拒绝新增 Active RFC 的 Proposed 生命周期并报告缺少 Supersedes / closes。文档 smoke 在英文页报告缺少语义镜像标记。 补丁增加双语 RFC、tier 协商、VerifiedClose 建议和 C1 边界引用类型。Host 集成仍待验收。 范围是提案及当前纯 TypeScript 契约。
改动思路 / Approach
C1 决定授权及结算,外部 Oracle 提供验证票据,helper 只计算折叠建议。 这一提交可作为待评议的 TypeScript 契约。最先可验收的运行切片应使用原 Goal/Todo 上一次真实恢复,将精确 Oracle 票据、父边界回读和原 settlement 串起来。其运行证据留在对应实现。 沿用现有历史工作集的折叠语义,让请求和回执共享精确身份校验。
具体改动 / Changes
逐项检查当前头 1b6514a 和 merge base d380526,6 个文件,+403/-0。差异核对覆盖 Active RFC、双语稿、协商及建议函数、Turn envelope 的类型引用和配套测试。 评审依据为 d380526。 目标规范
关键代码讲解
rfc-active-governance的接线使新增稿参与仓库现有治理。 RFC 头部verifier-negotiation-off由协商入口的关闭分支处理。 Tier 协商verified-close-exact-identity由票据读取后的身份比较处理,并核对 Oracle、源和压缩结果。 身份比较 · 拟议语义
对主干的风险 / Risks
[P1] 新增 Active RFC 使文档索引和镜像检查失败。 同一套 RFC 检查在 merge base 均通过,在当前头均失败。状态索引拒绝新增 Active RFC 的 Proposed 生命周期并报告缺少 Supersedes / closes。文档 smoke 在英文页报告缺少语义镜像标记。 经维护者接受后,按双语 Active RFC 模板登记生命周期、取代关系和语义镜像,保留当前交付成熟度并重新生成状态索引。尚待设计评议时,将提案留在项目认可的评议入口,待接受后再列入 Active RFC。
[P2] 不完整的身份可触发 VerifiedClose 折叠建议。 令请求与已通过票据的同一身份字段为空,其余字段保持有效,重复六次。Goal、Todo、父 epoch、子 scope、candidate SHA 和 verifier version 各自为空时都得到 FoldToReceipt。身份相等无法证明 Oracle 绑定了完整候选,按约定此时应保留原始记录。 在比较身份和输出推荐前拒绝任一端缺失、空或全空白的身份字段。用共享身份校验覆盖六项独立负例,并保留完整匹配仍可折叠的测试。
完整匹配且三段证据可读的已通过票据得到折叠推荐。跨 scope、不可读证据和有未清义务的情况均保留原始记录。 TypeScript 81 个测试和类型检查通过。预合并 4 个直接检查与 18 个选中检查通过,严格资格返回 quality_receipt_missing。两项另外执行的文档治理检查在当前头失败。 Host adapter、安装态回读和匹配预算下的收益属于后续验收。本轮运行了纯 TypeScript 入口和实际文档检查。
我的整体评价 / Verdict
请求修改。C1 决定授权及结算,外部 Oracle 提供验证票据,helper 只计算折叠建议。 这一提交可作为待评议的 TypeScript 契约。最先可验收的运行切片应使用原 Goal/Todo 上一次真实恢复,将精确 Oracle 票据、父边界回读和原 settlement 串起来。其运行证据留在对应实现。 当前头尚未满足 Active RFC 治理,也未通过不完整精确身份的契约负例。 修正两个边界后复跑文档与折叠负例。
English verdict: REQUEST_CHANGES at 1b6514a. Fix the Active RFC lifecycle and bilingual metadata, and reject all incomplete VerifiedClose identities before recommending a fold. Both governance checks regress on this head, and six isolated identity counterexamples produce FoldToReceipt.
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · Gemini · Google DeepMind · self_reported
动机 / Motivation
在长程求解任务中,控制面与宿主维护者在启用多轮探索与独立验收时,往往只能在粗糙的 Stop-Hook 兜底验证与同步逐工具拦截之间二选一;缺乏跨宿主的四边界验证 Hook 协同契约,也缺乏“子作用域须经独立 Oracle 回执且满足低重叠后才折叠”的 VerifiedClose 约束,因此本 PR 试图把验证接入收敛到既有 C1 与历史上下文边界之下。
如果不做任何改动,外部宿主(如 Codex、Claude Code、DSH、Antigravity)上的验证探测、子作用域折叠以及领域快尺(yardstick)试跑仍各自依赖局部协议或散落脚本,既难对齐能力协商档位,也容易让未验证的代理结果或跨作用域回执污染主干上下文。
- 受影响对象(affected_caller_or_operator): 接入宿主 Hook 生命周期(启动、里程碑、压缩/子作用域与停止边界)并消费独立验收回执的 LoopX 控制面、宿主适配器与实验评估维护者。
- 前后对比场景(before_after_scenario): 改动前,不同宿主各自实现启动上下文恢复、里程碑采样、压缩后恢复与停止验收,子工作折叠与快尺试跑缺少统一的不变式边界;理想改进是先合入合规的双语架构 RFC 再在真实拥有者上接线落地,而当前 PR 在最新精确头
72c77567b09f6ad69a0b56189db3ab3184086609上虽然已修复 RFC 治理检查并补齐了recommendVerifiedClose的空身份与角色/作用域证据校验,但依然将没有任何生产调用方的verifier_hook_contract.ts与仅作编译期类型导出的QuotaGoalBoundaryReference放在控制面生产目录中,同时把FoldToReceipt/KeepRaw留在turn_driver/而非既有拥有者progressive_context.ts、保留零调用方零测试的平行DomainPluginTrial类型,且未在docs/architecture/rfcs/README.md声明当前无运行时交付边界。 - 可观测结果(observable_outcome): 相对上一轮头
1b6514a6c1773855dcb1a0f921f62f899e6dd63a,最新头72c77567b09f6ad69a0b56189db3ab3184086609已使scripts/generate_rfc_status_index.py --check与examples/docs-governance-smoke.py双双实测通过(STATUS.md更新为Accepted (53)),并让recommendVerifiedClose在空身份和跨角色/错作用域证据下稳定返回KeepRaw(单测 7/7 通过、全空身份实测返回KeepRaw);但全仓生产代码对verifier_hook_contract.ts与QuotaGoalBoundaryReference仍只有 0 个生产运行时调用方,DomainPluginCandidate/DomainPluginTrial仍无任何调用方与测试,FoldToReceipt仍未归口progressive_context.ts。 - 非目标(non_goals): 本次变更不改变
C1准入、传输或结算所有权,不实现具体宿主适配器(Codex、DSH、Claude Code、Antigravity)运行时代码,不启用新默认开关,也不开展跨宿主或同宿主模型效果/缓存对照实验。
改动思路 / Approach
本次对精确头 72c77567b09f6ad69a0b56189db3ab3184086609 执行全包独立复审(rereview_pull_request_exact_head),逐项核验上一轮(审查 6011852973、1b6514a6c1773855dcb1a0f921f62f899e6dd63a)指出的 3 项阻塞项在最新提交 Require role- and scope-bound verifier evidence 中的实际修复与残余边界。
本轮确认已实质修复的前轮阻塞项:
- RFC 状态索引与镜像治理(原 P1 #1 已解决): 作者在
verifier-hook-co-design-v0.md与.zh-CN.md头部补齐Accepted (upon merge)、Supersedes / closes: none(替代 / 关闭:无)及semantic mirror/语义镜像互链,并重新生成STATUS.md与STATUS.zh-CN.md(Accepted (53)/已接受 (53));generate_rfc_status_index.py --check与docs-governance-smoke.py均从上一轮的exit 1恢复为exit 0通过。 recommendVerifiedClose空身份与证据角色/作用域绑定(原 P1 #3 已解决): 作者将VerifiedCloseReader升级为readReceipt+readEvidence => VerifiedScopeEvidence | undefined(要求{ ref, role, identity }三元一致),并在recommendVerifiedClose入口(第 140–144 行)校验VerifiedScopeIdentity六个字段全部非空白且request.receipt_ref非空白后才读取回执与证据;最新反例实测空/空白身份返回{"action":"KeepRaw"}且不触发权限读回,单测增至 7/7 全过。
然而从架构与比例性(architecture_assessment)及仓库 Scope-Fit Review 规则审视当前完整精确头,原第 2 项结构性阻塞仍未消除:loopx/control_plane/turn_driver/verifier_hook_contract.ts(181 行)与 loopx/control_plane/quota/turn_envelope.ts 新增的 QuotaGoalBoundaryReference(第 74–77 行)在全仓生产代码中依然只有 0 个运行时调用方,FoldToReceipt / KeepRaw 仍停留在 turn_driver/ 而未接入既有上下文策略拥有者 quota/progressive_context.ts,DomainPluginCandidate / DomainPluginTrial(第 169–181 行)继续在测试外零引用地平行定义于 capabilities/goal_capability_organization.ts 之外,且 docs/architecture/rfcs/README.md 第 204–205 行未补充 Delivery on main / Current boundary 说明来隔离“提案设计”与“运行态契约”;因此当前 PR 仍需收敛为纯合规双语 RFC(移除未接线的生产 TS 契约、单测与占位类型)或真正接入至少一条真实生产调用链并清理孤立类型。 当前 PR 边界(current_pr_boundary):对本 PR 而言,最清洁且可立即合入的边界是“保留已修通治理检查的双语 RFC 与 STATUS.md 索引,补齐 docs/architecture/rfcs/README.md 的 Delivery on main: Proposal only / Current boundary 声明,并将未接线的 verifier_hook_contract.ts、单测及 QuotaGoalBoundaryReference 移出生产源码目录直到真实宿主或 progressive_context.ts 调用方同步落地”;宿主适配器实现、真实缓存收益与生产开关继续保留在后续切片。
与既有实现对比,仓库在 loopx/control_plane/quota/turn_envelope.ts 第 73 行已有 QUOTA_GOAL_BOUNDARY_ARTIFACT = "quota_should_run.goal_boundary" 并由 loopx/control_plane/quota/adaptive_children.ts 第 13、196 行在生产中实际消费;在 docs/architecture/rfcs/history-working-set-context-policy-v0.md §5.1 已明确将 {KeepRaw, FoldToReceipt, EpochReset} 归属给共享 TypeScript 投影拥有者 progressive_context.ts + context_delivery.ts + turn_envelope.ts;在 loopx/control_plane/capabilities/goal_capability_organization.ts 第 51 行已有 goal_capability_improvement_plan_v0;在 loopx/control_plane/work_items/yardstick_decision.ts 已有 WorkYardstickProfile。当前精确头在生产目录保留 185 行新增 TS 代码,却没有任何真实生产者或消费者触发其中任何一条函数或类型。
| 提案边界 | RFC 设计职责 | 72c77567b0 代码与文档现状 |
既有所属拥有者与差距 |
|---|---|---|---|
| Start / resume | 通过原始 C1 capture 摘要与 /goal_boundary 读取作用域与停止条件 |
turn_envelope.ts 新增纯类型 QuotaGoalBoundaryReference(0 运行时调用),测试直接调用 capturedContextSelection |
adaptive_children.ts 已消费 QUOTA_GOAL_BOUNDARY_ARTIFACT,但新类型无生产调用者 |
| Milestone probe | 异步采样并回传平台期/快尺反转 | 仅联合类型 VerifierTransition(无生产实现) |
yardstick_decision.ts / stride_policy.ts |
| Compaction / subscope | 独立非空作用域、角色/引用/身份均绑定的 FoldToReceipt / KeepRaw |
recommendVerifiedClose 校验逻辑与 7 条单测自洽,但 0 生产调用方 |
应归属 quota/progressive_context.ts(history-working-set-context-policy-v0.md §5.1) |
| Stop / Domain plugin | 独立 Oracle 验收及内容寻址试跑准入 |
DomainPluginCandidate / DomainPluginTrial 0 生产调用方且 0 测试引用 |
平行重复 capabilities/goal_capability_organization.ts |
| RFC 索引治理 | 区分设计接受状态与 main 上真实交付边界 |
STATUS.md 与双语镜像检查已通过,但 README.md 缺 Delivery on main / Current boundary |
docs/architecture/rfcs/README.md 第 50–56、204–205 行 |
具体改动 / Changes
上一轮审查至本次精确头的增量变化(1b6514a6c1773855dcb1a0f921f62f899e6dd63a..72c77567b09f6ad69a0b56189db3ab3184086609)
增量提交(Require role- and scope-bound verifier evidence)修改 6 个文件(+100 / -27):
- RFC 头部与索引修复: 更新
docs/architecture/rfcs/verifier-hook-co-design-v0.md与.zh-CN.md(- **RFC status:** Accepted (upon merge)、**Supersedes / closes:** none、**Language mirror:** [中文版 — semantic mirror](...)及正文第 44 行补充非空作用域与角色/引用/身份绑定要求),并同步更新docs/architecture/rfcs/STATUS.md(Accepted (52)->Accepted (53))与STATUS.zh-CN.md(已接受 (52)->已接受 (53))。 recommendVerifiedClose强校验收口: 在loopx/control_plane/turn_driver/verifier_hook_contract.ts第 101–167 行引入VerifiedScopeEvidence、scopeIdentityFields、matchesScope与matchesEvidence,在入口阻断空白VerifiedScopeIdentity/receipt_ref,并要求oracle_evidence、source、summary、counterexample四类证据同时匹配ref、role与六元组identity。- 单测补齐: 在
tests/control_plane_ts/verifier_hook_contract.test.ts第 108–145 行新增两条负向单测(跨角色/错引用/错作用域拒绝,以及空白身份不触发readReceipt/readEvidence),使该文件单测从 5 条增至 7 条。
完整 PR 改动清单(相对基准 d38052695c2c8a2e67cdb2c1eb6f4c6651eabd4d,8 个文件,+478 / -2)
- 文档与索引(5 个文件,+122/-2):
docs/architecture/rfcs/verifier-hook-co-design-v0.md(58 行)、docs/architecture/rfcs/verifier-hook-co-design-v0.zh-CN.md(58 行)、docs/architecture/rfcs/README.md(+2 行,第 204–205 行)、docs/architecture/rfcs/STATUS.md(+2/-1)、docs/architecture/rfcs/STATUS.zh-CN.md(+2/-1)。 - 控制面 TypeScript 源码(2 个文件,+185/-0):
loopx/control_plane/quota/turn_envelope.ts第 74–77 行新增QuotaGoalBoundaryReference(+4 行);新增loopx/control_plane/turn_driver/verifier_hook_contract.ts(181 行)。 - TypeScript 单测(1 个文件,+171/-0): 新增
tests/control_plane_ts/verifier_hook_contract.test.ts(7 条单测),也是全仓唯一导入verifier_hook_contract.ts的文件。
关键代码讲解
matchesScope与matchesEvidence(loopx/control_plane/turn_driver/verifier_hook_contract.ts#L120-L132):matchesScope校验六元组身份字段逐一相等;matchesEvidence先用hasReference(ref)过滤空白字符串,再通过reader.readEvidence(ref)核验返回对象的evidence.ref === ref、evidence.role === role且matchesScope(identity, evidence.identity),消除了上一轮只判断布尔可读性而允许角色互换或跨作用域借用的问题。recommendVerifiedClose(loopx/control_plane/turn_driver/verifier_hook_contract.ts#L136-L167): 入口第 140–144 行先核验request.identity六个字段和request.receipt_ref全量满足hasReference(typeof ref === "string" && ref.trim().length > 0),否则直接返回{ action: "KeepRaw" },既不访问权威存储也不再把全空/空白身份折叠为FoldToReceipt。通过入口后依次校验回执身份匹配、failed分支的counterexample证据角色绑定,以及passed+!open_obligations+overlap === "low"+ 三类证据全部通过matchesEvidence。残留结构问题是该函数及其导出的 14+ 个类型至今无任何生产路径调用,且FoldToReceipt归属在turn_driver/而非progressive_context.ts。QuotaGoalBoundaryReference(loopx/control_plane/quota/turn_envelope.ts#L74-L77): 位于既有生产常量QUOTA_GOAL_BOUNDARY_ARTIFACT下方,但全仓除verifier_hook_contract.ts第 3 行以import type引入外没有任何生产者或运行时读取方,甚至verifier_hook_contract.test.ts第 152 行也是直接内联{ capture_sha256, pointer: "/goal_boundary" } as const字面量并调用context_selection.ts的capturedContextSelection。DomainPluginCandidate与DomainPluginTrial(loopx/control_plane/turn_driver/verifier_hook_contract.ts#L169-L181): 定义了staging/trial/adopted/retired四态联合类型,不仅没有任何生产调用方,连verifier_hook_contract.test.ts也未引用它们,同时与既有能力组合模块goal_capability_organization.ts平行分叉。
规范基线映射(spec_basis)
依据基准 d38052695c2c8a2e67cdb2c1eb6f4c6651eabd4d 上的规范入口 docs/architecture/rfcs/README.md(及其引用的 docs/development/README.md Scope-Fit Review 与 history-working-set-context-policy-v0.md §5.1)映射精确头 72c77567b09f6ad69a0b56189db3ab3184086609:
RFC-INDEX-HEADER->implemented:双语 RFC 头部已补齐Accepted (upon merge)、Supersedes / closes与semantic mirror/语义镜像,STATUS.md/STATUS.zh-CN.md已同步为Accepted (53),generate_rfc_status_index.py --check与docs-governance-smoke.py均在当前头实测通过。RFC-BILINGUAL-PAIR->implemented:英文与中文 RFC 镜像成对更新,并通过scripts/check_rfc_bilingual.py --base origin/main --head HEAD。RFC-MATURITY-SEPARATION->not_met:docs/architecture/rfcs/README.md第 50–56 行要求以Delivery on main与Current boundary明确隔离设计接受状态与实际交付边界,docs/development/README.md第 131–137 行明确禁止将无真实生产调用方、仅靠单测覆盖的新模块留置控制面生产源码目录;当前头README.md第 204–205 行仍缺这两个成熟度说明条目,RFC 第 5 行标注Delivery maturity: TypeScript contract,生产目录仍保留 185 行零调用方的.ts代码与未接入拥有者的FoldToReceipt/DomainPluginTrial类型。
对主干的风险 / Risks
阻塞发现(Findings)
-
[P1 · 阻塞] 控制面生产目录保留零生产调用方的
verifier_hook_contract.ts与QuotaGoalBoundaryReference并分裂既有拥有者(原 Finding #2 仍未修复)- Problem:
loopx/control_plane/turn_driver/verifier_hook_contract.ts(181 行)与loopx/control_plane/quota/turn_envelope.ts新增的QuotaGoalBoundaryReference(第 74–77 行)仍然没有任何生产运行时调用者,且把属于progressive_context.ts与goal_capability_organization.ts的概念放在turn_driver/。 - Evidence: 在精确头
72c77567b0执行全仓搜索rg -n "verifier_hook_contract|QuotaGoalBoundaryReference|recommendVerifiedClose|negotiateVerifierHooks|verifier_hook" loopx tests packages apps scripts examples:生产代码仅有turn_envelope.ts:74(定义)、verifier_hook_contract.ts:3(import type引入QuotaGoalBoundaryReference)、verifier_hook_contract.ts:20,136(导出函数定义),所有生产运行时模块(turn_driver/executor.py、turn_driver/loop_controller.ts、quota/progressive_context.ts、quota/adaptive_children.ts、capabilities/goal_capability_organization.ts、packages/、apps/)调用数为 0;唯一导入方仅是tests/control_plane_ts/verifier_hook_contract.test.ts,其中第 169–181 行的DomainPluginCandidate/DomainPluginTrial连测试也未引用。同时history-working-set-context-policy-v0.md§5.1 已将FoldToReceipt/KeepRaw归属progressive_context.ts,goal_capability_organization.ts已拥有goal_capability_improvement_plan_v0。 - Impact: 违反
scope_fit(无活跃生产调用方的纯测试覆盖模块不应进入生产路径,且无仓库/拥有者接受的 coverage-only 契约记录)、repository_reuse(unjustified_duplication)与change_proportionality(simplify_now),会在没有真实消费者验证接口形状前冻结未接入的导出与双份生命周期类型。 - Fix: 选择两条清晰路径之一完成收口:(a) 最简纯 RFC 方案(推荐): 移除
loopx/control_plane/turn_driver/verifier_hook_contract.ts、tests/control_plane_ts/verifier_hook_contract.test.ts与turn_envelope.ts第 74–77 行无消费类型QuotaGoalBoundaryReference,保留已过治理检查的双语 RFC 与STATUS.md(若需示意签名可留在 RFC 正文中);或 (b) 端到端最小接线方案: 为negotiateVerifierHooks/recommendVerifiedClose接入至少一条真实生产读回路径(如progressive_context.ts与宿主能力协商读回),将FoldToReceipt/KeepRaw放回progressive_context.ts,并删除零引用孤立类型DomainPluginCandidate/DomainPluginTrial。
- Problem:
-
[P2 · 阻塞(语义与交付边界隔离)]
docs/architecture/rfcs/README.md缺少Delivery on main/Current boundary说明,与Delivery maturity: TypeScript contract及adopted/retired命名不匹配- Problem: 新增 RFC 在索引页与成熟度声明上未按仓库约定隔离“已接受的设计提案”与“零生产调用方的当前现实”。
- Evidence:
docs/architecture/rfcs/README.md第 50–56 行明确定义Delivery on main与Current boundary用来说明真实落地成熟度,第 190–220 行的同级 RFC 均包含这两项列表,唯独第 204–205 行的[Verifier Hook Co-Design v0]缺失;同时verifier-hook-co-design-v0.md第 5 行标注Delivery maturity: TypeScript contract,verifier_hook_contract.ts第 177–181 行导出adopted/retired阶段类型,但当前分支生产运行时调用为 0。 - Impact: 导致
authority_semantics(命名/成熟度表述高于实际零运行代码能力)与RFC-MATURITY-SEPARATION不满足。 - Fix: 在
docs/architecture/rfcs/README.md第 204–205 行补齐- **Delivery on \main`:** Proposal only; no runtime verifier hook adapter or caller is wired.与- Current boundary: ...;若按 Finding 1(a) 移除.ts雏形,将verifier-hook-co-design-v0.md第 5 行及中文第 5 行同步改为Proposal(或若按 1(b) 接线,如实写明仅接线的精确范围),并重跑generate_rfc_status_index.py --check与docs-governance-smoke.py`。
前轮修复确认与边界隔离检查
- 已修复项复核:
scripts/generate_rfc_status_index.py --check:由1b6514a6c1的exit 1变为PASS(exit 0)。examples/docs-governance-smoke.py:由1b6514a6c1的AssertionError变为PASS(docs-governance-smoke ok)。recommendVerifiedClose空白身份反例探测:传入全空/空白VerifiedScopeIdentity在72c77567b0实测返回{"action":"KeepRaw"}(1b6514a6c1曾误返回FoldToReceipt),角色互换/错作用域/空引用负向单测均通过。
- 默认关闭隔离(
default_off_isolation):negotiateVerifierHooks({ enabled: false, pre_tool_use: true }, ...)返回null,且生产代码无任何路径导入verifier_hook_contract.ts或使用QuotaGoalBoundaryReference,既有默认运行时行为保持不变(既有 TS 套件 175 条全部通过)。 - 权限语义(
authority_semantics): 尽管 RFC 声明观测不能篡改 C1/Todo/结算,但Delivery maturity: TypeScript contract与未测试零调用方的DomainPluginTrial(adopted/retired)结合缺失的README.mdDelivery on main声明,仍构成名实不符(misleading)。
语义与 CI 对齐
- 语义词表扫描边界:
scripts/generate_semantic_inventory.py --changed-from origin/main(基线b375539271b4cb9f34386a77211a944ce6e05ffe)扫描 18 个快照报告supported candidates: 0,examples/semantic-vocabulary-drift-smoke.py通过(29/29 词表、56/56 拥有者符号均通过)。需提示verifier_hook_contract.ts使用内联 TS 字符串联合类型(tier、overlap、verdict、action、role、stage、kind、boundary),处于该脚本 AST 扫描盲区之外;如保留并接线 TS 代码,须与progressive_context.ts及goal_capability_organization.ts词表统一归口。 - CI 策略说明(
wait_for_ci: false): 本复审按仓库本地优先策略不轮询远端 GitHub Actions CI。canary premerge执行 4/4 直接检查、9/9 目录金丝雀、8/8 风险烟雾与 1/1 公开边界检查全部通过(因缺少精确 diff 的change-quality回执返回quality_receipt_missing,退出码 1)。
本地验证汇总(精确头 72c77567b09f6ad69a0b56189db3ab3184086609,wait_for_ci: false)
uv run --extra test python scripts/generate_rfc_status_index.py --check:PASS(exit 0)uv run --extra test python examples/docs-governance-smoke.py:PASS(docs-governance-smoke ok)uv run --extra test python scripts/check_rfc_bilingual.py --base origin/main --head HEAD:PASSuv run --extra test python examples/semantic-vocabulary-drift-smoke.py:PASS(29/29 vocabularies, 56/56 owner symbols)npm run typecheck:control-plane:PASSnode --no-warnings --experimental-sqlite --experimental-strip-types --test tests/control_plane_ts/verifier_hook_contract.test.ts:PASS(7/7 passed)- 关联 7 个 TS 套件联合执行(
verifier_hook_contract、yardstick_decision、post_writeback_hook_transaction、context_delivery、progressive_context、turn_envelope、context_selection):PASS(182/182 passed) - 反例探测(
recommendVerifiedClose传入全空/空白VerifiedScopeIdentity):PASS(返回{"action":"KeepRaw"},未调用readReceipt/readEvidence) uv run --extra test python -m ruff check tests/control_plane_ts loopx/control_plane/turn_driver loopx/control_plane/quota docs/architecture/rfcs:PASSuv run --extra test python -m mypy:PASS(17 source files)uv run --extra test loopx check --scan-path ...(全部 8 个改动文件公开边界扫描):PASS(0 errors, 5 checks)uv run --extra test python -m pytest -q tests/canary/test_rfc_bilingual.py tests/architecture/test_rfc_status_index.py tests/architecture/test_contributor_task_board.py tests/architecture/test_top_level_module_budget.py tests/architecture/test_control_plane_import_boundaries.py tests/architecture/test_content_digest_single_owner.py tests/architecture/test_semantic_vocabulary_drift.py:PASS(460 passed)uv run --extra test loopx canary premerge --from-git-diff --git-diff-base origin/main:direct_checks 4/4、catalog_canaries 9/9、risk_profile_smokes 8/8、public_boundary 1/1 均 PASS(总状态quality_receipt_missing,退出码 1)- 全仓生产调用方检查(
rg -n "verifier_hook_contract|QuotaGoalBoundaryReference|recommendVerifiedClose|negotiateVerifierHooks|verifier_hook" loopx tests packages apps scripts examples):FAIL(verifier_hook_contract.ts与QuotaGoalBoundaryReference在生产路径均为 0 调用方,DomainPluginCandidate/DomainPluginTrial连测试也未引用)
我的整体评价 / Verdict
对精确头 72c77567b09f6ad69a0b56189db3ab3184086609 复审后确认,上一轮指出的 RFC 索引与双语镜像治理失败 以及 recommendVerifiedClose 空白身份/跨角色证据校验缺陷 已完全修复并通过本地全部对应测试与脚本;但 生产源码目录仍保留零生产调用方、分裂 progressive_context.ts / goal_capability_organization.ts 所有权的 verifier_hook_contract.ts 与编译期占位 QuotaGoalBoundaryReference(且 docs/architecture/rfcs/README.md 缺少 Delivery on main / Current boundary 声明),按控制面 scope_fit、repository_reuse 与 change_proportionality 门禁仍需先完成收口,建议 REQUEST_CHANGES。
- 长程与用户体验影响(
outcome_impact):long_horizon为not_yet_proven(verifier_hook_contract.ts与QuotaGoalBoundaryReference仍无任何生产运行时调用方,DomainPluginTrial也无任何执行/测试路径,尚未在真实 Turn 或上下文投影链路上验证成效);user_experience为not_applicable,且visual_review为not_applicable(本次复审覆盖全部 8 个改动文件,未修改任何前端、Dashboard、Chat 或 CLI 渲染界面,无 UI 截屏遗漏)。 - 可观测语义与代码体积(
observable_semantics/code_volume/change_proportionality): 现有主干运行时行为与 RFC 文档治理检查均已确认无退化(175 条既有 TS 单测、460 条架构测试、RFC 治理脚本全通过),但因新增 TS 契约毫无生产调用方,其真实路径可观测语义仍属not_yet_proven。185 行控制面生产目录 TS 代码与 171 行测试在零生产调用方与零宿主适配器的状态下属partly_avoidable/simplify_now/disproportionate,其中compatibility_assessment为not_applicable(纯新增未调用文件与纯编译期类型,不涉及存量持久化协议兼容)。 - 词表归属(
semantic_alignment): 当前词表仍停留在未调用 TS 文件中的local_only内联字符串联合(AST 扫描报 0 候选),正式接入生产时必须并入progressive_context.ts与goal_capability_organization.ts的注册词表。 - 下一轮复审与合入所需证据: (1) 按 Finding 1 抉择其一:要么删除未接线的
verifier_hook_contract.ts、verifier_hook_contract.test.ts与未消费类型QuotaGoalBoundaryReference,使本 PR 成为纯粹的架构设计 RFC;要么至少接入一条真实生产调用方、把FoldToReceipt归口progressive_context.ts并移除零引用平行类型DomainPluginTrial;(2) 按 Finding 2 在docs/architecture/rfcs/README.md第 204–205 行补充Delivery on main与Current boundary描述并统一 RFC 第 5 行成熟度标签;(3) 重跑generate_rfc_status_index.py --check、docs-governance-smoke.py、check_rfc_bilingual.py与精确 diff 的canary premerge。 - 声明与新鲜度: 本评审在绑定信息不可用(
session_not_bound)的情况下以self_reported声明模型身份;未等待也未查询远端 GitHub Actions CI(wait_for_ci: false)。当前结果仅对应精确提交72c77567b09f6ad69a0b56189db3ab3184086609。
英文简短结论:
English verdict: REQUEST_CHANGES at head 72c7756. Two prior blockers from 1b6514a are verified resolved: (a) scripts/generate_rfc_status_index.py --check and examples/docs-governance-smoke.py now pass with updated Accepted RFC headers, semantic-mirror links, and STATUS.md; (b) recommendVerifiedClose now rejects blank VerifiedScopeIdentity fields up front (returning KeepRaw in counterfactual probe without calling readReceipt/readEvidence) and binds VerifiedScopeEvidence by ref, role, and identity (7/7 unit tests pass; 182/182 across 7 TS suites pass). However, two blockers remain: (1) scope_fit / repository_reuse / change_proportionality (simplify_now): loopx/control_plane/turn_driver/verifier_hook_contract.ts (181 lines) and QuotaGoalBoundaryReference in turn_envelope.ts still have zero runtime production callers across loopx/, packages/, apps/, and scripts/, split FoldToReceipt/KeepRaw ownership away from progressive_context.ts, and leave unused DomainPluginCandidate/DomainPluginTrial outside goal_capability_organization.ts; (2) authority_semantics / RFC-MATURITY-SEPARATION: docs/architecture/rfcs/README.md lacks Delivery on main / Current boundary lines while RFC line 5 states Delivery maturity: TypeScript contract. Local checks: check_rfc_bilingual.py, semantic-vocabulary-drift-smoke.py, typecheck:control-plane, ruff, mypy (17 files), loopx check (8 files), 460/460 architecture pytest cases, and canary premerge (4 direct + 18 selected checks; exit 1 only on quality_receipt_missing) all passed.
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh
动机 / Motivation
维护者需要知道当前 Hook 方案可检验的范围,以及未来由哪个已有机制接续。上一头的 RFC 治理和空身份折叠问题已实测修复。 当前需要准确展示已交付范围,并避免把尚无实际调用方的能力试跑阶段固化成并行公共契约。
状态索引和语义镜像已修复。架构入口在两条相邻 RFC 之间新增 Verifier Hook 链接,正文已有成熟度说明,但入口缺少规范要求的主干交付状态和当前边界,读者须进入正文才能知道两种 helper 尚无生产接线。 本次评审限于 RFC 与 TypeScript 契约,运行态接线另需验证。
改动思路 / Approach
保留能独立验证的协商和折叠条件。C1 管权限和结算,独立 Oracle 负责证据,工作集接线后才应用建议。在 RFC 清单条目补充 Delivery on main 与 Current boundary,指明已验证的 TypeScript 契约和仍待验证的 Host、Oracle 与历史工作集接线。 保留 RFC 的生命周期设计,将两个未使用的类型随实际能力组合消费方一起引入,并复用已有 trial basis;当前可执行的 tier 协商和 VerifiedClose 拒绝条件可以保留。
新增的 DomainPluginCandidate 和 DomainPluginTrial 只在声明处出现,现有测试也没有使用。已有 capability trial planner 从版本、配置、effect、rollback 与反馈绑定判断是否建议试跑;新增 staging、trial、adopted、retired 类型只携带自由字符串引用,当前没有生产者把它与已有 trial basis 建立关系。
具体改动 / Changes
完整评审头 72c77567b09f6ad69a0b56189db3ab3184086609,基线 d38052695c2c8a2e67cdb2c1eb6f4c6651eabd4d,共 8 个文件,+478/-2。状态索引和语义镜像已修复。架构入口在两条相邻 RFC 之间新增 Verifier Hook 链接,正文已有成熟度说明,但入口缺少规范要求的主干交付状态和当前边界,读者须进入正文才能知道两种 helper 尚无生产接线。 新增的 DomainPluginCandidate 和 DomainPluginTrial 只在声明处出现,现有测试也没有使用。已有 capability trial planner 从版本、配置、effect、rollback 与反馈绑定判断是否建议试跑;新增 staging、trial、adopted、retired 类型只携带自由字符串引用,当前没有生产者把它与已有 trial basis 建立关系。 当前索引 · 基线规范 · 既有能力试跑 owner
关键代码讲解
rfc-active-governance。Active RFC、新双语镜像和生成索引均可正常验证。verified-close-exact-identity。拒绝不完整身份后才读取票据,并按引用、角色及作用域绑定证据。36 项空值、空白或缺失身份检查以及 12 项证据绑定负例全部保留原文。完整匹配仍能返回折叠建议,关闭策略返回空。RFC 生成索引及语义镜像通过。 折叠建议verifier-negotiation-off。关闭分支返回空,现有 C1 和历史权威路径未接到新 helper。rfc-delivery-boundary。架构入口缺少交付范围和当前边界。 规范capability-trial-ownership。未使用的试跑阶段类型与已有决策的证据绑定须收口。 新类型
对主干的风险 / Risks
[P2] 架构索引缺少当前交付边界。 状态索引和语义镜像已修复。架构入口在两条相邻 RFC 之间新增 Verifier Hook 链接,正文已有成熟度说明,但入口缺少规范要求的主干交付状态和当前边界,读者须进入正文才能知道两种 helper 尚无生产接线。 在 RFC 清单条目补充 Delivery on main 与 Current boundary,指明已验证的 TypeScript 契约和仍待验证的 Host、Oracle 与历史工作集接线。
[P2] 暂缓没有生产者或消费者的试跑类型。 新增的 DomainPluginCandidate 和 DomainPluginTrial 只在声明处出现,现有测试也没有使用。已有 capability trial planner 从版本、配置、effect、rollback 与反馈绑定判断是否建议试跑;新增 staging、trial、adopted、retired 类型只携带自由字符串引用,当前没有生产者把它与已有 trial basis 建立关系。 保留 RFC 的生命周期设计,将两个未使用的类型随实际能力组合消费方一起引入,并复用已有 trial basis;当前可执行的 tier 协商和 VerifiedClose 拒绝条件可以保留。
当前八文件增量的 119 项 TypeScript、类型检查、双语和文档治理通过。预合并 4 项直接检查、18 项选定检查通过。严格资格为 quality_receipt_missing,真实宿主与成果/成本尚待验证。
我的整体评价 / Verdict
请求有界修改。文档状态和精确身份两项旧缺陷已修复。现有证据支持保留已测试的纯决策契约。先补索引与未使用的试跑类型边界,再在各自 owner 下交付未来的运行态接线。
English verdict: REQUEST_CHANGES at 72c7756. The former governance and blank-identity failures are fixed. Document the actual main-branch boundary in the RFC index and keep the unconsumed domain-trial lifecycle out of production exports until it can reuse the existing trial basis. Both tested pure decisions can remain.
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · Gemini · Google DeepMind · self_reported
动机 / Motivation
在长程求解任务中,控制面与宿主维护者在启用多轮探索与独立验收时,往往只能在粗糙的 Stop-Hook 兜底验证与同步逐工具拦截之间二选一;缺乏跨宿主的四边界验证 Hook 协同契约,也缺乏“子作用域须经独立 Oracle 回执且满足低重叠后才折叠”的 VerifiedClose 约束,因此本 PR 试图把验证接入收敛到既有 C1 与历史上下文边界之下。
如果不做任何改动,外部宿主(如 Codex、Claude Code、DSH、Antigravity)上的验证探测、子作用域折叠以及领域快尺(yardstick)试跑仍各自依赖局部协议或散落脚本,既难对齐能力协商档位,也容易让未验证的代理结果或跨作用域回执污染主干上下文。
- 受影响对象(affected_caller_or_operator): 接入宿主 Hook 生命周期(启动、里程碑、压缩/子作用域与停止边界)并消费独立验收回执的 LoopX 控制面、宿主适配器与实验评估维护者。
- 前后对比场景(before_after_scenario): 改动前,不同宿主各自实现启动上下文恢复、里程碑采样、压缩后恢复与停止验收,子工作折叠与快尺试跑缺少统一的不变式边界;理想改进是先合入合规的双语架构 RFC 再在真实拥有者上接线落地,而当前 PR 在最新精确头
4a67ad5a110ed7b73b715e2315334aa462a9cc44上虽进一步将candidate_sha收口为复用content_digest.ts的规范sha256:<64 hex>摘要校验,却完全未触动上一轮已经明确阻塞的两大问题——docs/architecture/rfcs/README.md第 204–205 行依然缺少Delivery on main与Current boundary声明,且控制面生产目录仍保留零运行时调用方的verifier_hook_contract.ts、仅作编译期导出的QuotaGoalBoundaryReference、以及零测试零调用方的平行类型DomainPluginCandidate/DomainPluginTrial(FoldToReceipt亦未归口progressive_context.ts)。 - 可观测结果(observable_outcome): 相对上一轮头
72c77567b09f6ad69a0b56189db3ab3184086609,最新提交4a67ad5a110ed7b73b715e2315334aa462a9cc44在 RFC §3 与recommendVerifiedClose中复用ENVELOPED_SHA256_PATTERN拦截非摘要的分支名或标签(verifier_hook_contract.test.ts增至 8/8 通过,反例探测均在读取权威前返回KeepRaw);但上一轮审查6011989660的两项阻塞以及两条仍未解决的评审线程(README.md:205缺失主干交付边界、verifier_hook_contract.ts:180存在未消费的DomainPluginTrial类型)均原封不动存在,全仓生产路径对verifier_hook_contract.ts与QuotaGoalBoundaryReference仍只有 0 个运行时调用方。 - 非目标(non_goals): 本次变更不改变
C1准入、传输或结算所有权,不实现具体宿主适配器(Codex、DSH、Claude Code、Antigravity)运行时代码,不启用新默认开关,也不开展跨宿主或同宿主模型效果/缓存对照实验。
改动思路 / Approach
本次对精确头 4a67ad5a110ed7b73b715e2315334aa462a9cc44 执行全包独立复审(rereview_pull_request_exact_head),先评估最新增量提交 Bind verified close to immutable candidate digests,再对 6011989660 及现有未解决评审线程涉及的全量阻塞项进行逐一复核。
本轮增量改动评估(72c77567b0 -> 4a67ad5a11):
作者将 VerifiedScopeIdentity.candidate_sha 明确约束为 sha256:<64 lowercase hexadecimal digits> 不可变内容摘要,并在 verifier_hook_contract.ts 第 3、144 行复用既有单一规范所有者 loopx/control_plane/content_digest.ts 的 ENVELOPED_SHA256_PATTERN(在 readReceipt / readEvidence 之前拒绝分支名、标签、裸 64 位十六进制串等输入),同时将 RFC 第 44 行双语同步并补齐第 8 条单测。这部分摘要单一所有者复用和防误读拒绝逻辑本身严谨且实测通过。
然而从架构与比例性(architecture_assessment)及仓库 Scope-Fit Review 规则审视当前完整精确头,最新提交并未解决上一轮已经指出的两项阻塞与两条未解决线程:loopx/control_plane/turn_driver/verifier_hook_contract.ts(184 行)与 loopx/control_plane/quota/turn_envelope.ts 新增的 QuotaGoalBoundaryReference(第 74–77 行)在全仓生产代码中依然只有 0 个运行时调用方,FoldToReceipt / KeepRaw 仍停留在 turn_driver/ 而未接入既有上下文策略拥有者 quota/progressive_context.ts,DomainPluginCandidate / DomainPluginTrial(第 172–184 行)依然没有任何测试或生产调用方并平行重复 capabilities/goal_capability_organization.ts,且 docs/architecture/rfcs/README.md 第 204–205 行仍缺少 Delivery on main / Current boundary 边界说明;因此本 PR 仍不能合入,应先移除未接线的生产 TS 代码、单测与未消费类型以纯 RFC 落地(或在当前 PR 中至少接入真实生产调用方、归口拥有者并删除孤立类型),同时在 README.md 补全交付成熟度边界。 当前 PR 边界(current_pr_boundary):对当前设计阶段的 PR 而言,唯一干净可立即合入的边界是“保留已通过治理检查与摘要约束对齐的双语 RFC 与 STATUS.md 索引,在 docs/architecture/rfcs/README.md 第 204–205 行补全 Delivery on main: Proposal only 与 Current boundary,并把零生产调用方的 verifier_hook_contract.ts、单测及占位类型 QuotaGoalBoundaryReference 移出生产源码目录直到真实宿主或 progressive_context.ts 调用方同步落地”(或者相反地在保留源码时至少打通一条真实生产调用方、将 FoldToReceipt 归口 progressive_context.ts 并删除未消费的 DomainPluginCandidate / DomainPluginTrial)。
与既有实现对比,本轮作者在 verifier_hook_contract.ts 第 3 行正确复用了 ../content_digest.ts 的 ENVELOPED_SHA256_PATTERN(避免正则分叉,test_content_digest_single_owner.py 通过),但围绕核心业务所有权的关键结构分裂仍然未变:QUOTA_GOAL_BOUNDARY_ARTIFACT 在 loopx/control_plane/quota/adaptive_children.ts 有真实生产消费而 QuotaGoalBoundaryReference 为 0 运行时调用;history-working-set-context-policy-v0.md §5.1 指定的 FoldToReceipt / KeepRaw 所有者是 progressive_context.ts 而非 turn_driver/;capabilities/goal_capability_organization.ts 已拥有试跑决策逻辑,而 DomainPluginCandidate / DomainPluginTrial 仍滞留在 verifier_hook_contract.ts 尾部无任何消费者。
| 提案边界 | RFC 设计职责 | 4a67ad5a11 代码与文档现状 |
既有所属拥有者与差距 |
|---|---|---|---|
| Start / resume | 通过原始 C1 capture 摘要与 /goal_boundary 读取作用域与停止条件 |
turn_envelope.ts 新增纯类型 QuotaGoalBoundaryReference(0 运行时调用),测试直接调用 capturedContextSelection |
adaptive_children.ts 已消费 QUOTA_GOAL_BOUNDARY_ARTIFACT,新类型仍无生产调用方 |
| Milestone probe | 异步采样并回传平台期/快尺反转 | 仅联合类型 VerifierTransition(无生产实现) |
yardstick_decision.ts / stride_policy.ts |
| Compaction / subscope | sha256:<64 hex> 不可变 candidate_sha、非空作用域与角色绑定的 FoldToReceipt / KeepRaw |
本轮复用 ENVELOPED_SHA256_PATTERN 校验逻辑正确且 8 条单测通过,但全仓 0 生产调用方 |
应归属 quota/progressive_context.ts(history-working-set-context-policy-v0.md §5.1) |
| Stop / Domain plugin | 独立 Oracle 验收及内容寻址试跑准入 |
DomainPluginCandidate / DomainPluginTrial(第 172–184 行)0 生产调用方且 0 测试引用 |
平行重复 capabilities/goal_capability_organization.ts(未解决线程 README 同步滞后) |
| RFC 索引治理 | 区分设计接受状态与 main 上真实交付边界 |
STATUS.md 与双语治理检查通过,但 README.md:204-205 仍缺 Delivery on main / Current boundary |
docs/architecture/rfcs/README.md 第 50–56、204–205 行 |
具体改动 / Changes
上一轮审查至本次精确头的增量变化(72c77567b09f6ad69a0b56189db3ab3184086609..4a67ad5a110ed7b73b715e2315334aa462a9cc44)
增量提交(Bind verified close to immutable candidate digests)修改 4 个文件(+28 / -4):
- 双语 RFC 摘要格式收敛:
docs/architecture/rfcs/verifier-hook-co-design-v0.md与.zh-CN.md第 44 行明确candidate_sha为sha256:<64 lowercase hexadecimal digits>(sha256:<64 位小写十六进制字符>),并在读取回执前检查格式,分支名、标签等非摘要标识保持KeepRaw。 - 复用单一摘要正则拥有者:
loopx/control_plane/turn_driver/verifier_hook_contract.ts第 3 行导入../content_digest.ts的ENVELOPED_SHA256_PATTERN,第 75 行补充 JSDoc,第 144 行在调用reader.readReceipt之前执行ENVELOPED_SHA256_PATTERN.test(expected.candidate_sha)。 - 补充负向单测:
tests/control_plane_ts/verifier_hook_contract.test.ts更新合法夹具candidate_sha为"sha256:" + "a".repeat(64),并新增第 8 条单测验证"main"、"candidate:26"、裸 64 位 hex、63 位 hex、非 hex 与大写 hex 均在不触及readReceipt/readEvidence的前提下返回KeepRaw。 - 未处理的上一轮阻塞与未解决线程: 未修改
docs/architecture/rfcs/README.md(对应上一轮 Finding #2 与未解决线程);未移除也未接线verifier_hook_contract.ts、QuotaGoalBoundaryReference及未使用的DomainPluginCandidate/DomainPluginTrial(对应上一轮 Finding #1 与未解决线程)。
完整 PR 改动清单(相对基准 d38052695c2c8a2e67cdb2c1eb6f4c6651eabd4d,8 个文件,+506 / -2)
- 文档与索引(5 个文件,+122/-2):
docs/architecture/rfcs/verifier-hook-co-design-v0.md(58 行)、docs/architecture/rfcs/verifier-hook-co-design-v0.zh-CN.md(58 行)、docs/architecture/rfcs/README.md(+2 行,第 204–205 行)、docs/architecture/rfcs/STATUS.md(+2/-1)、docs/architecture/rfcs/STATUS.zh-CN.md(+2/-1)。 - 控制面 TypeScript 源码(2 个文件,+188/-0):
loopx/control_plane/quota/turn_envelope.ts第 74–77 行新增QuotaGoalBoundaryReference(+4 行);新增loopx/control_plane/turn_driver/verifier_hook_contract.ts(184 行)。 - TypeScript 单测(1 个文件,+196/-0): 新增
tests/control_plane_ts/verifier_hook_contract.test.ts(8 条单测),是全仓唯一导入verifier_hook_contract.ts的文件。
关键代码讲解
ENVELOPED_SHA256_PATTERN复用与recommendVerifiedClose入口门控(loopx/control_plane/turn_driver/verifier_hook_contract.ts#L1-L4, L138-L147): 复用content_digest.ts第 2 行的/^sha256:[0-9a-f]{64}$/,在读取回执和证据前先确认request.identity六字段全部非空白、expected.candidate_sha匹配ENVELOPED_SHA256_PATTERN且request.receipt_ref非空白,不满足直接返回{ action: "KeepRaw" },避免把可变分支名/tag 误当不可变候选摘要。- 尚未接线的控制面模块与类型集合(
loopx/control_plane/turn_driver/verifier_hook_contract.ts#L1-L184&loopx/control_plane/quota/turn_envelope.ts#L74-L77): 全文件negotiateVerifierHooks、recommendVerifiedClose、QuotaGoalBoundaryReference仍无任何生产调用方;尾部的DomainPluginCandidate/DomainPluginTrial(第 172–184 行)甚至没有任何测试引用。
规范基线映射(spec_basis)
依据基准 d38052695c2c8a2e67cdb2c1eb6f4c6651eabd4d 上的规范入口 docs/architecture/rfcs/README.md(及其引用的 docs/development/README.md Scope-Fit Review 与 history-working-set-context-policy-v0.md §5.1)映射精确头 4a67ad5a110ed7b73b715e2315334aa462a9cc44:
RFC-INDEX-HEADER->implemented:双语 RFC 头部已补齐Accepted (upon merge)、Supersedes / closes与semantic mirror/语义镜像,STATUS.md/STATUS.zh-CN.md已同步为Accepted (53),generate_rfc_status_index.py --check与docs-governance-smoke.py均通过。RFC-BILINGUAL-PAIR->implemented:英文与中文 RFC 镜像成对更新(包括第 44 行摘要格式补充),scripts/check_rfc_bilingual.py --base origin/main --head HEAD通过。RFC-MATURITY-SEPARATION->not_met:docs/architecture/rfcs/README.md第 50–56 行要求在索引条目以Delivery on main与Current boundary隔离设计提案与已实现边界,docs/development/README.md第 131–137 行禁止在没有真实调用方时把仅靠单测覆盖的新模块留置控制面生产源码目录;当前头README.md第 204–205 行仍缺这两项说明,RFC 第 5 行仍标注Delivery maturity: TypeScript contract,且生产目录仍保留 188 行零生产调用方的 TS 代码、未归口的FoldToReceipt与零测试的DomainPluginTrial类型。
对主干的风险 / Risks
阻塞发现(Findings)
-
[P1 · 阻塞] 控制面生产目录仍保留零生产调用方的
verifier_hook_contract.ts、QuotaGoalBoundaryReference与零测试平行类型DomainPluginTrial(原 Finding #1 未修复)- Problem: 尽管第 4 次提交强化了
candidate_sha摘要格式检查,但loopx/control_plane/turn_driver/verifier_hook_contract.ts(184 行)与loopx/control_plane/quota/turn_envelope.ts第 74–77 行的QuotaGoalBoundaryReference在全仓生产代码中依然没有任何运行时调用方,且FoldToReceipt与DomainPluginTrial继续脱离各自既有的真实拥有者。 - Evidence: 在精确头
4a67ad5a110ed7b73b715e2315334aa462a9cc44执行全仓检索rg -n "verifier_hook_contract|QuotaGoalBoundaryReference|recommendVerifiedClose|negotiateVerifierHooks|DomainPluginTrial|DomainPluginCandidate" loopx tests packages apps scripts:命中仅限于verifier_hook_contract.ts自身导出、turn_envelope.ts:74(纯类型定义)与tests/control_plane_ts/verifier_hook_contract.test.ts,全仓生产代码调用数为 0;其中DomainPluginCandidate/DomainPluginTrial(第 172–184 行)连单测也完全没有引用。同时history-working-set-context-policy-v0.md§5.1 已明确将KeepRaw/FoldToReceipt归属给quota/progressive_context.ts,capabilities/goal_capability_organization.ts已拥有试跑决策逻辑,远端评审线程verifier_hook_contract.ts:180亦保持未解决且未过时状态。 - Impact: 违反
scope_fit(无活跃生产调用方的纯测试模块不应滞留生产路径)、repository_reuse(unjustified_duplication)与change_proportionality(simplify_now),在没有真实生产消费者前提前冻结跨模块导出与并行生命周期类型。 - Fix: 二选一彻底收口:(a) 最简纯 RFC 方案(推荐): 删除
loopx/control_plane/turn_driver/verifier_hook_contract.ts、tests/control_plane_ts/verifier_hook_contract.test.ts与turn_envelope.ts第 74–77 行无消费类型QuotaGoalBoundaryReference,保留已过治理检查的双语 RFC 与STATUS.md;或 (b) 端到端最小接线方案: 将negotiateVerifierHooks/recommendVerifiedClose真正接入至少一条生产路径(如progressive_context.ts与宿主能力读回),将FoldToReceipt/KeepRaw归口progressive_context.ts,并移除零调用零测试的DomainPluginCandidate/DomainPluginTrial。
- Problem: 尽管第 4 次提交强化了
-
[P2 · 阻塞]
docs/architecture/rfcs/README.md仍缺少Delivery on main/Current boundary声明,成熟度边界与命名语义失配(原 Finding #2 未修复)- Problem: 新增 RFC 在架构总索引条目中仍缺少仓库规范要求的当前主干交付范围与边界说明,使
README.md与Delivery maturity: TypeScript contract/adopted生命周期命名之间继续存在口径错位。 - Evidence:
docs/architecture/rfcs/README.md第 50–56 行明确定义Delivery on main与Current boundary用途,第 190–220 行同级条目均成对声明这两行,而第 204–205 行的[Verifier Hook Co-Design v0]仍为空白链接(对应远端未解决且未过时的评审线程);同时verifier-hook-co-design-v0.md第 5 行仍标注Delivery maturity: TypeScript contract,verifier_hook_contract.ts第 180–184 行仍导出无生产调用方的adopted/retired阶段。 - Impact: 不满足
RFC-MATURITY-SEPARATION与authority_semantics(misleading),读者在索引入口无法获知当前在main上零生产接入的真实状态。 - Fix: 在
docs/architecture/rfcs/README.md第 204–205 行补充- **Delivery on \main`:**与- Current boundary:两行(若采纳 Finding 1(a) 移出.ts文件则标为Proposal only,且同步将 EN/ZH RFC 第 5 行改为Proposal;若采纳 1(b) 接线则如实写出已接线的精确范围与未验证项),随后重跑generate_rfc_status_index.py --check与docs-governance-smoke.py`。
- Problem: 新增 RFC 在架构总索引条目中仍缺少仓库规范要求的当前主干交付范围与边界说明,使
边界隔离与语义对齐
- 本轮增量亮点(
candidate_sha摘要校验):recommendVerifiedClose复用content_digest.ts的ENVELOPED_SHA256_PATTERN在进入存储读取前拒绝非规范sha256:<64 hex>字符串(5 条digest_probe反例均输出{"action":"KeepRaw"}且未访问权威存储),test_content_digest_single_owner.py(包含于 460 条架构测试)通过。 - 默认关闭隔离(
default_off_isolation):negotiateVerifierHooks({ enabled: false, pre_tool_use: true }, ...)返回null,生产代码对verifier_hook_contract.ts与QuotaGoalBoundaryReference调用数为 0,现有运行时默认行为保持完全隔离(既有 175 条控制面 TS 单测全通过)。 - 语义词表扫描边界:
scripts/generate_semantic_inventory.py --changed-from origin/main(基线4ae2844cd03dd2d027eda68d5b870e2b652f6ac3)扫描 25 个快照报告supported candidates: 0,examples/semantic-vocabulary-drift-smoke.py通过(29/29 词表、56/56 拥有者符号)。因脚本仅扫描 PythonEnum/Literal/集合与 TSas const数组,若后续保留并接线 TS 代码,须将状态字面量与既有拥有者词表对齐。 - CI 策略说明(
wait_for_ci: false): 不等待或查询远端 GitHub Actions CI;本地canary premerge4 项直接检查、9 项金丝雀、8 项风险烟雾与 1 项公开边界扫描全通过(因缺乏精确 diff 的change-quality回执返回quality_receipt_missing,退出码 1)。
本地验证汇总(精确头 4a67ad5a110ed7b73b715e2315334aa462a9cc44,wait_for_ci: false)
uv run --extra test python scripts/generate_rfc_status_index.py --check:PASS(exit 0)uv run --extra test python examples/docs-governance-smoke.py:PASS(docs-governance-smoke ok)uv run --extra test python scripts/check_rfc_bilingual.py --base origin/main --head HEAD:PASSuv run --extra test python examples/semantic-vocabulary-drift-smoke.py:PASS(29/29 vocabularies, 56/56 owner symbols)npm run typecheck:control-plane:PASSnode --no-warnings --experimental-sqlite --experimental-strip-types --test tests/control_plane_ts/verifier_hook_contract.test.ts:PASS(8/8 passed)- 关联 8 个 TS 套件联合执行(
verifier_hook_contract、yardstick_decision、post_writeback_hook_transaction、context_delivery、progressive_context、turn_envelope、context_selection、content_digest):PASS(183/183 passed) digest_probe反例探测(""、" "、"main"、"candidate:26"、裸 64 位 hex):PASS(5/5 返回{"action":"KeepRaw"}且 0 权威读取)uv run --extra test python -m ruff check tests/control_plane_ts loopx/control_plane/turn_driver loopx/control_plane/quota docs/architecture/rfcs:PASSuv run --extra test python -m mypy:PASS(17 source files)uv run --extra test loopx check --scan-path ...(全部 8 个改动文件公开边界扫描):PASS(0 errors, 5 checks)uv run --extra test python -m pytest -q tests/canary/test_rfc_bilingual.py tests/architecture/test_rfc_status_index.py tests/architecture/test_contributor_task_board.py tests/architecture/test_top_level_module_budget.py tests/architecture/test_control_plane_import_boundaries.py tests/architecture/test_content_digest_single_owner.py tests/architecture/test_semantic_vocabulary_drift.py:PASS(460 passed in 59.26s)uv run --extra test loopx canary premerge --from-git-diff --git-diff-base origin/main:direct_checks 4/4、catalog_canaries 9/9、risk_profile_smokes 8/8、public_boundary 1/1 均 PASS(总状态quality_receipt_missing,退出码 1)- 全仓生产调用方扫描(
rg -n "verifier_hook_contract|QuotaGoalBoundaryReference|recommendVerifiedClose|negotiateVerifierHooks|DomainPluginTrial|DomainPluginCandidate" loopx tests packages apps scripts):FAIL(verifier_hook_contract.ts与QuotaGoalBoundaryReference均为 0 生产调用方,DomainPluginCandidate/DomainPluginTrial连测试也未引用)
我的整体评价 / Verdict
对精确头 4a67ad5a110ed7b73b715e2315334aa462a9cc44 完成第 4 轮独立复审后确认,新提交补充的 candidate_sha 摘要格式门控复用 content_digest.ts 规范合理且本地全部 8 条单测与 460 条架构校验通过;但由于上一轮审查 6011989660 及两条尚未解决的评审线程所指核心问题——控制面生产源码目录仍保留 0 生产调用方且分裂拥有者的 verifier_hook_contract.ts / QuotaGoalBoundaryReference / DomainPluginTrial,以及 docs/architecture/rfcs/README.md 仍缺 Delivery on main / Current boundary 边界说明——均仍未修正,整体维持 REQUEST_CHANGES。
- 长程与用户体验影响(
outcome_impact):long_horizon为not_yet_proven(verifier_hook_contract.ts与QuotaGoalBoundaryReference仍无任何生产运行时调用方,DomainPluginTrial无任何测试或执行路径,尚无真实长程任务接线与成效证明);user_experience为not_applicable,且visual_review为not_applicable(本次审查全部 8 个改动文件,未修改任何前端、Dashboard、Chat 或 CLI 渲染表面)。 - 可观测语义与代码体积(
observable_semantics/code_volume/change_proportionality): 现有主干运行时(175 条既有 TS 单测、460 条架构测试)与 RFC 文档治理检查均确认无退化,但新增 TS 契约毫无生产路径调用,故observable_semantics为not_yet_proven。188 行控制面生产目录 TS 代码与 196 行测试在零生产调用方条件下仍属partly_avoidable/simplify_now/disproportionate,compatibility_assessment为not_applicable(纯新增未调用文件与编译期类型,无存量协议兼容变更)。 - 词表归属(
semantic_alignment):candidate_sha正则已正确复用content_digest.ts单一所有者;其余内联 TS 状态字面量仍属未接入生产的local_only类型,正式接线时需并入progressive_context.ts与goal_capability_organization.ts词表。 - 下一轮复审与合入所需证据: (1) 解决未决阻塞线程与 Finding 1:删除零生产调用方的
verifier_hook_contract.ts、verifier_hook_contract.test.ts与未消费类型QuotaGoalBoundaryReference以纯 RFC 合入,或者接入真实生产调用方、将FoldToReceipt归口progressive_context.ts并移除零测试零调用的DomainPluginCandidate/DomainPluginTrial;(2) 解决未决线程与 Finding 2:在docs/architecture/rfcs/README.md第 204–205 行补充Delivery on main与Current boundary并校准 RFC 第 5 行成熟度声明;(3) 重跑generate_rfc_status_index.py --check、docs-governance-smoke.py、check_rfc_bilingual.py与精确 diff 的canary premerge。 - 声明与新鲜度: 本评审在绑定信息不可用(
session_not_bound)的情况下以self_reported声明模型身份;未等待也未查询远端 GitHub Actions CI(wait_for_ci: false)。当前结果仅对应精确提交4a67ad5a110ed7b73b715e2315334aa462a9cc44。
英文简短结论:
English verdict: REQUEST_CHANGES at head 4a67ad5. Commit 4a67ad5 cleanly reuses ENVELOPED_SHA256_PATTERN from content_digest.ts to reject non-digest candidate_sha strings before reading authority (8/8 unit tests, 183/183 across 8 TS suites, 5/5 digest counterfactual probes, generate_rfc_status_index.py --check, docs-governance-smoke.py, check_rfc_bilingual.py, semantic-vocabulary-drift-smoke.py, ruff, mypy, loopx check, 460/460 pytest checks, and canary premerge 4 direct + 18 selected checks all pass; exit 1 only on quality_receipt_missing). However, both remaining blockers from review 6011989660 and both open review threads remain unaddressed: (1) scope_fit / repository_reuse / change_proportionality (simplify_now): verifier_hook_contract.ts (184 lines) and QuotaGoalBoundaryReference in turn_envelope.ts still have zero runtime production callers, FoldToReceipt/KeepRaw sits outside progressive_context.ts, and DomainPluginCandidate/DomainPluginTrial remain unreferenced even in tests outside goal_capability_organization.ts; (2) RFC-MATURITY-SEPARATION / authority_semantics: docs/architecture/rfcs/README.md lines 204-205 still lack Delivery on main / Current boundary lines while RFC line 5 states Delivery maturity: TypeScript contract.
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh
动机 / Motivation
面向接入宿主 Hook、需要保留子工作原始证据的控制面维护者。宿主使用独立回执折叠子工作时,需要在证据不可用或下轮仍有依赖时保留原始上下文。同一个合格回执和读取请求,返回 undefined 时得到 KeepRaw,实际文件读取抛出 ENOENT 时错误穿过推荐器。RFC §3 规定不可读引用须保留原始内容。 规范 digest 的检查先于证据读取;普通路径未激活新模块。 本次验证 RFC、源合同与实际本机文件错误。安装 Host Hook、模型缓存及匹配成本成果未实测。提案将验证归入 C1、历史工作集和 capability portfolio。实际宿主接入及匹配成本下的成果仍待验证。 历史工作集规范
改动思路 / Approach
C1 管控制面和结算;history/progressive 管上下文,portfolio 管采用。新增合同和 trial 类型尚未接入。 Propose RFC and qualify a minimal existing consumer before claiming a production source contract. 先交付双语设计并指明首个可验收的读取者。若本轮保留可执行切片,由已有 progressive context owner 接入读回、不可用回退和原回执重放。逐工具 Hook 仍须显式启用。
具体改动 / Changes
按现有投影所有权、证据不可用、关闭时保持现有行为三条核对。完整核查 f9aa58e 对共同祖先 d380526 的 9 个文件,+508/−2。相对前次评审,新校验已修复无版本候选。独立验证中,旧头对无版本输入读取四次并推荐折叠,当前头零次读取并返回 KeepRaw。前后均接受规范且证据匹配的 digest。最新提交只在架构测试登记两个 canonical digest 消费点,运行代码和 RFC 与前一头逐字节相同。 前一头到当前头
关键代码讲解
- negotiateVerifierHooks 依据显式开关与已观察到的能力决定档位。关闭时没有新增路径,逐工具能力还需明确启用。 档位协商
- recommendVerifiedClose 先查 digest,再根据作用域读取独立回执和 evidence。matchesEvidence 直接调用证据读者。 证据路径
对主干的风险 / Risks
[P2] 实际读取错误绕过 KeepRaw。 同一个合格回执和读取请求,返回 undefined 时得到 KeepRaw,实际文件读取抛出 ENOENT 时错误穿过推荐器。RFC §3 规定不可读引用须保留原始内容。 若错误归一化由适配器负责,请在首个真实读取者中明确执行并补回归。 规范
[P2] 新合同没有可验收的现有消费者。 新推荐器只由新增测试调用。DomainPluginTrial 没有 producer 或 consumer。建议本轮交付双语 RFC,或让一个已有 history owner 从实际受控来源读回原结果。 既有入口 试跑类型 前一头评审
[P2] 手工索引缺少交付与范围。 请补 Delivery on main 和 Current boundary,明确合同、待接入 Host 及首个验收切片。自动索引检查通过,手工条目仍只有两个链接。 当前条目
当前头含新合同及 canonical digest owner 的 156 项检查、TypeScript typecheck、RFC 双语、生成索引和 Docs Governance 通过。相同现有 owner 检查基线和候选各 131 项通过。 独立真实文件错误反例失败。本次验证 RFC、源合同与实际本机文件错误。安装 Host Hook、模型缓存及匹配成本成果未实测。
我的整体评价 / Verdict
请求修改。保留当前候选 digest 的修复。先明确实际读取失败的处理和已有 owner 的接入边界,再决定保留代码或缩到纯 RFC,同时让目录准确说明交付阶段。
English verdict: REQUEST_CHANGES at f9aa58e. The digest fix works. Actual reader failures still escape KeepRaw, the production contract has no live consumer, and the manual RFC entry lacks delivery and boundary rows.
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh
动机 / Motivation
维护 verifier Hook 的人需要让子工作读回在权限变化时仍能保留原始证据。 前一头的推荐器在产品源码,真实 ENOENT 会中断调用。 相同合格回执和证据,文件缺失会保留 KeepRaw。已有记录被权限隔离后,实际读取仍抛出 EACCES。 当前把推荐器移入测试夹具,源模块只保留类型。ENOENT 回退和手工 RFC 索引均已修复。 这次评审覆盖设计、TypeScript 类型和可执行夹具。真实宿主、缓存、模型成果和成本留给 RFC 首个接入切片。
改动思路 / Approach
沿用原 history working-set 读取、独立回执与 C1 结算 owner。 当前交付类型、设计和夹具。首个实装仍使用原 history owner。 先把可用、不存在、权限拒绝和读取程序错误分开,再让既有读者接入。 现有历史工作集规范
具体改动 / Changes
准确头 4a96dd75b8dd58961561b026dcdcc1a191c6c2d0 和基线 d38052695c2c8a2e67cdb2c1eb6f4c6651eabd4d,10 文件 +557/-2。按保留原证据、关闭态隔离和首个接入切片核对 §3/§5。当前手工索引写清类型、夹具和接入边界。独立回执尚未接入产品,合同导出的 Goal 引用只规定内容哈希和路径。实际读取测试保持同一合法身份、同一类型和证据次序,只改对应文件能否被读。真实 ENOENT 在回执和原始 evidence 两处都返回 KeepRaw。可读对照仍折叠,TypeError 原样可见。产品源码模块无运行时出口,Turn envelope 只多了类型。 RFC 第 3 节 索引
对主干的风险 / Risks
[P2] 真实不可读引用仍会中断 KeepRaw。 真实权限拒绝在 readReceipt 和 readEvidence 都抛 EACCES,目录替代记录在两处都抛 EISDIR。夹具没有返回 KeepRaw,和同一提案对不可读引用的语义不符。 在 reader 边界把权限拒绝和无可用记录的错型路径明确建模为 unavailable,返回 KeepRaw。保留解析、程序错误等非预期故障的可见性,增加两个层级的真实文件反例。 读取夹具
当前 192 项 TypeScript 测试通过,严格类型检查、双语 RFC、索引检查均通过。基线相邻套件 179 过,另有一项已有 digest 消费清单故障,当前头包含对应登记。
我的整体评价 / Verdict
请求修改。保留类型与测试夹具分离、索引说明和 ENOENT 修复。补齐真实不可读时的回退,让未来接入沿用统一语义。实装后仍需验证原始回执恢复以及同一 C1 身份的重放。
English verdict: REQUEST_CHANGES at 4a96dd7. ENOENT preserves the raw scope, and the production module is type-only. Actual permission-denied or wrong-kind records still throw at both reader boundaries, contrary to the fixture's unreadable-reference contract. Treat those as unavailable while preserving unexpected diagnostics.
|
This pull request has merge conflicts with Choose the remote for the base repository, not an out-of-date fork. git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEADFor a same-repository clone whose Keep the DCO |
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…ilable -> KeepRaw Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
4a96dd7 to
1a4253e
Compare
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · Gemini · Google DeepMind · self_reported
动机 / Motivation
本轮针对精确头 1a4253e8d8a63446330f5482ef96751c5cd97dc8 完成整包复审。Control-plane maintainers, host adapter authors (Codex, DSH Cordis, Claude Code, Antigravity, generic CLI/Pi), and history working-set maintainers preparing opt-in multi-boundary verification and independent Oracle-backed child-scope folding.
Before PR #9262, cross-host start/milestone/compaction/stop verifier coordination and VerifiedClose evidence binding existed only across disparate scripts without an accepted specification or shared TypeScript contract; at exact head 1a4253e, the bilingual RFC and STATUS index pass all governance checks, loopx/control_plane/turn_driver/verifier_hook_contract.ts and turn_envelope.ts export zero runtime code, and the isolated fixture in tests/control_plane_ts/fixtures/verifier_hook_contract.ts enforces L0/L1/L2 opt-in negotiation, canonical sha256:<64 hex> candidate digests, nonblank 6-field scope and role matching, and KeepRaw fallback on ENOENT/EACCES/EPERM/EISDIR/ENOTDIR while surfacing SyntaxError and TypeError.
At exact head 1a4253e, generate_rfc_status_index.py --check, check_rfc_bilingual.py, docs-governance-smoke.py, semantic-vocabulary-drift-smoke.py, npm run typecheck:control-plane, strict standalone tsc on test+fixture, 216/216 tests across 8 control-plane TS suites, 461/461 pytest cases across RFC/architecture suites, loopx check (9 files), and canary premerge standard (22/22 checks) all pass; independent Node runtime probe confirms Object.keys(verifier_hook_contract) is empty ([]) and off/invalid/EACCES/EPERM/EISDIR/ENOTDIR inputs resolve cleanly to null or KeepRaw while EIO/SyntaxError/TypeError remain observable.
- 非目标(non_goals): Does not wire host hook adapters (Codex, DSH, Claude Code, Antigravity), modify C1 admission/transport/settlement logic, wire FoldToReceipt into progressive_context.ts runtime paths, change any runtime default, or run cross-host/same-host benchmark experiments.
- 剩余缺口(remaining_gap): Live integration connecting one verified child return into progressive_context.ts / history working-set recovery, real host hook adapter qualification on installed host builds, and matched-budget Stop-Hook causal comparison benchmarks remain pending subsequent slices.
- 下一步(next_step): Wire the first live verified child-return slice through the existing history working-set reader (progressive_context.ts) with C1 settlement replay on the same Goal/Todo and installed host output verification.
- 切分依据(boundary_reason): Landing the bilingual RFC, type-only contract (with zero runtime exports in loopx/), and executable filesystem-backed fixture as a self-contained prerequisite isolates protocol agreement from host/history runtime integration and can be cleanly reviewed and reversed.
- 规范基线: 基于基准提交
a9c275052a54076cfd2e2fb15271a121e20c2360的规范入口docs/architecture/rfcs/README.md逐条核对:RFC-STATUS-INDEX、RFC-BILINGUAL-PAIR、RFC-MATURITY-SEPARATION、SCOPE-FIT-FIXTURE、CONTENT-DIGEST-OWNER、UNREADABLE-KEEPRAW均已在精确头满足。
改动思路 / Approach
将全部可执行推荐与协商逻辑隔离到测试夹具并将生产目录收敛为纯编译期类型(零运行时导出),同时复用既有内容摘要与快尺所有权并完成双语 RFC 治理检查,当前边界契合前置设计阶段且可安全独立合入。
当前 PR 边界(current_pr_boundary): 本 PR 交付合规双语 RFC、STATUS 索引、纯类型 TS 接口与受测契约夹具(零生产运行时代码);后续切片再把首条真实子作用域回传接入 progressive_context.ts 与宿主适配器并补充同宿主对照验证。
相比前序阻塞轮次(4a96dd75b8 等):
- 作者与维护者已将
negotiateVerifierHooks和recommendVerifiedClose全部移出生产源码,隔离到tests/control_plane_ts/fixtures/verifier_hook_contract.ts,使loopx/control_plane/turn_driver/verifier_hook_contract.ts成为纯type-only契约文件(实测Object.keys(contract)为[]),loopx/control_plane/quota/turn_envelope.ts仅在现有QUOTA_GOAL_BOUNDARY_ARTIFACT下新增 4 行纯类型QuotaGoalBoundaryReference。 - 已删除未使用的
DomainPluginCandidate与DomainPluginTrial,GoalVerifierProfile.yardstick直接复用work_items/yardstick_decision.ts的WorkYardstickProfile,recommendVerifiedClose复用content_digest.ts的ENVELOPED_SHA256_PATTERN。 - 针对上一轮遗留的
EACCES/EISDIR问题,在最新提交1a4253e8d8中通过unavailableFsCodes = new Set(["ENOENT", "EACCES", "EPERM", "EISDIR", "ENOTDIR"])使readAvailable在缺失、无权限与错型路径读取时统一映射为KeepRaw,同时保持SyntaxError、TypeError与其他未列入 errno(如EIO)原样可见。
具体改动 / Changes
相对于共同祖先 a9c275052a54076cfd2e2fb15271a121e20c2360,共修改 9 个文件(+655 / -2):
- 双语 RFC 与索引(5 个文件,+129/-2):
docs/architecture/rfcs/verifier-hook-co-design-v0.md与.zh-CN.md:头部状态Accepted (upon merge)、Supersedes / closes: none、明确标注History working-set integration and host qualification are pending,§3 完整规定sha256:<64 hex>与不可读文件系统错误返回KeepRaw、解析/意外读取错误保持可见。docs/architecture/rfcs/STATUS.md与STATUS.zh-CN.md:由generate_rfc_status_index.py更新为Accepted (55)/已接受 (55)。docs/architecture/rfcs/README.md:第 204–209 行补充Delivery on main与Current boundary。
- 控制面纯类型接口(2 个文件,+106/-0):
loopx/control_plane/turn_driver/verifier_hook_contract.ts(102 行,全为import type/export type,无任何运行时代码)。loopx/control_plane/quota/turn_envelope.ts(第 76–79 行新增纯类型QuotaGoalBoundaryReference)。
- 测试夹具与单测(2 个文件,+423/-0):
tests/control_plane_ts/fixtures/verifier_hook_contract.ts(97 行:negotiateVerifierHooks、recommendVerifiedClose、readAvailable、matchesScope、matchesEvidence)。tests/control_plane_ts/verifier_hook_contract.test.ts(326 行,覆盖关闭隔离、L0/L1/L2、显式pre_tool_use、6 元组空白身份 0 读取拦截、非规范摘要拒绝、角色/引用/作用域错绑、真实磁盘ENOENT/EISDIR/ENOTDIR/chmod 0o000EACCES->KeepRaw、可读控制组FoldToReceipt、坏 JSONSyntaxError与TypeError透传以及/goal_boundary选择)。
对主干的风险 / Risks
无阻塞主干风险。
- 默认关闭与零运行时影响:
loopx/内不产生任何运行时 JavaScript,生产路径调用数为 0,既有 202 条控制面相关 TS 单测与 461 条架构 pytest 用例全通过。 - 非阻塞后续建议(follow-up):
docs/architecture/rfcs/README.md第 207–209 行使用现在时概括首个 live slice 目标,后续接通历史工作集时建议在Current boundary同步保持状态时态明确(目前第 206 行Delivery on main及 RFC 第 5 行已明确待接入状态);EPERM与EIO为合成 error.code 反例验证,非 root 环境实测了ENOENT/EISDIR/ENOTDIR/EACCES(chmod 0o000) 与坏 JSONSyntaxError。
本地验证汇总(精确头 1a4253e8d8a63446330f5482ef96751c5cd97dc8,wait_for_ci: false)
npm run typecheck:control-plane:PASS- 独立严格
tsc --noEmit(verifier_hook_contract.test.ts+ 夹具):PASS - 8 个控制面 TS 套件联合测试(
verifier_hook_contract、content_digest_single_owner、turn_envelope、context_delivery、progressive_context、context_selection、yardstick_decision、post_writeback_hook_transaction):PASS(216 passed, 0 failed, 0 skippedin 3.34s) - Node 运行时与反例探测(
Object.keys(verifier_hook_contract) === []、ENOENT/EACCES/EPERM/EISDIR/ENOTDIR->KeepRaw、EIO抛出、null身份与大写SHA256:->KeepRaw、关闭态 ->null):PASS scripts/generate_rfc_status_index.py --check/scripts/check_rfc_bilingual.py --base a9c275052a --head HEAD/examples/docs-governance-smoke.py(隔离 HOME):PASSscripts/generate_semantic_inventory.py --changed-from a9c275052a(supported candidates: 0)与examples/semantic-vocabulary-drift-smoke.py(34/34词表、62/62拥有者符号):PASSruff check(涉及 TS/RFC/架构测试目录):PASSmypy --follow-imports=silent:PASS(17 个配置源文件 0 错误;未过滤mypy在基线与当前头均为 6 个无关既有文件共 50 个错误)pytest -q(test_rfc_bilingual.py与 6 个核心架构测试文件):PASS(461 passedin 72.61s)loopx check --scan-path ...(全部 9 个改动文件):PASS(0 errors, 5 checks)loopx canary premerge --from-git-diff --git-diff-base a9c275052a --profile standard:PASS(4 项直接检查、9 项金丝雀、8 项风险烟雾、1 项公开边界扫描全部通过,merge_gate_passed: true)
我的整体评价 / Verdict
在精确头 1a4253e8d8a63446330f5482ef96751c5cd97dc8 完成整包独立验证:所有 6 条既有评审线程与历史阻塞项均已实质关闭,文档治理、纯类型接口隔离、摘要与快尺复用、以及真实文件权限/错型退回 KeepRaw 与异常透传均已验证通过,给出 APPROVE。
English verdict: APPROVE at head 1a4253e. All prior blockers and all 6 review threads are resolved: bilingual RFC headers and STATUS indexes pass governance validation; runtime negotiation and close recommendation logic is bounded to tests/control_plane_ts/fixtures/verifier_hook_contract.ts while verifier_hook_contract.ts emits zero runtime exports; dead plugin trial types were removed and canonical owners (ENVELOPED_SHA256_PATTERN, WorkYardstickProfile, QUOTA_GOAL_BOUNDARY_ARTIFACT) are reused; and ENOENT, EACCES, EPERM, EISDIR, and ENOTDIR map to KeepRaw while preserving SyntaxError, TypeError, and unexpected I/O errors (typecheck:control-plane, 216/216 TS tests across 8 suites, 461/461 pytest checks, docs-governance, semantic-vocabulary-drift, ruff, mypy --follow-imports=silent, loopx check, and canary premerge 22/22 all passed; wait_for_ci: false).
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh
[P2] 当前验收变更时仍可推荐折叠旧回执。 保持 Goal、Todo、epoch、child scope、候选 SHA 和 oracle 版本。独立证据原样可读,仅验收条件从 R1 变为 R2。 六字段身份匹配继续返回 FoldToReceipt,读取边界未验证当前验收与回执依据相同。新要求可能需要从原始材料复核。 复用 C1 的权威验收依据(例如当前 acceptance_digest),把它绑定到请求、回执和适用证据,或者在可信读者协议中显式执行同等的失效检查。缺失或不同时保留 KeepRaw,把旧回执留作历史。 在同一候选、六项身份和磁盘回执下,只切换验收摘要,要求原摘要仍可 FoldToReceipt,变更后 KeepRaw。保留版本不匹配与权限拒绝的对照。
当前身份类型 · 既有验收摘要 owner
动机 / Motivation
维护长程 Goal 的人可以调整验收要求,随后还需要从原候选与验证记录继续工作。
原候选在旧验收下合格时可以压缩历史;如果验收新增一项,接续时需要识别旧回执的适用范围。 相同候选、验证器版本和原回执下,只切换测试请求的当前验收摘要,两次都得到 FoldToReceipt。改动验证器版本的对照得到 KeepRaw。
本提交交付双语 RFC、纯类型和测试夹具。宿主 Hook、真实历史集接线、生产结算与模型对照仍待后续验收。
既有历史工作集的 A3 要求在变更版本、未完成检查或反证时得到相应决定。A8 保留关闭路径,A7 的真实回执重放属于下一阶段。本轮按基线 a9c275052a54076cfd2e2fb15271a121e20c2360 的规范核验。历史工作集规范
改动思路 / Approach
本轮保留原做法,把 Hook 调用和历史接线留给各自 owner,只落实双语设计、纯类型与测试夹具。验证身份需要覆盖当前验收依据。优先复用 C1 已有摘要或可信读者的新旧依据对照即可,无须扩展宿主功能与持久化结构。以前的空身份、不可读文件与索引问题在当前头已收敛。
具体改动 / Changes
- 五个文档与索引文件说明启动、探测、压缩或子范围以及停止四个边界,并列明后续真实宿主与模型对照。重新生成的双语状态索引及镜像检查通过。双语 RFC 入口
QuotaGoalBoundaryReference以原 capture 加固定指针表达目标边界。Verifier Hook 模块只导出类型,并复用快尺WorkYardstickProfile。Node 实际加载该模块得到零运行时导出。- 夹具以三个角色读回 Oracle、原始来源和摘要。真文件缺失、权限拒绝或文件类型不符时保留原始历史,解析和程序错误仍可见。连续两次读回完全相同的 R1 文件,在 R2 仍推荐折叠,说明候选和验证器完整绑定不足以确认需求版本。实际分支
对主干的风险 / Risks
当前 216 项 TypeScript 测试通过,基线与当前头的 200 项已有用例逐项一致。类型检查、双语和文档治理、语义词表检查均通过。标准预检 4 项直接、18 项执行全部通过。本地最初缺失 TypeScript 依赖,按锁文件安装后重跑通过。当前缺口影响以后接入的历史折叠判断,现有生产路径仍保持关闭。
我的整体评价 / Verdict
REQUEST_CHANGES。 让已通过的回执证明当前验收依据,再定稿这版契约。修复可在现有身份或可信读者边界完成。纯类型和测试夹具未改动已交付界面。实际宿主和历史工作集采用未验证。
English verdict: REQUEST_CHANGES at 1a4253e. The executable contract folds the same passed receipt after an independent acceptance revision changes. Bind the current acceptance basis and KeepRaw on mismatch. Existing tests, default-off parity and standard premerge passed. No live host or history wiring is claimed.
…copeIdentity Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · Gemini · Google DeepMind · self_reported
动机 / Motivation
需要接入独立验证 Hook 并在受支持会话边界折叠已完成子工作历史的控制面与宿主适配器维护者。
此前版本在目标标识缺失验收摘要字段时,若候选内容与验证器版本未变、仅目标验收规则从旧版本升为新版本,推荐器仍会把旧版已通过回执判定为可折叠;当前精确头将规范验收摘要纳入作用域标识后,相同条件下只保留旧摘要推荐折叠,切换至新验收摘要立即拒绝折叠并保留原始证据回读。若停留在旧设计不补全这一约束,后续宿主集成一旦按作用域推荐折叠,就会静默把按旧版验收条件通过的结果当作新验收要求下的有效凭证,导致漏检新约束。定稿双语协同设计 RFC 与纯类型契约模块(零运行时导出),并在独立测试夹具中对缺失、不可读、路径类型错误、角色错绑、摘要格式错误以及验收版本漂移均确定返回 KeepRaw。本 PR 不改写现有运行时结算或上下文投递链路,也不实现具体的 Codex、Claude 或 DSH 宿主 Hook 挂载与线上模型效果对比。真实历史工作集 owner 接线、各宿主运行时 Hook 回调适配器以及线上多模型对照实验仍待后续集成 PR 完成与验收。
改动思路 / Approach
将纯类型协议留在 turn_driver 契约文件、把可执行的推荐逻辑和文件系统读回示例隔离在测试夹具中,并在 quota 边界文件仅增补一条指针类型别名,既先锁定不变量又不向未接线的生产主干提前引入运行时依赖。仅交付双语 RFC 及状态索引更新、一条只读边界引用类型别名、纯类型 VerifiedClose 与 Hook 事件契约、以及测试目录内的参考实现与 15 项自动化用例;不触及生产执行路径。
在结构分工上,Start 阶段通过只读边界引用精确指向捕获快照中的目标约束指针;VerifiedClose 阶段由调用方传入当前权威作用域标识,推荐器在触达回执或证据读取器之前先行校验不可变候选内容摘要与当前目标验收摘要格式,任何字段空白、格式不符、角色错位、文件不可读(ENOENT、EACCES、EPERM、EISDIR、ENOTDIR)或作用域字段不等都退回原始作用域。与 turn_envelope 既有边界常量及 content_digest 唯一正则 owner 的配合直接复用已有定义,避免在契约或测试里复制第二套摘要正则或自造目标边界字段。
flowchart LR
Req["VerifiedCloseRequest (exact head cfa7c3589b)"] --> Pre["格式与非空预检 (BARE_SHA256 / ENVELOPED_SHA256)"]
Pre -->|"空白或摘要格式非法"| Raw1["KeepRaw (0 次读者 IO)"]
Pre -->|"格式有效"| Rec["reader.readReceipt(receipt_ref)"]
Rec -->|"缺失/权限拒绝/作用域或 acceptance_digest 不匹配"| Raw2["KeepRaw"]
Rec -->|"verdict == failed + 匹配反例"| RawC["KeepRaw + counterexample_ref"]
Rec -->|"verdict == passed 且低重叠无未决"| Ev["逐项校验 oracle/source/summary 角色与作用域"]
Ev -->|"全部一致且可读"| Fold["FoldToReceipt"]
Ev -->|"任一缺失/不可读/错绑"| Raw3["KeepRaw"]
(说明:上图基于静态源码分支绘制,用于说明 cfa7c3589bd93f0034db834c1b659260f93c2751 中 recommendVerifiedClose 的控制流与停止分支,不代表生产运行时真实宿主挂载。)
具体改动 / Changes
本 PR 共变更 9 个文件(+741/-2):5 个双语 RFC 与索引文件、2 个控制面纯类型声明文件以及 2 个测试夹具与单元测试文件。参考规范为 eebc7b9d29646dc757b8c76ecb21b5742caa7201 中的 docs/architecture/rfcs/history-working-set-context-policy-v0.md(提交版本 eebc7b9d29646dc757b8c76ecb21b5742caa7201):A3、A5、A6、A8 已在纯类型契约与夹具边界落地并通过对应负向测试;A1、A7、A10、A12 因真实宿主和历史工作集尚未接线而在本阶段按范围声明保留为 deferred。
关键代码讲解
VerifiedScopeIdentity:绑定goal_id、todo_id、parent_epoch_ref、child_scope_ref、candidate_sha、规范acceptance_digest(直接复用outcome_requirements.ts产出的 64 位小写十六进制摘要语义)与verifier_version,使作用域不仅锁定候选内容与验证器版本,也绑定当前有效的目标验收契约摘要。recommendVerifiedClose:通过scopeIdentityFields纳入acceptance_digest,并在调用reader.readReceipt前以content_digest.ts的ENVELOPED_SHA256_PATTERN与BARE_SHA256_PATTERN同时验证候选摘要和验收摘要格式;对文件缺失、权限拒绝或路径类型错误捕获为不可用返回KeepRaw,而SyntaxError、TypeError等解析或契约异常保持上抛可见。QuotaGoalBoundaryReference:紧邻既有常量QUOTA_GOAL_BOUNDARY_ARTIFACT导出只读类型,固定使用capture_sha256与"/goal_boundary"指针表达目标边界引用,零运行时载荷改动。acceptance revision drift R1 -> R2用例:基于磁盘文件回执证明 R1 请求触发FoldToReceipt,仅将当前请求中的acceptance_digest切换为 R2 即触发KeepRaw,同时保留verifier_version失配与EACCES对照。
对主干的风险 / Risks
- Scope-Fit 覆盖边界:本 PR 为显式声明的仅契约与夹具覆盖阶段(coverage-only),
verifier_hook_contract.ts通过node --experimental-strip-types验证导出的运行时键集合为空数组[],turn_envelope.ts也仅新增类型别名;当前主干生产代码没有运行时 Hook 调用点,也不存在默认行为切换或隐式激活。 - 验证矩阵与基线归因:
PASS:npm run typecheck:control-plane(零错误);verifier_hook_contract.test.ts(15/15 通过,含 4 项文件系统的缺失/错型/EACCES子测试)、targeted 控制面 5 套件(verifier_hook_contract+content_digest_single_owner+turn_envelope共 106/106;context_delivery+native_context_lifecycle共 38/38);Node 独立反事实矩阵验证 4 种输入(R1 折叠、R2KeepRaw、带前缀格式错误零 IOKeepRaw、过期证据KeepRaw)。PASS:scripts/check_rfc_bilingual.py --base origin/main --head HEAD、scripts/generate_rfc_status_index.py --check、examples/docs-governance-smoke.py、架构与 Canary pytest(489 passed+23 passed)、ruff check loopx、loopx check(9 变更文件公开边界 0 错误)、Goalcanary premerge --tier standard(4/4 direct + 9/9 catalog + 8/8 risk + 1/1 boundary,0 失败)。FAIL(基线已有、与本 PR 无关):全量npm run test:control-plane在cfa7c3589bd93f0034db834c1b659260f93c2751运行6950项测得6827 pass / 26 fail / 97 skip。该 26 项失败全部集中在managed_claim_execution_conformance.ts与canonical_task_lease_renew.test.ts中对旧 45 分钟租约过期时间(10:45:00Z)及observeFencedExecution的断言(因合入基线a9c275052a54076cfd2e2fb15271a121e20c2360及主干50b4cc9de43498b57c8589c1bda03a787762416a均已继承#9487提交6268621e5e将默认租约 TTL 调为 3 小时13:00:00Z而测试未同步更新)。在同一机器以相同命令对50b4cc9de43498b57c8589c1bda03a787762416a与cfa7c3589bd93f0034db834c1b659260f93c2751执行这 5 个关联套件与canonical_task_lease_renew.test.ts,得到完全一致的退出码1、失败数26/2与规范化失败签名,而本 PR 零改动coordination/或租约逻辑。
- 非阻塞观察:测试文件第 387–397 行的
Control 2读者包装里自己捕获EACCES转返回undefined,不过同文件第 236–274 行已直接用无捕获readJsonFile验证过readAvailable内建对EACCES的捕获,因此不构成覆盖漏洞;后续正式宿主适配器应依赖底层边界统一识别不可用错误而非各自重复包装。当前远端合并状态因相对origin/main落后若干提交而显示BEHIND,但MERGEABLE且无合并冲突、无未解决评论线程。
我的整体评价 / Verdict
对长程能力(long_horizon)为 improved:在候选与验证器不变时补齐目标验收摘要一致性检查,阻断过期验收折叠并保留原始证据回读;对终端用户体验(user_experience)为 not_applicable(本次改动仅涉及双语 RFC 文档、纯类型定义与 TypeScript 控制面单测夹具,不包含前端界面或渲染输出。无渲染层改动需要核验(命令行与控制面内核无 UI 变更)。)。语义对齐判定为 aligned(reuse_existing:复用了 content_digest 唯一正则、outcome_requirements 摘要语义、WorkYardstickProfile 与 QUOTA_GOAL_BOUNDARY_ARTIFACT,未新建运行时枚举或全局注册项,无需调整词表与 CI)。代码体量仅增加约两百行纯类型与独立测试夹具,比例合宜、默认关闭隔离完整、权威边界不夸大生命周期承诺。基于对精确提交 cfa7c3589bd93f0034db834c1b659260f93c2751 的实测复核,所有既有阻塞问题已修毕且未发现新的阻塞缺陷,建议准予批准。
English verdict: APPROVE at cfa7c35. VerifiedScopeIdentity now binds canonical acceptance_digest and rejects R1-to-R2 acceptance drift back to KeepRaw while preserving zero runtime exports and clean targeted, RFC, governance, and standard premerge validation (with 26 control-plane lease TTL failures independently confirmed pre-existing on origin/main).
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh
没有发现阻塞项。未运行真实宿主、模型或远端 CI。
动机 / Motivation
设计可选 verifier Hook 的宿主接入者,以及依赖独立 Oracle 回执的工作集 owner。 对照上一提交与当前提交,在磁盘保持同一候选、Oracle 版本和回执,只修改验收摘要,同时检查某个证据引用的独立验收变化。 当前提交在验收 R1 可推荐折叠,R2 只读取旧回执即保留原文,非法摘要不读取回执,单份 R2 证据不能同 R1 回执混用。 本次边界为 RFC、类型和可执行契约夹具。真实 Hook 接入、采样、模型和成本验证属于后续切片。 旧六字段回执会在候选内容固定但当前验收改变时继续推荐折叠,原始比较材料可能过早被移出。 先交付明确的类型契约和可执行反例,用当前 Goal 验收摘要绑定决策,保持正式宿主接入边界。 对照契约 对照修订 a9c275052a54076cfd2e2fb15271a121e20c2360。
- V1 只有精确可读、作用域一致的回执才能推荐折叠。 通过。
- V2 原始证据保持可读,不可用读取保留原始范围。 通过。
- V3 首个已经接入的 Host 必须验证真实 C1 结算和历史读回;本轮只交付类型及契约夹具。 留待首个宿主切片。
改动思路 / Approach
生产改动仅导出类型。暂由契约夹具验证推荐,实际 Goal 权威、工作集交付与 EpochReset 继续由既有 owner 持有。 先固定验收摘要、角色和保留原件的语义,供后续宿主落地复用。 现有工作集策略要求精确验证、保留原件及区分已验证折叠与真正 EpochReset。 上一轮指出的六字段缺口已通过同一磁盘回执和验收变化独立复测。 对仓库经验采用其中的最小真实路径方法,分别核对正常操作、失败和恢复后的结果。
具体改动 / Changes
精确提交 cfa7c3589bd93f0034db834c1b659260f93c2751,9 个文件 +741/−2。九个文件新增主要由类型、配对 RFC 和真实文件反例组成,执行夹具没有进入生产。
recommendVerifiedClose。验收摘要变更使旧回执失效。文件不可用返回 KeepRaw,程序错误仍可见。 代码VerifiedScopeIdentity。增加权威 acceptance_digest,把候选、验收、Oracle 和上下文绑定到同一个身份。 代码QuotaGoalBoundaryReference。复用捕获摘要绑定和原有 Goal boundary 路径,无运行时调用。 代码
144 项 TypeScript 验证通过,另用两份源码的同一磁盘输入确认验收变化、缺失回执、禁用和预工具门槛。 定向回归测试
对主干的风险 / Risks
上一提交对 R2、非法摘要和单份 R2 摘要证据仍建议折叠。现头三项均保留原文,R1 和缺失回执的正反对照保持。 标准本地预检 18 项执行检查均通过。 只读 merge-tree 和签署检查通过。未运行真实宿主、模型或远端 CI。
语义与 CI 对齐
在真实触发下保留调用方所选的范围。当前提交在验收 R1 可推荐折叠,R2 只读取旧回执即保留原文,非法摘要不读取回执,单份 R2 证据不能同 R1 回执混用。 运行当前夹具、真实磁盘回执配对、双语和标准预检。 复用现有词汇,约束由既有源码拥有者执行。
我的整体评价 / Verdict
APPROVE。 沿用已验证的类型和证据契约,首个实际 Host 接线时沿原 C1 读取和现有工作集 owner 验证读取及恢复。 当前方案补齐首次集成所需的验收失效条件。真实多轮效果和用户路径仍需后续验证。 复用 C1 捕获和既有工作集动作,新增身份字段限未接入生产的 TypeScript 契约。 批准范围是 RFC 和当前可执行接口,实际 Host 的首次有用结果和缓存效果仍待资格验证。
English verdict: APPROVE at cfa7c35. A file-backed counterfactual now folds only under the original acceptance digest and keeps raw for changed acceptance, invalid digest, or mismatched evidence. This qualifies the RFC and executable interface fixture; real host adoption and measured benefit remain pending.
Current review scope
Rebased cleanly onto latest
origin/main(a9c275052a54076cfd2e2fb15271a121e20c2360) and resolved all remaining[P1]/[P2]review threads at exact head1a4253e8d8a63446330f5482ef96751c5cd97dc8:loopx/control_plane/turn_driver/verifier_hook_contract.tsdefines the type-only contract (QuotaGoalBoundaryReferencefromturn_envelope.ts,WorkYardstickProfilereuse, and canonicalsha256:<64 lowercase hex>candidate_sha), whiletests/control_plane_ts/fixtures/verifier_hook_contract.tsexercises negotiation (L0–L2+ explicitpre_tool_use), scope/role bindings, andKeepRawfail-closed guards.EACCES,EPERM,EISDIR,ENOTDIR,ENOENT): updatedreadAvailableintests/control_plane_ts/fixtures/verifier_hook_contract.tsand synced RFC §3/§5 (verifier-hook-co-design-v0.md&.zh-CN.md) so missing, permission-denied, and wrong-kind filesystem lookups at bothreadReceiptandreadEvidenceresolve cleanly to unavailable (KeepRaw), while parse (SyntaxError) and programmer (TypeError) failures remain thrown.docs/architecture/rfcs/STATUS.mdandSTATUS.zh-CN.mdon top of currentorigin/mainand keptDelivery on main/Current boundaryexplicit indocs/architecture/rfcs/README.md.Current validation (Exact Head
1a4253e8d8a63446330f5482ef96751c5cd97dc8)npm run typecheck:control-plane: passed (0errors)node --no-warnings --experimental-sqlite --experimental-strip-types --test(verifier_hook_contract.test.ts,content_digest_single_owner.test.ts,turn_envelope.test.ts,context_delivery.test.ts,native_context_lifecycle.test.ts): 143 passed, 0 skipped, 0 failed, including realENOENT,EACCES(chmod 0o000),EISDIR,ENOTDIR, readable-fileFoldToReceipt,SyntaxError, andTypeErrorchecks across both reader levelsscripts/generate_rfc_status_index.py --check,scripts/check_rfc_bilingual.py --base origin/main --head HEAD, andexamples/docs-governance-smoke.py: passedloopx check --scan-path ...(all 9 changed files):errors=0,warnings=0,public boundary scan clean: 9 filesloopx change-quality verify --goal-id <goal-id> --base-ref origin/main:ok: true,status: "valid",receipt_id: "cqr_0f513500ef3455ce938b",decision: "pass"loopx canary premerge --from-git-diff --git-diff-base origin/main --goal-id <goal-id> --tier standard:direct_checks: 4/4 passedcatalog_canaries: 9/9 passed, failure_count=0risk_profile_smokes: 8/8 passed, failure_count=0boundary_run: 1/1 passed (public boundary scan)passed(merge_gate_passed: true,failure_count: 0,manual_hold_count: 0)