Skip to content

Unify knowledge discovery and delivery through find and read - #709

Open
jiaran-king wants to merge 13 commits into
InferMatrixLab:mainfrom
jiaran-king:codex/686-find-lean
Open

jiaran-king wants to merge 13 commits into
InferMatrixLab:mainfrom
jiaran-king:codex/686-find-lean

Conversation

@jiaran-king

@jiaran-king jiaran-king commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Governing Issue and delivery slice

Refs #686

Anchors touched: A2, A4, and A7. #686 records the proposed CLI migration and the managed delivery requirements.

InferRSI gave agents different knowledge commands for ordinary lookup, campaign work, and benchmarks. Some only listed hits. Others assembled a context bundle and wrote a session receipt. In the original CUDA reproduction, the first hit had a 13,166-byte body, but the old 64 KiB bundle limit excluded it because the body and required files totaled 320,040 bytes.

This PR makes find the knowledge-query entry point and read the way to open a hit. It covers command migration, delivery of card bodies and linked reference files, and the records used to verify what reached a managed round.

image

Knowledge authorship declaration

{
  "schema_version": 1,
  "head_sha": "85f78d07182f06dd7b183e4a980c6db72f672922",
  "human_only": false,
  "material_ai_authors": [
    {
      "tool": "Codex",
      "model_id": "gpt-6.2-sol",
      "effort": "max",
      "role": "author"
    },
    {
      "tool": "Codex",
      "model_id": "gpt-6.2-astra",
      "effort": "max",
      "role": "author"
    }
  ]
}

Changed artifacts and evidence

Workflow Before After
Ordinary lookup and model research find, knowledge search, knowledge research, and question-based context or collect. find QUERY, then run the selected hit's read_args. Open linked files on demand. Standalone lookup and reads are read-only.
Campaigns and benchmarks campaign knowledge, benchmarks session knowledge, and question-based campaign capture-context could search, assemble, and record in one step. find QUERY --session DIR records ordered hits and pins their source and revision. Its scoped read records the bytes returned for each file and page.
External lookup cannbot search and mindie query. CANNBot callers move to the existing find QUERY --backend ascend route with a project grant. MindIE project grants enabled with mindie enable --default-find --backend ascend join ordinary Find. MindIE callers move their native JSON requests to find --input FILE. CANNBot Find · MindIE text navigation
Explicit assembly collect accepted both questions and selected references. Use collect --id REF --revision REF=REV to assemble selected material under a byte limit. Manual campaign capture-context --id-ref REF still saves a snapshot of a selected bundle.
inferrsi find "reproducible diffusion baseline correctness fixed seed end to end benchmark" \
  --session "$session" --limit 2

Run the chosen hit's read_args to open its body. Add --resource references/benchmark-commands.md to those arguments to open the linked reference file. For a paged file, run the returned next_read_args until the file is complete. Each continuation keeps the revision, source, and any session search reference. The collect byte limit applies only to explicit assembly.

In managed sessions, the frozen knowledge policy still governs access. A knowledge-disabled session skips external lookup. The Harness registers search and read receipts under the session lock after checking the diagnosis, ranking policy, and deadline. Apps uses the KnowledgeReader for discovery and exact-version reads. Search receipts report zero delivered bytes. Empty reads are recorded as empty_context for audit. When a passage informs a candidate, cite it in the hypothesis and attach its delivery with round --knowledge-ref where the round accepts explicit references. Service-reuse rounds retain the prepared material at its captured version.

Filtered inventories, selected Markdown exports, historical receipt import, and the separate MindIE MCP integration remain available.

CLI retirement. Retired query commands exit with status 2 and a migration hint to find and read. Explicit assembly and manual snapshots remain available. Historical receipts and traces can be audited and replayed. New rounds require a scoped read receipt with delivered content. Dong’s decision on #709

Checks and dependencies

Current head 85f78d07 on main 477446f6

  • MindIE opt-in. Ordinary Find honors the project grant and reports references and condition counts. Text and JSON search imports retain the matched references. In the installed CLI test, ordinary Find used CANNBot on the project's a2 platform and the opted-in MindIE grant. Scoped Find used its frozen CANNBot a3 settings. The provider responses came from synthetic fixtures. #746
  • Installed CLI. The bug: campaign knowledge records a delivery when all matched skills exceed the context budget #696 query returned five hits and zero body bytes in a CPU campaign and a CPU benchmark. Both refused to cite a Find receipt and rejected Read requests with a mismatched reference or revision. A verified 3,900-byte Read receipt could be cited in the first completed round. The original CUDA query returned two hits, and the full 13,166-byte body and the 8,466-byte linked file opened independently. Historical replay and import preserved the original records. #696
  • Local checks. Python 3.10 passed 33 targeted tests and Python 3.11 passed 33, including frozen benchmark card delivery under Verify required benchmark knowledge card delivery #670. Both isolated wheel checks passed with 137 records and 775 resources. Ruff and diff checks passed.

Earlier heads

Manager base sync b2a67088 on main ba4637e2

Both hosted Ready full checks passed on this head. Ready CI

  • Manager synchronization. Managed lifecycle commands construct the typed requests from Move managed sessions, budgets and recovery into Harness Manager #741. Scoped Find and Read use the Manager knowledge operation and the existing checks for the query, ranking policy, diagnosis, epoch, and delivered bytes. Status reads the committed round receipt through Manager.
  • Local checks on this head. Python 3.10 passed 138 targeted tests and Python 3.11 passed 225. These cover the Manager/CLI boundary, fingerprint-free service reads, receipt retry and admission, and Verify required benchmark knowledge card delivery #670. Two service-lifecycle cases affected by the local macOS stop restriction were outside the selection. Both isolated wheel checks passed with 137 records and 775 resources. Ruff and diff checks passed.
  • Installed CLI. The bug: campaign knowledge records a delivery when all matched skills exceed the context budget #696 query returned five hits and zero body bytes in both a CPU campaign and a CPU benchmark. Both rejected a Find citation and completed the first round with a verified 3,900-byte Read receipt. In both runs, status --round-receipt 1 matched the stored observation. The CUDA example returned its 13,166-byte body and 8,466-byte attachment independently. Historical replay and import preserved the original records. #696

Service execution and evaluation base sync 4e0d6498

Both hosted Ready full checks passed on this head. Ready CI

  • Harness synchronization. Scoped Find and Read use the managed request checks and idempotent receipt commit. Rejected responses leave no retained search or delivery. Recorded reads can be cited and historical receipts remain available for audit. The branch carries the Records, Executor, and Evaluator moves through Move managed service execution and assessment into Harness components #737.
  • Local checks on this head. Python 3.10 passed 69 tests and Python 3.11 passed 155. The selection includes managed request and retry checks, pinned service reads, and Verify required benchmark knowledge card delivery #670 pair eligibility and byte accounting. Each run hit the same macOS service-stop permission error in the fingerprint-isolation test, reproduced on unmodified main. Two known service-lifecycle cases were outside the selection. Both isolated wheel checks found 137 records and 775 resources. Ruff and diff checks passed.
  • Installed CLI. In each of a CPU campaign and a CPU benchmark, the original bug: campaign knowledge records a delivery when all matched skills exceed the context budget #696 query returned five hits and zero body bytes. The Find receipt was refused as a round citation. The 3,900-byte Read receipt was accepted in the first completed round. The original CUDA hit delivered the full 13,166-byte body and the 8,466-byte linked attachment independently. The historical round was replayed and imported with the original records intact. #696

Repository-pack base sync f5d19e91 on main 54342cc5

  • Main synchronization. The only conflict was in the indexer summary tests. The branch retains both the repository-pack fingerprint test for the old and new layouts and the retrieval evaluator tests.
  • Local checks on this head. Python 3.10 and 3.11 each passed 28 targeted tests, including ranking, retained-source reads, and both repository-pack layouts. The two macOS service-lifecycle cases remain outside this local selection. Ruff and git diff --check passed. A Python 3.11 wheel installed outside the checkout exposed all seven packaged repository descriptors and opened the pinned body from a cgroupv2 Find result.

Test-fix head 5e6c6e11

  • Service ranking regressions. The Python 3.10 and 3.11 full checks at bf3204b9 both failed in the same two tests because they still imported the removed Apps helper. Both tests now call KnowledgeReader.find() and retain the configuration, no-fingerprints, and score-overflow assertions. Prior full checks
  • Local checks. On Python 3.10 and 3.11, 26 targeted tests passed on each version. The local test selection excluded two service-lifecycle cases that hit a macOS permission error during baseline cleanup. The indexer worker ran on both versions and completed a pinned read through KnowledgeReader.read_hit(), with matching CLI and API search outputs. Ruff and git diff --check passed.

Runtime head bf3204b9

  • Installed CLI. In both a managed campaign and a CPU benchmark fixture, the original bug: campaign knowledge records a delivery when all matched skills exceed the context budget #696 query returned five hits and zero delivered bytes. Its pinned read with --byte-range 0 3900 returned 3,900 UTF-8 bytes. Submitting the Find receipt exited 2 without consuming a round. Submitting the read receipt recorded it in round one. The retired campaign and benchmark search commands also exited 2. #696
  • Body, attachments, and history. The original CUDA query returned two hits. The first body was delivered in three pages totaling 13,166 bytes. The linked reference opened independently. Explicit assembly under 64 KiB still reports context_limit for the 320,040-byte required group. Opening an empty linked file returned zero bytes with an empty_context receipt. Both forms of citation of a historical one-step receipt were rejected for a new round. A round from the installed baseline package was replayed and imported with the historical control files and receipt unchanged.
  • Regression checks. 43 focused tests passed on this head, including the distinction between hits, returned content, and adopted passages, and the required benchmark card's frozen version, total byte budget, and first-round delivery. Ruff and git diff --check passed. #384 · #670
  • Service and encoding checks. The installed package returned an unchanged synthetic Chinese title through find --backend ascend on macOS and verified -I -B -X utf8 on the real CANNBot child. The local feat(harness): allow service campaigns to continue after a failed final #705 tests stopped at the baseline cleanup check with PermissionError, which also reproduced on unmodified main at 3efb03ea. The hosted Linux results listed below apply to earlier heads. #705 · #708

Earlier retrieval and delivery checks

  • CUDA retrieval and paging. On the reduced worktree, the original query returned two hits. The first hit delivered its full 13,166-byte body, and its relative link opened the 8,466-byte linked reference file separately. A 153,600-byte fixture was reassembled byte for byte from 26 executable read pages through the host.

  • Live CPU NumPy Softmax optimization and replay. The supplied task specification did not give the agent a search command, query terms, or a target card. In the live run on cbdabc3b, the agent made its own query, got five hits, read three pages, and cited one passage in its hypothesis. The reduced worktree replayed those original tool returns and recovered one verified use.

  • Benchmark delivery and service reuse. Read serves the requested file independently of the experimental cap. Targeted regressions verify that benchmark credit requires complete delivery of the pinned card under the frozen query and scenario, before the first verified round and within the frozen byte limit. Late, partial, and over-budget deliveries remain ineligible. A later retry leaves the original judgment intact. The tests also cover historical single-capture receipts and reopening a retained service version after the live package changes. #670

  • Reduced worktree validation. 212 focused tests passed before the publication snapshot. The publication snapshot preserved the reviewed changes and regenerated the same catalog inputs with a source revision reachable from this branch.

  • Publication head 0ddfce1b87c7 on base 7e2c4ab6fdab. Ruff, diff whitespace, and pinned skill-index validation passed. A targeted rerun was started on this head.

  • Local full suite. The run was still in progress at publication. Observed failures include an unavailable Homebrew Node dependency and macOS sandbox rejection of ps in CANNBot cleanup tests. Full-suite failures still need triage.

  • CI fix validation at 48b6314e8b8a. All five previously failing tests passed locally. The sdist-built wheel passed the complete outside-checkout smoke on Python 3.10 and 3.11, each with 137 records and 775 resources. Ruff, the coverage regeneration check, and git diff --check passed. Hosted CI passed on that head.

  • Conflict and empty-receipt follow-up at 6252c77dbaec. 54 focused tests passed. A clean install of the candidate wheel returned a synthetic Chinese CANNBot title unchanged through find --backend ascend; the subprocess used -I -B -X utf8. The Linux full checks for Python 3.10 and 3.11 passed on 6252c77dbaec. CI for 6252c77dbaec

Remaining work and Issue closure

The maintainer accepted the CLI retirement and continued read-only access to historical receipts. Current-head acceptance covers scoped delivery and round attribution, frozen benchmark delivery, and fingerprint-free service reads. Atomic layer/finding selection remains a follow-up. #713 handoff and service-reuse verification The paired benchmark acceptance is covered by delivery regressions. Maintainer decision

Use find for discovery and read for the selected body or resource. Keep explicit
bundle assembly, historical imports, and the benchmark delivery contract.

Agent-assisted-by: Codex / unknown [effort=unknown] (author)
Signed-off-by: Zhou ziheng <[email protected]>
Agent-assisted-by: Codex / unknown [effort=unknown] (author)
Signed-off-by: Zhou ziheng <[email protected]>
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Skill evaluation

PLANNED: not executed; there are no task outcomes yet.
No approval, model efficacy or current-head test result is implied.

  • Next: run the pinned source/index --check below at head 85f78d07182f06dd7b183e4a980c6db72f672922.
  • Task selection: no supported automatic comparison; choose a relevant source/content check and disposition uncovered claims.
  • Selected comparisons: 0 · Estimated task calls: 0. Uncovered/unsupported changes: 137; Canonical library paths: 9; Generated projection paths: 2; Other paths: 126. These are paths, not independent claims.
  • Return: command, input/source pin, exit status, outputs/failures and untested claims for independent verified/refuted/unverified disposition.
Author verification steps (nonpaid; not yet run)
  1. Bind the checkout. Run git rev-parse HEAD; it must equal 85f78d07182f06dd7b183e4a980c6db72f672922. If it differs, obtain a current plan; do not reuse old results.
  2. Check source/index consistency. At that PR checkout, using the reviewed repository tool and its documented development dependencies, run:
python tools/build_skill_index.py --source-revision cbeb57eb5232b2a61ab21395c1b2f31745503f56 --check

The 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.
No supported automatic comparison is selected. Review the canonical changes and explain which claims need evidence, are unaffected, or remain unverified; do not treat generated records as separate behavioral claims.
Uncovered scope by location: Canonical library paths: 9; Generated projection paths: 2; Other paths: 126. Path counts are not claim counts; no metadata-only conclusion is inferred.
3. Return evidence for independent review: head, check/task/source pin, command, environment, exit status, outputs/failures and untested claims. Label scripted controls. Request each claim's disposition: verified, refuted or unverified; this plan proves neither model provenance nor benefit.
Check recipes and evidence limits

Evidence and logs · Retention: 30 days.
Retained artifacts are verifiable only before Unix time 1798343463 while the linked artifact is available. Expired evidence is unverified.

Plan bindings, budget, frozen exam and advisory details

Advisory: obtain missing evidence

Retained evidence availability: planned / unexecuted. No approval or merge authorization is issued.
Applicable only while these revisions and inputs match the current PR.
Paid execution requires trusted label authorization and cumulative PR reservation. Unknown accounting blocks new paid calls; planning is not execution.
Pipeline evidence only; offline fixed outputs do not establish skill efficacy.
Unchanged-correct is valid neutral evidence, not incremental benefit.
Content/source review and authorship admission remain separate.
Trusted regrading checks retained answers, not model/hardware provenance or a hostile executor; this is not an efficacy certification.

  • Retained evidence is planned / unexecuted.
  • No supported comparison cases were selected.
  • Uncovered/unsupported scope needs a case or explicit reviewer disposition.
    Plan SHA-256: cf1d1f76e1a04a3f83c07591b3fc92b4db1d99a81aa4b7187299e98d86379f28
    Base: 477446f6d675bb47b4912bb52ae04e0cb3fb4b3e · Head: 85f78d07182f06dd7b183e4a980c6db72f672922
    Trusted implementation: 477446f6d675bb47b4912bb52ae04e0cb3fb4b3e

Model/settings: {"effort":"not_applicable","name":"claude-opus-5-5"}
Budget: {"comparisons":0,"estimated_calls":0,"limits_per_comparison":{"campaign_seconds":600,"max_task_calls":2,"repeats":1,"timeout_seconds":180,"token_stop_new_trials":200000},"provider_config_sha256":"b28d80f8194fbe0f5a9f01515efb24b218979fd45f702776560da276f4b30d04","reservation":null}

Skill Comparison Cases Estimated calls

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/skill_library/_compiled/_provenance.json","source_revision":"cbeb57eb5232b2a61ab21395c1b2f31745503f56","status":"ready"}

Provider/settings: {"client":{"api_version":"2023-06-01","endpoint":"https://yibuapi.com/v1/messages","kind":"anthropic-messages-full-context-v1","max_output_tokens":4096,"max_read_bytes":32768,"max_request_bytes":262144,"max_requests":1,"max_tool_calls":12,"provider":"yibuapi"},"limits":{"token_stop_new_trials":200000},"model":{"effort":"not_applicable","name":"claude-opus-5-5"},"pricing":{"currency":"USD","expires_at":1793271228,"group":"default","max_input_tokens":1000000,"model":"claude-opus-5-5","rate_evidence":"https://github.com/InferMatrixLab/InferRSI/issues/215#issuecomment-6467531341","rates":{"cache_read":"0.4","cache_write":"10","input":"8","output":"40"},"request_fee":"0","unit":"per_million_tokens"},"spend_limit":{"amount":"200","currency":"USD"}}

Uncovered / unsupported paths (137)
  • uncovered: "docs/apps-module-migrations.json"
  • uncovered: "docs/benchmarks/benchmark-comparison.md"
  • uncovered: "docs/benchmarks/moe-forward-benchmark.md"
  • uncovered: "docs/benchmarks/optimization-benchmarks.md"
  • uncovered: "docs/dashboard.md"
  • uncovered: "docs/examples/dashboard-profile-review.html"
  • uncovered: "docs/guides/knowledge/external-channels.md"
  • uncovered: "docs/guides/knowledge/knowledge-layout.md"
  • uncovered: "docs/guides/knowledge/knowledge-retrieval-trace.md"
  • uncovered: "docs/guides/operations.md"
  • uncovered: "docs/guides/optimization-workflow-unification.md"
  • uncovered: "docs/guides/plugins/codex-plugin.md"
  • uncovered: "docs/guides/plugins/dsh-plugin.md"
  • uncovered: "docs/guides/service-reuse-campaigns.md"
  • uncovered: "docs/knowledge-base.md"
  • uncovered: "docs/knowledge-operations.md"
  • uncovered: "docs/knowledge-store.md"
  • uncovered: "docs/quickstart.md"
  • uncovered: "docs/searchspace-index.json"
  • uncovered: "docs/skill-coverage.md"
  • uncovered: "plugins/inferrsi-dsh/form.cjs"
  • uncovered: "plugins/inferrsi/skills/inferrsi/SKILL.md"
  • uncovered: "plugins/workswarm/inferrsi/skills/inferrsi/SKILL.md"
  • uncovered: "src/inferrsi/apps/cli/init.py"
  • uncovered: "src/inferrsi/apps/cli/arguments.py"
  • uncovered: "src/inferrsi/apps/handoff/context_provider.py"
  • uncovered: "src/inferrsi/apps/integrations/mindie/context.py"
  • uncovered: "src/inferrsi/apps/integrations/mindie/navigation.py"
  • uncovered: "src/inferrsi/apps/integrations/mindie/project.py"
  • uncovered: "src/inferrsi/apps/views/capture_delivery.py"
  • uncovered: "src/inferrsi/apps/views/codex_knowledge.py"
  • uncovered: "src/inferrsi/apps/views/codex_search.py"
  • uncovered: "src/inferrsi/apps/views/codex_tool_returns.py"
  • uncovered: "src/inferrsi/apps/views/comparison_report.py"
  • uncovered: "src/inferrsi/apps/views/dashboard_data.py"
  • uncovered: "src/inferrsi/apps/views/retrieval_projection.py"
  • uncovered: "src/inferrsi/apps/views/round_citations.py"
  • uncovered: "src/inferrsi/apps/views/round_decision_view.html"
  • uncovered: "src/inferrsi/apps/views/search_archive.py"
  • uncovered: "src/inferrsi/apps/views/search_attribution.py"
  • uncovered: "src/inferrsi/apps/views/template.html"
  • uncovered: "src/inferrsi/apps/workflows/benchmark_compare.py"
  • uncovered: "src/inferrsi/apps/workflows/campaign.py"
  • uncovered: "src/inferrsi/apps/workflows/knowledge.py"
  • uncovered: "src/inferrsi/apps/workflows/session_knowledge.py"
  • uncovered: "src/inferrsi/benchmark/tasks/qwen21-denoise-npu/TASK.md"
  • uncovered: "src/inferrsi/harness/README.md"
  • uncovered: "src/inferrsi/harness/indexer/init.py"
  • uncovered: "src/inferrsi/harness/manager/init.py"
  • uncovered: "src/inferrsi/harness/manager/_requests.py"
  • uncovered: "src/inferrsi/harness/manager/_runtime.py"
  • uncovered: "src/inferrsi/harness/manager/_session.py"
  • uncovered: "src/inferrsi/harness/manager/_state.py"
  • uncovered: "src/inferrsi/harness/records/campaign_records.py"
  • uncovered: "src/inferrsi/harness/records/evidence.py"
  • uncovered: "src/inferrsi/harness/records/knowledge_capture.py"
  • uncovered: "src/inferrsi/knowledge/_skill_selection.py"
  • uncovered: "src/inferrsi/knowledge/catalog.py"
  • uncovered: "src/inferrsi/knowledge/channels.py"
  • uncovered: "src/inferrsi/knowledge/context_projection.py"
  • uncovered: "src/inferrsi/knowledge/data/skill_library/README.md"
  • uncovered: "src/inferrsi/knowledge/data/skill_library/_compiled/_provenance.json"
  • uncovered: "src/inferrsi/knowledge/data/skill_library/_compiled/inputs.json"
  • uncovered: "src/inferrsi/knowledge/data/skill_library/config/research_profiles/minimax-h3.json"
  • uncovered: "src/inferrsi/knowledge/data/skill_library/records/README.md"
  • uncovered: "src/inferrsi/knowledge/data/skill_library/systems/engines/h3-c/audit-h3-runtime-residency/SKILL.md"
  • uncovered: "src/inferrsi/knowledge/data/skill_library/systems/engines/h3-c/audit-h3-runtime-residency/references/minimax-h3-apple.md"
  • uncovered: "src/inferrsi/knowledge/data/skill_library/systems/engines/h3-c/audit-h3-runtime-residency/references/minimax-h3-profile.json"
  • uncovered: "src/inferrsi/knowledge/data/skill_library/systems/engines/h3-c/audit-h3-runtime-residency/references/validation.md"
  • uncovered: "src/inferrsi/knowledge/data/skill_library/workflows/research/inference-engine-research/SKILL.md"
  • uncovered: "src/inferrsi/knowledge/data/skill_library/workflows/research/inference-engine-research/references/model-aware-preparation.md"
  • uncovered: "src/inferrsi/knowledge/knowledge_find.py"
  • uncovered: "src/inferrsi/knowledge/knowledge_operations.py"
  • uncovered: "src/inferrsi/knowledge/research.py"
  • uncovered: "tests/apps/check_workswarm_installed.py"
  • uncovered: "tests/apps/test_apps_context_provider.py"
  • uncovered: "tests/apps/test_campaign_record_injection.py"
  • uncovered: "tests/apps/test_campaign_task_selection.py"
  • uncovered: "tests/apps/test_cannbot_boundaries.py"
  • uncovered: "tests/apps/test_cannbot_channel_acceptance.py"
  • uncovered: "tests/apps/test_cli_catalog.py"
  • uncovered: "tests/apps/test_codex_knowledge_search.py"
  • uncovered: "tests/apps/test_codex_plugin.py"
  • uncovered: "tests/apps/test_codex_search_delivery.py"
  • uncovered: "tests/apps/test_codex_search_shell_forms.py"
  • uncovered: "tests/apps/test_dsh_plugin.py"
  • uncovered: "tests/apps/test_engineering_benchmark_plugins.py"
  • uncovered: "tests/apps/test_indexer_deliveries.py"
  • uncovered: "tests/apps/test_knowledge_read_ranges.py"
  • uncovered: "tests/apps/test_mindie_project.py"
  • uncovered: "tests/apps/test_mindie_runtime.py"
  • uncovered: "tests/apps/test_mlx_discovery.py"
  • uncovered: "tests/apps/test_optimization_session.py"
  • uncovered: "tests/apps/test_optimization_story.py"
  • uncovered: "tests/apps/test_optimization_trace.py"
  • uncovered: "tests/apps/test_project_explanation.py"
  • uncovered: "tests/apps/test_project_optimization.py"
  • uncovered: "tests/apps/test_project_service_reuse.py"
  • uncovered: "tests/apps/test_retrieval_projection.py"
  • uncovered: "tests/apps/test_round_citations.py"
    Additional paths omitted; see retained evidence.

@Dong1017 Dong1017 added area:knowledge Knowledge line: packs, skill library, knowledge admission area:apps Apps line: CLI, Python entrypoints, host inspection, workflows, views, and adapters area:harness Harness module: profile, A/B loop, quality gates, evidence reports labels Nov 26, 2026
Follow published read continuations in the wheel and decision-card checks.
Exercise service ranking with a session root, record the retired research
helper in the compatibility test, and regenerate the coverage digest.

Agent-assisted-by: Codex / gpt-6.2-sol [effort=max] (author)
Signed-off-by: Zhou ziheng <[email protected]>
@jiaran-king
jiaran-king marked this pull request as ready for review November 26, 2026 09:38
@jiaran-king

Copy link
Copy Markdown
Contributor Author

@david6666666 @Dong1017 For #686, we propose retiring the old query commands rather than keeping aliases. With #507 already sharing the ranking logic, the remaining problem was that callers still had to choose between several discovery and delivery contracts. This PR uses find for discovery, pinned read for the selected body or linked file, and find --session plus the returned read for managed receipts. Keeping the old query forms would leave that ambiguity in scripts and installed plugins. We keep historical trace imports, inventory, export, and explicit assembly; the old live query forms require migration. Is there a compelling reason we must keep the old search entry points? If not, we should retire them rather than maintain two ways to search.

@Dong1017

Copy link
Copy Markdown
Collaborator

Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced).

Yes, keep them for now. #709 should not retire the old query commands; #379 accepted them as compatibility and fallback routes. The find → read default stands, and in-repo callers can migrate to it.

Dong-bot (authorized delegate): the exit-2 retirement is not accepted in this PR. A separate compatibility decision has to come first.

Details

Why the old forms stay

Kept by this PR (no objection)

What would unblock the retirement

  • A separate compatibility decision that names the installed plugin bundles and external callers that have migrated, and says what replaces the collect --relevance fallback. Then the exit-2 change can be reconsidered.

Not verified here

  • pr/diff.patch is 153 KB and marked diffComplete: false. It spilled outside the workspace and I could not page through it, so I did not confirm the exit-2 path line by line. I read src/inferrsi/apps/cli/arguments.py lines 1–200 at 48b6314e only.
  • No tests run. Hosted CI is pending per the PR body.
  • This is not a formal review and gives no verdict on the diff. The seeded head is diffComplete: false, so no PASS on this head either way.

Check returned resources for every cited local receipt. Preserve archived
captures while showing empty receipts separately in session summaries and
excluding them from dashboard citation targets.

Agent-assisted-by: Codex / gpt-6.2-sol [effort=max] (author)
Signed-off-by: Zhou ziheng <[email protected]>

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

首次 Ready 检视:base 7e2c4ab6fdab68da10b13e1a03d21dd6f8fd6c22 → head 48b6314e8b8a07347785f82385a95e3b951bb233。范围:#686 的统一发现入口、兼容性以及受管交付边界。

  1. 新默认入口不等于移除旧入口。 live parser 把 knowledge search / knowledge research 留给历史解析,现有脚本运行会失败。#379 的兼容决定 和 #709 的范围决定 都保留旧入口作为兼容和回退。请保留旧命令的参数、输出与退出码,用原命令跑兼容回归;仓内示例和插件可继续迁到 find → read。
  2. 合入候选尚未证明保留 #708 的 Windows UTF-8 修复。 当前分支早于 #708,GitHub 也尚不能构造无冲突的合并结果。PR 改了 CANNBot 的公开入口回归,但 head 的 worker 仍以 -I -B 启动,没有 -X utf8。这不是说 PR diff 删除了该参数。更新到含 #708 的 main 并解决集成冲突后,请用候选安装包的 find QUERY --backend ascend 跑合成中文标题,确认真实子进程仍有 -I -B -X utf8、标题无损返回。

实际:静态对照兼容入口和 CANNBot 路径;用真实隔离 Python 子进程和替身采集运行两份原始 worker(main 3efb03ea、本 PR head)的 _run / _strict。模拟缺 UTF-8 模式时输出 GBK,main 正确返回中文,PR 分支拒绝 JSON。未跑候选 wheel、真实 Windows 索引、受管交付全链或完整套件;本轮不把这些未验证项称为通过。

@jiaran-king

Copy link
Copy Markdown
Contributor Author

@zengchuang-hw Thanks for the review. I agree we need to preserve #708's Windows UTF-8 fix; I’ll verify that CANNBot titles survive the subprocess boundary through find after updating the branch.

On compatibility, #379 did retain the legacy query forms. The rationale for retiring the legacy query routes is that sharing a ranker did not fix the bugs caused by having several ways to search and deliver the results. #686 documents how agents could pick a route that found the right material but did not deliver or retain it as expected. In #696 we reproduced five hits and zero bytes returned by campaign knowledge, yet it recorded a delivery and let the next round cite the empty receipt. We also reproduced a case where attachments made the whole bundle exceed its budget, even though the body would have fit on its own.

The proposal is to have one way to search (find), then open the pinned body or a linked attachment separately (read). In a managed session, a hit is recorded as a search, and only returned content counts as delivery. Historical receipts remain readable for audit. If there is a compelling reason we must keep the old search forms, let's settle it explicitly; otherwise I'd retire them rather than maintain two sets of search and delivery behavior.

Keep explicit failed-final continuation in service dispatch while validating
the frozen ranking policy for the scoped knowledge workflow.

Agent-assisted-by: Codex / gpt-6.2-sol [effort=max] (author)
Signed-off-by: Zhou ziheng <[email protected]>
Exercise the search-only rejection before reading the paged body and citing its delivery. Clarify the session, MindIE and explicit bundle boundaries in CLI help and the operation guide.

Agent-assisted-by: Codex / gpt-6.2-sol [effort=max] (author)
Signed-off-by: Zhou ziheng <[email protected]>

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

回应更新与兼容方案讨论。上轮检视的 48b6314e8b8a07347785f82385a95e3b951bb233 → 本轮 6252c77dbaece6d4f305b8fd4ce08c01f6b85398,当前 base 3efb03ea71356786b19b705e53f65267c17d19bf。

已解除:CANNBot UTF-8。 当前启动参数保留 -I -B -X utf8,新增 Find 回归覆盖中文标题。独立从本 head 提取原始 worker,以真实隔离 Python 子进程验证参数和中文 JSON 往返;仅采集器使用标准库替身。未独立重跑安装包、Windows 和官方索引。

仍阻塞:旧命令在实时入口被移除。 parser仍只在历史解析模式登记 knowledge search / knowledge research。同意只维护一个搜索和交付实现,但 #379 与 本 PR 的范围决定要求当前保留兼容。可以保留薄的兼容入口或转换层,复用同一底层并核对旧参数、响应和退出码;对受管旧命令,继续断言零正文不登记为交付。另一条路是先记录明确取代旧决定的兼容方案,再有意移除。本轮没有发现该取代决定,未跑全部兼容 fixture 或受管交付全链,因此不批准。

@Dong1017

Dong1017 commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Posted by an automated agent acting on behalf of @Dong1017 (model claude-opus-5-5), at the owner's direction.

负责人意见:find → read 的方向接受。合入前请按已接受的 #500 与 #702 设计调整以下四点。 以下基于 head 6252c77d 的静态阅读,没有运行。

  1. 受管会话的状态提交回到 Harness。 新增的 apps/workflows/session_knowledge.py 在 Apps 里拿 Harness 的会话锁、读 state.json、追加 contexts 并直接写回(L296、L380),调用了 9 个 optimization._* 私有函数。task: 按 Analyzer、Indexer、Executor、Evaluator 和 Manager 重组 Harness,统一导入路径 #702 已定 Manager 是会话状态和预算的唯一提交者,Indexer 只核对交付回执,Apps 只装配。请在 Harness 一侧提供一个公开入口(接收 find/read 的回执,在锁内核对诊断绑定、冻结排序、知识时限后登记),Apps 只调这一个入口。这样 task: 按 Analyzer、Indexer、Executor、Evaluator 和 Manager 重组 Harness,统一导入路径 #702 的 P4 只需整体迁移这一处,不用从 Apps 里拆。
  2. 知识访问走 Knowledge Reader 契约。 同一文件直接导入 _skill_selection、rank、service_body 等 Knowledge 内部实现(L22-L32)。[Tracking] 高效知识表达:知识目录(含 Skill)的分层披露与搜索空间索引 #500 已接受整库原子化切换,负责人记录要求 Unify knowledge discovery and delivery through find and read #709 的受管 find/read 经 Reader 接入,沿用限定引用、固定版本、L0–L3、必选依赖整组交付或明确拒绝、实际交付回执。请改为只依赖 Reader 的公开接口,切换时只换 Reader 内部存储。
  3. 旧查询命令在本 PR 移除,不留别名(负责人决定,见更正评论)。 这一决定撤回 Dong-bot 此前"保留旧命令"的意见,tracking: Skill Indexer 检索效率、准确性与逐轮采用 #379 对这些查询入口的兼容承诺同时撤回。退役命令按 PR 现有做法以退出码 2 给出迁移提示;显式组装(collect --id … --revision …)和手工 capture-context --id-ref 保留。bug: campaign knowledge records a delivery when all matched skills exceed the context budget #696 的「5 条命中、0 字节、回执仍可引用」由唯一的 find/read 路径消除。
  4. 历史回执只读。 旧格式回执保留读取,用于审计、task: 按 Analyzer、Indexer、Executor、Evaluator 和 Manager 重组 Harness,统一导入路径 #702 的跨版本恢复和 [Tracking] 高效知识表达:知识目录(含 Skill)的分层披露与搜索空间索引 #500 的回滚,但新一轮不能把旧回执当作新交付引用。旧回执读取的移除与 [Tracking] 高效知识表达:知识目录(含 Skill)的分层披露与搜索空间索引 #500 的 Day-3 退役一起,用单独的清理 PR 处理。

合入顺序。 建议 #709 先于 #702 的 P1 冻结合入(目前 #702 只到 P0),P1 直接冻结 find --session / read 的回执样本。若 #709 晚于 P1,按 P1 的清单把 Harness 侧改动放进对应组件。

@jiaran-king @zengchuang-hw @david6666666 FYI。

2026-11-26 编辑:第 3 点按负责人更正改为移除旧查询命令。

@Dong1017

Copy link
Copy Markdown
Collaborator

Posted by an automated agent acting on behalf of @Dong1017 (model claude-opus-5-5), at the owner's direction.

更正(负责人决定):#709 可以移除旧查询命令,不保留别名。 我上一条协调评论第 3 点写成"暂时保留",判断有误,已改正。#702 的 P1 尚未冻结,#709 先合入时 P1 直接冻结新的 find / read 入口,和 #702、#500 都不冲突。

@jiaran-king @zengchuang-hw @david6666666

Delegate discovery and exact resource reads to the KnowledgeReader. Register the observed bytes under the session lock and reserve historical or empty receipts for audit.

Agent-assisted-by: Codex / gpt-6.2-sol [effort=max] (author)
Signed-off-by: Zhou ziheng <[email protected]>

@david6666666 david6666666 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.

Dot, acting for @david6666666 under delegated PR review.

PR review verdict — DO NOT PASS. Score withheld. Base 3efb03ea71356786b19b705e53f65267c17d19bf, head bf3204b9327b21c513969915ee1868a469de8616.

The owner’s updated decision permits retirement of the old query commands, and this revision moves the session write into a Harness entry point. The remaining inline question is about the managed Reader contract. Total withheld: material archive/fixture and full migration surface coverage remain incomplete.

def read_in_session(args, reader):
if not args.search_ref:
raise ValueError("A session read requires the --search-ref returned by Find")
if args.layer or args.finding or args.compact or args.max_bytes is not None:

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.

Does this guard intentionally defer the agreed managed Reader capability to #713? The owner’s coordination note requires managed reads to use the Reader’s L0–L3 and delivery contract, but this route rejects every explicit --layer or --finding before calling Harness. Please either carry the supported options through the public Reader path and retain a pinned managed-read regression, or link a recorded deferral with the exact capabilities in this PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, David. Yes, managed --layer and --finding are intentionally deferred to the shared Reader work in #713 (confirmed handoff). #713 will define L0–L3 and finding selection and add a pinned managed-read case that checks the exact bytes and delivery receipt. We'll wire the managed find → read path to that interface once it lands. This PR keeps the existing standalone L1/finding reads unchanged and uses pinned body or resource reads in managed sessions.

zengchuang-hw
zengchuang-hw previously approved these changes Nov 26, 2026

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

回应负责人范围更新,对比上轮检视的 6252c77dbaece6d4f305b8fd4ce08c01f6b85398 至 bf3204b9327b21c513969915ee1868a469de8616,base 3efb03ea71356786b19b705e53f65267c17d19bf。

  • 旧查询的退役现由负责人明确接受:迁移提示仍为退出码 2,显式组装保留,历史回执可审计但不能冒充新交付。上轮只剩的兼容范围阻塞因此解除,不是将移除描述成向后兼容。
  • Apps改调 Harness 公开入口;Harness在锁内核对会话并提交状态,Find/Read 通过 Reader。CANNBot UTF-8 worker 在本次增量未变。
  • 本地运行从当前 head 提取的普通会话 citation 校验:有实际交付内容且绑定原 Find 的 Read 通过;仅有 Find、历史捕获、空交付、来源不匹配均拒绝,读取边界使用替身。另静态核对了服务用的固定源读取和历史展示分支;未重跑安装包、真实外部索引、整套会话或设备验收。

Copy link
Copy Markdown
Contributor

回应这条提醒:协调事项已在当前版本检视核对。将状态提交移回 Harness、经 Reader 访问、历史回执仅供审计;旧命令按后续范围决定退役。这里不重复批准。

Keep service ranking assertions and the indexer pinned-read measurement working after the Apps helpers moved.

Agent-assisted-by: Codex (author)
Signed-off-by: Zhou ziheng <[email protected]>
Keep both the pack fingerprint regression and the retrieval evaluator checks.

Agent-assisted-by: Codex (author)
Signed-off-by: Zhou ziheng <[email protected]>
@jiaran-king

Copy link
Copy Markdown
Contributor Author

@zengchuang-hw @david6666666 Could you re-review f5d19e91? The two failing ranking tests now exercise the public Reader with their original assertions, and the branch is synced with main. Full CI passed on this head, including Python 3.10 and 3.11.

For the layer/finding question, the #713 handoff and service-reuse verification are recorded. This PR keeps the existing service-reuse Find/Read and its fingerprint-free receipts; atomic layer/finding selection is follow-up work.

zengchuang-hw
zengchuang-hw previously approved these changes Nov 26, 2026

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

回应复审邀请。前次批准的 bf3204b9 → 当前 f5d19e91482c75408cb943f3fe442838cb252ce3,base 54342cc573896c953cb0e2fb8734ef28262b5bda。

两条服务排序回归改走公开 Reader,保留默认命中和无内容指纹、零权重为空、溢出时报错的原断言。随主线的描述符迁移也核对了旧 Harness 路径与新 resources 路径都参与 Indexer 证据指纹。正式切换到原子层/finding 的接线不在本次 approved 增量。

本地提取本提交的 Reader 方法用替身后端验证固定查询、保留目录和指定权重被原样转发,不支持的 kind 被拒绝;静态核对实际断言。未独立重跑完整排序 fixtures、安装包或真实服务。

Keep verified Find and Read receipts on the managed request commit path alongside the Records, Executor, and Evaluator migrations.

Agent-assisted-by: Codex (author)
Signed-off-by: Zhou ziheng <[email protected]>
Agent-assisted-by: Codex (author)
Signed-off-by: Zhou ziheng <[email protected]>
Keep the typed session boundary and route scoped Find and Read through Manager with the existing receipt checks.

Agent-assisted-by: Codex (author)
Signed-off-by: Zhou ziheng <[email protected]>
@jiaran-king

Copy link
Copy Markdown
Contributor Author

@zengchuang-hw @david6666666 Could you re-review b2a6708? The branch is synced with the Harness P9 changes, and full CI passed on this commit on Python 3.10 and 3.11.

I reran #696 from the installed wheel in both CPU campaign and benchmark sessions. A Find receipt was rejected as a round citation. Reading 3,900 bytes produced a valid citation, and the committed receipt was visible from the round status command. The #713 handoff for layer/finding selection is unchanged. Thanks!

zengchuang-hw
zengchuang-hw previously approved these changes Nov 27, 2026

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

回应本轮复审邀请。固定范围 ba4637e → b2a6708。

对照上轮检视的 f5d19e9,复审至 b2a6708 的 P8/P9 集成。Apps 的 scoped Find/Read 改走 Manager 公开的 knowledge_operation;受管普通与 service-reuse 会话仍持同一会话锁读取并提交回执,普通会话继续核对冻结指纹,服务 Find 使用独立临时来源,真实 Read 才能成为轮次交付。旧查询按负责人范围决定保留迁移提示和历史只读审计,不把旧快照或仅 Find 当成新交付;原子层和 finding 接线仍是后续。

用当前 head 的实际操作函数接入合成会话及 Reader 替身,分开验证普通和服务 Find/Read 都在锁内顺序执行,活动/预算门通过后才提交;错配旧指纹在调用 Reader 前拒绝;仅服务 Find 获得临时保留路径。静态追查 Apps→Manager 接线、诊断/条件绑定和旧命令处置。本轮未重跑完整安装、外部索引或真实服务。

@jiaran-king

Copy link
Copy Markdown
Contributor Author

@amy-why-3459 Could you review #709 at b2a6708? Since you reviewed #466 and #724, I’d especially appreciate a second look at how the new Find/Read flow fits into managed sessions. Full CI passed, and the PR description records the installed-wheel checks for both campaign and benchmark. Thanks!

@amy-why-3459 amy-why-3459 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.

Dot, acting for @amy-why-3459.

回应 b2a6708 的复审。查了当前 Manager 路径:Find/Read 持同一会话锁,Read 从已登记的 Find 取得引用与修订,提交轮次时 Find 回执不能代替正文 Read 回执。旧 base 上的 Ready CI 确实通过。

合入前请验证与刚合入的 #746 共存。 main 的 477446f6 已让独立 Find 通过 standalone_find=True 接入项目明确启用的 MindIE。b2a6708 则重写了这条 CLI 路径,频道调用目前只传 source;两个固定范围共同修改了 CLI、MindIE 适配、频道和 Find 等 10 个文件,GitHub 当前标为不可合并。处理冲突时,请分别跑两条实际 CLI 回归:未带 --session 的普通 Find 在项目明确启用后保留 MindIE 默认导航和独立过滤计数;带 --session 的受管 Find 仍不继承该默认频道,只按冻结设置返回引用,再由匹配的 Read 交付正文。旧基线的绿灯不能验证这两条同装行为。当前不批准。

Keep project opt-ins and condition counts in standalone Find alongside managed session receipts. Recognize MindIE condition counts when importing recorded text results.

Agent-assisted-by: Codex (author)
Signed-off-by: Zhou ziheng <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:apps Apps line: CLI, Python entrypoints, host inspection, workflows, views, and adapters area:harness Harness module: profile, A/B loop, quality gates, evidence reports area:knowledge Knowledge line: packs, skill library, knowledge admission

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants