Skip to content

Commit 57842fc

Browse files
author
chenpengfei
committed
fix: adapt copy flow to canonical URI boundary
1 parent b9a5ab3 commit 57842fc

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

openviking/server/routers/filesystem.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ def _clean_memory_attrs(raw: str) -> dict[str, Any]:
3838
return attrs
3939

4040

41-
async def _tags_attr(service: Any, uri: str, ctx: RequestContext, *, is_dir: bool) -> list[str]:
41+
async def _tags_attr(
42+
service: Any, uri: str, ctx: RequestContext, *, is_dir: bool
43+
) -> list[str]:
4244
vikingdb_manager = getattr(service, "vikingdb_manager", None)
4345
if not vikingdb_manager:
4446
return []

openviking/service/fs_service.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,8 +504,6 @@ async def cp(
504504
ctx: RequestContext,
505505
) -> Dict[str, Any]:
506506
"""Copy a resource and queue derived parent semantics after commit."""
507-
from_uri = validate_viking_uri(from_uri, field_name="from_uri")
508-
to_uri = validate_viking_uri(to_uri, field_name="to_uri")
509507
viking_fs = self._ensure_initialized()
510508
async with self._uri_mutation_coordinator.mutation(
511509
ctx.account_id,

openviking/storage/viking_vector_index_backend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1518,7 +1518,7 @@ async def get_l2_abstracts_by_uris(
15181518
"""Strictly load existing L2 abstracts for a bounded URI set."""
15191519
requested_by_canonical: Dict[str, str] = {}
15201520
for uri in uris:
1521-
requested_by_canonical.setdefault(canonicalize_uri(uri, ctx), uri)
1521+
requested_by_canonical.setdefault(resolve_uri(uri).uri, uri)
15221522
canonical_uris = list(requested_by_canonical)
15231523
if not canonical_uris:
15241524
return {}

tests/api_test/api/client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ def fs_cp(
492492
"recursive": recursive,
493493
},
494494
)
495+
495496
def session_used(
496497
self,
497498
session_id: str,

0 commit comments

Comments
 (0)