test: debrand plumbing labels and restore skill compat

This commit is contained in:
Peter Steinberger
2026-03-27 21:50:39 +00:00
parent 03e7e3cd27
commit a50455452d
12 changed files with 21 additions and 39 deletions

View File

@@ -5,11 +5,11 @@ describe("resolveMessageSecretScope", () => {
it("prefers explicit channel/account inputs", () => {
expect(
resolveMessageSecretScope({
channel: "Discord",
channel: "Signal",
accountId: "Ops",
}),
).toEqual({
channel: "discord",
channel: "signal",
accountId: "ops",
});
});
@@ -17,27 +17,27 @@ describe("resolveMessageSecretScope", () => {
it("infers channel from a prefixed target", () => {
expect(
resolveMessageSecretScope({
target: "telegram:12345",
target: "signal:12345",
}),
).toEqual({
channel: "telegram",
channel: "signal",
});
});
it("infers a shared channel from target arrays", () => {
expect(
resolveMessageSecretScope({
targets: ["discord:one", "discord:two"],
targets: ["signal:one", "signal:two"],
}),
).toEqual({
channel: "discord",
channel: "signal",
});
});
it("does not infer a channel when target arrays mix channels", () => {
expect(
resolveMessageSecretScope({
targets: ["discord:one", "slack:two"],
targets: ["signal:one", "imessage:two"],
}),
).toEqual({});
});

View File

@@ -1,7 +1,6 @@
import fs from "node:fs";
import os from "node:os";
import path from "node:path";
import { createSyntheticSourceInfo } from "@mariozechner/pi-coding-agent";
import { afterAll, beforeAll, describe, expect, it } from "vitest";
import { buildWorkspaceSkillStatus } from "../agents/skills-status.js";
import type { SkillEntry } from "../agents/skills.js";
@@ -39,9 +38,7 @@ describe("skills-cli (e2e)", () => {
description: "Capture UI screenshots",
filePath: path.join(baseDir, "SKILL.md"),
baseDir,
sourceInfo: createSyntheticSourceInfo(path.join(baseDir, "SKILL.md"), {
source: "openclaw-bundled",
}),
source: "openclaw-bundled",
disableModelInvocation: false,
},
frontmatter: {},