Commit Graph
86 Commits
Author SHA1 Message Date
baojun-zhang 2b78fff498 Fix dual path lock (#3454)
* fix(storage): add short timeout for encrypted dual-path write locks

* Reduce PathLockEngine poll interval from 0.2s to 0.1s.
2026-07-22 16:08:01 +08:00
Yuanqing ZHAOandYuanqing Zhao 2d84a6f13c perf(cuvs): improve recovery scalability and filtered-search efficiency (#3311)
* perf(index): avoid materializing descendant path strings

* perf(cuvs): compact host vector shadow

* perf(storage): prune redundant tenant path scopes

* fix(cuvs): synchronize worker-thread searches

* perf(cuvs): stream dense shadow recovery

* test(storage): cover cross-user path scopes

* perf(storage): page candidate recovery scans

* perf(cuvs): accelerate adaptive filter routing

* perf(cuvs): reduce filtered-search host overhead

---------

Co-authored-by: Yuanqing Zhao <2604121+yuanqingz@users.noreply.github.com>
2026-07-21 15:59:58 +08:00
Qin Haojie 1d4bf132ed fix(task): 修复 add-resource 任务重启后无法恢复 (#3334)
* fix(task): recover add-resource jobs after restart

Persist asynchronous add-resource work in QueueFS so interrupted jobs can resume instead of leaving tasks running forever.

* fix(queue): omit parser args from prepared jobs

* fix(queue): fail when semantic source is missing
2026-07-20 14:07:27 +08:00
Yuanqing ZHAOandYuanqing Zhao fa19ac0a75 perf(vectordb): coalesce auto cuVS rebuilds during bulk ingest (#3277)
* perf(vectordb): coalesce auto cuVS rebuilds during bulk ingest

Add an opt-in bulk-ingest maintenance scope that coalesces Auto cuVS background rebuilds across multiple write batches.

- defer derived GPU maintenance until the outermost bulk scope exits while keeping native writes and persistence visible per call
- harden the background worker against debounce, generation, shutdown, and stale-candidate races
- preserve suspension across index replacement and retire replaced workers
- wait for the final Auto GPU snapshot before vectordb_perf records search QPS
- document that the scope is non-transactional and only schedules readiness on exit

Auto cuVS and background rebuild remain disabled by default. Native CPU and remote backends use no-op hooks, so their existing behavior and dtype are unchanged.

* fix(vectordb): reject stale index replacements

* fix(vectordb): harden bulk rebuild lifecycle

---------

Co-authored-by: Yuanqing Zhao <2604121+yuanqingz@users.noreply.github.com>
2026-07-16 18:59:16 +08:00
Qin Haojie d47f2106ee refactor: remove unused and deprecated APIs (#3272)
Delete dead compatibility paths and test-only helpers so unsupported APIs do not remain as accidental contracts.
2026-07-16 10:49:56 +08:00
Yuanqing ZHAOandYuanqing Zhao 0080f94bdc perf(vectordb): batch benchmark upserts (#3264)
Co-authored-by: Yuanqing Zhao <2604121+yuanqingz@users.noreply.github.com>
2026-07-15 19:49:06 +08:00
huangruitengandhuangruiteng b0ea896a68 fix: batch child directory overview summaries (#3154)
Co-authored-by: huangruiteng <huangruiteng@bytedance.com>
2026-07-14 11:38:59 +08:00
Qin Haojie 4f0bd86f32 fix(fs): canonicalize URIs before move (#3219)
* fix(fs): canonicalize URIs before move

* fix(uri): canonicalize grep and ovpack inputs

* fix(mv): preserve destination on vector update failure
2026-07-13 17:15:55 +08:00
huangruitengandhuangruiteng 0a6204221b fix(queue): recover stale non-tree lock handoffs (#3193)
Co-authored-by: huangruiteng <huangruiteng@bytedance.com>
2026-07-13 13:57:12 +08:00
ByteDanceLiuYang 0d6b53639c fix(vectordb): only write content field for VikingDB backends (#3114)
* fix(vectordb): only write content field for VikingDB backends

* fix: update doc
2026-07-10 15:16:12 +08:00
baojun-zhang 6a33ebb7ca Optimize glob walkdir (#3013)
* feat(storage): optimize glob func

* feat(rgafs): implement paged glob traversal without full tree materialization

* feat(rgafs): implement paged glob traversal without full tree materialization

* feat(rgafs): implement paged glob traversal without full tree materialization

* feat(rgafs): implement paged glob traversal without full tree materialization

* feat(rgafs): implement paged glob traversal without full tree materialization

* feat(rgafs): implement paged glob traversal without full tree materialization

* feat(rgafs): implement paged glob traversal without full tree materialization

* feat(rgafs): implement paged glob traversal without full tree materialization

* feat(rgafs): implement paged glob traversal without full tree materialization

* fix(localfs): offload blocking fs operations to spawn_blocking

* feat(glob): cap glob api default node_limit at 256

* feat(sdk): add node_limit options for glob in python and go SDKs
2026-07-06 21:39:16 +08:00
ByteDanceLiuYang 34c191a0b6 fix(vikingdb): trust OpenViking schema for volcengine api_key mode (#2981) 2026-07-03 15:15:40 +08:00
Kevin HouandClaude Opus 4.8 b2dcd74709 fix(embedding): fail terminally on auth errors instead of re-enqueueing (#2916) (#2919)
The embedding handler classified 401/403 auth errors as transient and
re-enqueued them, tripping the circuit breaker and cycling the message
forever. add-resource holds the resource tree lock and blocks --wait
until embeddings complete, so a permanently-failing credential (the dummy
keys on no-secrets fork-PR CI) hung the lock and the request
indefinitely; every add-resource retry then hit "Resource is busy".

Route ERROR_CLASS_AUTH to terminal failure (mark failed, no re-enqueue,
no breaker trip) so the embedding tracker drains, the request completes,
and the tree lock releases. The resource is left un-vectorized; a reindex
recovers it once credentials are valid.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 15:20:00 +08:00
baojun-zhang 843a4a3a39 feat(encrypt): Protect encrypted writes with temp-file publish and dual-path locking (#2894)
* feat(encrypt): Protect encrypted writes with temp-file publish and dual-path locking

* fix(storage): reuse outer lock handles, keep encrypted temp files out of user space, preserve encrypted-only path locking, and add cross-layer temp-path tests

* fix(storage): reuse rollback lock handles and gate encrypted wrapper creation on replace publish support

* fix(storage): reuse rollback lock handles, align encrypted temp lock paths, and use localfs replace publish semantics
2026-07-01 11:27:26 +08:00
agent fdcfa0ef10 Generate resource L0 summaries from overview prompt (#2890) 2026-06-30 21:43:29 +08:00
Qin Haojie 47556bf694 fix(vikingdb): drop schema version from embedding metadata (#2848) 2026-06-26 14:21:51 +08:00
ByteDanceLiuYangandqin-ctx 0ee3a7ca8e fix(vikingdb): make legacy collections compatible with grep schema upgrade (#2835)
* fix: collection schema version compatible issue

* fix: tighten collection embedding compatibility check

---------

Co-authored-by: qin-ctx <qinhaojie.exe@bytedance.com>
2026-06-25 23:13:18 +08:00
ByteDanceLiuYang 39e4180a36 fix: VikingDB grep fallback, exclude URI filtering, and text field byte limit (#2825)
* fix: vikingdb text limit to 1MB; fallback to fs when vikingdb exception; push back exclude_uri to vikingdb filter

* optimize: add debug log
2026-06-25 17:37:23 +08:00
Haoyu Zhangandzhanghaoyu.la aa53e7aede feat: 实现 commit、restore、show 文件系统多版本管理功能 (#2756)
* feat: 实现 commit、restore、show 文件系统多版本管理功能

fix: 修复commit时删除文件

fix: commit 的 fast path 1 添加 Racy-clean 机制

fix: 将 sdk 中的 git 命令改为 snapshot 命令,同步修改单测

fix: 多版本管理的文件存储目录改为 .ovgit

feat: snapshot cli 渲染

fix: 修复 restore 时将删除的文件回滚时,目录不存在的问题

feat: restore 命令的 project_dir 参数改为可选,不传时默认全目录回滚

feat: 更新文档

fix: 删除暂未使用的配置参数

feat: 新增示例脚本

fix: 修复示例代码

fix: 修复 restore 返回的 task id 任务完成状态

feat: 在 restore 修改文件系统时加锁

fix: fix openviking_sdk

* feat: 将git多版本管理功能改为默认打开,并复用agfs的配置参数作为默认值

* fix: restore 命令改为先完成 ref 一致性协议再写回 VFS;object store 并发改为使用唯一 temp path

* fix: 在 git 配置检验层去除未实现的cas_mode = "redis_lock"模式

* fix: 在 Rust GitService 边界统一校验 account

* fix: 当前commit不支持通过 path 传入目录,增加报错信息

* fix: 将git文件默认存储路径统一为 .ovgit

* fix: restore 时写入 VFS 失败时返回详细的报错,并继续触发 reindex

* fix: 校验 commit、restore、show 的路径

* feat: 实现 commit 时指定目录

---------

Co-authored-by: zhanghaoyu.la <zhanghaoyu.la@bytedance.com>
2026-06-25 11:28:04 +08:00
87329714dd feat(grep): integrate VikingDB bm25 keyword search for grep engine (#2144)
* feat(grep): integrate VikingDB bm25 keyword search for grep engine

* fix(grep): address CI review feedback: max-size eviction to _count_cache, use Literal, Split regex alternation into individual keywords for bm25 (max 10)

* fix(schema): use dynamic __version__ for schema_version and handle dev suffixes in version comparison

* fix(schema): upsert data to vikingdb lack of content

* chore: add benchmark for retrieval

* fix(grep): vikingdb return 200 and no results means no matching content, not necessary to fallback to local fs

* fix(benchmark): sub uri args; add report

* refactor: code format by ruff

* optimize: move grep config (engine and switch_to_remote_threshold) to ov.conf

* optimize: auto adapt remote_return_limit by agg API; rm unnecessary params in keywords search

* fix: adjust benchmark scripts

* fix(grep): store full content for BM25; use PathScope depth; reduce redundant API calls

* refactor: new benchmark

* fix: step1 add resource by real code data

* feat(benchmark): split grep benchmark into effectiveness/performance suites with async reindex

* optimize (benchmark): adjust keywords and ground truth for testing

* fix: truncate 64KB for content field

* optimize: effectiveness add resource plainly

* optimize: change param use of SearchByKeywords from "keywords" to "query"

* optimize(benchmark): refactor effectiveness scripts

* optimize: ensure raw data for content field

* optimize: fulltext analyzer's stop-words only use symbols

* fix: adapt to new ov cli for benchmark

* optimize: reuse file content to avoid re-read AGFS file

* optimize: tune grep vikingdb defaults and refresh bm25 benchmark scripts

* optimize: benchmark client timeout

* update README

* fix: rm unused param

* fix: default values in docs

* optimize: increase truncate byte size to 1MB for content field for VikingDB

* fix(logger): harden queued stream logging (#2786)

* fix(logger): replace StreamHandler with QueueHandler+QueueListener to prevent thread deadlock

When log.output='stdout' (default) and the server is managed by systemd,
concurrent log writes can deadlock because logging.StreamHandler holds a
thread lock across stream.flush() which blocks on systemd-piped file I/O.

During session.commit() phase 2, multiple async coroutines (memory
extraction, summarization) concurrently call logger.info()/warning()
with large payloads. The first thread's flush() blocks on the pipe,
while all subsequent threads block on handler.acquire() forever.
This permanently silences the server log and prevents _write_done_file()
from executing, leaving phase 2 hanging without .done.

Fix: use QueueHandler + QueueListener from stdlib logging.handlers
(Python 3.2+). QueueHandler.emit() does queue.put(record) with no lock
or I/O, returning immediately. QueueListener has a dedicated single
thread as the sole consumer touching the real StreamHandler, making
lock contention impossible.

Changes in _create_log_handler(): stdout/stderr branches now create
a shared QueueListener with unbounded queue, returning QueueHandler
instances to callers. _build_standard_handler() delegates formatter
and filter setup to the real handler in the listener thread.

Closes: #2752

* fix(logger): harden queued stream logging

---------

Co-authored-by: njuboy11 <njuboy11@users.noreply.github.com>

---------

Co-authored-by: Qin Haojie <qinhaojie.exe@bytedance.com>
Co-authored-by: njuboy11 <njuboy11@users.noreply.github.com>
2026-06-24 18:46:02 +08:00
Zayn Jarvis 79f7bdd184 fix(auth): align role serialization with string roles (#2728) 2026-06-19 13:30:28 +08:00
Jiahui Zhou 21c58bd8f6 Set tags (#2706)
* feat(vectordb): add partial update api

fix(vectordb): support partial updates across adapters

fix(vectordb): return structured update results

test(vectordb): cover update result behavior

* feat(vectordb): support partial upsert semantics

* feat(content): support explicit search tags

* refactor unify search tag update api

* refactor(content): drop unrelated peer_id from semantic refresh

* fix(content): normalize set-tags targets and cli output
2026-06-18 17:48:49 +08:00
Qin Haojie 058cd1f5ea feat(migration): add legacy user-peer migration (#2610)
* feat(migration): add legacy user-peer migration

* test(migration): trim redundant migration tests
2026-06-15 13:21:33 +08:00
Qin Haojie 49e4d76913 feat(core): add actor peer filesystem view (#2594)
* feat(core): enforce actor scoped retrieval

* fix(core): narrow actor peer filtering to retrieval

* fix(core): enforce actor peer filesystem view
2026-06-13 15:49:34 +08:00
Hao Zhe 402d51f7c0 fix(cli): render filesystem modtimes locally (#2576) 2026-06-12 18:36:54 +08:00
Qin Haojie e06671b351 feat(session): 将 session 存储到 user 命名空间 (#2556)
* feat(session): store sessions in user namespace

* fix(session): tolerate legacy commit body fields
2026-06-11 14:33:00 +08:00
baojun-zhang eed39c593f fix(test): fix CLI and storage test regressions (#2523) 2026-06-09 11:26:27 +08:00
2f214f2e34 fix(ingest): enumerate all children on the ingest path / 入库时枚举目录全部子节点,修复 ls node_limit=1000 静默截断 >1000 文档 (#2518)
[EN]
viking_fs.ls() defaults to node_limit=1000 to keep agent-facing tool
output from flooding the model's context. Several internal system
operations on the ingest / summary / vectorize path call ls() to
enumerate a directory's children and inherited that 1000 cap, so
importing a directory with more than 1000 entries silently processed
only the first 1000 and dropped the rest.

Observed: a 6,221-document import produced exactly 1000 subdirectories.
The namespace already held an earlier import, so temp->final
materialization took the incremental sync path
(_sync_topdown_recursive -> list_children) instead of the atomic
whole-directory move; list_children's ls() truncated the 6,221 temp
children to 1000 and the remaining 5,221 were dropped when temp was
deleted.

Fix: introduce a shared LS_ALL_NODES sentinel in viking_fs and pass it
explicitly at every internal call site that must observe every child.
ls()'s default stays 1000, so agent-facing listings are unchanged.

Call sites fixed:
  - DirectoryParser._merge_temp / _recursive_move (parser temp merge)
  - SemanticProcessor._sync_topdown_recursive     (temp->final sync)
  - SemanticProcessor._process_memory_directory   (memory dirs)
  - SemanticDagExecutor._list_dir                 (summary DAG dispatch + recursion)
  - Summarizer.list_top_children                  (semantic-unit enqueue)
  - embedding_utils.index_resource                (per-directory file indexing)

Tests: tests/storage/test_ingest_ls_node_limit.py reproduces the >1000
truncation for both the temp->final sync materialization and the summary
DAG enumeration (red before, green after). Existing fakes updated to
accept the node_limit kwarg production now passes.

[中文]
viking_fs.ls() 默认 node_limit=1000,用于避免 agent 工具输出刷爆模型上下文。
但入库 / 摘要 / 向量化链路上多处内部系统调用 ls() 枚举目录子节点时也继承了
这个上限,导致目录条目超过 1000 时只处理前 1000 个、其余被静默丢弃。

现象:6221 篇文档入库后,目标命名空间下只剩正好 1000 个子目录。由于该命名
空间已存在更早的入库结果,temp->final 物化走了增量同步路径
(_sync_topdown_recursive -> list_children)而非原子整目录搬移;list_children
的 ls() 把 6221 个 temp 子节点截断到 1000,其余 5221 个在 temp 清理时丢失。

修复:在 viking_fs 中引入共享哨兵 LS_ALL_NODES,在每一处必须枚举全部子节点的
内部调用显式传入;ls() 默认值仍为 1000,agent-facing 的列目录行为不变。修复的
调用点见上方 Call sites。若不一并修摘要 DAG / sync,即使 raw 物化修好,1001 篇
之后的 L0/L1 摘要与向量索引仍会卡在 1000。

测试:tests/storage/test_ingest_ls_node_limit.py 复现 temp->final 物化同步与摘要
DAG 枚举两处的 >1000 截断(修复前 red、修复后 green);现有 fake 已更新以接受生产
代码新传入的 node_limit 参数。

Co-authored-by: chenpengfei <chenpengfei@bytedance.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 19:30:06 +08:00
baojun-zhang 7ee1481e1d feature(storage): support multi write storage (#2466)
* feature(storage): support multi write storage

* refactor(storage): simplify multiwrite logic and consolidate test helpers

* refactor(storage): extract multibackend and shape modules and tighten multi-write wrapper boundaries

* refactor(storage): refactor write pipeline
2026-06-08 11:12:15 +08:00
baojun-zhang e492cbd16f refactor(encryption): using rust refactor encryption (#2444) 2026-06-05 17:26:26 +08:00
Qin Haojie ff258768c2 feat(memory): 引入 User/Peer 记忆隔离模型 (#2236)
* feat(memory): introduce user and peer memory isolation

Unify agent-scoped memory behavior into user-owned memory spaces, add peer_id compatibility for session and retrieval paths, and wire memory_policy through session commit flows.

* feat(memory): align session identity around peer IDs

* feat(search): pass peer id through retrieval

* refactor(memory): remove agent identity from integrations

* fix(memory): isolate peer identity from self extraction

* fix(tau2): provision benchmark user configs

* fix(auth): allow admin keys to access data APIs

* fix(openclaw): enable peer memory policy for peer roles

* fix(openclaw): resolve sender for peer recall

* refactor(session): simplify memory extraction routing

* refactor(ov-cli): reduce formatting-only diff

* refactor(message): remove unused message helpers

* refactor(retrieval): simplify peer target resolution

* refactor(namespace): remove deprecated agent namespace policy

* fix(agent): propagate peer id through integrations

* fix(auth): align integration clients with api-key mode
2026-06-05 10:55:48 +08:00
baojun-zhang 073e929a1a feat(storage): optimize tree func (#2372)
* feat(storage): optimize tree func

* feat(storage): add test case && fix tree show parent dir problem

* feat(storage): format code

* feat(storage): fix check problem

* feat(storage): remove redundant unit test

* feat(storage): fix code review issue

* feat(storage): fix code review issue
2026-06-03 18:21:55 +08:00
Dechao Sun c0abcb9a34 Improve vector storage backend persistence (#2367) 2026-06-01 22:14:55 +08:00
Dechao Sun c1cf1c3d06 add Qdrant vectordb support (#2350) 2026-06-01 16:46:48 +08:00
Qin Haojie 294810dfb3 fix(queuefs): bound semantic node scheduling (#2343)
Use a shared semantic node scheduler to cap DAG work across imports.
2026-06-01 11:08:31 +08:00
Qin Haojie c72c8a87e8 fix: apply embedding input limits in embedder (#2266) 2026-05-27 20:23:40 +08:00
Qin Haojie c99623feee fix(storage): recover stale semantic lock handoffs (#2214) 2026-05-25 14:50:23 +08:00
bot-of-qin-ctxandqin-ctx c0f4c0667b Fix/semantic target sync (#2207)
* fix(storage): sync semantic target before DAG

* Update CONTRIBUTING_CN.md (#2206)

* Update CONTRIBUTING_CN.md

---------

Co-authored-by: qin-ctx <qinhaojie.exe@bytedance.com>
2026-05-23 23:27:39 +08:00
Qin Haojie 2f12439b61 fix(embedding): 限制队列输入并停止超长重试 (#2197)
* fix(embedding): bound queue inputs before provider calls

* style(embedding): apply ruff formatting

* test(embedding): trim redundant input guard coverage
2026-05-23 22:24:12 +08:00
Qin Haojie 2406c0e6e1 refactor(storage): 异步化存储锁与 IO (#2143)
* refactor(storage): async storage lock IO

Move AGFS and storage lock paths onto async wrappers while preserving lock handoff semantics.

* refactor: streamline async task tracking

Collapse TaskTracker lifecycle operations into async-only APIs and align callers/tests with the new boundary. Also throttle repeated memory/path lock wait warnings to reduce noisy retry logs.
2026-05-22 14:03:18 +08:00
Qin Haojie cfb19a50ca fix(storage): isolate async clients and semantic refresh (#2168)
Cache async SDK clients per event loop to avoid cross-loop reuse in worker threads.
Move memory vectorization into semantic queue refresh and preserve target sync state for resource updates.
2026-05-21 17:24:52 +08:00
3acc63c670 Fix/language output (#2164)
* auto-commit before eval 20260509_181850

* auto-commit before eval 20260509_192618

* update

* auto-commit before eval 20260510_005109

* auto-commit before eval 20260510_011832

* auto-commit before eval 20260510_014114

* auto-commit before eval 20260510_022835

* auto-commit before eval 20260510_025048

* auto-commit before eval 20260510_031034

* auto-commit before eval 20260510_143728

* auto-commit before eval 20260510_172705

* auto-commit before eval 20260510_220133

* auto-commit before eval 20260511_115905

* auto-commit before eval 20260511_121959

* auto-commit before eval 20260511_132120

* auto-commit before eval 20260511_161430

* auto-commit before eval 20260511_163606

* auto-commit before eval 20260511_173943

* auto-commit before eval 20260511_175657

* auto-commit before eval 20260511_224347

* auto-commit before eval 20260511_233109

* auto-commit before eval 20260512_104710

* auto-commit before eval 20260512_111256

* auto-commit before eval 20260512_181905

* auto-commit before eval 20260512_191540

* auto-commit before eval 20260512_192540

* auto-commit before eval 20260512_195710

* auto-commit before eval 20260513_000746

* auto-commit before eval 20260513_004221

* auto-commit before eval 20260513_004656

* refactor: migrate logger calls to tracer in extract_loop modules

Replace logger.warning/error/info with tracer.error/info in extract_loop
related modules for better observability (console + OpenTelemetry spans).

Modules updated:
- agent_experience_context_provider.py (5 replacements)
- extract_loop.py (4 replacements)
- memory_updater.py (9 replacements)
- session_extract_context_provider.py (4 replacements)
- utils/json_parser.py (7 replacements)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* auto-commit before eval 20260513_123007

* auto-commit before eval 20260513_125305

* auto-commit before eval 20260513_135421

* auto-commit before eval 20260513_141013

* auto-commit before eval 20260513_143455

* auto-commit before eval 20260513_145401

* auto-commit before eval 20260513_163345

* auto-commit before eval 20260514_105906

* auto-commit before eval 20260514_112912

* auto-commit before eval 20260514_120308

* auto-commit before eval 20260514_122022

* auto-commit before eval 20260514_134800

* auto-commit before eval 20260514_135615

* auto-commit before eval 20260514_135818

* auto-commit before eval 20260514_142941

* auto-commit before eval 20260514_162401

* auto-commit before eval 20260514_231859

* auto-commit before eval 20260515_104122

* auto-commit before eval 20260515_122140

* auto-commit before eval 20260515_122942

* auto-commit before eval 20260515_144941

* auto-commit before eval 20260515_154736

* auto-commit before eval 20260515_181643

* auto-commit before eval 20260515_182727

* auto-commit before eval 20260515_183056

* auto-commit before eval 20260515_183652

* auto-commit before eval 20260515_183825

* auto-commit before eval 20260515_202731

* auto-commit before eval 20260516_001144

* auto-commit before eval 20260516_011749

* auto-commit before eval 20260516_015903

* auto-commit before eval 20260516_020505

* auto-commit before eval 20260516_130701

* auto-commit before eval 20260516_144342

* auto-commit before eval 20260516_151043

* Harden memory graph rendering and patch guidance.

Escape embedded graph data for script safety, add a vis-network load guard, tighten graph layout defaults, and clarify SEARCH guidance so patch content stays bound to the target file/page context.

🤖 Generated with [Aiden x Claude Code]

Co-Authored-By: Aiden

* auto-commit before eval 20260517_005258

* auto-commit before eval 20260517_012903

* auto-commit before eval 20260517_014036

* auto-commit before eval 20260517_015726

* auto-commit before eval 20260517_024952

* auto-commit before eval 20260517_032518

* auto-commit before eval 20260517_135114

* auto-commit before eval 20260517_143238

* auto-commit before eval 20260517_154858

* auto-commit before eval 20260517_200556

* auto-commit before eval 20260517_215025

* fix: keep memory storage plain and render graph links on display

Store memory bodies as plain text in VikingFS and move link rendering to graph display so repeated writes no longer persist nested markdown links. Also tighten link renderer path handling so cross-user relative paths are rejected and strip_links preserves viking and absolute targets.

🤖 Generated with [Aiden x Claude Code]

Co-Authored-By: Aiden

* auto-commit before eval 20260518_001945

* fix: invert selected graph node colors

Make the currently selected memory node use a light background with dark text so it stands out against the dark graph theme.

🤖 Generated with [Aiden x Claude Code]

Co-Authored-By: Aiden

* auto-commit before eval 20260518_011327

* update

* auto-commit before eval 20260518_161813

* auto-commit before eval 20260518_165104

* auto-commit before eval 20260518_174259

* update

* auto-commit before eval 20260518_224834

* auto-commit before eval 20260518_233319

* auto-commit before eval 20260518_235712

* auto-commit before eval 20260519_135952

* fix memory patch failure logging

Keep dry-run patch validation from emitting a misleading patch_handler warning, and record skipped field updates from MemoryUpdater where the failure is handled.

🤖 Generated with [Aiden x Claude Code]

Co-Authored-By: Aiden

* auto-commit before eval 20260519_213142

* 语言修正

* fix(memory): fan out links for shared page ids

Expand _resolve_links so shared page ids resolve across every operation URI instead of collapsing to a single path. Align the page-id and extract-loop tests with the current API contract and the multi-URI link behavior.

🤖 Generated with [Aiden x Claude Code]

Co-Authored-By: Aiden

* auto-commit before eval 20260520_195141

* update language

* 语言修正,日语相关

* 语言修正,针对时区,小语言,兼容windows系统时区

* auto-commit before eval 20260520_215911

* auto-commit before eval 20260520_222335

* update

* style(memory): clean up formatter drift

Apply the remaining formatter-driven cleanup in the memory modules so the working tree stays clean before the next behavior changes. This keeps helper signatures and string literals aligned with current lint output.

🤖 Generated with [Aiden x Claude Code]

Co-Authored-By: Aiden

* 日语修正

* 更新注释

* update

---------

Co-authored-by: chenjunwen <chenjunwen@bytedance.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 17:05:31 +08:00
Qin Haojie fd9ada9295 fix(storage): preserve semantic lock ownership (#2140)
Introduce typed lock leases for semantic queue handoff so resource, memory, and reindex flows can share or transfer lock ownership without releasing caller-owned locks prematurely.
2026-05-20 14:37:02 +08:00
Qin Haojie 77b604a641 fix(storage): 优化路径锁与语义刷新并发 (#2029)
* fix(storage): refine path lock semantic refresh concurrency

Use exact path locks for source commits, tree locks only for lifecycle and schema scopes, and coalesce derived semantic writes to avoid stale summary overwrites under concurrent resource and memory updates.

* chore: split benchmark changes into separate PR

* chore: keep semantic refresh design notes out of docs

* style: format lock changes

* fix: preserve resource lifecycle locks

* Revert "fix: preserve resource lifecycle locks"

This reverts commit d2fb274f85.

* fix(resource): simplify lifecycle locking

* fix(queuefs): consolidate semantic sidecar writes
2026-05-14 20:44:28 +08:00
xiejianqiao 4e4da6ee86 fix(storage): move blocking backend calls off event loop (#2035)
Run AGFS and vector backend blocking operations in a threadpool to avoid blocking async flows, and add tests covering the threaded adapter calls.
2026-05-14 13:58:29 +08:00
Hao Zhe 66d447187b fix(storage): canonicalize shorthand namespace URIs on write (#1929) 2026-05-09 14:05:36 +08:00
Jiahui Zhouandqin-ctx ac3346422a feat(rebuild): add rebuild api scaffold (#1592)
* feat(admin): add rebuild api scaffold

feat: add admin rebuild API

fix: harden admin rebuild execution

feat(cli): add rebuild command support

fix(rebuild): support namespace rebuild routing

refactor(rebuild): unify memory semantic rebuild mode

refactor(rebuild): move http endpoint to content route

fix(rebuild): skip root namespace vectorization

fix(rebuild): harden namespace classification

refactor: rename rebuild api to reindex

refactor: rename reindex executor module

refactor(reindex): remove unused reason field

* fix(reindex): tighten namespace URI handling

Share segment-based Viking URI classification across context inference and reindex execution, add skill namespace support, and require root reindex requests to select an account.

* refactor: reuse indexing pipeline in reindex

* Revert "refactor: reuse indexing pipeline in reindex"

This reverts commit 2725fe6733.

* fix(reindex): respect semantic vectorization skips

Avoid scheduling semantic DAG vectorization work during semantic_and_vectors reindex, and keep resource vector text selection aligned with normal vectorize_file handling for non-text files.

---------

Co-authored-by: qin-ctx <qinhaojie.exe@bytedance.com>
2026-05-08 17:48:33 +08:00
ad13850021 fix(semantic): memory queue stall + permanent fs-error classification (#1531)
* fix(semantic): ensure memory processing always reports completion status

_process_memory_directory() had early return paths that could bypass
report_success()/report_error() in on_dequeue(), leaving the queue's
in_progress counter permanently stuck. This caused the semantic queue
to appear stalled with pending items never being processed.

All code paths now properly propagate to the completion callbacks.

Fixes #864.

* fix(semantic): classify filesystem errors as permanent to prevent infinite retry

Address review feedback: filesystem errors (FileNotFoundError,
PermissionError, IsADirectoryError, NotADirectoryError) are now
classified as permanent by classify_api_error(), so they hit
report_error() instead of being infinitely re-enqueued.

Tests updated to exercise real classifier behavior without mocking.

* test: fix set_callbacks signature for DequeueHandlerBase

DequeueHandlerBase.set_callbacks now takes (on_success, on_requeue, on_error);
the original PR #951 test harness called it with only (on_success, on_error).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix(semantic): remove dead _mark_failed helper, add transient-error test

_mark_failed's two call sites were removed when _process_memory_directory
started raising on error. The closure itself was left behind. Delete it —
telemetry failure is now reported by on_dequeue's exception handler via
get_request_wait_tracker().mark_semantic_failed().

Add test_memory_ls_transient_error_requeues to cover the transient branch
of the memory path: a 500-class error from ls() must route through
_reenqueue_semantic_msg() and fire report_requeue() + report_success(),
not report_error(). The previous tests only exercised permanent errors.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: deepakdevp <deepakdevp@gmail.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-06 15:20:26 +08:00
Jiahui Zhou b9753385ec feat: parallelize grep reads for remote storage (#1761) 2026-04-28 14:57:11 +08:00
Qin Haojie f9cf3cd209 fix(storage): make content writes immediately readable (#1742)
* fix(storage): make content writes immediately readable

* fix(storage): drop legacy write update flags
2026-04-27 17:16:48 +08:00