fix(semantic): persist filename-keyed memory summary cache#3364
fix(semantic): persist filename-keyed memory summary cache#3364huangruiteng wants to merge 7 commits into
Conversation
|
@qin-ctx I refined the existing #3364 branch in ddd0f0b after auditing the durable cache failure path. A transient per-file summary failure is represented as an empty summary; persisting that empty value would make later unchanged-file refreshes treat the failure as a permanent cache hit. The cache parser and serializer now reject empty or whitespace-only summaries, so the next incremental refresh retries the file while preserving valid filename-keyed entries. Validation: 9 focused semantic queue tests passed; Ruff check/format and diff hygiene passed. Please include this failure-retry boundary in the existing review when convenient. |
|
@qin-ctx I tightened the existing sidecar migration boundary in 1b0e732. Once .summary_cache.json is structurally valid, it is now authoritative even when it has zero or partial usable entries; .overview.md is consulted only when the sidecar is missing, malformed, or has an unsupported version. This prevents an exact filename heading in an older overview from resurrecting a blank/failed cache entry and suppressing the intended retry, while preserving migration fallback for pre-sidecar directories. Validation: 11 focused tests passed, including authoritative blank-entry retry and invalid-version fallback; Ruff check/format, diff hygiene, and LoopX public-boundary scan passed. Please include this boundary in the existing review. |
|
@qin-ctx #3364 最新 head 我尝试直接 rerun,但 GitHub 返回需要仓库 admin 权限。烦请维护者重跑该 workflow;若重跑仍以相同外部 provider 超时结束,再把它作为 CI 环境稳定性问题处理,不先对本 PR 实现做无证据改动。 证据:https://github.com/volcengine/OpenViking/actions/runs/29785422460 |
| \n@qin-ctx 我在 #3364 既有分支继续做了 derived-sidecar 边界审计,并推送提交 519398c。此前新引入的 .summary_cache.json 虽由 semantic processor 生成,却不在 ContentWriteCoordinator 的 derived-file 禁止直写集合中;外部 create/replace 可写入合法 JSON,后续增量刷新会把它当权威 cache 复用。\n\n现在该文件名由 storage internal-names 统一定义,semantic processor 与 content-write 共用;直接 create/replace 均会按现有 .overview.md / .abstract.md 规则拒绝。验证:新增直写回归 2/2、既有 memory cache 回归 11/11、Ruff check/format 与 diff hygiene 均通过。请按最新 head 复核这个 cache 完整性边界。 |
|
@qin-ctx 补充推进到 这轮在独立 worktree 对 current main 做合成 merge 审查时发现一个与本 PR sidecar 契约直接相关的问题: 验证:
说明: |
Summary
.summary_cache.jsonkeyed by the real filename.overview.mdparsing, so unchanged files avoid repeated LLM summarization.overview.mdand.abstract.mdunder the same stale-message check and exact path-lock batchThis is a current-main replacement for #2636, whose patch no longer applies and whose test plan was not implemented.
Closes #1261.
Validation
pytest tests/storage/test_semantic_queue_memory_dedupe.py -q --no-cov— 8 passedruff format --checkon the three changed filesruff checkon the three changed filespython -m compileallon the changed Python filesgit diff --check