Repository navigation
refactor(knowledge): unify search on Find and archive its evidence - #507
jiangkuaixue123 merged 17 commits into
Conversation
Use Find to rank managed knowledge questions before collecting pinned, budgeted context. Resolve installed entries inside each runtime so base installations and DSH can follow a hit to the original material. Retain exact catalog and explicit legacy operations for existing callers. Agent-assisted-by: Codex (managed discovery, readback and DSH implementation) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
Agent-assisted-by: Codex / gpt-6.2-sol [effort=max] (Case backend metadata) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
Rank the eligible kind corpus, open packaged skills without the optional YAML parser, and use authored Case backend scope. Retain legacy catalogue and dual-cue selectors. Allow exact installed Case capture and record the actual discovery sources. Agent-assisted-by: Codex (implementation and capture regression coverage) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
Reuse the Find corpus and ranker for package catalog queries, grouped research, Collect and optional context files. Preserve exact inventory, pinned reads, budgeted delivery and historical archives. Document legacy input migration and cover external-only public results. Agent-assisted-by: Codex / gpt-6.2-sol [effort=max] (catalog, Collect and protected guidance) Agent-assisted-by: Codex (CLI, applications and verification) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
Limit package-only Store discovery to reserved package projections and store-owned candidates so every hit can be opened by the same reader. Agent-assisted-by: Codex / gpt-6.2-sol [effort=max] (implementer) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
Assert the retired scorer names stay absent while preserving the historical move manifest and surviving APIs. Regenerate the synthetic dashboard example with the recorded Find scores and call chain. Agent-assisted-by: Codex (compatibility assertions and fixture regeneration) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
Distinguish ranked references, verified resource delivery and reviewed use. Keep incomplete or unsupported CLI returns visible without asserting complete search totals. Agent-assisted-by: Codex (direct retrieval trace import and regression verification) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
Classify exact reads and queryless inventories from the recorded selection. Match complete managed JSON returns to their verified captures before recording delivered resources. Agent-assisted-by: Codex (capture classification and archive delivery) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
Handle the continued read command shown in the dashboard guide without treating separate shell commands as one return. Agent-assisted-by: Codex (shell decoding and end-to-end regression) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
Resolve explicit references in existing optimization reasons through the saved round receipt and the reviewed search archive. Keep unverified use as a declaration. Agent-assisted-by: Codex (round evidence integration and independent review) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
Keep the upstream handoff package layout and apply installed skill context delivery at its canonical location. Agent-assisted-by: OpenAI dot (merge integration and validation) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
Skill evaluationPLANNED: not executed; there are no task outcomes yet.
Author verification steps (nonpaid; not yet run)
python tools/build_skill_index.py --source-revision 14e6f17bd254aaa05da0d5a2e3aea35ed337b139 --checkThe declared source pin matches this head's canonical library bytes. The command has not run: retain its exit code and full drift/success output. It checks the generated projection, not claim truth or skill efficacy. Evidence and logs · Retention: 30 days. Plan bindings, budget, frozen exam and advisory detailsAdvisory: obtain missing evidenceRetained evidence availability: planned / unexecuted. No approval or merge authorization is issued.
Model/settings:
Automatic execution / cumulative PR budget: {"reason":"Trusted configuration or pricing missing, invalid or expired","remaining_usd":"unknown","reserved_or_unresolved_usd":"unknown","spent_or_legacy_usd":"unknown","state":"blocked"}Projection check selection (not an executed result): {"declared_in":"src/inferrsi/knowledge/data/repo_packs/inferrsi/knowledge/_provenance.json","source_revision":"14e6f17bd254aaa05da0d5a2e3aea35ed337b139","status":"ready"}Provider/settings: Uncovered / unsupported paths (82)
|
zengchuang-hw
left a comment
There was a problem hiding this comment.
NO PASS
Draft PR #507, head 07ace74ebe4534e98dbf60485aff0b2e045c59f2. Scope: Find migration (#316) and search archive (#384).
- Repeated decision reason can lose valid citation evidence.
round_citations.py:165–167picks the first assistant occurrence of the logged reason. If the same reason appears before and after a visible read,round_reviews.py:179–182discards the read and leaves adoption unknown despite the later valid sequence. Pair the read with a qualifying decision before the saved log and cover the repeated-reason case in a regression test. Preserve the guard against crediting reads after the decision. - Exact-head knowledge declaration failed. The declaration log reports a missing, invalid, or stale declaration for this head. Correct the declaration and verify the resulting head.
I reviewed the Find ranking and callers, compatibility wrappers, Apps evidence paths, and relevant tests statically. No additional confirmed blocker in the Find code. Ready CI was still running at inspection; repository tests and the author’s CPU round were not rerun locally. This is the first review of this draft.
david6666666
left a comment
There was a problem hiding this comment.
Static review of the Find migration and search-archive integration at 07ace74e. I did not rerun the tests.
| return None, not in_scope, None | ||
| code, output = item.get("exit_code"), item.get("aggregated_output") | ||
| if call := knowledge_invocation(argv): | ||
| return decode_knowledge(call, code, output) |
There was a problem hiding this comment.
A successful campaign knowledge or benchmarks session knowledge call falls through as unrelated here. If its capture ID is omitted, import-search --complete can report zero searches with complete coverage even though the rollout contains a managed query. Could we keep coverage partial unless the query is matched to a verified capture, and add a regression where the capture ID is omitted?
| | Execute one ordinary local CPU command with a fixed record | Python `inferrsi.harness.api.Harness.allocate` / `execute` / `read` | Experiment-executing / record-writing | One explicit RunStore root and one trusted local CPU target; ordinary command mode only; a record holds execution facts, so exit 0 is not a verdict; no device, model or network fallback | | ||
| | Visualize a recorded run or campaign | CLI `dashboard`; [dashboard](dashboard.md) | Report-generating / local read-only serving | Writes an offline HTML snapshot or serves an optional live view on loopback; does not run an agent or validate a claim | | ||
| | Capture a knowledge context | CLI `campaign capture-context`; [offline dashboard](dashboard.md#record-the-optimization-story-campaign-trace) | Local evidence-writing | Runs `collect` with a context budget and keeps the full envelope and resource hashes in a new `knowledge/<id>.json`; proves what was prepared, not what a model read | | ||
| | Capture a knowledge context | CLI `campaign capture-context`; [offline dashboard](dashboard.md#record-the-optimization-story-campaign-trace) | Local evidence-writing | Saves assembled context and resource hashes in a new `knowledge/<id>.json`. Uses Find for ordinary questions and supports explicit IDs and legacy ranking options | |
There was a problem hiding this comment.
This row promises support for legacy ranking options, but capture-context rejects the old --relevance-method values, and the migration section below tells callers to remove them. Please clarify that the flag spelling remains but find-lexical-v1 is the only accepted value. The Collect row has the same mismatch.
david6666666
left a comment
There was a problem hiding this comment.
One separate delivery-versus-use case on the same head.
| trace, lines, knowledge_root, archive=True, selections=selections) | ||
| trace, lines, knowledge_root, archive=True, selections=selections, **options) | ||
| capture_returns = dict(review["capture_returns"]) | ||
| if note_line is not None: |
There was a problem hiding this comment.
Could we match selected capture returns whenever the trace window is available, even if the round reason has no [use …] citation? With a valid capture ID and an exact tool response, this branch still leaves delivery unknown solely because no citation was written. The return should count as visible delivery while adoption stays unknown. Please cover an uncited managed return with a supplied capture ID.
Match saved captures against their managed tool returns and retain every instance of a manual reason uttered before the saved log. Document the supported Find ranking value. Agent-assisted-by: Codex (archive implementation and regression tests) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
Use the committed library snapshot containing the revised research guidance. Running the index and coverage generators changes only the shared source revision. Agent-assisted-by: Codex (generated skill projection refresh) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
Keep the service lifecycle and fingerprint-free package context. Use the existing package Find corpus and ranker for service knowledge, with one supported method across managed entrypoints. Agent-assisted-by: Codex (merge resolution and service knowledge integration) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
Use the shared capture verification for text queries. Exact IDs and inventory remain non-search operations. Preserve the distinction between a saved capture receipt and visible material. Agent-assisted-by: Codex (archive coverage and regression tests) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
Agent-assisted-by: Codex / gpt-6.2-sol [effort=max] (skill projection regeneration) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
07ace74 to
871c39d
Compare
david6666666
left a comment
There was a problem hiding this comment.
The prior coverage, uncited-delivery and legacy flag points are addressed. One new exact-head CI regression below.
| captures = {key: capture_event(key, capture_inputs[key]) for key in capture_ids} | ||
| trace, lines, knowledge_root, archive=False, **options) | ||
| return_texts = capture_return_texts(trace, lines, capture_returns, capture_ids) | ||
| captures = {key: capture_event(key, capture_inputs[key], return_chunks=return_texts.get(key), |
There was a problem hiding this comment.
This now adds verified capture delivery to the local record, but the generated profile example is still from the previous shape. Both Ready full-check jobs fail test_published_profile_example_matches_fixture on HTML equality. Please regenerate docs/examples/dashboard-profile-review.html with tests/fixtures/dashboard_profile_review.py after the archive changes and keep the equality check.
Agent-assisted-by: Codex / gpt-6.2-sol [effort=max] (generated skill projection and offline profile example) Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
zengchuang-hw
left a comment
There was a problem hiding this comment.
PASS
Incremental independent review of 07ace74ebe4534e98dbf60485aff0b2e045c59f2 → 871c39d0812ab5e67bdf42ffb6e5e7d2e508a010, anchored to the latter. Previous review: #507 (review). Scope remains the Find migration and retrieval/archive behavior (#316 / #384).
The previous repeated-reason defect is resolved: decision_positions now retains every matching statement before the accepted log submission, and round_reviews pairs a visible source return with a later qualifying decision. A repeated pre-read/post-read reason can establish the later association, while a statement only before the read or after the saved log cannot. The regression cases now explicitly cover these orders.
I also inspected the incremental managed/manual capture paths: recognized search commands without their matching selected capture/receipt remain unresolved; delivery is recorded separately from adoption; a complete managed envelope can establish delivery without a use citation; missing, clipped or grouped/unmatched results retain partial coverage. The service-reuse integration ranks the package catalog with Find while keeping its fingerprint-free prepared-context format separate from the versioned archive importer. The related CLI/docs/tests reflect these boundaries.
The old and new histories diverge after rebasing. I compared the actual tree contents and separated inherited main changes from this PR's changes against current base 9b418d7fe16f3979b67f74f290949629ef103e8f, rather than treating a three-dot comparison as the literal incremental diff. No remaining concrete blocker found in this incremental code review; no additional prerequisite or non-blocking suggestion.
Executed checks: read-only source/tree and test-source inspection; current author/repository/head and my own prior-review deduplication. Not executed: repository code, tests, model/device experiments. CI was not queried or used as an approval condition in this round; the previous CI/declaration item is not carried forward as a code blocker under the current review instructions. This approval is a code-review conclusion, not a claim that unexecuted tests or experiments passed. No third-party review opinions were consulted.
871c39d to
d0f83b9
Compare
zengchuang-hw
left a comment
There was a problem hiding this comment.
PASS
独立增量检视:871c39d0812ab5e67bdf42ffb6e5e7d2e508a010 → d0f83b954f190c07f669a6fbf569bd6d879e8f44(上轮检视)。
两版提交历史已分叉,本轮直接比较完整 Git 树:仅两份文件变化,无文件删除,运行时代码和测试源未变。
- Dashboard 合成示例现在标注 A/B 已送达、C/D/E 未知;与现有捕获记录的第 2 行返回和两条资源预算相符。采用仍为未知,used=0;E 的省略冲突记录也保留,没有把送达当作采用。
- 知识包的
_provenance.json仅更新来源提交。该提交的 registry blob 与当前相同,registry 哈希字段未变。
上轮 citation reason 修复未受本次改动影响;本轮无批准前必做项或新增非阻塞建议。已静态核对 Git 树、变更、相关 fixture 与交付判定代码,以及 #384 的适用要求;未执行仓库代码、测试或实验,未查 CI。此批准仅针对所列 head 的代码检视,不改变 Draft 状态。
There was a problem hiding this comment.
LGTM
PR review verdict — PASS
Reviewed base 9b81c9ba1d4d1f7d45bd039a7c02ac2f01859426 and head d0f83b954f190c07f669a6fbf569bd6d879e8f44.
Second tip technical verify after zengchuang-hw tip Approve on the same head.
Verified:
- Find ranking remains the shared text-discovery path; capture/search archive distinguishes hits, delivered passages, and used citations without treating delivery as adoption
- Tip regenerations refresh skill projection / offline profile example;
test_published_profile_example_matches_fixturepasses locally (addresses prior Ready HTML mismatch thread) campaign knowledge/benchmarks session knowledgedecode ascaptured_searchwithcomplete=Falseuntil a verified capture match — open suggestion about omitted capture IDs does not reproduce as a tip false-complete blocker on this head; optional follow-up for an explicit regression remains non-blocking- Local targeted knowledge/search suites: 274 passed, 2 skipped; ruff clean on touched Find/archive modules
- Ready 44474326319: full-check 3.10/3.11, installed-package, dashboard-browser, hosts, pr-references success; declarations pass
Technical/third-party verify only (cursor[bot] permission none). Not a write+ eligible Approver claim; not dual-tip / merge-ready under agent-collaboration. Merge still needs write+ independent Approve — left to Dong always-on / write+ humans. Note #515 integration order with overlapping knowledge surfaces if stacked with #516.
Refs #316 (search follow-up to #466) and #384 (search archive).
What changed
findandreadactivity through the existing campaign search archive. Distinguish search hits, delivered passages and supported use in a round decision. Missing or unusable evidence does not silently turn into a complete zero-search record.Validation
Knowledge authorship declaration
The contributor verified the effective runtime settings. The two trailers that previously recorded GPT-6.1 Sol have been corrected to GPT-6.2 Sol at
maxeffort.