Skip to content

docs(decision-context, material-lifecycle): add Decision Context → Ma… - #3116

Closed
rootkiller6788 wants to merge 1 commit into
huangruiteng:mainfrom
rootkiller6788:feat/gh-c74-dc-ml-walkthrough
Closed

docs(decision-context, material-lifecycle): add Decision Context → Ma…#3116
rootkiller6788 wants to merge 1 commit into
huangruiteng:mainfrom
rootkiller6788:feat/gh-c74-dc-ml-walkthrough

Conversation

@rootkiller6788

Copy link
Copy Markdown
Contributor

…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

  • Closes #
  • Contributor task ID:

Validation

  • python3 -m py_compile loopx/*.py
  • loopx check --scan-root .
  • Other:

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring (no functional changes)
  • Documentation update
  • Test update

LoopX Area

  • Control plane (goals, todos, quota, scheduler, registry, runtime)
  • Benchmark boundary (adapters, runners, verifiers, scoring, evidence)
  • Capability or extension (providers, adapters, skills)
  • Public docs or presentation surface (README, protocols, dashboard)
  • Build, packaging, installer, or CI
  • Host or runtime integration

Boundary Checklist

  • I did not commit .loopx/, .codex/goals/, live ACTIVE_GOAL_STATE.md, credentials, private benchmark traces, verifier output, raw agent sessions, internal document links, or local machine paths.
  • I did not duplicate maintainer-owned benchmark work unless a maintainer split out a public issue for it.
  • I kept the change scoped to the linked issue/task.

…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 huangruiteng left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_contextloopx.capabilities.material_lifecycle 的多个模块中,缺少统一的可执行验证路径;本 PR 用单文件示例把 13 个场景串起来,是比分散断言更可维护的贡献者入口。

改动思路

改动集中在新增 examples/decision-context-material-lifecycle-walkthrough-smoke.py,不触碰产品代码、不调用 provider、不读写外部 sink。示例直接调用真实模块 API:build_decision_source_manifestbuild_decision_evidence_packetbuild_decision_proposalbuild_decision_outcome_receiptbuild_decision_outcome_feedbackbuild_material_store_inventorybuild_material_rerank_proposalbuild_material_rerank_apply_receiptbuild_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_safemain() 汇总失败并返回非零退出码。

具体改动

关键内容讲解

  • 场景 1/8(架构边界):Decision Context 必须 default_enabled == Falsecreates_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_eligiblemutates_core_state == False;eligible 时 feedback 桥创建 review_ready candidate 但绝不自动 ingest/activate;存在 unresolved conflict 时必须返回 unresolved_authority_conflict reason code,而不是静默跳过。
  • 场景 9/10(inventory 与 rerank):inventory 声明 raw_content_captured == False 并验证 stable_ids_verified/backup_verified;rerank proposal 引用 decision_evidence_ref,moves 带 reason_codemax_moved_items/max_rank_displacement 约束进入 constraints 块。
  • 场景 11/12(owner gate 与 lifecycle):rerank apply receipt 必须携带 owner_gate_refvalidation_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-review SUCCESS,pytest 在评审时仍 IN_PROGRESS——本地已独立运行全部 13 个场景通过,等价于该示例的本地验证,但合入前应确认 CI pytest 变绿。
  • 示例漂移风险被结构抑制:全部场景调用 exact-head 的真实 capability API 而非硬编码输出;管线行为变化时 smoke 会失败。
  • 不新增抽象或调用方:decision_contextmaterial_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 huangruiteng left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

详细中文评审(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_scantests/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.

@rootkiller6788
rootkiller6788 deleted the feat/gh-c74-dc-ml-walkthrough branch August 12, 2026 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants