Skip to content

feat(material-lifecycle): add wave-based reranking owner and multi-host provenance docs - #8579

Merged
huangruiteng merged 3 commits into
mainfrom
codex/material-wave-ranking-20261111
Nov 11, 2026
Merged

huangruiteng merged 3 commits into
mainfrom
codex/material-wave-ranking-20261111

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Goal And Delivered Outcome

  • Outcome basis / optional anchor: Add a deterministic TypeScript control-plane wave reranking planner (material_lifecycle.plan_wave_rerank), Python wrapper (plan_material_wave_rerank), CLI subcommand (loopx material-lifecycle plan-wave-rerank), Antigravity project skill surface (antigravity -> .agent/skills), and multi-host native caller provenance documentation in loopx-material.
  • Goal/source and gap: material_lifecycle previously provided single-item movement (plan_material_single_move) and generic permutation proposals (build_material_rerank_proposal), leaving multi-item Top-Window shortlist updates susceptible to three structural failure modes: (1) effort-blind multi-week monographs/courses blocking short high-VOI sprint slices when scoped_slice_ready is false, (2) missing/unranked load-bearing primary citations or secondary commentaries ranked ahead of their cited primary sources, and (3) orthogonal general-trend items crowding top_window_size. In addition, project_skill_delivery lacked the antigravity .agent/skills surface root and skills/loopx-material/SKILL.md did not explicitly clarify native caller provenance across verified local owner hosts.
  • Observable before → after, with the validation row that proves it:
    • Before: callers assembling multi-item rerank proposals had no deterministic control-plane wave planner to stratify unsliced deep_monograph items behind quick_slice / focused_study waves, fail closed on unranked required_load_bearing_refs or primary-over-secondary inversions, or cap orthogonal_backlog / orthogonal_signal items inside top_window_size while keeping untouched backlog items in exact original relative order. PROJECT_SKILL_SURFACE_ROOTS also omitted antigravity.
    • After: plan_material_wave_rerank / loopx material-lifecycle plan-wave-rerank deterministically computes lossless wave-ordered permutations, protected-anchor placement, Top-Window orthogonal demotion into ranked_backlog, and build_material_rerank_proposal-compatible moves + constraints via the TypeScript control-plane owner loopx/control_plane/capabilities/material_wave_ranking.ts; project-skill supports --surface antigravity (.agent/skills). Proven by tests/control_plane_ts/material_wave_ranking.test.ts, tests/capabilities/test_material_wave_ranking.py, and tests/capabilities/test_material_project_skill_delivery.py.
  • Issue/task and intended base: Standalone capability & documentation slice targeting main.

Author Declaration

  • Written by: model_agent (Gemini, Google)

Implemented against

  • Specification and revision: no written specification; the request in this PR is the basis (built on origin/main at beff0f3e55d1f70eceebbd8e78c11f1cff34643b).
  • Criteria:
Criterion (spec clause) Disposition Symbol / path Test or command
Horizon-wave & effort-band cost-adjusted ordering (stratify unsliced deep_monograph to foundational_track unless scoped_slice_ready=True) implemented planMaterialWaveRerank in loopx/control_plane/capabilities/material_wave_ranking.ts; plan_material_wave_rerank in loopx/capabilities/material_lifecycle/ranking.py node --no-warnings --experimental-sqlite --experimental-strip-types --test tests/control_plane_ts/material_wave_ranking.test.ts
Load-bearing primary-over-secondary lineage & unranked required_load_bearing_refs fail-closed gate + Top-Window blocker check implemented planMaterialWaveRerank in loopx/control_plane/capabilities/material_wave_ranking.ts uv run --extra test python -m pytest -q tests/capabilities/test_material_wave_ranking.py
Orthogonal signal Top-Window cap (max_orthogonal_in_top_window) shifting excess orthogonal items to ranked_backlog (> top_window_size) implemented planMaterialWaveRerank in loopx/control_plane/capabilities/material_wave_ranking.ts uv run --extra test python -m pytest -q tests/capabilities/test_material_wave_ranking.py
Lossless set membership, protected 1-based anchors, untouched 300-item backlog relative order retention, and build_material_rerank_proposal compatibility + CLI plan-wave-rerank implemented loopx/capabilities/material_lifecycle/ranking.py, loopx/capabilities/material_lifecycle/cli.py, loopx/control_plane/effect_runtime_handlers.ts uv run --extra test python -m pytest -q tests/capabilities/test_material_wave_ranking.py tests/capabilities/test_material_single_move.py
antigravity project skill delivery surface (.agent/skills) & multi-host native caller provenance + wave quality rules documentation implemented PROJECT_SKILL_SURFACE_ROOTS in loopx/capabilities/project_skill_delivery/core.py; skills/loopx-material/SKILL.md; loopx/capabilities/material_lifecycle/README.md & README.zh-CN.md uv run --extra test python -m pytest -q tests/capabilities/test_material_project_skill_delivery.py tests/test_project_skill_cli.py
  • Self-check before submission: Verified TypeScript control-plane typecheck, TS unit/handler tests, Python material_lifecycle + project_skill pytest suites, semantic coinage inventory, smoke scripts, ruff, and loopx check public-boundary scan. Wave, effort, and evidence-role vocabularies live in the TypeScript decision owner; the Python boundary delegates domain validation to that owner rather than maintaining duplicate closed sets. Left out the unrelated pre-existing origin/main baseline failures in examples/control_plane/control-plane-risk-characterization-smoke.py and the separate checkpoint content-digest issue to keep this PR diff strictly scoped.

Scope And Continuation

  • Completed scope and remaining work: Complete within this scope. material_lifecycle now exposes wave-based reranking across TypeScript control-plane RPC, Python API, CLI, bilingual capability READMEs, and loopx-material skill guidance, alongside .agent/skills surface support for antigravity.
  • Slice boundary / successor: N/A — the requested capability owner, wrapper, CLI subcommand, surface mapping, tests, and documentation are self-contained and complete.

Re-review Repair

  • [orth,a,b,c] with orth=orthogonal_backlog, a/b/c=active_sprint, and top_window_size=2 now returns [a,b,c,orth]: active waves that overflow the window stay ahead of deferred orthogonal backlog.
  • [primary,secondary,independent] with top_window_size=1, secondary.primary_source_refs=[primary] now returns [independent,primary,secondary]: Top-Window replacement evaluates the complete post-swap topology and skips a candidate that depends on the source being shifted out.
  • Both reviewer counterexamples have TypeScript tests and real CLI regressions. The Python wrapper no longer duplicates the TS wave/effort/evidence-role closed sets, so semantic inventory remains multi_value_twins=8/8 without raising the budget.
  • Every commit in the updated range has a DCO Signed-off-by trailer.

Validation

  • Tested revision: 2119bfbd64fc4def3b13da9119168f8270ef8a11
  • Run state: finished
  • Input classes: synthetic
Check kind Result Public-safe evidence / limitation
static passed npm run -s typecheck:control-plane, uv run --extra test python -m ruff check loopx/capabilities/material_lifecycle loopx/capabilities/project_skill_delivery tests/capabilities/test_material_wave_ranking.py tests/capabilities/test_material_project_skill_delivery.py tests/test_project_skill_cli.py, and git diff --check origin/main...HEAD all exited 0.
static passed python3 examples/semantic-vocabulary-drift-smoke.py passed with multi_value_twins=8/8; the TS owner remains the single domain vocabulary source.
static passed loopx check --scan-path ... across all 16 changed paths reported ok: True, errors=0, and public boundary scan clean.
unit passed node --no-warnings --experimental-sqlite --experimental-strip-types --test tests/control_plane_ts/material_wave_ranking.test.ts tests/control_plane_ts/effect_runtime_handlers.test.ts tests/control_plane_ts/effect_runtime_handler_loading.test.ts passed (42/42 tests, including both re-review counterexamples).
integration passed uv run --extra test python -m pytest -q tests/capabilities/test_material_*.py tests/test_decision_context_material.py tests/test_material_candidate_revision.py tests/test_project_skill_cli.py tests/capabilities/test_capability_extension_registry.py tests/control_plane/test_compact_identifier_shape_owner.py tests/architecture/test_material_lifecycle_apply_status_owner.py passed (257/257 tests, exercising Python -> TS effect_runtime_result round-trip and compatibility with build_material_rerank_proposal).
real_entrypoint passed Direct loopx material-lifecycle plan-wave-rerank --input - --format json subprocess checks for both reviewer counterexamples returned [a,b,c,orth] and [independent,primary,secondary] with apply_authorized=false. The CLI file/stdin and fail-closed cases also pass in tests/capabilities/test_material_wave_ranking.py.
  • Coverage and gaps: Covers pure TypeScript wave planner logic, lazy RPC registration, Python validation/delegation, proposal builder round-trip, CLI --input JSON execution, and antigravity project-skill installation/removal. The unrelated pre-existing origin/main control-plane risk-characterization smoke was reproduced on the immutable base and latest main and left untouched; the separate checkpoint content-digest issue is not changed by this PR. Native Antigravity host loading and model adoption remain unverified; the installer path and managed lifecycle are covered.

See validation disclosure guidance.

Frontend / Visual Evidence

  • UI impact: none
  • Before: N/A
  • After: N/A
  • First viewport and preview: N/A
  • States and viewports shown: N/A
  • Source data: none
  • Attention review: N/A (CLI, Python/TS capability, and Markdown documentation only; no dashboard/web/desktop UI changes).
  • Craft review: N/A

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

Technical Direction

  • Direction / acceptance reference, when applicable: Capability hardening (material_lifecycle deterministic wave reranking owner in TypeScript control plane + multi-host project skill delivery).

Shared-authority RFC fixture impact

  • Production-scale fixture schema: N/A
  • Semantic dimensions changed, or reviewed no-impact rationale: N/A (pure capability planning RPC material_lifecycle.plan_wave_rerank; does not alter Goal Authority persistence or shared-authority state schemas).
  • Provider conformance arms run: N/A
  • Read-only legacy/file/PostgreSQL three-arm rehearsal (required for promotion, runtime-routing, or compatibility-projection changes): N/A

Boundary Checklist

  • Neither the diff nor this PR body/comments/attachments disclose private state, credentials, raw traces or verifier output, internal links, or local machine paths (including .loopx/, .codex/goals/, and live ACTIVE_GOAL_STATE.md).
  • 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.
  • Existing English/Chinese RFC pairs (including ledger entries) both have a diff, and the local premerge check python3 scripts/check_rfc_bilingual.py --base origin/main --head HEAD passes, or no paired RFC changed.
  • I completed the visual evidence section for UI changes, or marked UI impact none.
  • Every commit includes a DCO Signed-off-by trailer (git commit -s).

@songoow songoow left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewer: model_agent · GPT-6 Astra Pro · OpenAI · self_reported

Reviewed exact head: 9744784ce315e7eaf9ce6c762f627ca772c4377b;base:beff0f3e55d1f70eceebbd8e78c11f1cff34643b。结论基于完整 16 文件差异、现有调用链和本地真实 CLI,当前有两个需要修复的 P2。

动机 / Motivation

受影响的是已接入素材来源、需要一次调整多条学习或研究材料优先级的项目用户及其本地 Agent。

原有单条移动预览只能表达一个条目的目标名次;例如把短期交付材料、一手来源和长期阅读同时调序,需要调用方自行处理相互依赖、固定名次和整条队列,重复操作容易给出互相冲突的计划。

本次希望让调用方提交完整队列和从材料中核实的标注,一次取得可审计的多条重排预览,再复用现有提案和授权写入流程。实测入口、提案兼容性和无修改预览成立,但主动波次溢出窗口、正交来源依赖这两个组合尚未得到正确结果。

边界是显式调用的排序预览与项目级 Skill 交付;本 PR 不负责生成材料标注、自动执行重排、创建来源权限或实现新的多主机身份系统。

改动思路 / Approach

排序决策放在单一 TypeScript owner,Python 只做输入边界、调用与结果投影,复用现有提案、receipt 和项目安装器,这个边界适合本次显式预览需求;无需另建调度器、持久化排序 authority 或通用 Agent 框架。

当前 PR 应保留可直接调用的预览、已有授权边界及 Antigravity 安装映射,在同一 owner 内修复波次拼接和依赖保持的配额调整;正确性检查应验证候选结果,不能把算法自己造成的冲突归因给用户输入。

实际路径为 loopx.entrypoint.main → CLI dispatcher → _load_wave_rerank_cli_payload → plan_material_wave_rerank → lazy effect-runtime handler → planMaterialWaveRerank。新 owner 接收完整 ranked set,先规范化标注,再排波次、处理来源拓扑和固定位置,最后生成 moves。它没有 provider IO;build_material_rerank_proposal 继续要求调用方提供 inventory 与 Decision Context 引用,写入仍属于既有 source owner。新生成的约束是预览边界,不是 apply 授权。保留旧 single-move API 也合理:一次精确移动与整列按波次排序并非同一语义。

具体改动 / Changes

关键代码讲解

  • planMaterialWaveRerank 是新的纯计算 owner。固定 anchor、完整成员集合、来源拓扑和 Top Window 校验都在这里,但两个调整阶段的组合存在下述反例。
  • plan_material_wave_rerank 复用 effect runtime,把结果转换为既有 builder 可消费的 moves/constraints;runtime 拒绝会变为调用方可见的 ValueError,无静默降级。
  • _load_wave_rerank_cli_payload 提供文件/stdin 的真实入口,成功和拒绝都保留 apply_authorized=false;失败退出码为 2。
  • PROJECT_SKILL_SURFACE_ROOTS 增加 antigravity → .agent/skills,复用现有显式项目安装、managed marker 和卸载逻辑;原有 pi 等 surface 未改路径。

独立接受边界来自 docs/reference/protocols/material-lifecycle-architecture-v0.md,spec_revision=beff0f3e55d1f70eceebbd8e78c11f1cff34643b。该文档没有条款编号,以下沿用其章节名作为 criterion_id:Position(默认关闭、安装不授予来源权限)implemented;Stage-0 Contracts(有界 proposal、显式 no-change 与独立 receipt)implemented;Derived ranked state and lifecycle lineage(保留完整成员集合与 backlog)implemented;Decision-Driven Ranking and Exploration(排序提案与写入 owner 分离)implemented;Migration Boundary(本次不扩展迁移路径)out_of_scope。新增四波次具体策略没有已合入的独立规范;本次另对照它新增 README 中的公开排序承诺验证,发现 F1/F2,未把新文档当作已经验收的证据。

差异为 16 文件 +2212/-34:生产、配置及 Agent 指令 9 文件 +1510/-31,测试 4 文件 +604/-0,公开文档 3 文件 +98/-3。主体为 1092 行 TS owner;既有 receipt/schema 和权限路径没有迁移需求。

对主干的风险 / Risks

F1 — [P2] orthogonal backlog 不能插入尚未排完的主动波次之前。 initialMovable 拼接 将 orthogonalWaveItems 放在所有 remainingMovable 前。输入 [orth,a,b,c],后三项均为 active_sprint、orth 为 orthogonal_backlog、窗口 2,真实 CLI 返回成功和 [a,b,orth,c];既有 proposal builder 也接受其三条 moves。无 anchor、来源依赖或配额冲突,正确的波次顺序可以是 [a,b,c,orth]。这违背新增公开承诺的 max(top_window_size + 1, after_active_waves),会把当前工作材料压到正交热点之后。最小修复是把溢出窗口的主动波次与被保序的普通 backlog 分开,在全部主动波次之后插入正交材料;补充主动波次数量大于窗口的回归用例。

F2 — [P2] 配额替换项必须在移出旧来源后仍满足依赖。 allPredsInTop 只检查交换前的排名。输入 [primary,secondary,independent],primary 为正交 backlog,另外两项为 active sprint,secondary.primary_source_refs=[primary],窗口 1。来源提升后配额调整选择 secondary 替换正要移出的 primary,最终校验报 primary must precede secondary,CLI 退出 2。合法结果 [independent,primary,secondary] 同时满足窗口零正交、来源在前和完整成员集合。这不是不可满足的用户约束;应排除依赖被移出来源的 replacement,并验证交换后的完整拓扑,找下一合法候选。补充这个三条目真实 CLI 用例即可区分修复。

语义与 CI 对齐

这里扩展的是 material-lifecycle 本地排序词汇,不修改通用工作 lane 或权限语义。现有公开预览承诺被上述两个边界组合破坏;修复应在同一 TS owner 中完成,并复跑 node --no-warnings --experimental-sqlite --experimental-strip-types --test tests/control_plane_ts/material_wave_ranking.test.ts 及 python -m pytest -q tests/capabilities/test_material_wave_ranking.py,增加对应反例。不能只降低 README 的承诺来把错误顺序或错误拒绝算作成功。

验证:PASS TS owner/handler/loading 40/40、Python wave/single-move/contracts/project-scope/project-skill/CLI 70/70、全 control-plane typecheck、git diff --check。FAIL 两个真实 CLI 的预期排序/可行性条件,现有测试全绿仍未覆盖。PASS base/head 的 material-lifecycle architecture --format json 完全相等,无标注预览保持原队列,输出明确不授权 apply;项目安装正反路径覆盖 Antigravity。native host 实际加载和模型遵循指令未验证,未将路径测试冒称为主机集成通过。GitHub 队列快照无 status-check rollup,远端 CI 记 UNVERIFIED,与本地已复现缺陷分开判断;两次因测试文件名选错而未收集测试的探索命令不计入通过数。

我的整体评价 / Verdict

架构归属、默认关闭和已有写入权限的分工可以保留;本次没有创建与 Core 并行的权限来源。long_horizon 判断为 preserved:新增预览无持久化队列、重试调度或外部写入,旧路径和成员集合守卫仍在。user_experience 判断为 regression:显式使用新排序入口时会拿到错误 backlog 顺序,或在存在合法解时被要求处理并不存在的输入冲突,尚不能认定目标已交付。视觉审查不适用:本次只触及 CLI、纯计算和项目 Skill,没有渲染页面变化;未验证范围为真实 Antigravity host 加载及模型采纳。

不因代码规模要求重建框架,也不把等待全部远端 CI 作为这次判断的代替品。最小重审条件是修复 F1/F2,在上述实际入口证明主动波次溢出和依赖来源配额组合,同时保持当前成功/拒绝、no-change、固定 anchor、授权隔离测试。此结论仅覆盖本次固定 head;发布前仍需核对远端 head。

English verdict: REQUEST_CHANGES — two reproducible ranking defects remain at the reviewed head.

@huangruiteng
huangruiteng force-pushed the codex/material-wave-ranking-20261111 branch from 9744784 to 9268683 Compare November 11, 2026 07:31
loopx-agent and others added 3 commits November 11, 2026 15:38
…st provenance docs

Add a deterministic TypeScript control-plane wave reranking planner (material_lifecycle.plan_wave_rerank), Python wrapper (plan_material_wave_rerank), and CLI subcommand (loopx material-lifecycle plan-wave-rerank) to prevent effort-blind courses/monographs from blocking quick high-VOI slices, enforce primary-over-secondary lineage and unranked load-bearing ref gates, and cap orthogonal items in Top-Window while preserving untouched backlog relative order and protected anchors. Also add the antigravity project skill surface (.agent/skills) and clarify multi-host native caller provenance in loopx-material documentation.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Keep unfinished active waves before deferred orthogonal material and retry Top-Window replacements against the complete post-swap topology. Add TypeScript and real CLI regressions for both reviewer counterexamples.

Signed-off-by: huangruiteng <huangrt01@163.com>
Remove duplicate Python wave, effort, and evidence-role closed sets. The Python boundary still validates compact tokens while the existing TypeScript runtime remains the single domain vocabulary owner, restoring the semantic inventory budget without loosening it.

Signed-off-by: huangruiteng <huangrt01@163.com>
@huangruiteng
huangruiteng force-pushed the codex/material-wave-ranking-20261111 branch from 9268683 to 2119bfb Compare November 11, 2026 07:39

@huangruiteng huangruiteng left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewer: model_agent · GPT-5 · OpenAI · self_reported

Reviewed exact head: 2119bfbd64fc4def3b13da9119168f8270ef8a11;base:bcf1b6363f70487ab21dfaec34c5eda14b9db226。上一轮两个 P2 已在当前 head 修复。

动机 / Motivation

已启用 Material Lifecycle 的项目用户及其本地 Agent,在需要同时调整多条学习或研究材料优先级时使用该预览。

此前只有单条移动和不带波次语义的 proposal builder;调用方需要自行协调一手来源先于二手解读、固定名次、Top Window 正交热点配额以及大型 backlog 的相对顺序,容易生成相互冲突或压低当前工作的计划。具体到本轮反例,[orth,a,b,c] 曾返回 [a,b,orth,c],而合法的 secondary.primary_source_refs=[primary] 场景又会错误拒绝存在合法解的计划。

调用一次 CLI 或 Python API 即可得到完整、可审计且保持成员集合的重排预览,并可直接交给既有 proposal builder;写入仍需原有 owner gate。

本 PR 不生成材料标注、不读取私有正文、不新增 source authority、不自动 apply,也不替代 Antigravity 等宿主自身的 turn 与权限系统。

改动思路 / Approach

排序规则与不变量归 TypeScript owner,Python 只做边界校验、RPC 调用和结果投影,CLI 保持只读预览,这与现有 material-lifecycle 的 decision/effect 分离一致。

实际路径是 loopx.entrypoint.main → _load_wave_rerank_cli_payload → plan_material_wave_rerank → lazy effect-runtime handler → planMaterialWaveRerank。TypeScript owner 接收完整 ranked set 和公开安全的标注,先建立 primary_source_refs 拓扑,再按波次、投入成本、证据角色和原始稳定名次排序,随后处理 protected anchors 与 Top Window 正交配额,最后逐项验证成员集合、拓扑和 fixed-rank 后置条件。输出只包含 opaque refs、moves 和 constraints,不携带正文、URL、凭据或 provider state。

flowchart LR
    INPUT["完整 ranked refs + 公开安全标注"]
    TS["TypeScript owner<br/>拓扑 / 波次 / anchor / Top Window"]
    CHECK["后置条件<br/>lossless membership / precedence / cap"]
    OUT["preview<br/>reordered refs + moves + bounds"]
    PROP["既有 proposal builder<br/>仍需 inventory / Decision Context / owner gate"]
    WRITE["source owner apply<br/>本 PR 不执行"]

    INPUT --> TS --> CHECK --> OUT --> PROP -. "外置授权边界" .-> WRITE
Loading

上图是当前 head 的源码示意,不代替执行证据。正的公开调用路径走真实 CLI 与 Python wrapper;失败路径在 TypeScript owner 内以 typed request error 拒绝,再由 Python 转为 ValueError,不会静默降级或部分写入。

本 PR 交付显式调用的 wave-rerank 预览、项目级 Antigravity Skill 映射和相关文档;不新增 source authority、持久化队列、自动 apply 或通用 Agent 框架。

复用判断明确:plan_material_single_move 只表达一次精确移动,build_material_rerank_proposal 负责既有 proposal 格式和授权边界,二者都不拥有多条目波次排序与来源拓扑求解;新增 TS owner 因此是本问题的最小决策边界,而不是平行 authority。Python 侧最初重复的 wave/effort/evidence-role 闭集已删除,域词汇现在只由 TS owner 定义。

具体改动 / Changes

完整 diff 为 16 文件,+2402/-34。主体是 1126 行 TypeScript owner、413 行真实 CLI/Python 回归、366 行 TS 回归,以及双语 README、Skill 指引和现有 installer 映射的小幅扩展;既有 receipt/schema、Core authority 和 source apply 路径没有迁移。

关键代码讲解

  • planMaterialWaveRerank 是纯决策 owner。它校验紧凑 refs、annotation 字段和数量、来源 DAG、anchor 可达区间及 load-bearing 依赖,并返回不可变的顺序、moves、bounds 和审计列表。
  • initialMovable 与 Stage B 把溢出窗口的主动波次置于 deferred orthogonal backlog 之前;配额替换现在先构造完整交换后顺序,再用 preservesPrimaryPrecedence 检查整个拓扑并继续寻找合法候选。
  • plan_material_wave_rerank 只做 Python 边界规范化、effect-runtime 调用和 typed result 投影;它不复制 TS 的领域闭集,invalid wave/effort/role 仍由 TS owner 拒绝。
  • _load_wave_rerank_cli_payload 支持文件与 stdin,严格限制顶层字段,成功和失败都显式保留 apply_authorized=false。
  • PROJECT_SKILL_SURFACE_ROOTS 增加 antigravity → .agent/skills,复用现有 managed marker、预览、安装和卸载事务;effect_runtime_handlers 只注册 lazy handler,不扩大默认加载面。

契约映射

审查基准为 docs/reference/protocols/material-lifecycle-architecture-v0.md,spec_revision=bcf1b6363f70487ab21dfaec34c5eda14b9db226。

criterion_id requirement disposition
POSITION capability 默认关闭、owner-scoped,不拥有原文或 Core authority implemented:catalog 与 architecture packet 仍报告 default_enabled=false、creates_authority=false、mutates_core_state=false
STAGE0 输出 bounded rerank delta,并支持明确 no-change implemented:planMaterialWaveRerank 生成 moves/constraints,空移动保持既有 proposal 可消费
DERIVED-STATE 保留完整 ranked set 与 backlog 成员关系 implemented:lossless membership、protected rank 与 unannotated backlog 后置检查及 TS/CLI 回归
RANKING 排序决策与写入分离,写入依赖 owner gate implemented:新路径只返回 apply_authorized=false 的 preview,既有 proposal/receipt 继续独占写入边界
MIGRATION 本次不扩展 migration provider 或 cutover out_of_scope:diff 未修改 migration plan/apply/rollback 路径

文档与宿主面

双语 README 和 loopx-material Skill 指引增加了三组排序规则、真实 CLI 示例、引用顺序和 Top Window 配额说明;Antigravity、Kiro CLI、Pi 的已注册 surface 也在文档表中对齐。项目级安装仍只影响显式目标目录,不激活材料写入。原生 Antigravity 实际加载 Skill 与模型遵循仍未验证,不能由路径测试推出。

对主干的风险 / Risks

当前 head 没有 blocking finding。最强回归风险仍是“约束求解在后续阶段改变前一步判断”:F1 会让正交 backlog 插到尚未排完的 active wave 前,F2 会让配额替换破坏来源顺序。两项都已在完整 owner 上复现并修复;当前实现通过真实 CLI 分别得到 [a,b,c,orth] 和 [independent,primary,secondary],同时保留 anchor、lineage、membership 和 authorization 检查。

其他风险按证据处理如下:

  • 性能与规模:正式 TS 用例覆盖 300 条队列,额外随机检查覆盖 4000 个 1–40 条队列的成员集合与 Top Window 配额;尚未证明 10,000 条上限下的交互延迟,但实现为纯计算预览,不影响普通调用路径。
  • 默认关闭隔离:base 与 head 的 loopx material-lifecycle architecture --format json 输出字节一致;新增 CLI 只有显式调用时出现,没有加入 heartbeat、scheduler、自动 apply 或默认 Skill 安装。
  • 权限语义:material_lifecycle.plan_wave_rerank、material_wave_rerank_plan_v0 和 CLI planned 都只表示预览,不承诺写入;现有 proposal builder 继续要求 revision-bound inventory、Decision Context 和 owner gate。
  • 宿主集成:antigravity 安装目标与 managed lifecycle 有正反路径测试,但真实宿主发现与模型采纳未执行,保留为 unverified,不影响本次排序 owner 的正确性判断。
  • 既有基线红灯:control-plane-risk-characterization-smoke.py 在 immutable main 与当前 head 都因同一 safe_bypass_allowed=False 断言失败;本 PR 不修改该因果路径,且变更不变量有独立通过的测试。GitHub CI 在评审时仍有 queued job,当前记作诊断项,不冒充成功。

语义与 CI 对齐

新增词表只属于 material-lifecycle 本地排序契约:MATERIAL_HORIZON_WAVES、MATERIAL_EFFORT_BANDS、MATERIAL_EVIDENCE_ROLES 和 effective wave 由 TS owner 单点定义。Python 仅验证 opaque token,实际域校验通过真实 runtime 返回;semantic-vocabulary-drift-smoke.py 从初始的 multi_value_twins=11/8 修复为 8/8,没有提高预算或注册无关词汇。

验证结果:PASS TypeScript owner/handler/loading 42/42;PASS Python 关联套件 257/257;PASS control-plane typecheck、Ruff、Rfc bilingual check、git diff --check、semantic vocabulary smoke;PASS 两个真实 CLI 反例。canary premerge 的 diff、编译、risk-profile 与 public-boundary 部分通过,唯一失败已按上面同一 base/head 签名归因为既有风险 smoke。

我的整体评价 / Verdict

long_horizon 判断为 preserved:新增能力是显式预览,不创建持久队列、自动重试、静默副作用或第二套写入 authority,完整成员集合与既有 proposal/receipt 链路仍受保护。user_experience 判断为 improved:用户和本地 Agent 不再需要手工拼接多条相互约束的 moves,CLI 与 Python API 返回同一可审计结果,失败信息指出真正缺失的 intake、anchor 或 source dependency;本轮两个错误顺序/错误拒绝已消除。

代码体积较大,但主要来自可执行的纯 TS 约束 owner 和对应测试;复用单条移动或通用 proposal builder 无法表达整列波次与拓扑求解,因此没有发现可删除的平行状态机。最有价值的简化已经执行:移除 Python 的一份领域词汇副本,恢复单一 TS 词表 owner。spec 映射的五个 criterion 均 implemented 或按既有边界 out_of_scope,没有 not_met。

视觉审查不适用:本 PR 没有页面或渲染布局变化,只触及 CLI、Python/TypeScript capability、installer 与 Markdown;最需要补足但仍不阻塞本次合并的验证是真实 Antigravity 宿主加载与模型采纳。排除该未验证宿主维度后,当前 exact head 的功能不变量、默认关闭、授权分离、旧 API 兼容和 reviewer 反例都有独立证据。

English verdict: APPROVE — both reported ranking defects are fixed and validated at exact head 2119bfbd64fc4def3b13da9119168f8270ef8a11; no blocking finding remains.

@huangruiteng
huangruiteng dismissed songoow’s stale review November 11, 2026 07:45

Both requested changes are resolved at exact head 2119bfb. F1 now places all overflowing active waves before deferred orthogonal backlog and the real CLI returns [a,b,c,orth]. F2 now validates the complete post-swap primary_source_refs topology, skips dependent replacements, and the real CLI returns [independent,primary,secondary]. TypeScript and Python CLI regressions pass, all review threads are resolved, and the current exact head has a fresh approval.

@huangruiteng
huangruiteng merged commit 775c703 into main Nov 11, 2026
6 of 10 checks passed
@huangruiteng
huangruiteng deleted the codex/material-wave-ranking-20261111 branch November 11, 2026 07:45
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.

3 participants