English中文

复现 MemTether

100% 可复现 Apache-2.0 欢迎独立运行验证

别信我们说的数字,自己跑一遍。本页每个结论背后都有一条可执行的命令。

1. 环境

# Python 3.10 或 3.12
python --version

# 创建干净的虚拟环境
python -m venv .venv
source .venv/bin/activate  # Linux/macOS
# .venv\Scripts\activate   # Windows

# 安装
pip install memtether

2. 冒烟测试

# 初始化 + 验证 23 个适配器
memtether init

# 写一条记忆
memtether remember "复现测试内容" --source reproduce

# 搜索它
memtether search "复现测试" --list

# 预期输出: [fact/reproduce] 复现测试内容

3. 跑测试套件

git clone https://github.com/MemTether/MemTether.git
cd MemTether
pip install -e ".[server]"

# 运行全部测试
pytest tests/ -v --tb=short

# 预期: 464+ passed, 4 skipped(a63 起口径;随版本递增)

4. 覆盖率

pip install pytest-cov
pytest tests/ --cov=. --cov-report=term

# 预期: TOTAL ~55%(466 测试口径)
# 明细: memory_court 98% / predicates 95% / consolidation 67%
#       governance 57% / memsearch ~57% / gateway 54% / tether_connect 49%

5. LongMemEval 基准

MemTether 在 LongMemEval 500 题全量运行中报告 strict-match 62.6%(334 题适用)。EAF 模式把多会话 strict 从 32.5% 提升到 60.0%(配对 p=0.008,n=131)。

可复现性声明:基准测试工具在私有生产实例中。我们正在准备公开的基准工件包(目标 2026-12)。在此之前,这些数字是声明值,未经独立复现。

参考:LongMemEval 论文 · 官方仓库

6. 结论-证据对照表

结论证据状态
23 个适配器自动接入memtether init 输出 + tether_connect.py 597 行✅ 可复现
466 项测试pytest tests/ -v✅ 可复现
覆盖率 ~55%pytest --cov✅ 可复现
WAL 模式启用sqlite3 memory.db "PRAGMA journal_mode"✅ 可复现(a26 修复)
租户隔离tests/test_tenant.py — 跨租户 0 泄露✅ 可复现
限流 60/分钟tests/test_rate_limit.py✅ 可复现
EAF +19.4pp(500Q)releases/eaf_artifact_bundle/ — 500 题逐题记录,McNemar p=7.84e-07✅ 工件包
strict 62.6%(500Q 基线)releases/eaf_artifact_bundle/eaf_500q_pq_final.json✅ 同一工件包

7. 文件完整性

所有 Release 都发布 wheel + tar.gz,并在 Release 页附 SHA-256 摘要。验证方式:

sha256sum memtether-0.1.0a62-py3-none-any.whl

与 Release 页的摘要比对。

8. 独立复现

如果你复现了(或复现失败)任何结论,请到 MemTether Issues 开一个 issue,附上:

所有提交都会被审核并署名。诚实的失败结果同样欢迎。