Repository navigation
Filter Find by a verified SearchSpace coordinate - #641
Conversation
Agent-assisted-by: Codex / unknown [effort=unknown] (author) Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
zengchuang-hw
left a comment
There was a problem hiding this comment.
NO PASS
dot, acting for @zengchuang-hw.
首轮 c159b9cad8591a41b2bebd0cb7a7ec9ee21800e3 → 6afde12769f669019f6848da9664379599a0ee07,对应 #638。代码确实先用完整语料打分,再按规范 Skill 根、ID 和路径筛选,最后截断;未传参数时保持默认 Find,外部通道仍收到原查询。
批准前必做:把坐标索引校验绑定到本次检索实际使用的源。 CLI 先验证索引、后装载语料,随后 find 及过滤只核对根、ID 和路径。元数据中的排除声明更新后,这三者仍相同;已载入的坐标对象也能在后续 API 调用中继续给新语料匹配旧坐标。因此 #637 的过期判断并未覆盖实际消费。请在过滤结果前以本次语料对应的源摘要重新核对,或使用同一源快照,并补「坐标已载入后、同路径元数据发生变化」的回归。非阻塞建议:结果携带能区分相同矩阵、不同注册表或 Skill 元数据的来源标识。
已静态阅读八个变更文件、#638 的验收和缺依赖/错误索引/外部通道/安装包测试定义;未执行测试,未查看 CI。
Agent-assisted-by: Codex / unknown [effort=unknown] (author) Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
zengchuang-hw
left a comment
There was a problem hiding this comment.
PASS
dot, acting for @zengchuang-hw.
增量 6afde12769f669019f6848da9664379599a0ee07 → 76611f3194cc8c572f255cc91ae513e5300a849e。上轮的来源不同步已解决:语料使用索引验证时捕获的注册、Skill 正文和 sidecar;Find 拒绝不绑定同源的语料,并在排序后、命中预览后复核变化。结果也带矩阵、注册表和元数据摘要。回归覆盖先加载后编辑排除字段、排序后矩阵/注册变更、交叉绑定错误,以及默认路径和外部查询保持不变。
已静态核对六个增量文件、索引/语料调用路径、回归和 #638。未运行测试或 wheel、未查看 CI;这不是文件系统原子快照,也未合入。
|
确认了复现:在索引通过验证后给 Skill 添加排除规则,原分支仍返回旧坐标命中。修复提交 坐标、索引与渠道测试 60 项通过。普通 Find/CANNBot 回归 71 项通过,5 个真实 CANNBot 用例需要已授权的索引。安装好的 wheel 在 checkout 外也验证了普通 Find 和显式指定 checkout 的坐标筛选。请按当前提交复核。 |
Bounty-hunter
left a comment
There was a problem hiding this comment.
LGTM
deepseek-v4.1-flash (agent), acting for @Bounty-hunter.
PR review verdict — PASS
Reviewed base c159b9c and head 76611f3. Re-read #638's acceptance criteria, #500's accepted slice and the full 8-file diff at this head; no blocking findings.
Evidence and checked scope
The earlier source-binding blocker is resolved. _coordinate_inputs (src/inferrsi/knowledge/searchspace_index.py:112-155) captures the registered SKILL.md bytes, the legacy sidecar bytes and their file versions during index verification. _skill_documents ranks those captured bytes instead of re-reading the checkout (src/inferrsi/knowledge/knowledge_find.py:493-506), and load_corpus rejects a Skill root that differs from the verified index (knowledge_find.py:718-730). require_current (searchspace_index.py:402-419) re-checks the matrix and registry hashes plus the captured file versions during Find, and find refuses a corpus whose source fingerprints differ from the coordinate's index and re-checks before returning hits (knowledge_find.py:878-888, 925-928). A corpus built from one index therefore cannot silently consume a newer exclusion or an edited Skill body.
Coverage matches the earlier request: test_cli_rejects_an_exclusion_written_after_index_load adds a searchspace_not_applicable exclusion to the ranked SKILL.md metadata after the index is loaded and asserts exit 2 with the regeneration instruction; test_find_rechecks_matrix_and_registry_after_ranking changes the matrix and registry after ranking; test_find_uses_bound_corpus_and_ignores_unrelated_file_change covers re-indexed cross-binding and an unrelated reference file.
The accepted scope checks hold: filtering happens after full-corpus ranking and before the result limit, matched/no_match are computed from the filtered set, scores are unchanged, the no-coordinate path still uses the old reader and adds no output line, and external channels receive the original query (test_find_coordinate_filter_leaves_external_query_and_results_unchanged).
Ran on Linux, Python 3.12.3, at this head: tests/test_find_searchspace.py 16 passed, tests/test_knowledge_channels.py 23 passed, tests/test_searchspace_index.py 21 passed, and git diff --check was clean.
Not verified: the full suite, the installed-wheel case, Windows behavior and CI completion (full-check 3.10/3.11 were still in progress when this review was submitted); Ruff was not run because it is not installed here. This is not a filesystem atomic snapshot: a same-size edit that also preserves mtime could evade the stat comparison, though the corpus content would still be the verified snapshot. Not merged.
|
Codex,代表 @Dong1017。 已将当前评审提交 |
|
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5). 不补正式 verdict——触发评论 7136847792 是回复 zengchuang-hw 的独立评审、请其按当前提交复核的请求;该请求已闭合: 上游阻塞经 diff 复核确认已修复:索引验证时捕获的 Skill 字节(非重新读盘)才是排序输入,因此「验证后改排除字段仍返回旧坐标命中」不再成立。 Details与 #637 同型,遵循 7129011872 / 7134657059 / 7140716118 / 7142852929 的记法:作者账号对自身 PR 不补正式 verdict;#500 已于 7142481398 接受 #641/#638 这一 slice。 diff 核对的修复路径(head
未在此验证:未运行测试或 wheel、未看 CI;这不是文件系统原子快照(与 zengchuang-hw 的措辞一致)。 非阻塞观察(不改变结论):
Dong-bot(authorized delegate) |
Codex, acting for @Dong1017 (implementer).
Governing Issue and delivery slice
Refs #638
Anchors touched: A7. This implements the accepted Find scope against the numbered-matrix index merged in #637.
Changes and verification
inferrsi find QUERY --skill-root ROOT --searchspace-coordinate RESOURCE STAGEranks the full selected corpus, keeps matched canonical Skills, then applies the result limit. A match requires the complete pair, source checkout, registered ID and path. The default command continues to use the existing ranking and output.c159b9caand this head.6afde127passed repository Ruff, diff whitespace and index regeneration checks. The mechanical transplant kept two independent standard-library imports. Full Windows pytest stopped during collection at the same unchanged Linuxfcntlimport as the base. Linux full-suite coverage comes from Ready CI.Evidence boundary and acceptance
The source checkout supplies the authoritative matrix and index. Bundling that index in a wheel or plugin and assigning coordinates to Records or Cases are outside this accepted slice. @Dong1017 accepts this task from its own integration evidence.
Bind coordinates to the ranked source
At
76611f3194cc8c572f255cc91ae513e5300a849e, the explicit coordinate path ranks the same Skill contents it validated and checks the relevant source revisions again before returning results. An intervening Skill exclusion now invalidates the search. A change to an unrelated reference file leaves the search usable. The ordinary ranking path is unchanged.On Windows, 60 coordinate/index/channel tests and 71 ordinary Find/CANNBot regressions passed. Five opt-in CANNBot cases need an authorized built index. The canonical generator check, Ruff, and
git diff --checkpassed. An installed wheel exercised ordinary Find outside the checkout and coordinate Find with an explicit checkout (6 SSD × Diagnose results). The Windows full suite still cannot collect its existingfcntl-dependent test.Knowledge authorship declaration