Files
HomeAgent/internal/memory/pipeline
JianFeeeee a7e8f55085 test: 把 helper/getter 判据改写为模块职责级黑盒契约
四个模块从「导出符号调用」改为「模块职责 → 可观察结果」。

## internal/memory

    TestCommitThenRecallAfterReopen
      Commit → Close → 重开同一库 → Recall 核对主/谓/宾
      (原来只检查 GraphData 返回 map 里有 nodes 键)
    变异:Recall 恒空 → 断言红

## internal/memory/pipeline

    TestAppendThenDistillWritesQueryableFact
      Append → Start → 注入 splitter → 图库 Recall 命中
    TestRawRecordsPersistAcrossRestart
      Append → Stop → 新实例 Start → 回读原始记录
    TestSplitterFailureDoesNotFabricateFacts
      拆分失败必须回退,不得编出事实
    TestPauseResumeAndStopAreObservable
    变异:跳过蒸馏/跳过落盘 → 均断言红

## internal/nlp

    真实 Parser → 三元组 + 句子溯源 + 分值
    融合阈值改变取舍(高阈值空、低阈值还原)
    SetDefaultParser 影响 NewExtractor(nil)
    变异:丢弃 dep 抽取 / 取消阈值截断 → 均断言红

## internal/config

    新增 TestSecretSurvivesRestartAndStaysEncrypted
      敏感项 Set → 磁盘无明文 → Close → 重开 → GetSecret 还原明文
    变异:GetSecret 不解密 / Set 不加密落盘 → 均断言红
    删除了一条不成立的断言(普通 Get 本应返回明文),按真实契约收紧。

## 验证

    go build ./...                            PASS
    go vet ./...                              PASS
    gofmt -l                                  干净
    python3 .github/scripts/check-ci-gates.py PASS
    go test ./... -count=1                    51 测试包 / 100 包无测试 / 0 FAIL
    4 个改动包 -race                          全绿
    源码目录 _test.go                         0
2026-11-14 10:04:44 +08:00
..