docs(decision-context, material-lifecycle): add Decision Context → Ma… - #3116
docs(decision-context, material-lifecycle): add Decision Context → Ma…#3116rootkiller6788 wants to merge 1 commit into
Conversation
…terial Lifecycle rerank walkthrough (GH-C74) Public-safe walkthrough proving the full pipeline from revision-bound evidence through owner-gated material rerank: source manifests strip private locators, stale claims and unresolved conflicts stay visible, exact-read-verified claims feed outcome feedback into Reward Memory candidates, rerank proposals reference decision evidence with bounded constraints, and apply receipts require separate owner gates and validation refs. Exercises 13 scenarios bridging the two capabilities without provider calls, draft bodies, credentials, or publish authority.
huangruiteng
left a comment
There was a problem hiding this comment.
Review PR #3116 — exact head 32e36d1a29a1d6d28c6746736e5c296ec7f7df39
详细中文评审
动机
该 PR 为 Decision Context → Material Lifecycle rerank(GH-C74)补充贡献者可见的端到端 walkthrough smoke,证明从 revision-bound 证据到 owner-gated material rerank 的整条管线均已实现、可回归且始终遵守公开边界。Decision Context 默认关闭、不产生 authority、provider 失败 fail-open;Material Lifecycle 的 raw material store 是私有外部 authority,LoopX 状态只保存公开安全的 receipt。这些契约分布在 loopx.capabilities.decision_context 与 loopx.capabilities.material_lifecycle 的多个模块中,缺少统一的可执行验证路径;本 PR 用单文件示例把 13 个场景串起来,是比分散断言更可维护的贡献者入口。
改动思路
改动集中在新增 examples/decision-context-material-lifecycle-walkthrough-smoke.py,不触碰产品代码、不调用 provider、不读写外部 sink。示例直接调用真实模块 API:build_decision_source_manifest、build_decision_evidence_packet、build_decision_proposal、build_decision_outcome_receipt、build_decision_outcome_feedback、build_material_store_inventory、build_material_rerank_proposal、build_material_rerank_apply_receipt、build_material_lifecycle_receipt 与两个 architecture packet。13 个场景按两大面组织:Decision Context(manifest/evidence/proposal/outcome/feedback 的 eligible 与 ineligible 两路)与 Material Lifecycle(architecture/inventory/rerank/owner-gated apply/lifecycle receipt),最后以完整决策→rerank 管线收尾;每个载荷都经过 _assert_public_safe,main() 汇总失败并返回非零退出码。
具体改动
关键内容讲解
- 场景 1/8(架构边界):Decision Context 必须
default_enabled == False、creates_authority == False、provider 失败策略为fail_open_to_current_authority;Material Lifecycle 的 raw store 必须声明为private_external_authority,两者都默认关闭。 - 场景 2(私有定位符剥离):
DecisionSourceSpec即使携带private_locator,manifest 序列化结果也不能包含该值,并显式声明private_locators_captured == False——这是最关键的隐私断言。 - 场景 3/4(证据与提案):evidence packet 保留 stale/rejected claims(含
reason_code)与 unresolved conflicts,source_bodies必须缺席;proposal 必须引用evidence_packet_ref并带objective_scores与置信度,绝不带原始 source body。 - 场景 5/6/7(outcome 与 feedback):verified outcome 声明
reward_memory_candidate_eligible且mutates_core_state == False;eligible 时 feedback 桥创建review_readycandidate 但绝不自动 ingest/activate;存在 unresolved conflict 时必须返回unresolved_authority_conflictreason code,而不是静默跳过。 - 场景 9/10(inventory 与 rerank):inventory 声明
raw_content_captured == False并验证stable_ids_verified/backup_verified;rerank proposal 引用decision_evidence_ref,moves 带reason_code,max_moved_items/max_rank_displacement约束进入 constraints 块。 - 场景 11/12(owner gate 与 lifecycle):rerank apply receipt 必须携带
owner_gate_ref与validation_ref,且不包含cursor_commit_ref(cursor 提交是独立 owner 动作);lifecycle 状态转换必须带transition_authority_ref。 - 场景 13(端到端):manifest → evidence → proposal → verified outcome → feedback → inventory → rerank → owner-gated apply 全链路,每个 payload 都通过 public-safe 检查。
对主干的风险
- 无产品代码改动,
git diff --check干净;dependency-reviewSUCCESS,pytest在评审时仍 IN_PROGRESS——本地已独立运行全部 13 个场景通过,等价于该示例的本地验证,但合入前应确认 CI pytest 变绿。 - 示例漂移风险被结构抑制:全部场景调用 exact-head 的真实 capability API 而非硬编码输出;管线行为变化时 smoke 会失败。
- 不新增抽象或调用方:
decision_context与material_lifecycle均为已上线 capability 模块,本 smoke 只补公开回归路径,不存在“无活跃调用方”的 scope-fit 问题。 - 安全边界验证充分:私有定位符剥离、raw content 缺席、owner gate 与 validation ref 强制、cursor 提交分离、无外部 sink 均有断言;
FORBIDDEN词表用字符串拼接构造以避免源码误判。 - 文件较大(+958),但内容与 13 个独立场景一一对应,建议按 Decision Context / Material Lifecycle 两个面 review;本地运行全部通过,合入后可作为该 rerank 管线的持续回归入口。
我的整体评价
同意合并(APPROVE)。958 行的 walkthrough smoke 覆盖面与该管线复杂度匹配:它把 Decision Context 的默认关闭/fail-open/隐私剥离、outcome→Reward Memory 的 eligible/ineligible 两路、Material Lifecycle 的 owner-gated rerank 与 lifecycle authority 全部落到可执行断言,且 13/13 场景在 exact head 32e36d1a29a1d6d28c6746736e5c296ec7f7df39 本地独立运行通过。唯一待确认项是 CI pytest 完成状态,不影响评审结论,但合入前应确认其为绿色。
English Verdict
APPROVE — exact head 32e36d1a29a1d6d28c6746736e5c296ec7f7df39.
Key finding: the walkthrough smoke exercises the real decision_context and material_lifecycle capability APIs across 13 scenarios (default-off/fail-open architecture, private-locator stripping, evidence/conflict visibility, Reward Memory eligibility feedback, raw-content-absent inventory, evidence-linked owner-gated rerank, lifecycle transition authority); all 13 passed in an independent local run at the exact head, dependency-review is SUCCESS, and git diff --check is clean. No production code changes and no new abstractions; the only open item is the in-progress CI pytest check, which should be green before merge.
Validation: local run of examples/decision-context-material-lifecycle-walkthrough-smoke.py (13/13 ok); dependency-review SUCCESS; pytest pending.
huangruiteng
left a comment
There was a problem hiding this comment.
详细中文评审(durable_smoke_value 门槛)
精确评审头: 3116@32e36d1a29a1d6d28c6746736e5c296ec7f7df39
动机
本 PR 是单文件 examples/decision-context-material-lifecycle-walkthrough-smoke.py(+958 行),演示 Decision Context → Material Lifecycle。按 durable_smoke_value 门槛,例程类 PR 必须证明对仓库/产品的真实、持久价值;本 PR 不满足。
改动思路
13 个 scenario 覆盖 decision-to-rerank 全流程、lifecycle receipt 与 transition authority。作为演示自洽,但该主题已有大量测试覆盖,且队列中已有更克制的同类实现。
具体改动(关键内容讲解)
- existing_coverage_scan:
tests/capabilities/下 decision_context 与 material_lifecycle 各有完整测试族(apply/contracts/decision_planning/runtime 等),另有examples/material-lifecycle-contract-smoke.py;同时 liubf21 的 #3071(227 行)已用真实 capability 覆盖同一 decision-material walkthrough 主题并通过新门槛。本文件 958 行高度重复。 - same_author_batch_scan:#3113–#3120 为同一作者 8 个同构 walkthrough 系列。
- real_product_or_repo_value_verdict:正确做法是收敛为 thin focused pytest,或直接与 #3071 合并;958 行 example 是重复脚手架。
对主干的风险
代码本身无运行时风险。风险在模式:同作者用超大体量同形状 walkthrough 系列占满队列,且与已通过评审的同类 PR 重复。
我的整体评价
REQUEST_CHANGES。 修复建议(择一):(1) 收敛为 thin focused pytest;(2) 与 #3071 或 #3113–#3120 系列合并。贡献行为警告:按 PR #3134 政策,若同一作者在警告后再提交此类低价值同形状 PR,将禁止该账号继续向本仓库提交 PR(owner 执行屏蔽)。
English Verdict
REQUEST_CHANGES — exact head 32e36d1a29a1d6d28c6746736e5c296ec7f7df39.
Under the durable_smoke_value gate, this 958-line example-only walkthrough duplicates the shipped decision-context/material-lifecycle test family and overlaps the already-approved compact walkthrough #3071 (227 lines). Consolidate into thin focused tests or merge with the existing walkthrough. Contribution warning: further low-value same-shape PRs will lead to the account being blocked from submitting PRs.
…terial Lifecycle rerank walkthrough (GH-C74)
Public-safe walkthrough proving the full pipeline from revision-bound evidence through owner-gated material rerank: source manifests strip private locators, stale claims and unresolved conflicts stay visible, exact-read-verified claims feed outcome feedback into Reward Memory candidates, rerank proposals reference decision evidence with bounded constraints, and apply receipts require separate owner gates and validation refs.
Exercises 13 scenarios bridging the two capabilities without provider calls, draft bodies, credentials, or publish authority.
Summary
Issue Or Task
Validation
python3 -m py_compile loopx/*.pyloopx check --scan-root .Type of Change
LoopX Area
Boundary Checklist
.loopx/,.codex/goals/, liveACTIVE_GOAL_STATE.md, credentials, private benchmark traces, verifier output, raw agent sessions, internal document links, or local machine paths.