惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Martin Fowler
Martin Fowler
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
博客园_首页
宝玉的分享
宝玉的分享
S
SegmentFault 最新的问题
Jina AI
Jina AI
Hugging Face - Blog
Hugging Face - Blog
V
Visual Studio Blog
美团技术团队
IT之家
IT之家
罗磊的独立博客
Blog — PlanetScale
Blog — PlanetScale
Google DeepMind News
Google DeepMind News
月光博客
月光博客
Microsoft Azure Blog
Microsoft Azure Blog
H
Help Net Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Last Week in AI
Last Week in AI
博客园 - 叶小钗
M
MIT News - Artificial intelligence
B
Blog RSS Feed
有赞技术团队
有赞技术团队
Y
Y Combinator Blog

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
feat(qa): expose active memory toggles to scenarios (#958...
RomneyDa · 2026-06-23 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -74,6 +74,8 @@ function createDeps(overrides?: Partial<QaScenarioRuntimeDeps>): QaScenarioRunti

7474

extractQaToolPayload: fn,

7575

formatMemoryDreamingDay: fn,

7676

resolveSessionTranscriptsDirForAgent: fn,

77+

activeMemoryToggleKey: fn,

78+

setActiveMemorySessionDisabled: fn,

7779

buildAgentSessionKey: fn,

7880

normalizeLowercaseStringOrEmpty: fn,

7981

formatErrorMessage: fn,

Original file line numberDiff line numberDiff line change

@@ -86,6 +86,8 @@ export type QaScenarioRuntimeDeps = {

8686

extractQaToolPayload: QaScenarioRuntimeFunction;

8787

formatMemoryDreamingDay: QaScenarioRuntimeFunction;

8888

resolveSessionTranscriptsDirForAgent: QaScenarioRuntimeFunction;

89+

activeMemoryToggleKey: QaScenarioRuntimeFunction;

90+

setActiveMemorySessionDisabled: QaScenarioRuntimeFunction;

8991

buildAgentSessionKey: QaScenarioRuntimeFunction;

9092

normalizeLowercaseStringOrEmpty: QaScenarioRuntimeFunction;

9193

formatErrorMessage: QaScenarioRuntimeFunction;

@@ -177,6 +179,8 @@ type QaScenarioRuntimeApi<

177179

extractQaToolPayload: TDeps["extractQaToolPayload"];

178180

formatMemoryDreamingDay: TDeps["formatMemoryDreamingDay"];

179181

resolveSessionTranscriptsDirForAgent: TDeps["resolveSessionTranscriptsDirForAgent"];

182+

activeMemoryToggleKey: TDeps["activeMemoryToggleKey"];

183+

setActiveMemorySessionDisabled: TDeps["setActiveMemorySessionDisabled"];

180184

buildAgentSessionKey: TDeps["buildAgentSessionKey"];

181185

normalizeLowercaseStringOrEmpty: TDeps["normalizeLowercaseStringOrEmpty"];

182186

formatErrorMessage: TDeps["formatErrorMessage"];

@@ -283,6 +287,8 @@ export function createQaScenarioRuntimeApi<

283287

extractQaToolPayload: params.deps.extractQaToolPayload,

284288

formatMemoryDreamingDay: params.deps.formatMemoryDreamingDay,

285289

resolveSessionTranscriptsDirForAgent: params.deps.resolveSessionTranscriptsDirForAgent,

290+

activeMemoryToggleKey: params.deps.activeMemoryToggleKey,

291+

setActiveMemorySessionDisabled: params.deps.setActiveMemorySessionDisabled,

286292

buildAgentSessionKey: params.deps.buildAgentSessionKey,

287293

normalizeLowercaseStringOrEmpty: params.deps.normalizeLowercaseStringOrEmpty,

288294

formatErrorMessage: params.deps.formatErrorMessage,

Original file line numberDiff line numberDiff line change

@@ -1,11 +1,12 @@

11

// Qa Lab plugin module implements suite runtime flow behavior.

2-

import { randomUUID } from "node:crypto";

2+

import { createHash, randomUUID } from "node:crypto";

33

import fs from "node:fs/promises";

44

import path from "node:path";

55

import { setTimeout as sleep } from "node:timers/promises";

66

import { formatMemoryDreamingDay } from "openclaw/plugin-sdk/memory-core-host-status";

77

import { resolveSessionTranscriptsDirForAgent } from "openclaw/plugin-sdk/memory-host-core";

88

import { buildAgentSessionKey } from "openclaw/plugin-sdk/routing";

9+

import { createPluginStateSyncKeyedStore } from "openclaw/plugin-sdk/runtime-doctor";

910

import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";

1011

import {

1112

callQaBrowserRequest,

@@ -85,6 +86,39 @@ type QaSuiteScenarioFlowEnv = {

8586

transport: QaSuiteRuntimeEnv["transport"] & QaScenarioRuntimeEnv["transport"];

8687

} & Omit<QaSuiteRuntimeEnv, "transport">;

8788
89+

function activeMemoryToggleKey(sessionKey: string) {

90+

return createHash("sha256").update(sessionKey, "utf8").digest("hex");

91+

}

92+
93+

function setActiveMemorySessionDisabled(

94+

env: QaSuiteScenarioFlowEnv,

95+

sessionKey: string,

96+

disabled: boolean,

97+

) {

98+

const store = createPluginStateSyncKeyedStore<{

99+

sessionKey: string;

100+

disabled: true;

101+

updatedAt: number;

102+

}>("active-memory", {

103+

namespace: "session-toggles",

104+

maxEntries: 10_000,

105+

env: {

106+

...process.env,

107+

OPENCLAW_STATE_DIR: path.join(env.gateway.tempRoot, "state"),

108+

},

109+

});

110+

const key = activeMemoryToggleKey(sessionKey);

111+

if (disabled) {

112+

store.register(key, {

113+

sessionKey,

114+

disabled: true,

115+

updatedAt: Date.now(),

116+

});

117+

return;

118+

}

119+

store.delete(key);

120+

}

121+
88122

type QaSuiteStep = {

89123

name: string;

90124

run: () => Promise<string | void>;

@@ -204,6 +238,8 @@ function createQaSuiteScenarioDeps(params: QaSuiteScenarioDepsParams) {

204238

extractQaToolPayload,

205239

formatMemoryDreamingDay,

206240

resolveSessionTranscriptsDirForAgent,

241+

activeMemoryToggleKey,

242+

setActiveMemorySessionDisabled,

207243

buildAgentSessionKey,

208244

normalizeLowercaseStringOrEmpty,

209245

formatErrorMessage: params.formatErrorMessage,