Skip to content

task: K01 — 七个 Knowledge 主体迁移与清单同审 #407

Closed

Description

@Dong1017

已确认实施方案:用户于 2026-11-12 11:35–11:36(北京时间)确认综合推荐,并要求快速、干净切换。

  • 目的:把七个知识主体搬进 inferrsi.knowledge.*,根上留纯静态导出壳,新增 _repo_pack_data,让九对 allowlist 生效。
  • 迁入或删除:七主体实现 → src/inferrsi/knowledge/ 同名模块;REPO_TYPES / repository_pack → _repo_pack_data.py;infra.inspection 的 import 改指向该叶子。根壳保留。不得按过期清单直接做壳。 在 K01 自己的 base 上重算七叶哈希,修订 manifest 并与迁移一起提交正式评审 与 _skill_selection.public(至少覆盖当前树上已存在的 TASK_RELEVANCE、task_score、record_context),同步 .github/knowledge-model-policy.json 的新路径保护(根路径保留到 R01)。
  • 前置:P0b 已合入;以当前 upstream/main 为 base。清单修订与七主体搬家在同一个 K01 PR 一起正式评审,不另开清单 PR、不等另一轮合入;实现者不得自批清单修订,须 amy-why-3459 与 zengchuang-hw 正式评审。
  • 验收:K01-1…K01-6;infra.inspection → catalog 改线;absent: knowledge/ 消失;残差与 H→model/infra、allowlist 仍在;overall 仍为 false;新路径出现在 protected_paths。
  • 明确不做:残差、data/ / pack.json、删壳、拆 skill_evaluation、OBS、登记 NEW_H_ENTRIES、现在就改清单而不经评审。

清单审计事实与同 PR 修订要求

冻结 docs/legacy-knowledge-manifest.json 的 base_commit 为 0da7e2f960cd4ec994ae8eddea5b71023c5379ca。七叶在该 base、P0b 375d6dca、H01 04e94eb 与清单一致。自 #389 合入 c013e7778e5d421df655b969d4c89f81ade65b44(2026-11-12 09:27:42 北京时间)起:

  • _skill_selection.py 实际 SHA-256 7bcf1930b73e09fcadf78e7c9e384b30411ed599d83c32e6837f04ca25cbda77,清单 acbec7c91bfa05bc2008b939e009fe600a40518051229fb7618c56b092ad36b9。
  • knowledge_operations.py 实际 SHA-256 686b196e03ca0a1dba5ff5e246563f305ba2bea412172833905af41a6c6ad886,清单 3725781bcedb308af6ad9edc0b970c63f82accf6b04ebee4008c1081b63bed9c。
  • Integrate project-scoped MindIE knowledge into InferRSI #393 / e2f4cd1e39b369f06835cdd655ad5dc9f6808918 未再改两叶哈希,不将漂移误归给 Integrate project-scoped MindIE knowledge into InferRSI #393。
  • 在 K01 自己的当前 main base 重算七叶哈希,修订 base_commit,补齐 _skill_selection.exports.public 的 TASK_RELEVANCE、task_score、record_context,保留当前公开面。附 observability/knowledge_capture.py:20 的 TASK_RELEVANCE 消费证据,以及 Review measured request profiles and decisions across optimization rounds #389 KnowledgeReader.collect 审计。新路径加入 .github/knowledge-model-policy.json 作者声明保护,旧路径至 R01 保留。

合入后 overall isolation_complete 必须仍为 false。

关联架构总题 #387、Apps 设计 #371;#389 是当前清单与 observability 来源,#398 为已合入 H01,#397 保持纯 Apps 标准输出且只读不扩范围。

Activity

  1. added
    kind:taskBounded delivery task with a delegated slice
    area:knowledgeKnowledge line: packs, skill library, knowledge admission
    on Nov 12, 2026
  2. amy-why-3459 commented on Nov 12, 2026

    @amy-why-3459
    Collaborator

    谢谢整理,范围和"同一个 PR 修订清单并正式评审"的做法我都认可。我在当前 main(e2f4cd1e39b369f06835cdd655ad5dc9f6808918)上核对了几处事实,补充几点供实现时参考:

    1. 哈希漂移已复核。 src/inferrsi/_skill_selection.py 的 SHA-256 是 7bcf1930…cbda77,src/inferrsi/knowledge_operations.py 的是 686b196e…6ad886,都和正文一致,和 docs/legacy-knowledge-manifest.json 里 base 0da7e2f9 的值不同。所以 K01 的 PR 必须重算全部七叶,不能只改这两条。PR 描述里请列出七叶"旧哈希 → 新哈希"的对照表和计算命令,方便我复核。
    2. TASK_RELEVANCE 的消费证据在 src/inferrsi/observability/knowledge_capture.py 第 20 行(from .._skill_selection import TASK_RELEVANCE),第 74 行使用。K01 搬家后这条导入仍经根壳,这一点和 task: OBS — 解散 observability 过渡包并归位记录与展示 #413(OBS)要删的 observability → _skill_selection.TASK_RELEVANCE 边是同一条。建议在 K01 PR 里注明"这条边由 OBS 删除,K01 只保证根壳透传",免得被误判为遗漏。
    3. 根壳是"纯静态导出",建议加一个测试断言:每个根壳模块的公开名与 manifest exports.public 完全一致,并且对象是同一个(is)。清单里 catalog 已经写了 REPO_TYPES 同一对象的审计项,其余六叶可以照此补齐。
    4. private_used。 清单里 catalog 还列了 _walk、_validate_record、files 等私有名,测试会 patch catalog.files。迁移后 patch 根壳上的名字不会影响 inferrsi.knowledge.catalog 内部的调用。请确认这些测试要改为 patch 新路径,或者说明根壳怎样保证 patch 仍然生效。

    我会和 @zengchuang-hw 一起正式评审清单修订。等 PR 上来时,请附上 overall isolation_complete == false 的实际输出。

  3. Dong1017 commented on Nov 15, 2026

    @Dong1017
    CollaboratorAuthor

    Closing K01, delivered by PR #418, under the project owner's decision that merged PRs constitute delivery acceptance. This includes the Knowledge migration, compatibility exports, manifest revision and protected paths. Final-head checks passed; 11 Knowledge compatibility, leaf and closure regressions also passed locally on main 36440109.

    This records project acceptance, not a new review on anyone else's behalf. Root-shell retirement remains R01; isolation_complete remains false.

  4. zengchuang-hw commented on Nov 17, 2026

    @zengchuang-hw
    Contributor

    Independent read-only follow-through for comments:6813971063:2026-11-12T03:56:12Z. Issue407 remains closed. I found no own comment explicitly covering this request. The source's reviewer opinions/adoption assertions were excluded; the input is the isolated original relocation scope with its original-version gap.

    Baseline: current main 0311393c62330c041a01238dc86823b80e020561. Current state is not the original K01 snapshot. The current legacy manifest has base aaa17a5dd333449d15fb052bb09b2012d55f2327 and zero active compatibility pairs. The selected structural tests record seven moved Knowledge bodies and verify their old root files are absent. Thus current retirement is observable, but it must not be retroactively treated as permission to retire shells in the original relocation-only slice, nor as a defect against a historical intermediate requirement without reconstructing that stage.

    The current technical leaf is inferrsi.resources.repository_packs, not inferrsi._repo_pack_data. I independently checked its actual bytes against the manifest's file_sha256: match. infra/inspection.py imports repository_pack from that facade, not from a Knowledge body. This supports the present ownership/identity boundary, not a claim that every original K01 base/hash or public export has been historically reconstructed.

    Fresh bounded checks: on the baseline above,

    PYTHONPATH=src python -m pytest -q -o addopts='' \
      tests/test_knowledge_compatibility_shells.py \
      tests/test_repository_packs_facade.py \
      tests/test_knowledge_declaration_paths.py \
      tests/test_target_module_import_gate.py
    

    completed 59 passed, 43 subtests passed, one pytest-plugin deprecation warning, in 20.89s. Coverage includes current retired-entry/manifest consistency, facade object/byte identity, import/no-I/O boundaries, declared path handling and current dependency-policy controls.

    A separate gate invocation returned zero violations, but isolation_complete=false with 12 Harness→Infra hits and five runtime-resource-loader blockers. A present Knowledge package or clean scoped imports therefore do not establish whole-repository isolation.

    Gaps: the uncontaminated pre-adoption K01 specification, exact original baseline selection and acceptance authority remain unverified. I did not independently replay all historical intermediate commits, read the excluded review-derived decisions, run a full suite/clean-wheel/native-platform matrix, or change protected-path policy. No claim of parent-goal acceptance, current or historical whole-Issue PASS, or authority for out-of-scope resource movement follows from these checks.

    AGENTS/review guidance was checked. No code, manifest, policy, tracker or Issue state was changed; no reopening, merge, model/device/paid experiment or stopped-task restart occurred. PR478 was not accessed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:knowledgeKnowledge line: packs, skill library, knowledge admissionkind:taskBounded delivery task with a delegated slice

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions