From ec2450709008f9fe75ec2ddeaaabd6b919ff9e56 Mon Sep 17 00:00:00 2001 From: earayu Date: Mon, 27 Apr 2026 02:19:49 +0800 Subject: [PATCH] =?UTF-8?q?docs(indexing):=20=C2=A7G.5=20amendment=20?= =?UTF-8?q?=E2=80=94=20index=5Fmodality=20(not=20modality)=20for=20retriev?= =?UTF-8?q?al-modality=20discriminator?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bryce T3.2 implementation (PR #1727 follow-up commit 53257881 on chenyexuan/celery-wave3-cutover) flagged a name collision: D10.h already locked SearchResultMetadata.modality as the content-modality field (Literal["text", "image"]). v3 design pack §G.5 narrative re-used `modality` for "which retrieval modality served this hit" (Literal["vector", "fulltext", "graph", "summary", "vision"]), which would shadow the D10.h field. Architect ack of Bryce's chosen disambiguation: rename the new field to `index_modality`. D10.h `modality` (content) preserved. SearchResultMetadata gains three new fields total: parse_version / index_modality / index_state_per_modality. The two are orthogonal — a hit can be (index_modality="vector", modality="text") or (index_modality="vision", modality="image"). Co-Authored-By: Claude Opus 4.7 --- docs/modularization/indexing-redesign-design-pack.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/modularization/indexing-redesign-design-pack.md b/docs/modularization/indexing-redesign-design-pack.md index fc3a426de..82192a64d 100644 --- a/docs/modularization/indexing-redesign-design-pack.md +++ b/docs/modularization/indexing-redesign-design-pack.md @@ -1085,16 +1085,18 @@ Each `SearchResultItem.metadata` carries: class SearchResultMetadata(BaseModel): # ... existing fields (chunk_id / section_path / heading_anchor etc) ... parse_version: Optional[str] = None # which parse_version served this hit - modality: Literal["vector","fulltext","graph","summary","vision"] + index_modality: Optional[Literal["vector","fulltext","graph","summary","vision"]] = None index_state_per_modality: Optional[Dict[str, Literal["ACTIVE","FAILED","NOT_ENABLED","INDEXING"]]] = None ``` +> **Naming amendment 2026-04-27 (Bryce T3.2 implementation, msg=1a02cbcb)**: the field for "which retrieval modality produced this hit" is **`index_modality`**, not `modality`. D10.h already locked `SearchResultMetadata.modality: Optional[Literal["text", "image"]]` for **content modality** (whether the hit's content is text or an image), and the two concepts are orthogonal — a hit can be `index_modality="vector"` + `modality="text"`, or `index_modality="vision"` + `modality="image"`. The `index_` prefix disambiguates and preserves the D10.h-locked field. + Clients (and the agent layer) can: - Detect mixed-version results in one response (different modalities show different `parse_version`) -- Skip a modality that's currently FAILED/INDEXING +- Skip a retrieval modality that's currently FAILED/INDEXING - Decide whether to wait + retry vs proceed with partial coverage -Schema-wise this is a small extension of the D10.h `SearchResultMetadata` allowlist (already locked at chunk_id / section_path / heading_anchor; v2 adds `parse_version` and `index_state_per_modality`). +Schema-wise this is a small extension of the D10.h `SearchResultMetadata` allowlist (already locked at chunk_id / section_path / heading_anchor / source / title / collection_id / document_id / asset_id / mimetype / page_idx / url / modality; v3 adds `parse_version` / `index_modality` / `index_state_per_modality`). ---