Skip to content

Index Searchspace Matrix coordinate pairs - #637

Merged
Dong1017 merged 3 commits into
mainfrom
codex/knowledge-coordinate-index
Nov 24, 2026
Merged

Dong1017 merged 3 commits into
mainfrom
codex/knowledge-coordinate-index

Conversation

@Dong1017

@Dong1017 Dong1017 commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Governing Issue

Refs #632
Anchors touched: none

Changes

  • Generate a checkout Searchspace index from the numbered matrix Candidate Skills cells. Preserve explicit resource × lifecycle pairs and distinct coverage states.
  • Verify the matrix, registry, and every consumed Skill metadata source. Qualify the reader by checkout Skill root, registered ID and canonical path.
  • Reuse the coverage generator entry point. The default coverage view and Find behavior are unchanged.

Review follow-up

The reader now compares entries against the deterministic projection of the same canonical inputs used by the generator and verifies source consistency throughout the read. Tests reject fabricated legal pairs and states with unchanged source fingerprints, including links to unrelated same-name Skill files.

Validation

  • The preceding coordinate suite passed 20 tests. The follow-up preserves the explicit missing PyYAML diagnostic and verifies that default Find still works on a minimal installation. The earlier coordinate, coverage, and catalog run passed 72 with 2 skipped. Generated index and legacy coverage --check, Ruff and git diff --check passed.
  • The first adjacent Find and dependency run passed 142 tests and 43 subtests, with one Windows path-length fixture setup failure also reproduced on the clean base. That fixture passed separately under a shorter temporary path.
  • The generated checkout index includes 52 covered, 21 supplementary, 15 not-applicable and one unknown Skill. The Llama owner-map links add neither SSD × Optimize nor OS × Optimize. Changing only exclusion metadata invalidates the old index.
  • Draft for independent review. Explicit Find filtering is a separate delivery.
{
  "schema_version": 1,
  "head_sha": "ffd599629ea7a33785f0daced836322a3e9a9b54",
  "human_only": false,
  "material_ai_authors": [
    {
      "tool": "Codex",
      "model_id": "unknown",
      "effort": "unknown",
      "role": "author"
    }
  ]
}

Agent-assisted-by: Codex / unknown [effort=unknown] (author)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

@zengchuang-hw zengchuang-hw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

NO PASS
dot, acting for @zengchuang-hw.

首轮独立检视 fd349032c54dd42e57185e86c74fad543fb51617 → b3aae7c6d2cb491d356ca741b8795559ef688221,对应 #632;无上轮检视。生成器从编号表 Candidate Skills 提取完整坐标对,读取器也按根、注册 ID 和路径绑定条目。这两处方向正确。

批准前必做:读取时验证返回的坐标确实来自这些源。 searchspace_index.py L101–143 对照矩阵、注册表和元数据的摘要,但只对 JSON 中的坐标做类型与枚举校验。源文件不变时,生成物里格式合法但与矩阵不符的坐标仍会成为可匹配条目,导致 #638 返回错误的筛选结果。生成器 --check 能发现产物偏差,但实际读取不走这项校验。请让读取器把状态和坐标绑定到规范来源的确定性投影,并补一个源摘要保持不变、合法坐标与源不一致时应拒绝加载的回归测试。

已静态阅读五个变更文件、#632、矩阵及仓库检视说明;未运行测试,未查看 CI。

Agent-assisted-by: Codex / unknown [effort=unknown] (author)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
@Dong1017

Copy link
Copy Markdown
Collaborator Author

Agent-assisted by Codex, acting for @Dong1017.

@zengchuang-hw 请复核当前 head 9708a71dea84f9c3afb2f8ae032afb878ccdd79c。读取和生成现在调用同一投影,并核对读取期间的源摘要。合法格式的伪造坐标、伪造状态和非注册路径的同名 Skill 均有回归。最新坐标套件 20 项通过,两个生成物的 --check、Ruff 和 diff 校验通过。

@zengchuang-hw zengchuang-hw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

NO PASS
dot, acting for @zengchuang-hw.

增量 b3aae7c6d2cb491d356ca741b8795559ef688221 → 9708a71dea84f9c3afb2f8ae032afb878ccdd79c。上轮的坐标完整性问题已解决:生成和读取使用同一投影,读取对照所有条目并再次核对源摘要;回归覆盖摘要不变时的错误坐标和状态。

批准前必做:让最小安装能区分缺依赖和索引过期。 新的读取路径在重新投影时对每个 Skill 调用 _effective,需要可选的 PyYAML。读取器 把带安装提示的 MissingSkillsExtra 当作 ValueError 包装成 SearchSpace sources are missing or invalid。结果是最小安装选择一个健康的 checkout 也会被告知索引无效,重新生成无法解决。请保留缺依赖诊断并说明 opt-in checkout 读取的先决条件(或保持读取不依赖该 extra),补覆盖无 PyYAML 时的回归,且默认 Find 不受影响。#638 的显式 Find 筛选依赖这个诊断边界。

已静态阅读四个增量文件及元数据解析路径;未运行测试,未查看 CI。

Agent-assisted-by: Codex / unknown [effort=unknown] (author)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

@zengchuang-hw zengchuang-hw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PASS
dot, acting for @zengchuang-hw.

增量 9708a71dea84f9c3afb2f8ae032afb878ccdd79c → ffd599629ea7a33785f0daced836322a3e9a9b54。上轮的最小安装诊断问题已修复:读取器在通用错误包装前保留 MissingSkillsExtra 和安装指引,已有坐标完整性核对不变。文档明确 opt-in checkout 验证需要 PyYAML;新增回归模拟缺依赖并断言普通 Find 仍可打开结果。未发现新的批准阻塞。

已静态阅读三个增量文件并核对 #632 与 #638 的边界;未运行测试,未查看 CI。此检视只覆盖索引及验证,不验收 #638 的筛选实现。

@Dong1017

Copy link
Copy Markdown
Collaborator Author

Codex, acting for @Dong1017.

@Bounty-hunter 请作为第二位独立评审核对 ffd599629ea7a33785f0daced836322a3e9a9b54。重点是只从编号矩阵的 Candidate Skills 提取完整坐标对、按注册路径绑定条目、拒绝摘要未变但坐标被篡改的生成物。增量也保留缺 PyYAML 的安装提示和普通 Find 的最小安装行为。#638 是另一份交付。本轮修复和复核记录见上一条审查。

@Dong1017
Dong1017 marked this pull request as ready for review November 24, 2026 14:53

@Bounty-hunter Bounty-hunter 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.

LGTM
deepseek-v4.1-flash (agent), acting for @Bounty-hunter.

PR review verdict — PASS
Reviewed base fd34903 and head ffd5996.

I re-derived the committed index independently from the head sources: all 89 registered rows match (52 covered, 21 supplementary, 15 not-applicable, one unknown), with zero coordinate or state differences. The matrix, registry and metadata digests in docs/searchspace-index.json also match the raw files I hashed.

Evidence, scope and unverified items
  • Generator and reader share project_coordinate_entries; load_searchspace_index recomputes it and requires exact equality with the artifact, so a forged coordinate or state with unchanged source digests is rejected. Entry lookup is bound to the checkout skill root, registered id and registry-relative path.
  • The digest covers the matrix, skill-index.json and every registered SKILL.md (and sidecar metadata.json where present); a change confined to searchspace_not_applicable stales the index. The embedded and sidecar cases are both tested.
  • Missing PyYAML: MissingSkillsExtra is re-raised before the generic stale-index wrapper, preserving the install hint; the regression also checks ordinary Find still opens a case without the extra.
  • The legacy coverage view keeps its behavior: the moved helpers keep the same signatures and semantics, and its existing tests still call input_digest, layer_state and collect.
  • I did not run the test suite. At review time full-check (3.10 and 3.11) was still in progress; the other current-head checks were green. Verify that required check before merge.
  • Optional, non-blocking: unlike the legacy coverage view, the coordinate generator does not report non-canonical skill_library links it skips. A future diagnostic could surface those; this slice does not need it.

Scope is #632's index slice only; #638's Find filtering is not reviewed here.

@Dong1017
Dong1017 merged commit c159b9c into main Nov 24, 2026
19 of 21 checks passed
@Dong1017

Copy link
Copy Markdown
Collaborator Author

Codex, acting for @Dong1017 (integrator).

Merged the generated SearchSpace coordinate index into main at c159b9ca.

Integration evidence

Both Linux full checks, installed-package checks and the knowledge policy passed on ffd59962. The governing Issue, its native parent, live PR references, approvals and final merge state were checked immediately before the squash. The matrix index covers 89 registered Skills. Its public query matches canonical paths and complete coordinate pairs. The user-facing Find flag is tracked separately.

Independent review by @zengchuang-hw · Independent review by @Bounty-hunter

@Dong1017

Copy link
Copy Markdown
Collaborator Author

Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).

不必再补一道正式 verdict:7135031925 是发给 @Bounty-hunter 的第二独立评审请求,他已在 ffd59962 上 APPROVED(6041816805);该 head 已有 zengchuang-hw 与 Bounty-hunter 两个当前 head Approve、无悬挂 CHANGES_REQUESTED,并于 15:14:31Z 合并为 c159b9ca。本账号即 PR 作者,不构成独立票(同 #615 7129011872、#619 7134657059、#631 7140968742)。

按 diff(非评审记录)复核,两轮阻塞均已修复:

  • 坐标完整性:load_searchspace_index 用与生成器同一 project_coordinate_entries 重算,entries != expected 即抛 StaleSearchspaceIndex,投影后再核一次 coordinate_inputs(sources changed during verification);条目查询绑定 _skill_root、注册 id 与注册表相对路径。伪造合法坐标/状态、错路径、同名异地 SKILL.md 均有回归。
  • 最小安装诊断:MissingSkillsExtra 是 ValueError 子类(skill_catalog.py:12-16,41-42),第二个 try 用 except MissingSkillsExtra: raise 先行透出;coordinate_inputs 只读 JSON 与目录(_indexed_skills → _directory,无 frontmatter 解析),故第一个 except ValueError 不会误吞,回归同时断言安装提示与普通 Find 仍可用。
  • 制品自洽:docs/searchspace-index.json 我逐条数过 89 条 = 52 covered / 21 supplementary / 15 not-applicable / 1 unknown(husky),与 body 及 Bounty-hunter 重算一致;Llama owner-map 未引入 SSD×Optimize 或 OS×Optimize。

Dong-bot(authorized delegate)

未验证项与范围

@Dong1017

Copy link
Copy Markdown
Collaborator Author

Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).

这条请求已由 zengchuang-hw 本人满足,Dong-bot 不再补正式 verdict:它发给 @zengchuang-hw、指向已被取代的 9708a71d,而他已在该 head 给出 NO PASS(6041299293),随后又在当前 head ffd59962 上 APPROVED(6041408968);加上 Bounty-hunter 的 6041816805,当前 head 有两个 Approve、无悬挂 CHANGES_REQUESTED,PR 已于 15:14:31Z 合并为 c159b9ca。本账号即 PR 作者,不构成独立票(同 #619 7134657059、#631 7140968742,本 PR 7142852929)。

按 diff 复核 ffd59962,两轮阻塞都已闭合:load_searchspace_index 用与生成器同一 project_coordinate_entries 重算,并以 entries != expected 抛 StaleSearchspaceIndex,投影后再核一次 coordinate_inputs(sources changed during verification);entry() 把条目绑定到 skill root、注册 id 与注册表相对路径。最小安装一侧,coordinate_inputs 走 skill_directories → _indexed_skills/_directory,只读 JSON 与目录、不解析 frontmatter,MissingSkillsExtra 只可能来自 project_coordinate_entries 里的 _effective,而第二个 try 用 except MissingSkillsExtra: raise 先行透出(_knowledge_errors.py:4 确认它是 ValueError 子类,这个顺序是必要的)。

制品与默认行为也核对过:docs/searchspace-index.json 逐条数得 89 条 = 52 covered / 21 supplementary / 15 not-applicable / 1 unknown(husky);audit-llama-runtime-state 只有 Accelerator 与 RAM/Host 的 Diagnose/Verify,未引入 SSD×Optimize 或 OS×Optimize;--searchspace-index 是新增开关,缺省仍走 collect/render 写 docs/skill-coverage.md,references 只多一个关键字 canonical_paths,默认语义不变。测试数由 20 增至 21,正好是评论所说的 20 项加上本轮新增的缺 PyYAML 回归。

Dong-bot(authorized delegate)

未验证项与范围

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