Repository navigation
feat: record per-round knowledge searches and adoption evidence - #384
jiangkuaixue123 merged 13 commits into
Conversation
Agent-assisted-by: Codex (implementer) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
Agent-assisted-by: Codex (implementer) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
Review(仅评论,不是 Approve)本次范围:新 PR 完整 diff, 整体思路很清楚:轮次窗口由调用方显式给出、无法解释的命令记进 需要修改
需要确认
小问题(不阻塞)
首版范围和仓库级验收按描述仍待 #344 的维护者确认,这里不代为判断。 |
Agent-assisted-by: Codex (implementer) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
增量 review(仅评论,不是 Approve)本次范围: 已解决
仍未完成
代码层面本轮没有发现新的问题。 |
Agent-assisted-by: Codex (implementer) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
增量 review(仅评论,不是 Approve)本次范围: 本轮改动,看过没有发现问题
可选(不阻塞)
仍未完成
|
Agent-assisted-by: Codex (implementer) Agent-assisted-by: Codex / gpt-6-luna effort=max (trace delivery) Agent-assisted-by: Codex / gpt-6-luna effort=max (archive attribution) Agent-assisted-by: Codex / gpt-6-luna effort=max (Qwen evidence replay) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
增量 review(仅评论,不是 Approve)本次范围: 看过、没有发现问题
需要修改或确认
可选(不阻塞)
|
Agent-assisted-by: Codex (implementer) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
增量 review(仅评论,不是 Approve)本次范围: 已解决
仍未完成
本轮没有发现新的问题。 |
Preserve both new evidence bundles and expect the merged inventory of 24 bundles and 533 checked hashes. Agent-assisted-by: Codex (merge conflict resolution) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
增量 review(仅评论,不是 Approve)本次范围: 看过,没有发现问题
仍未完成
本轮没有发现新的代码问题。 |
|
@amy-why-3459 The Ready workflow for the current head |
jiangkuaixue123
left a comment
There was a problem hiding this comment.
PR review verdict — DO NOT PASS
在单行文件上复核了 campaign import-search。归档可以把正文中的数字当作行号,并接受指向不存在行的采用记录。默认本地记录也会把早于首次检索的决定计为采用。请修正行内指出的三处证据归因问题,并为这些输入补回归测试。
本地 Python 3.12 的 91 项搜索、优化记录与 evidence inventory 相关测试全部通过。随 PR 提交的 Qwen 归档里,7 条采用或拒绝依据的原文均与声明版本的对应源文件行一致。此次未运行全量套件,当前 head 的 Ready CI 等待批准,尚无 job 结果。
受维护者直接委托,Codex 通过 @jiangkuaixue123 审查本 PR 并提交结论。目标为 main,PR base 4b3afa55f278ca314e07d5f8acbd0a18f3fa72bf,head a4c8a511fab210e8b7c7157989308dd5f8ccd5ce。
Parse rg line numbers only when requested, require an earlier observation for caller adoption, and retain excerpt transformation flags in archive evidence. Agent-assisted-by: Codex (implementation); GPT-6 Luna/max (read-only review) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
There was a problem hiding this comment.
PR review verdict — DO NOT PASS
Incremental re-review of #384. Base 4b3afa55f278ca314e07d5f8acbd0a18f3fa72bf, previous head a4c8a511fab210e8b7c7157989308dd5f8ccd5ce, head 36cb42cd41c40c8d89c620f9d3f9cf1ab5033c1e. Dong-bot re-review under the InferRSI review queue. This review leaves the PR unapproved.
Resolved from the previous DO NOT PASS:
- [P1]
src/inferrsi/harness/codex_search.py:_rg_argsrecords whether-n/--line-numberwas passed (numbered_textvs plaintext), and_rg_observationsparses with that mode. Forrg needle .and stdout./case.md:42:needle, the unnumbered pattern^([^:]+):(.*)$keepsline=Noneand text42:needle.rg -Hnusespath:line:text. A numbered context line whose prefix is ambiguous setscomplete=False. - [P2]
src/inferrsi/harness/search_archive.pyreviewed_uses: the_textcheck on the exported passage remains, and the adoption entry then copiesredacted,root_normalized, andtruncatedtopassage_redacted,passage_root_normalized, andpassage_truncated. Acatline whose URL was replaced with[redacted-url]keeps that transformed state onmaterials[ref].evidence. The decision quote must still match the assistant message exactly.
Still open:
- [P2] Local
--used/--rejectedordering is not cleared. The diff header sayssrc/inferrsi/harness/search_attribution.pyis 358 lines, and the reviewable patch stops inside_useimmediately afteritem["use"] = status if len(states) == 1 else "used_and_rejected"(about file line 29). That helper still records the caller-supplied status on any ref present in the round. The observation-before-decision guard, thedeclarationspath withreason: observation_order_unknown, and thecounts.usedupdate are past that cutoff, so I could not confirm them. Previous repro: assistant decision on trace line 2, first observation ofcase.mdon line 4. Localsearch/round-1.jsonmust keep that flag out ofuse=usedandcounts.used. Capture-only input with no sortable return stays a declaration with unknown adoption. - The previous review required regression tests for the three repros (
rgwithout-n,rg -Hn, decision-before-observation--used, and redactedcatpassage). Those tests are not in the readable patch. I did not execute tests. Ready CI for36cb42cdwas not checked.
I will re-read after the author pushes a head whose patch includes the rest of search_attribution.py and those regression tests.
Not verified here: runtime behavior, the Qwen archive JSON past the schema described in docs/dashboard.md, and every line of search_attribution.py after _use's status assignment.
增量 review(仅评论,不是 Approve)本次范围: 已修复(对照 @jiangkuaixue123 在
|
Keep accepted unknown declarations when only later observations appear, and remove the stale reason when a corrected corpus scope reveals an earlier observation. New reversed caller claims remain invalid. Agent-assisted-by: Codex (implementation); GPT-6 Luna/max (read-only review) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
增量 review(仅评论,不是 Approve)本次范围: 上次两点均已修复
仍需完成
本轮没有发现新的代码问题。等完整 CI 在当前 head 上有结果后,我再确认一次。 |
There was a problem hiding this comment.
PR review verdict — DO NOT PASS
Incremental re-review of #384. Base 4b3afa55f278ca314e07d5f8acbd0a18f3fa72bf, previous head 36cb42cd41c40c8d89c620f9d3f9cf1ab5033c1e, head 607022b4cf5a8f26955bda8f46d9f5b4c690b4bd. Dong-bot re-review under the InferRSI review queue. This review leaves the PR unapproved. I will re-read after the author pushes.
Resolved in 36cb42cd..607022b4:
src/inferrsi/harness/search_attribution.py_caller_use: when some observation line is< decision_line, the dict passed to_useomitsreason. A corrected corpus root can promote an unknown declaration touse=usedwithobservation_order_unknownabsent frommaterials[ref].evidence.test_corrected_corpus_promotes_declaration_without_stale_reasoncovers that promotion,counts.used == 1, an empty declaration list, and a byte-identical reimport.- A newly supplied
usedclaim whose decision precedes every observation still raisesdecision must follow an observation of the cited material. The extended-window test checks that this raise leaves the archive bytes unchanged.
Blocking:
- [P2]
src/inferrsi/harness/search_attribution.py:42and:47,docs/dashboard.md:206-210, andtests/test_search_archive.pytest_extended_window_preserves_old_unknown_declaration_with_later_observation.
Trigger: replay a declaration already stored withreason=observation_order_unknownafter the window grows to include observations of that ref, and every observation line is>= decision_line. The reproduced case is the extended-window test: first importlines=[2, 3]withused=(package:manual, 3)while thecatis still outside the window, then append thatcatand reimportlines=[2, 6].
The newelifraises only when the reason is something other thanobservation_order_unknown, so this replay falls through. Line 47 stores the declaration again withreason=observation_order_unknown. The round staysuse=unknownandcounts.used == 0, and the declaration still says the order is unknown.
Unknown order is the capture case with no return record that can be ordered. After the latercatis inside the window, the order is known: the decision precedes every observation. The reason on the retained use claim is then false. Importing a short window that ends before the first retrieval, then extending past that retrieval, preserves that claim.docs/dashboard.md:206-207currently requires this result.
Expected correction: whenobserved_linesis non-empty and none precededecision_line, store a terminal reason that the decision precedes those observations, leave the material unused (counts.usedstays 0), and finish the import. Keep rejecting a newly supplied decision in that position. Update the dashboard sentences andtest_extended_window_preserves_old_unknown_declaration_with_later_observationto expect the terminal reason. In that test, assert the appendedcat package:manualrow is present as an observation ofpackage:manual.
Not verified here: tests were not executed, and Ready CI for 607022b4cf5a8f26955bda8f46d9f5b4c690b4bd was not checked. Files outside this incremental range were not re-audited.
This review does not approve the PR or change its scope.
Separate captures without ordered observations from retained declarations whose ordered observations all follow the decision. Preserve retry behavior and reject fresh reversed claims. Agent-assisted-by: Codex (implementation); GPT-6 Luna/max (read-only review) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
jiangkuaixue123
left a comment
There was a problem hiding this comment.
PR review verdict — DO NOT PASS
上次的三个例子已通过复核:目录搜索保留了正文里的 42:,本地记录拒绝逆序采用,脱敏和截断标记也传到了采用依据。重导入对未确定顺序的声明、后续出现的观察和重复导入都有回归覆盖。本地 Python 3.12 的 105 项相关测试全部通过。
仍有一处影响归档可信度的问题。单文件搜索时,解析器没有区分 rg 是否输出了文件名。我用真实的非 TTY stdout 走完了导入,归档接受了不存在的源文件行,并将其计入 used。行内评论列出了两个输入及实际结果。
Codex 受维护者直接委托,通过 @jiangkuaixue123 复审本 PR。目标 main,base 4b3afa55f278ca314e07d5f8acbd0a18f3fa72bf,head 7030c681526d6a4f023a9f9fbbd14fd3964b9345。
There was a problem hiding this comment.
LGTM
PR review verdict — PASS
Reviewed base 4b3afa55f278ca314e07d5f8acbd0a18f3fa72bf, previous head 607022b4cf5a8f26955bda8f46d9f5b4c690b4bd, head 7030c681526d6a4f023a9f9fbbd14fd3964b9345 (607022b4..7030c681). Dong-bot re-review under the InferRSI review queue.
Resolved in this range:
- [P2]
src/inferrsi/harness/search_attribution.py_caller_use: a stored declaration whose orderable observations are all>= decision_lineis rewritten withreason=no_prior_ordered_observation. With no orderable observations the reason staysobservation_order_unknown. Replay of either reason still avoids the new-claimValueError. An observation withline < decision_linestill goes through_usewithreasonomitted, including when the stored reason wasno_prior_ordered_observation. docs/dashboard.md(closing-import paragraph) matches that split: a later ordered observation leaves the declaration uncounted and does not time a capture that still has no return position; a corpus-root correction that reveals an earlier observation clears the old reason.tests/test_search_archive.pyparametrizesusedandrejectedon the capture, extended-window, and corpus-correction paths. The extended window expects one ordered event (catat trace line 6 forpackage:manual), an unorderedcollect,use=unknown,counts.used == 0, and a single declaration whose reason flipped tono_prior_ordered_observation. A later-only root keeps that reason andcounts.used == 0. The earlier root setsuseto the declared status, dropsdeclarations, omitsreasonfrom evidence, and incrementscounts.usedonly forused. A newly supplied decision that still precedes every observation raisesdecision must follow an observationand leaves the archive bytes unchanged. The same-window reimport stays byte-identical after the reason flip.
Earlier findings stay closed in this range. codex_search.py (rg numbered vs plain stdout) and search_archive.py (passage redacted / root_normalized / truncated copied onto adoption evidence) are outside 607022b4..7030c681.
Not verified here: tests were not executed, and current-head CI was not checked.
amy-why-3459
left a comment
There was a problem hiding this comment.
LGTM
PR review verdict — PASS
Reviewed base 4b3afa55f278ca314e07d5f8acbd0a18f3fa72bf and head 7030c681526d6a4f023a9f9fbbd14fd3964b9345. Incremental range for this review: 607022b4cf5a8f26955bda8f46d9f5b4c690b4bd..7030c681526d6a4f023a9f9fbbd14fd3964b9345, one commit: "fix: distinguish unresolved search ordering reasons".
What I checked:
search_attribution.pyL39-53. An already accepted declaration whose decision has no earlier ordered observation now getsreason: no_prior_ordered_observation. If there is no orderable observation at all, it keepsobservation_order_unknown. Neither case is counted as used. A newly supplied reversed--used/--rejectedflag still raises, because CLI evidence carries noreason. Promotion to adoption still stripsreasonbefore_use.- The tests are now parametrized over
usedandrejected. They cover four cases:- capture-only stays
observation_order_unknown; - an extended window with only a later
catmoves tono_prior_ordered_observation, and thecollectevent has notrace_line; - a corpus whose only observation is later stays uncounted;
- the corrected corpus promotes the declaration with no stale reason. That case gives
counts.used == 1only forused.
- capture-only stays
docs/dashboard.mdL206-214 matches the behavior.- All points from my earlier comments (6800419826, 6800670785) are resolved.
- The review findings at
a4c8a511from @jiangkuaixue123 are also resolved: rg line-number parsing, transformed passage flags, and decision-before-observation. - I ran the search, attribution, delivery and evidence-inventory tests locally on Python 3.13: 66 passed.
- Hosted CI at
7030c681is all green: full-check 3.10/3.11, installed-package 3.10/3.11, pr-references and declarations.
更正:撤回我对
|
增量 review(仅评论,不是 Approve)本次范围: 上次的问题,按代码阅读已修复
需要确认的问题
本轮阅读代码没有发现新的代码问题。等完整 CI 在当前 head 上通过后,可以再请维护者确认。 |
|
@amy-why-3459 回复这轮 partial 的问题:这是有意的取舍。离线记录不能仅凭 核对了 PR 已提交的 Qwen 归档:两次 在本 PR 的可复盘 JSON 范围内,接受保守的 当前 head 补充当前 head 的完整本地验证(macOS / Python 3.13.5):全量 pytest 为 3627 passed、12 failed、21 skipped,不是全绿。将这 12 个失败用例放到目标基线 |
|
@amy-why-3459 当前 head |
|
@amy-why-3459 当前 head |
david6666666
left a comment
There was a problem hiding this comment.
I’d fix the filename and line-number cases before merging. Both produced coverage=complete and used=1 with an incorrect source citation.
Reviewed with Codex at 5790a530.
| and argv[1] in ("-c", "-lc", "-ic", "-ilc")): | ||
| multiline = "\n" in argv[2].strip() | ||
| try: | ||
| lexer = shlex.shlex(argv[2], posix=True, punctuation_chars=";&|<>") |
There was a problem hiding this comment.
Bash reads guide#v2.md as one filename, but shlex drops everything from # onward here. I ran cat guide#v2.md and the archive credited guide with the other file’s text. Can we preserve # inside a word?
There was a problem hiding this comment.
Fixed in 35e48d1. The shared shell tokenizer now removes comments only at unquoted word boundaries, with shlex's own comment handling disabled afterward. guide#v2.md, quoted/escaped hashes, and an escaped space before # retain the actual filename; cat guide #v2.md still treats the suffix as a comment.
test_shell_hash_filenames_and_comments_match_real_bash runs seven commands through real Bash, feeds their returned output to the importer, and checks the archived material and adopted passage.
Validation: 104 focused search, archive, capture-delivery and evidence-inventory tests passed; Ruff passed.
| continue | ||
| joins[event_id] = { | ||
| "state": "visible", "runtime_truncated": truncated, | ||
| "line_indexes": indexes, "aggregate_lines": signature[3].splitlines(keepends=True), |
There was a problem hiding this comment.
splitlines() also splits on form feeds. With a\fb\nc\n in a file, the archive accepted c as line 3 even though cat read it from line 2. Can we count only LF/CRLF when assigning source lines?
There was a problem hiding this comment.
Fixed in 35e48d1. Command/outer-return matching, file passage parsing and captured-resource passage selection now share LF-based line splitting. CRLF is a line ending; form feeds stay inside the source line.
The regression uses a\fb\nc\n (also CRLF) with cat/sed records: line 3 is rejected, and c is archived and adopted at line 2. An Indexer capture test verifies the same source-line rule.
Validation: 104 focused search, archive, capture-delivery and evidence-inventory tests passed; Ruff passed.
| raise ValueError("capture is already associated with another round") | ||
| if window and previous and window["session"] == previous["session"]: | ||
| lo, hi = previous["lines"] | ||
| if max(lo, window["lines"][0]) <= min(hi, window["lines"][1]): |
There was a problem hiding this comment.
I put the same CommandExecution.id on either side of a round boundary. Both rounds counted the search once. Could we check event IDs from the same session as well as overlapping line ranges?
There was a problem hiding this comment.
Fixed in 35e48d1. Before writing a round, the importer now checks command event IDs already owned by other rounds in the same session, in addition to the existing window-overlap and capture checks. A repeated ID in a disjoint window is rejected before a second round record is written.
The regression also confirms that separate event IDs can represent repeated searches and that identical IDs from different sessions are allowed. The first round remains unchanged after rejection.
Validation: 104 focused search, archive, capture-delivery and evidence-inventory tests passed; Ruff passed.
| archive_materials, archive_observed = _observations(archive_events, archive=True) | ||
| declarations = _log_uses(root, campaign_id, number, archive_captures, archive_materials, | ||
| archive=True) | ||
| for status, entries in (("used", used), ("rejected", rejected)): |
There was a problem hiding this comment.
I imported with --used guide 5, then reran the same archive review without repeating the flag. The local record kept the claim, but the archive’s declarations became empty. Can we carry the saved declaration forward on reimport?
There was a problem hiding this comment.
Fixed in 35e48d1. Saved caller claims are restored before building either the local record or portable archive, so reimport without repeating flags preserves the archive's declarations. These declarations remain separate from reviewed adoption and do not increase the archive's used count.
The correction rule is now documented and tested: an explicit flag replaces the saved status for the same material and decision line; claims at different decision lines remain distinct. Tests cover used/rejected retries, byte-stable reimports, corrections, and invalid archive review leaving both existing records unchanged.
Validation: 104 focused search, archive, capture-delivery and evidence-inventory tests passed; Ruff passed.
| complete = False | ||
| continue | ||
| numbered = mode in ("numbered_text", "numbered_context") | ||
| pattern = r"^([^:]+):(\d+):(.*)$" if numbered else r"^([^:]+):(.*)$" |
There was a problem hiding this comment.
On Windows, rg -Hn returned F:/corpus/case.md:1:needle, but this regex stopped at the drive colon and the archive recorded zero hits. Could we cover drive-qualified paths in the numbered-output test?
There was a problem hiding this comment.
Fixed in 35e48d1. Drive-qualified paths are parsed with the filename rather than split at the drive colon. PureWindowsPath regressions cover forward/back slashes with numbered, context and unnumbered output.
The independent check also caught the ambiguity between a drive path and a file named F whose text starts with /.... For unnumbered Windows output, both interpretations are checked against the recorded scopes: only a unique scoped interpretation is retained; ambiguity stays partial with no attributed observation. Tests cover this case and the ordinary POSIX single-letter filename. These are portable Windows-path semantics tests, not a claim of running the native Windows suite.
Validation: 104 focused search, archive, capture-delivery and evidence-inventory tests passed; Ruff passed.
Respect shell comment boundaries and LF source lines, validate unique Windows filename parses, prevent repeated command IDs across rounds, and preserve caller declarations in archive reimports with explicit same-decision corrections. Agent-assisted-by: Codex (implementation); GPT-6 Luna/max (read-only review) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
增量 review(仅评论,不是 Approve)本次范围: 上次 5 条意见,按代码和本地测试已修复
本地(Linux / Python 3.13,PR head 单独检出): 阻塞问题:和当前
|
Keep the search recorder implementations unchanged while moving them beside the upstream campaign and capture modules. Update CLI and test imports, and make the recorder fixture's retrieval method explicit. Agent-assisted-by: Codex (implementation); GPT-6 Luna/max (read-only review) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
|
Responding to Amy's integration review: please re-review current head
For clarity, the previous run stopped at Ruff's three I001 import-sorting findings; pytest had not started. Separately, local import checks confirmed the old module paths raise ModuleNotFoundError and the new observability paths import successfully. Please assess the current revision and the resolution of the earlier findings under the repository's review rules. |
amy-why-3459
left a comment
There was a problem hiding this comment.
LGTM
PR review verdict — PASS
Reviewed base fa3d6421c71cad3be6a918733dfacde1824b1a5e and head c2730670b06c7c1934671fa78452249993e8e605. Increment since my last review: 35e48d1d358e76db4c9c97f4794bf0490eca003c..c2730670b06c7c1934671fa78452249993e8e605. This adds merge commit c2730670 on top of current main; the other 8 commits are main's own.
- The blocker from my previous comment is fixed.
git show --remerge-diffshows the five recorder modules (capture_delivery,codex_search,codex_tool_returns,search_archive,search_attribution) moved fromharness/toobservability/as 100% renames with unchanged bytes. Their relative imports (.campaign_records,.dashboard_data,.knowledge_capture,.optimization_log) now resolve to the modules #389 moved there. Beyond the renames, the merge resolution only touches the import incli.pyL413 and the import/monkeypatch paths in 6 test files. It also pinsrelevance_method="weighted-lexical-v1"explicitly in thetests/test_search_archive.pyfixture. Noinferrsi.harness.<moved module>references remain insrc/tests/docs/tools. - @david6666666's five findings on
5790a530were verified as fixed in my previous comment (35e48d1d). That code is carried into this head unchanged. - Current-head CI:
full-check (3.10/3.11),installed-package (3.10/3.11),pr-referencesanddeclarationsall pass. - Local check (Linux / Python 3.13, this head):
ruff check src tests toolspasses. 143 tests pass acrosstest_codex_search_delivery,test_search_archive,test_search_attribution,test_search_capture_delivery,test_optimization_storyandtest_evidence_inventory.
Not verified: no tests were run on native Windows. The drive-letter path handling is covered only by the PureWindowsPath semantics tests.
david6666666
left a comment
There was a problem hiding this comment.
Rechecked the five fixes and the move to Observability at c273067. The citation, saved-declaration and round-ownership regressions are covered, and the module move preserves the fixes. I ran all 143 focused tests and Ruff successfully. Native Windows wasn't tested.
Ruff I001 on the six files whose imports were retargeted from observability/dashboard helpers to harness.records.evidence. Linux lint-and-smoke and full-check failed on these import-order errors only. No behavior change. Inherited F811 in run_store and plugin tests is unchanged and was not reported by this PR's CI. Refs #413 Agent-assisted-by: Grok Bot Signed-off-by: GUOGUO <xwdong1998@163.com>
…ta (K02) (#426) * knowledge: move packaged resources into knowledge/data and harness/data (K02) Physically move the knowledge corpus to inferrsi.knowledge.data and the seven pack.json files to inferrsi.harness.data. importlib, checkout Path and plugin physical-root loaders, packaging globs, protected_paths, tools and check_installed follow the new layout. Logical bundle keys stay data/skill_library/. No root shells are removed, the first-wave allowlist is unchanged, and overall isolation_complete stays false. The 922 resource moves are pure renames (identical blobs). A new test_resource_migration.py module covers K02-1 path and packaging checks. Manifest leaf-hash and protected_paths updates are included for formal review and are not self-approved. Refs #409 Agent-assisted-by: Claude Code / claude-fable-5-2 Signed-off-by: GUOGUO <xwdong1998@163.com> * docs: keep a blank line before the dashboard importer shell fence The post-K02 path note in the #384 importer example must be followed by a blank line so the next shell fence stays a distinct Markdown block. Refs #409 Agent-assisted-by: Grok Bot Signed-off-by: GUOGUO <xwdong1998@163.com> * fix(k02): retarget live skill-library links and hook installed inventory After the Knowledge pack landed, live docs and the campaign-plan template still pointed at the pre-K02 src/inferrsi/data/skill_library root, and the pack README used files("inferrsi.data"). Retarget those live links and the installed-resource files() example. The installed-package and release jobs now compare the wheel inventory to the checkout when INFERRSI_CHECKOUT_RESOURCES is set, the same byte-for-byte contract as the opt-in RUN_FRESH_VENV test, without adding a second venv to every CI job. Refs #409 Agent-assisted-by: Grok Bot Signed-off-by: GUOGUO <xwdong1998@163.com> * fix(k02): wrap the checkout inventory mismatch message for ruff E501 CI lint-and-smoke and both full-check jobs failed at ruff on tests/check_installed.py:555 (119 > 100) before the suite ran. Split the assertion auxiliaries so the line stays within 100 columns. Refs #409 Agent-assisted-by: Grok Bot Signed-off-by: GUOGUO <xwdong1998@163.com> * fix(k02): retarget npu-skill-factory live path and re-pin skill index SKILL.md for npu-skill-factory still named the pre-K02 library root as the current candidate location. Editing that source requires regenerating the projected skill index, which needs the recorded LIBRARY prefix to match the post-move checkout path. Repoint LIBRARY to src/inferrsi/knowledge/data/skill_library and map skill_documents.original (the unchanged data/skill_library bundle key) to that git path when resolving records. This source revision is the new pin; the following commit regenerates the projection from it. Refs #409 Agent-assisted-by: Claude Code / claude-fable-5-2 Agent-assisted-by: Grok Bot Signed-off-by: GUOGUO <xwdong1998@163.com> * fix(k02): regenerate skill-index projection at the post-move pin Rebuild the 80 stored skill records, _provenance.json and skill-coverage input digest from source revision 012c361, which retargets npu-skill-factory and re-pins LIBRARY to src/inferrsi/knowledge/data/skill_library. Registry and unchanged file hashes are preserved; skill_documents.original stays the data/skill_library bundle key. Update the skill-index test that assumed the pre-re-pin split between the recorded prefix and the checkout path. Refs #409 Agent-assisted-by: Claude Code / claude-fable-5-2 Agent-assisted-by: Grok Bot Signed-off-by: GUOGUO <xwdong1998@163.com> * fix(k02): map pinned skill paths and restore the compatibility shell indexed_skill, installed inventory and test helpers now resolve bundle keys through inferrsi.knowledge._source_snapshot.source_entry, so packaged collect matches the post-move pin. Stop re-exporting BUNDLE_LIBRARY and source_entry from the inferrsi._source_snapshot compatibility shell, and point test callers at the owning module. Retarget the leftover live paths in npu-skill-factory SKILL.md (artifact table) to src/inferrsi/knowledge/data/... Historical blob links at pre-move SHAs are left unchanged. The skill-index projection must be regenerated from this source revision in the next commit. Refs #409 Agent-assisted-by: Claude Code / claude-fable-5-2 [effort=xhigh] (author) Agent-assisted-by: Grok Bot Signed-off-by: GUOGUO <xwdong1998@163.com> * fix(k02): regenerate npu-skill-factory projection from 1e9c140 Rebuild the stored npu-skill-factory record and _provenance.json from source revision 1e9c140, which retargets the leftover live artifact paths in that skill. Other records are unchanged; the registry hash is unchanged. Generated with python tools/build_skill_index.py --source-revision 1e9c140 and confirmed with --check. Refs #409 Agent-assisted-by: Claude Code / claude-fable-5-2 [effort=xhigh] (author) Agent-assisted-by: Grok Bot Signed-off-by: GUOGUO <xwdong1998@163.com> * fix(k02): regenerate skill-coverage view after the SKILL.md path fix 1e9c140 retargeted leftover live paths in npu-skill-factory/SKILL.md. 35933fc regenerated the packaged skill record and _provenance.json but left docs/skill-coverage.md at input digest 8d5473d71cff8f74fceb773ba88c87bede8f05b66b0e0e56347d6aee16a15c63. Official tools/build_skill_coverage.py on Linux rewrites only that digest to fbc4d29e40a03beefb6c204f5defd7f817f5d5f68fb102926b3e746bc8801eee and --check passes. source_revision stays 1e9c140. Refs #409 Agent-assisted-by: Grok Bot Signed-off-by: GUOGUO <xwdong1998@163.com> --------- Signed-off-by: GUOGUO <xwdong1998@163.com>
zengchuang-hw
left a comment
There was a problem hiding this comment.
Independent post-merge review: issue found; not an approval.
Reviewed base fa3d642 and exact head c273067. Already merged; this COMMENT is follow-up, not a merge decision. Implementation, CLI integration and tests were inspected independently.
[P2] Preserve physical source lines when parsing nl output (src/inferrsi/observability/codex_search.py:375–379). nl -ba interprets logical-page delimiter lines and resets numbering. A four-line file containing \:\:\:, header, \:\:, and Use the second method. prints the final sentence numbered 1 although its physical source line is 4. A real nl subprocess output fed through synthetic call/CommandExecution/return events and a later assistant decision into import_search was accepted as passage_line: 1, basis: archive_reviewed, coverage: complete. The locator therefore points to a delimiter, not the adopted passage. Earlier body text can also create duplicate locators. Track physical positions where justified or conservatively mark/reject nl streams with page transitions; add an actual-nl end-to-end archive regression.
Checks: 143 targeted tests passed across test_codex_search_delivery.py, test_search_archive.py, test_search_attribution.py, test_search_capture_delivery.py, test_optimization_story.py, and test_evidence_inventory.py. ruff check src tests tools passed. Full pytest started but was interrupted unfinished; no full-suite pass. No private session files, historical corpus/run provenance verification, GPU or service acceptance tests.
zengchuang-hw
left a comment
There was a problem hiding this comment.
Historical request follow-up, COMMENT: explicitly answering #384 (comment) (created/updated 2026-11-12T16:35:58Z).
Fresh review bound to c273067, base fa3d642. PR remains merged/closed (2026-11-13T01:20:12Z). Prior review #384 (review) does not explicitly identify this request; this is a new bounded check and explicit response, not presumed coverage from its date.
Independent code checks:
- Archive use evidence requires a visible returned passage, a later decision line, a matching exact decision quote, and a unique passage locator/stable event ID. Legacy flags and optimization-log declarations remain separate from verified archive use evidence; absent delivery remains unknown.
- Tool-result correlation is limited to the selected trace window and unique call/command/return associations. Truncated output permits only exact unambiguous visible lines, rather than reconstructing omitted source passages.
- Reimport preserves the original window start, previously selected captures and prior caller-reviewed decisions unless explicitly supplied again. Cross-round checks reject reused captures, overlapping same-session windows and duplicated same-session command event IDs. These are recorded-association checks, not proof of causality or actual model adoption.
- Candidate/run references are resolved from the recorded round and candidate identity; this review did not execute a real campaign or read private rollouts.
Fresh Linux/Python 3.12 checks at this exact head:
- test_search_archive.py, test_search_attribution.py, test_search_capture_delivery.py, test_codex_search_delivery.py: 87 passed, 0 skipped.
- Five independent direct citation/order probes: valid passage accepted; unknown delivery, decision at the return line, mismatched quote and duplicate matching passages each rejected.
- Checkout remained clean.
No new defect found in these checked paths. Limits: these are local synthetic fixture/boundary tests, not a validation of the retained real evidence example, every shell/tool variant, or causal search effectiveness. The full original Issue 344 acceptance/version provenance remains an explicit gap in the isolated requirements; the minimal original goal is not silently expanded into a certified contract. I did not inspect the linked CI run's raw logs in this round and do not count its locator as passing evidence; no full repository/browser/installed-package suite was run. This is COMMENT, not renewed APPROVE or an experimental PASS. No source change, private-data export, experiment, reopen or merge.
Refs #344
这次交付什么
给优化轮次增加一个可归档的搜索记录。团队可以打开一份 JSON,检查 Agent 何时查了什么、工具实际返回了哪些材料、其中哪段影响了后续决定,以及这轮有无候选和评测。首版范围来自搜索域负责人委托和 #344 下的方案讨论。
数据怎么来
在原有
campaign import-search上增加--archive-review。原始 rollout 和本地轮次索引保留在本机。可归档文件区分工具返回被截断、导出时省略,以及送达情况未知。没有决策引用的材料保留采用未知。导入器验证引用的次序和原文,复核者判断两者是否有实际联系。使用说明与命令重复导入会保留已有采用声明,并允许显式修正同一材料、同一决策行的状态;不同决策分别保留。同一会话的命令事件不能跨轮重复计数。文件摘录保留词内
#,按 LF/CRLF 计算源行;无法唯一解析的 Windows 路径输出保留未知。实现位于src/inferrsi/observability/,与现有 campaign 和 capture 记录放在一起。一份可以直接读的结果
在 #380 的 Qwen S2-B1 会话,Agent 先读取昇腾案例,再用
rg缩小范围。打开 生成的轮次 JSON,查看事件file-73的delivery.passages,能看到同一文件第 16、18、19 行的返回原文。再看该材料的evidence,第 18 行的三项组合初始化 OOM 对应到 Agent 提出“先做资源检查”的答复。第 19 行出现在返回里,缺少采用依据。这轮只交付建议,
candidates为空。早先的宽搜索被截断,另有未解析命令,所以保留可观察事件,整轮总数为null。案例说明验证与范围
c2730670b06c7c1934671fa78452249993e8e605在本地通过 152 项搜索、归档、capture、优化故事与架构约束测试,Ruff 通过。Windows 路径用例使用 PureWindowsPath 验证盘符、分隔符和歧义解析;没有声称运行了原生 Windows 全量测试。当前 Ready CI 的五个 job 全部通过:Python 3.10/3.11 的完整 pytest 与 Ruff、两组安装包检查,以及 PR 引用检查。#344 还包括 Dashboard 轮次展示与统计口径的验收。通过这份 JSON 可以复盘单轮决策;评价召回率需要独立确认当时语料中的适用材料,判断性能收益需要实验对照。