mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
test(qa): remove retired scenario migration ledgers (#121229)
* test(qa): remove retired scenario migration ledgers * fix(deps): pin noVNC dependency exactly
This commit is contained in:
committed by
GitHub
parent
f31d9d8fa9
commit
9ede0e9cef
@@ -1,58 +0,0 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { readQaBootstrapScenarioCatalog, readQaScenarioById } from "../../scenario-catalog.js";
|
||||
|
||||
const RENAMED_MATRIX_SCENARIOS = {
|
||||
"matrix-thread-follow-up": "thread-follow-up",
|
||||
"matrix-thread-isolation": "thread-isolation",
|
||||
"matrix-subagent-thread-spawn": "subagent-thread-spawn",
|
||||
"matrix-top-level-reply-shape": "channel-top-level-reply-shape",
|
||||
"matrix-room-thread-reply-override": "thread-reply-override",
|
||||
"matrix-dm-reply-shape": "dm-chat-baseline",
|
||||
"matrix-dm-shared-session-notice": "dm-shared-session",
|
||||
"matrix-dm-per-room-session-override": "dm-per-room-session",
|
||||
"matrix-secondary-room-reply": "channel-secondary-conversation-isolation",
|
||||
"matrix-mention-gating": "channel-mention-gating",
|
||||
"matrix-observer-allowlist-override": "matrix-allowlist-hot-reload",
|
||||
"matrix-allowlist-block": "channel-sender-allowlist",
|
||||
"matrix-multi-actor-ordering": "channel-multi-actor-ordering",
|
||||
} as const;
|
||||
|
||||
function isMatrixModuleScenario(
|
||||
scenario: ReturnType<typeof readQaBootstrapScenarioCatalog>["scenarios"][number],
|
||||
) {
|
||||
if (scenario.execution.kind !== "flow" || scenario.id === "matrix-allowlist-hot-reload") {
|
||||
return false;
|
||||
}
|
||||
return scenario.execution.flow?.steps.some((step) =>
|
||||
step.actions.some(
|
||||
(action) =>
|
||||
typeof action === "object" &&
|
||||
action !== null &&
|
||||
"value" in action &&
|
||||
typeof action.value === "object" &&
|
||||
action.value !== null &&
|
||||
"expr" in action.value &&
|
||||
typeof action.value.expr === "string" &&
|
||||
action.value.expr.includes("./live-transports/matrix/scenarios/scenario-runtime-"),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
describe("legacy Matrix scenario migration", () => {
|
||||
const moduleScenarioIds = readQaBootstrapScenarioCatalog()
|
||||
.scenarios.filter(isMatrixModuleScenario)
|
||||
.map((scenario) => scenario.id);
|
||||
|
||||
it("maps all 94 former scenario ids to QA Lab scenarios", () => {
|
||||
const legacyIds = [...moduleScenarioIds, ...Object.keys(RENAMED_MATRIX_SCENARIOS)];
|
||||
expect(legacyIds).toHaveLength(94);
|
||||
expect(new Set(legacyIds).size).toBe(94);
|
||||
|
||||
for (const scenarioId of moduleScenarioIds) {
|
||||
expect(readQaScenarioById(scenarioId).id).toBe(scenarioId);
|
||||
}
|
||||
for (const [legacyId, targetId] of Object.entries(RENAMED_MATRIX_SCENARIOS)) {
|
||||
expect(readQaScenarioById(targetId).id, legacyId).toBe(targetId);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -1,93 +0,0 @@
|
||||
import fs from "node:fs";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { readQaScenarioById } from "../../scenario-catalog.js";
|
||||
|
||||
const LEGACY_TELEGRAM_BEHAVIOR_LEDGER = [
|
||||
{
|
||||
id: "telegram-other-bot-command-gating",
|
||||
owner: "qa/scenarios/channels/telegram-other-bot-command-gating.yaml",
|
||||
scenarioId: "telegram-other-bot-command-gating",
|
||||
},
|
||||
{
|
||||
id: "telegram-mentioned-message-reply",
|
||||
owner: "qa/scenarios/channels/channel-canary.yaml",
|
||||
scenarioId: "channel-canary",
|
||||
},
|
||||
{
|
||||
id: "telegram-stream-final-single-message",
|
||||
owner: "qa/scenarios/channels/telegram-stream-final-single-message.yaml",
|
||||
scenarioId: "telegram-stream-final-single-message",
|
||||
},
|
||||
{
|
||||
id: "telegram-long-final-reuses-preview",
|
||||
owner: "qa/scenarios/channels/telegram-long-final-reuses-preview.yaml",
|
||||
scenarioId: "telegram-long-final-reuses-preview",
|
||||
},
|
||||
{
|
||||
id: "telegram-long-final-three-chunks",
|
||||
owner: "qa/scenarios/channels/telegram-long-final-three-chunks.yaml",
|
||||
scenarioId: "telegram-long-final-three-chunks",
|
||||
},
|
||||
{
|
||||
id: "telegram-mention-gating",
|
||||
owner: "qa/scenarios/channels/channel-mention-gating.yaml",
|
||||
scenarioId: "channel-mention-gating",
|
||||
},
|
||||
] as const;
|
||||
|
||||
const LEGACY_TELEGRAM_CAPABILITY_LEDGER = [
|
||||
{
|
||||
id: "credentials-and-lease-cleanup",
|
||||
owner: "extensions/qa-lab/src/live-transports/telegram/adapter.runtime.ts",
|
||||
proof: "acquireQaCredentialLease",
|
||||
},
|
||||
{
|
||||
id: "bot-api-and-rich-message-observation",
|
||||
owner: "extensions/qa-lab/src/live-transports/telegram/telegram-api.runtime.ts",
|
||||
proof: "normalizeTelegramObservedMessage",
|
||||
},
|
||||
{
|
||||
id: "native-send-reply-edit-mapping",
|
||||
owner: "extensions/qa-lab/src/live-transports/telegram/adapter.runtime.ts",
|
||||
proof: "reply_parameters",
|
||||
},
|
||||
{
|
||||
id: "gateway-readiness-and-config",
|
||||
owner: "extensions/qa-lab/src/live-transports/telegram/telegram-api.runtime.ts",
|
||||
proof: "waitForTelegramChannelRunning",
|
||||
},
|
||||
{
|
||||
id: "selection-and-standard-artifacts",
|
||||
owner: "extensions/qa-lab/src/live-transports/telegram/cli.runtime.ts",
|
||||
proof: "runQaFlowSuiteFromRuntime",
|
||||
},
|
||||
{
|
||||
id: "package-rtt-sampling",
|
||||
owner: "scripts/e2e/npm-telegram-live-runner.ts",
|
||||
proof: "createRoundTripProbe",
|
||||
},
|
||||
] as const;
|
||||
|
||||
describe("legacy Telegram runner parity", () => {
|
||||
it("maps every retired scenario to one maintained YAML owner", () => {
|
||||
expect(LEGACY_TELEGRAM_BEHAVIOR_LEDGER).toHaveLength(6);
|
||||
expect(new Set(LEGACY_TELEGRAM_BEHAVIOR_LEDGER.map(({ id }) => id)).size).toBe(6);
|
||||
|
||||
for (const entry of LEGACY_TELEGRAM_BEHAVIOR_LEDGER) {
|
||||
const scenario = readQaScenarioById(entry.scenarioId);
|
||||
expect(scenario.sourcePath, entry.id).toBe(entry.owner);
|
||||
}
|
||||
});
|
||||
|
||||
it("keeps every runner capability at its intended owner boundary", () => {
|
||||
for (const entry of LEGACY_TELEGRAM_CAPABILITY_LEDGER) {
|
||||
expect(fs.readFileSync(entry.owner, "utf8"), entry.id).toContain(entry.proof);
|
||||
}
|
||||
});
|
||||
|
||||
it("has no unresolved legacy runner owner", () => {
|
||||
expect(
|
||||
fs.existsSync("extensions/qa-lab/src/live-transports/telegram/telegram-live.runtime.ts"),
|
||||
).toBe(false);
|
||||
});
|
||||
});
|
||||
@@ -24,7 +24,6 @@ describe("Telegram QA profiles", () => {
|
||||
const live = resolveTelegramQaScenarioIds({ providerMode: "live-frontier" });
|
||||
const mock = resolveTelegramQaScenarioIds({ providerMode: "mock-openai" });
|
||||
|
||||
expect(mock).toHaveLength(19);
|
||||
expect(live).not.toContain("telegram-long-final-reuses-preview");
|
||||
expect(mock).toContain("telegram-long-final-reuses-preview");
|
||||
expect(mock).not.toContain("telegram-assistant-transcript-role-boundary");
|
||||
|
||||
Generated
+1
-1
@@ -2408,7 +2408,7 @@ importers:
|
||||
specifier: 3.1.0
|
||||
version: 3.1.0
|
||||
'@novnc/novnc':
|
||||
specifier: ^1.7.0
|
||||
specifier: 1.7.0
|
||||
version: 1.7.0
|
||||
'@openclaw/gateway-client':
|
||||
specifier: workspace:*
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@
|
||||
"@modelcontextprotocol/ext-apps": "1.7.5",
|
||||
"@modelcontextprotocol/sdk": "1.30.0",
|
||||
"@noble/ed25519": "3.1.0",
|
||||
"@novnc/novnc": "^1.7.0",
|
||||
"@novnc/novnc": "1.7.0",
|
||||
"@openclaw/gateway-client": "workspace:*",
|
||||
"@openclaw/gateway-protocol": "workspace:*",
|
||||
"@openclaw/libterminal": "0.3.2",
|
||||
|
||||
Reference in New Issue
Block a user