test(memory): keep promotion signal fixture inside age window · openclaw/openclaw@06cdb17
vincentkoc
·
2026-05-03
·
via Recent Commits to openclaw:main
File tree
extensions/memory-core/src
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1528,10 +1528,12 @@ describe("memory cli", () => {
|
1528 | 1528 | |
1529 | 1529 | it("prints conceptual promotion signals", async () => { |
1530 | 1530 | await withTempWorkspace(async (workspaceDir) => { |
| 1531 | +const dayMs = 24 * 60 * 60 * 1000; |
| 1532 | +const nowMs = Date.now(); |
1531 | 1533 | await recordShortTermRecalls({ |
1532 | 1534 | workspaceDir, |
1533 | 1535 | query: "router vlan", |
1534 | | -nowMs: Date.parse("2026-04-01T00:00:00.000Z"), |
| 1536 | +nowMs: nowMs - 2 * dayMs, |
1535 | 1537 | results: [ |
1536 | 1538 | { |
1537 | 1539 | path: "memory/2026-04-01.md", |
@@ -1546,7 +1548,7 @@ describe("memory cli", () => {
|
1546 | 1548 | await recordShortTermRecalls({ |
1547 | 1549 | workspaceDir, |
1548 | 1550 | query: "glacier backup", |
1549 | | -nowMs: Date.parse("2026-04-03T00:00:00.000Z"), |
| 1551 | +nowMs: nowMs - dayMs, |
1550 | 1552 | results: [ |
1551 | 1553 | { |
1552 | 1554 | path: "memory/2026-04-01.md", |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。