chore(lint): clear sort mutation, spread fallback, and error-cause findings

toSorted/flat in the labeler coverage test, drop no-op empty-object spread
fallbacks in the telegram command-menu e2e config, and attach the caught
cause when rewrapping the trusted-workflow parse error.
This commit is contained in:
Peter Steinberger
2026-08-10 10:24:15 -07:00
parent 4e5029e43b
commit aa33c63c5b
2 changed files with 5 additions and 5 deletions
@@ -218,14 +218,14 @@ test("registers pressure-prioritized Telegram menus through a real Gateway", asy
{ agentId: "qa", match: { channel: "telegram", accountId: "skill" } },
];
cfg.plugins = {
...(cfg.plugins ?? {}),
...cfg.plugins,
allow: [...new Set([...(cfg.plugins?.allow ?? []), LOCALIZED_PLUGIN_ID])],
entries: {
...(cfg.plugins?.entries ?? {}),
...cfg.plugins?.entries,
[LOCALIZED_PLUGIN_ID]: { enabled: true },
},
load: {
...(cfg.plugins?.load ?? {}),
...cfg.plugins?.load,
paths: [...new Set([...(cfg.plugins?.load?.paths ?? []), localizedPluginDir])],
},
};
@@ -17,11 +17,11 @@ const labelerPath = path.join(repoRoot, ".github/labeler.yml");
const extensionDirectories = readdirSync(extensionsRoot, { withFileTypes: true })
.filter((entry) => entry.isDirectory())
.map((entry) => entry.name)
.sort();
.toSorted();
const extensionDirectorySet = new Set(extensionDirectories);
const labeler = parse(readFileSync(labelerPath, "utf8")) as Record<string, LabelerRule>;
const extensionGlobDirectories = Object.values(labeler)
.flatMap((rules) => rules)
.flat()
.flatMap((rule) => rule["changed-files"] ?? [])
.flatMap((changedFiles) => changedFiles["any-glob-to-any-file"] ?? [])
.flatMap((glob) => glob.match(/^extensions\/([^/]+)\//)?.[1] ?? []);