Skip to content

Commit 5a1daf8

Browse files
authored
test(qa): cover memory promotion safety (#119093)
1 parent 2ca01fb commit 5a1daf8

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎qa/scenarios/memory/memory-dreaming-sweep.yaml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ scenario:
66
coverage:
77
primary:
88
- session-memory.memory-files-dreaming
9+
- session-memory.memory-files-promotion
910
objective: Verify enabling dreaming creates the managed sweep, stages light and REM artifacts, and consolidates repeated recall signals into durable memory.
1011
successCriteria:
1112
- Dreaming can be enabled and doctor.memory.status reports the managed sweep cron.
@@ -263,7 +264,7 @@ flow:
263264
args:
264265
- lambda:
265266
async: true
266-
expr: "(async () => { const status = await readDoctorMemoryStatus(env); const lightReport = await fs.readFile(lightReportPath, 'utf8').catch(() => ''); const remReport = await fs.readFile(remReportPath, 'utf8').catch(() => ''); const promotedMemory = await fs.readFile(memoryPath, 'utf8').catch(() => ''); if (!lightReport.includes('# Light Sleep')) return undefined; if (!remReport.includes('# REM Sleep')) return undefined; if (!promotedMemory.includes(config.expectedNeedle)) return undefined; if (status.dreaming?.phases?.deep?.managedCronPresent !== true) return undefined; if ((status.dreaming?.promotedTotal ?? 0) < 1) return undefined; return { status, lightReport, remReport, promotedMemory }; })()"
267+
expr: "(async () => { const status = await readDoctorMemoryStatus(env); const lightReport = await fs.readFile(lightReportPath, 'utf8').catch(() => ''); const remReport = await fs.readFile(remReportPath, 'utf8').catch(() => ''); const promotedMemory = await fs.readFile(memoryPath, 'utf8').catch(() => ''); const promotedEntry = status.dreaming?.promotedEntries?.find((entry) => entry.snippet?.includes(config.expectedNeedle)); const promotionMarker = promotedEntry?.key ? `<!-- openclaw-memory-promotion:${promotedEntry.key} -->` : ''; if (!lightReport.includes('# Light Sleep')) return undefined; if (!remReport.includes('# REM Sleep')) return undefined; if (!promotedMemory.includes(config.expectedNeedle)) return undefined; if (!promotionMarker || !promotedMemory.includes(promotionMarker)) return undefined; if (status.dreaming?.phases?.deep?.managedCronPresent !== true) return undefined; if ((status.dreaming?.promotedTotal ?? 0) < 1) return undefined; return { status, lightReport, remReport, promotedMemory, promotionMarker }; })()"
267268
- expr: liveTurnTimeoutMs(env, 180000)
268269
- 1000
269270
finally:
@@ -285,4 +286,4 @@ flow:
285286
args:
286287
- ref: env
287288
- 60000
288-
detailsExpr: "JSON.stringify({ promotedTotal: promoted.status.dreaming?.promotedTotal ?? 0, shortTermCount: promoted.status.dreaming?.shortTermCount ?? 0, phaseSignalCount: promoted.status.dreaming?.phaseSignalCount ?? 0, lightSleep: promoted.lightReport.includes('# Light Sleep'), remSleep: promoted.remReport.includes('# REM Sleep') })"
289+
detailsExpr: "JSON.stringify({ promotedTotal: promoted.status.dreaming?.promotedTotal ?? 0, shortTermCount: promoted.status.dreaming?.shortTermCount ?? 0, phaseSignalCount: promoted.status.dreaming?.phaseSignalCount ?? 0, lightSleep: promoted.lightReport.includes('# Light Sleep'), remSleep: promoted.remReport.includes('# REM Sleep'), promotionMarkerPresent: promoted.promotedMemory.includes(promoted.promotionMarker) })"

‎qa/scenarios/security/memory-core-redaction-boundaries.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ scenario:
88
primary:
99
- security.redaction-dreaming
1010
- security.redaction-promotion
11+
- session-memory.memory-files-artifact-safety
1112
objective: Prove memory-core redacts sensitive interactive transcript content before dreaming ingestion and structurally rejects contaminated or untrusted promotion candidates.
1213
successCriteria:
1314
- A real interactive session transcript keeps safe control text while replacing a raw shared secret before the real dreaming phase ingests it.

0 commit comments

Comments
 (0)