Conversation
Signed-off-by: zhangzherui <jerry_@whut.edu.cn>
|
Thank you for submitting this PR and participating in Tencent Rhino-bird Open-source Training Program! |
* Update README.md * Update README_CN.md
…tCloud#151) * feat(hermes): support Windows native setup Closes TencentCloud#113 Signed-off-by: misaka <09982.misaka@gmail.com> * test(postinstall): cover cross-platform behavior * Delete __tests__/postinstall.test.ts * Delete hermes-plugin/memory/memory_tencentdb/tests/test_memory_tencentdb_recovery.py --------- Signed-off-by: misaka <09982.misaka@gmail.com> Co-authored-by: 十五便士 <95488710+Maxwell-Code07@users.noreply.github.com>
Add unit tests for memory-tencentdb provider self-healing functionality, including watchdog behavior and request path recovery.
* Update README.md * Update README_CN.md
* docs: add Star History chart to README * docs: replace Star History chart with GitHub badges * docs: use real Star History chart image in README
…solves TencentCloud#160) (TencentCloud#529) * fix(store): sanitize FTS5 query tokens to prevent MATCH injection#160 问题 buildFtsQuery() 把用户输入拼成 FTS5 MATCH 表达式,含 FTS5 操作符(`" ' * ( ) AND OR NOT NEAR : ^`)的输入会篡改查询语义或触发语法错误(注入)。 方案 - `sanitizeFtsToken()`:双引号包字面 phrase,内部 `"` 转义为 `""`(修正旧实现"删除双引号"导致的 recall 损伤) - `sanitizeFtsWhitelist()`:字符级白名单(defence-in-depth) - `buildFtsQuery` 复用 `sanitizeFtsToken` - 与项目已有的 `MATCH ?` 参数化(SQL 防注入)组成三层防御 测试 新增 38 个:单元(21)+ 真实 FTS5 召回对比(4)+ 白名单(13)。本地全量 **105 passed**,零回归。 验收对照 issue 四档全覆盖:基础 / 进阶 / 深入(真实 FTS5 recall 实证)/ 拓展(白名单 + 参数化三层防御)。 * Delete src/core/store/buildFtsQuery.recall.test.ts * Delete src/core/store/buildFtsQuery.test.ts * Delete src/core/store/buildFtsQuery.whitelist.test.ts --------- Co-authored-by: 十五便士 <95488710+Maxwell-Code07@users.noreply.github.com>
…ounters after cleanup (TencentCloud#337) * fix(data): add CheckpointManager.recalculate() to reconcile drifted counters after cleanup After cleanup operations (memory-cleaner, manual JSONL pruning, or pipeline state deletion), checkpoint counters (l0_conversations_count, total_memories_extracted) can drift from actual data — they only increment, never decrease. Add recalculate() to CheckpointManager that accepts actual counts and overwrites drifted counters under the file lock. Call it once at startup in wirePipelineRunners() after vector store is initialized. Closes TencentCloud#157 Signed-off-by: xiyue1753 <xiyuekl@qq.com> * Delete src/utils/checkpoint.test.ts --------- Signed-off-by: xiyue1753 <xiyuekl@qq.com> Co-authored-by: 十五便士 <95488710+Maxwell-Code07@users.noreply.github.com>
|
Thank you for your hard work on issue [#120] — the solution is well-designed and the code quality is excellent 👏 That said, from a project-stability perspective, we're taking a cautious approach toward "cache hit-rate optimization" changes. This is an experience-level optimization rather than a functional bug or security issue, so to keep the change surface minimal and reduce regression risk, we've decided not to introduce a large-scale implementation at this time and will close the related PRs. Your ideas and technical approach remain highly valuable, and we truly appreciate the effort you've put in. We welcome you to continue contributing to the Rhino Bird open-source program and look forward to seeing you shine on a more suitable topic 🚀 |
Description | 描述
Adds focused multi-turn regression coverage for the canonical prompt-cache mitigation in #375.
The existing tests validate a single injected message. This follow-up measures the long-session behavior that #120 originally reported:
recall.showInjected=falseremoves every recall block before persistenceshowInjected=truehistory in the benchmark fixtureshowInjected=truebehavior covered as the opt-in diagnostic pathThis PR adds focused regression tests and an acceptance-oriented architecture/measurement note; it does not introduce another runtime injection strategy.
Related Issue | 关联 Issue
Related to #120
Follow-up to / depends on #375
Change Type | 修改类型
Self-test Checklist | 自测清单
Verification:
npm.cmd exec vitest run src/adapters/openclaw/recall-injection.test.ts src/adapters/openclaw/recall-injection.multiturn.test.ts: 8 passednpm.cmd test: 78 passednpm.cmd run build:plugin: passedgit diff --check: passedAdditional Notes | 其他说明
The runtime mitigation remains the canonical implementation in #375 (
prependby default, opt-inappend, andshowInjected=false). This follow-up now documents the before/after prompt structure, theR*N*(N-1)/2aggregate replay-growth model, the deterministic 100-turn evidence, and a controlled DeepSeek/MiMo A/B protocol indocs/prompt-cache-mitigation.md. After #375 merges, this branch should be rebased ontomain, retaining the regression and documentation commits. The benchmark is a deterministic persisted-history growth proxy, not a fabricated provider-side cache hit claim.