fix(ci): fix test failures from recent feature additions
- Add ChatStore mock to all dashboard route tests that mock @fusion/core, since server.ts now instantiates ChatStore(store.getFusionDir(), ...) - Add getFusionDir to createMockStore in server.test.ts - Gate AI session cleanup scheduling behind shouldScheduleAiSessionCleanup() (returns false in test env) to prevent open handle warnings - Fix desktop tests: DASHBOARD_URL is now exported as a function alias, update assertions to call DASHBOARD_URL() instead of using as string - Add node:os mocks to system-metrics.test.ts for deterministic results - Replace hardcoded maxWorkers=16 with availableParallelism()-based calculation in all vitest configs to prevent OOM on 2-core CI runners - Add --workspace-concurrency=2 to pnpm test commands - Fix TaskCard tests: update mission badge title assertions to full titles - Remove unused /api/mesh/state route - Fix plugin-auto-label: add isError field, async onTaskCreated, "tests" keyword - Fix plugin-ci-status: add module-level logger, tighten test assertions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -27,7 +27,7 @@ const CATEGORY_RULES: CategoryRule[] = [
|
||||
label: "documentation",
|
||||
},
|
||||
{
|
||||
keywords: ["test", "testing", "spec", "coverage"],
|
||||
keywords: ["test", "tests", "testing", "spec", "coverage"],
|
||||
label: "testing",
|
||||
},
|
||||
{
|
||||
@@ -97,6 +97,7 @@ const autoLabelTool: PluginToolDefinition = {
|
||||
const labels = classifyText(text);
|
||||
return {
|
||||
content: [{ type: "text", text: JSON.stringify(labels) }],
|
||||
isError: false,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -119,7 +120,7 @@ const plugin: FusionPlugin = definePlugin({
|
||||
);
|
||||
},
|
||||
|
||||
onTaskCreated: (task, ctx) => {
|
||||
onTaskCreated: async (task, ctx) => {
|
||||
const labels = classifyText(task.description || "");
|
||||
if (labels.length > 0) {
|
||||
ctx.logger.info(
|
||||
|
||||
Reference in New Issue
Block a user