docs(task-32): refresh MCP docs for split search#1908
Merged
Conversation
earayu
added a commit
that referenced
this pull request
Apr 29, 2026
#1912) Closes task #48 (#32-A1b acceptance test) — verifies the cross-endpoint contract introduced by PR #1909 (task #32-A1, commit 8d5ffa9): the bounded ``evidence_refs`` carried on graph entities + relations must re-compose a complete ``read_document_chunk(collection_id, document_id, chunk_id)`` call without any additional lookup, so an agent following spec § 3.1.1 chain (``query_graph_entities → entity → evidence_refs → read_document_chunk → chunk content``) can succeed. ## What this file is Patch-based per @ziang msg=db58d137 (option 1: lift the ``_patch_doc_lookup`` pattern from ``tests/unit_test/test_d10c_read_primitives_surface.py``). 4 tests covering the 4 sub-criteria PM listed in #indexing优化:a5ab5969 msg=351dd874: 1. ``GraphEvidenceRef`` carries the exact composite key ``read_document_chunk`` needs (``document_id`` + ``chunk_id`` + optional ``parse_version``). 2. ``query_graph_entities`` (via ``_entity_to_search_view``) returns an entity whose ``evidence_refs[0]`` re-composes a successful ``read_document_chunk`` call returning the underlying chunk body. 3. ``expand_graph_subgraph`` carries ``evidence_refs`` on the relation side as well — Weston msg=7500e57d's BLOCKER fix is verified end-to-end, not just at projection layer. 4. ``get_entity_detail`` reuses ``_entity_to_search_view`` and chains identically — proves the projection is a single source of truth for both endpoints. ## What this file is not Not a re-test of PR #1909's projection logic — that is already covered by ziang's 23 unit tests in ``tests/unit_test/service/test_graph_search_service_layer.py`` and ``tests/unit_test/mcp/test_graph_tools.py``. This file's value-add is *chained*: it verifies the data shape produced by the graph layer is contract-compatible with ``read_document_chunk`` without re-testing either side in isolation. Not a live e2e — no real DB, vector connector, LLM provider, or embedding pipeline. Per ziang msg=db58d137 + msg=49d3d8fd the acceptance criterion is contract-shape compatibility, not a real backend round-trip; runtime behaviour of either side is already covered by their owning suites. ## Fixture coordinates (pinned with @ziang msg=49d3d8fd) - ``document_id="doc1"`` - ``chunk_id="chunk-a"`` - ``parse_version="v1"`` - ``collection_id="col-acceptance-1"`` These match the minimal ``LineageMember`` shape ziang's PR #1909 unit tests use, so a future change to ``_lineage_to_evidence_refs`` that breaks the chain shows up here at the cross-endpoint boundary even if ziang's per-endpoint unit tests still pass. ## Validation - ``./.venv/bin/python -m pytest tests/integration/test_graph_evidence_refs_chain.py -v`` → **4 passed** - ``git diff --check`` clean - pre-commit ``make lint`` passed Sister cleanups in the same task #32 Phase A batch (already merged): - @ziang PR #1909 — backend ``GraphEvidenceRef`` + projection (task #44) - @dongdong PR #1908 — MCP docs (task #45) - @huangzhangshu PR #1906 — boundary test no-rerank (task #46)
5 tasks
earayu
added a commit
that referenced
this pull request
Apr 29, 2026
…esson #14 (#1916) Phase A 全闭环 follow-up sediment(task #32 Phase A close 后启动)。 fold 7 lesson sediment 进 § 四(task #32 + task #35 多轮迭代实证累计)+ fix-forward task #45 PR #1908 NIT defer (mcp-api.md "Phase A 后" → "当前已携带", per architect msg=04c7962e Option B + dongdong msg=1c08ac8a)。 § 四 新增 7 lesson: - Lesson #12 v6 sub-form (v6.1 function / v6.2 endpoint / v6.3 data type scope walk) — 架构师 msg=9c5c32d1 升级,task #36 PR #1899 fix-forward² L148 case 实战 surface - Lesson #12 v7 (caller signature → backend schema → runtime fallback 三层 grep) — task #34 rerank 调研 huangheng msg=e539848f own-up + 架构师 msg=b12fec5d thoroughness=very thorough trace 实证 - Lesson #12 v7.1 (composite key invariant) — task #32 spec PR #1905 Weston msg=7500e57d BLOCKER catch + huangheng + 架构师 double own-up - Lesson #12 v7.1 sub-form (backend 投影层 + acceptance 跨 endpoint chained chain 双层 verify) — 架构师 msg=f04b36a8 升级,PR #1909 backend textbook (`8d5ffa97`) + PR #1912 acceptance textbook (`eb2a805b`) 配对 - Lesson #13 v2.1 (import-level dual-side rewrite — 删 source 必删 obsolete test 文件 / 函数) — task #17 PR #1884 first + task #36 PR #1899 fix-forward¹ second - Lesson #13 v2.2 (value-level dual-side rewrite — 删 source 字段 / 数据必 同步 update stale assertion / count) — task #36 PR #1899 fix-forward² L103/L108 first + task #47 PR #1910 contract test second - Lesson #13 v3 (boundary 不重复事实保证 invariant,只覆盖可能 drift 的 contract) — 架构师 msg=036dd8b2 升格,task #46 PR #1906 first - Migration chain 时序 invariant (enum hard-cut PR 必先 chain DELETE FROM 旧 enum value migration) — task #47 PR #1910 first (`3c7d2f81b5e9` chain 在 `a8f4c2d9e1b7` 后) - Lesson #14 (架构 invariant 删除多轮迭代收尾 — sweeping cleanup directive 单 PR 无法一次性 cover,多轮 grep gate verify + fix-forward task 是工程 常态) — task #35 6 轮 fix-forward 实证 first (PR #1899/#1897/#1898/ #1906/#1910/#1911 + task #40 final 验收) § 六 sediment 引用追加: - PR #1909 (`8d5ffa97`) Lesson #12 v7.1 backend 层 textbook - PR #1912 (`eb2a805b`) Lesson #12 v7.1 acceptance 层 textbook - task #35 6 轮 fix-forward 收尾 Lesson #14 first-application demo § 八 修订记录追加本次 commit timeline。 mcp-api.md L88 fix-forward (per dongdong msg=f1975615 + 架构师 msg=04c7962e Option B): "task #32 Phase A 后" → "当前已携带(task #32 Phase A 落地, PR #1909 + PR #1912)"。Phase A 全闭环后用户面文档现状准确。 来源 directive: PM msg=0129c3c5 phase A close 后启动 follow-up 子 PR + 架构师 msg=62e58a18 Phase A close 后立即启动 directive。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation