chore: trim fix-rationale comments

This commit is contained in:
Ray 2026-07-22 12:33:30 +08:00
parent 00e9323b27
commit 47c9263379
5 changed files with 1 additions and 14 deletions

View file

@ -144,8 +144,6 @@ class CloudBackend:
self._warn_folder_upgrade()
self._folder_id_cache[name] = None
elif e.status_code == 400 and "already exists" in str(e):
# Duplicate-name 400, for parity with the local backend's
# error taxonomy.
raise CollectionAlreadyExistsError(
f"Collection '{name}' already exists") from e
else:
@ -211,9 +209,6 @@ class CloudBackend:
except CollectionNotFoundError:
return # already gone — delete is idempotent
if folder_id:
# The cloud API has no folder-deletion endpoint (only POST /folder
# and GET /folders exist) — fail clearly instead of issuing a
# request that can only 404.
raise PageIndexError(
f"Deleting a cloud collection is not supported by the PageIndex "
f"API — delete folder '{name}' in the dashboard "

View file

@ -53,8 +53,6 @@ class LegacyCloudAPI:
# forever. Streamed responses get a longer read timeout since it
# applies between chunks, not to the whole response.
kwargs.setdefault("timeout", 120 if kwargs.get("stream") else 30)
# Transport errors propagate raw (0.2.x contract) — they must escape
# is_retrieval_ready's except-PageIndexAPIError, not read as "not ready".
response = requests.request(
method,
f"{self.base_url}{path}",

View file

@ -51,8 +51,7 @@ class IndexConfig(BaseModel):
def from_yaml(cls, path: str = None, **overrides) -> "IndexConfig":
"""Load config from a YAML file ("yes"/"no" accepted for booleans);
keyword overrides take precedence. Defaults to the package config.yaml.
Unknown YAML keys are ignored with a warning (legacy config.yaml
tolerance); unknown keyword overrides still raise."""
Unknown YAML keys are ignored with a warning."""
import yaml
if path is None:
path = os.path.join(os.path.dirname(__file__), "config.yaml")

View file

@ -111,9 +111,6 @@ def build_index(parsed: ParsedDocument, model: str = None, opt=None) -> dict:
"structure": structure,
}
# Description requires summaries (legacy gating): the clean structure
# fed to the LLM carries only titles/summaries, so without summaries
# the description would be generated from bare titles.
if opt.if_add_node_summary and opt.if_add_doc_description:
clean_structure = create_clean_structure_for_description(structure)
result["doc_description"] = generate_doc_description(

View file

@ -210,8 +210,6 @@ class SQLiteStorage:
def list_documents(self, collection: str) -> list[dict]:
conn = self._get_conn()
rows = conn.execute(
# Newest first, matching the cloud API's createdAt DESC order;
# rowid breaks same-second ties by insertion order.
"SELECT doc_id, doc_name, doc_description, doc_type FROM documents WHERE collection_name = ? ORDER BY created_at DESC, rowid DESC",
(collection,),
).fetchall()