Repository navigation
Conversation
cocolord
force-pushed
the
codex/item-search-protocol-v1
branch
from
November 17, 2026 09:30
8cda13f to
8a20cf4
Compare
cocolord
force-pushed
the
codex/item-search-protocol-v1
branch
3 times, most recently
from
November 23, 2026 02:50
30e580e to
5c63d91
Compare
Co-authored-by: TRAE CLI <traecli@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
Reuse classified FindResult responses and aggregate score across HTTP, SDK, MCP and CLI, with optional Item metadata and no query-time content reads. Keep ingestion on the existing resource lifecycle while preserving Item identity, immutable attributes, retry initialization and nested Item safety. Complete native shadow/union grouping and scalar filter scans with consistent snapshots, full counts and bounded member evidence. Validation: 779 Python regression cases, 56 native engine contract cases, 19 CLI rendering cases, 15 Skill unit cases and 11 additional CLI cases passed. Additional CLI cases used the repository CI RUST_MIN_STACK setting.
Track member mutations for the affected accounts and retain collection-wide validation for index replacement. Cover concurrent writes and same-account moves during recall.
Use the account partition for VikingDB search and classify Item results by declaration root URI. Preserve Catalog identities across imports and merged moves, and keep Native recall and aggregation independent of the returned Item limit.
Run member counting, vector recall, candidate projection and Item grouping inside one native CPU query. Preserve per-account snapshot validation, index replacement checks and candidate budgets. The 174 targeted regressions passed. On the frozen synthetic 100k-member workload, p95 fell from 1553 ms to 1012 ms and peak RSS from 2684 MiB to 1457 MiB.
cocolord
force-pushed
the
codex/item-search-protocol-v1
branch
from
November 23, 2026 06:24
b1d0ebb to
8017f13
Compare
…ory merge Moving an ordinary directory into an existing Item replaced the target's declaration with the source's plain node, deleting its item_uuid and item_attrs while leaving the member files in place. A later mkdir(as_item) then failed with FailedPrecondition because the root was already an ordinary directory. Keep the existing target declaration when the source carries no item_uuids but the destination does; a declared Item source still replaces the target under the existing semantics. Both the native CatalogEngine and the VikingDB catalog reuse the already-fetched destination row, so no extra read is added and the existing undo snapshots still roll back both sides. Adds merge/undo regressions for ordinary vs Item sources (native shadow and union, cloud with injected delete failure) and a real-service add_resource -> mv -> Item search -> mkdir replay covering a root and a nested destination Item. Documents that merging an ordinary directory into an Item preserves the destination declaration (en + zh). Co-authored-by: TRAE CLI <traecli@bytedance.com>
The query_items op implemented a UUID->root lookup that the Item Search assembly path never calls: assembly reads entity_uri straight from group metadata, per the engine contract. It had zero production callers and conflicted with the pre-launch scheme (no UUID回查). Remove it from the native engine, the VikingDB catalog, and the disabled-collection stub; rewrite the affected tests to verify the same behaviors via production ops (resolve for URI<->UUID mapping, declare_item read-back for attrs). Co-authored-by: TRAE CLI <traecli@bytedance.com>
Clear account-scoped Catalog before identity cleanup can complete. Propagate cleanup failures so existing deletion tasks can retry, and verify persisted declarations vanish after reopening storage without affecting other accounts. Use partition for aggregate queries and URI predicates for Catalog visibility checks. Remove unsupported primary-key scalar ordering. Verified against real VikingDB STG; inherited UUID filtering still has a separately reproduced engine AND-order bug. Co-authored-by: TRAE CLI <traecli@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
Reuse VikingDB reads during transfers, refresh Skill abstracts in place, and honor file-only resource imports. Limit local Catalog work to Item operations and reuse account snapshots for filter-only searches.
Document Item identity cleanup when moving into the file-only system namespace.
| return json_stringify(result); | ||
| } | ||
|
|
||
| std::string CatalogEngine::execute(const std::string& request_json) { |
Keep CPU candidate counting and recall inside the shared C++ grouping call. Normalize typed filters before grouping externally recalled candidates.
| return Candidate{std::move(label), canonical(required_string(fields, "uri")), score}; | ||
| } | ||
|
|
||
| std::optional<std::string> CatalogEngine::aggregate_filter( |
Keep ordinary BM25 handling in place and decode Item URIs in the storage adapter. Reuse filesystem authorization and Skill cleanup, carry the root identity in the semantic plan, and reserve write labels only for collections with an active Catalog.
|
|
Check both previous and new member URIs against mandatory query paths. Preserve account-wide invalidation for unbounded queries and reserve retries for writes that can affect grouping.
This branch has not been deployed
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.
Description
Add opt-in Item retrieval to find/search. Return declared roots in the existing memories/resources/skills/total envelope with stable UUIDs, each root's own attributes and engine max/sum scores. New Skill packages declare Items automatically; explicit child Items retain union membership in their ancestors.
For VikingDB, OV generates a UUID when it declares a new Item and passes it with the regular directory L0 upsert. The UUID and root attributes are stored on that VikingDB record. Member writes use the existing write path, and VikingDB resolves Item membership from the member's path.
The open-source engine persists each explicit Item root's UUID and attributes in its native Catalog. It groups existing vector records by URI. Directory and file operations use the existing filesystem.
VikingDB keyword Item queries use BM25 grouping without embeddings. Attribute filters retain the original list filter tree. Filter-only Item queries enumerate scalar pages and resolve effective Item identities and own roots with zero scores and UUID ordering. Ordinary
findretains filter-only retrieval. Ordinarysearchrequires a query or image.Item keyword requests forward the existing BM25 parameters and candidate input limit. Ordinary copy and move use the cleanup behavior on
main. Resource reimports check Item declarations on directories being deleted or replaced.The API-key backend now issues Item operations without collection_meta. Account scope selects the partition; the engine validates the actual pre-created schema. Existing optional schema hints retain their Catalog behavior. Enterprise provisioning in MR !4266 only adds the default Item schema and required field passthrough; its existing connection configuration and renderer remain unchanged.
Human Involvement
Validation
1468b76cdpassed 294 targeted repository tests and two native directory-transfer probes. An existing STG fixture returned changes in grouped scores when the BM25 parameters were tuned.cfec0f9d5passed 366 targeted Python cases after rebuilding the native engine. Five ordinary HTTP probes matchedmainboth with and without Item declarations. Checks covered grouped max/sum, persistence on reopen, move, and delete. One resource-delete assertion receivedqueuedand reproduced onmain.dcd5a9182passed 569 Python and 509 CLI tests. Paired ordinary HTTP probes matchedmainwith the same inputs.Commercial acceptance covers incremental new libraries with the new schema and matching kernel. Existing libraries retain their schema and ordinary-query compatibility. Legacy clients accessing new inheritance-sharded collections are outside this deployment combination. Engine attribute-filter AND-order failures remain separately documented.
Functional acceptance report and raw evidence records checks by import, retrieval, Skill, lifecycle, media, response format and ordinary regression, preserving earlier failures and attachments.