fix(ci): replay compaction and skills api drift

This commit is contained in:
Peter Steinberger
2026-03-28 00:43:47 +00:00
parent 6a039bca30
commit fa4da0ce5d
7 changed files with 23 additions and 26 deletions

View File

@@ -267,7 +267,7 @@ async function summarizeChunks(params: {
params.model,
params.reserveTokens,
params.apiKey,
undefined,
params.headers,
params.signal,
effectiveInstructions,
summary,

View File

@@ -1,6 +1,7 @@
import fs from "node:fs/promises";
import os from "node:os";
import path from "node:path";
import { createSyntheticSourceInfo } from "@mariozechner/pi-coding-agent";
import { afterAll, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { installDownloadSpec } from "./skills-install-download.js";
import { setTempStateDir } from "./skills-install.download-test-utils.js";
@@ -73,16 +74,14 @@ function createFixtureSkill(params: {
baseDir: string;
source: string;
}): SkillEntry["skill"] {
const skill = {
return {
name: params.name,
description: params.description,
filePath: params.filePath,
baseDir: params.baseDir,
source: params.source,
sourceInfo: { source: params.source },
sourceInfo: createSyntheticSourceInfo(params.filePath, { source: params.source }),
disableModelInvocation: false,
};
return skill as unknown as SkillEntry["skill"];
}
function buildDownloadSpec(params: {

View File

@@ -1,3 +1,4 @@
import { createSyntheticSourceInfo } from "@mariozechner/pi-coding-agent";
import { describe, expect, it } from "vitest";
import { buildWorkspaceSkillStatus } from "./skills-status.js";
import type { SkillEntry } from "./skills/types.js";
@@ -48,14 +49,12 @@ function createFixtureSkill(params: {
baseDir: string;
source: string;
}): SkillEntry["skill"] {
const skill = {
return {
name: params.name,
description: params.description,
filePath: params.filePath,
baseDir: params.baseDir,
source: params.source,
sourceInfo: { source: params.source },
sourceInfo: createSyntheticSourceInfo(params.filePath, { source: params.source }),
disableModelInvocation: false,
};
return skill as unknown as SkillEntry["skill"];
}

View File

@@ -1,3 +1,4 @@
import { createSyntheticSourceInfo } from "@mariozechner/pi-coding-agent";
import { describe, expect, it } from "vitest";
import { withEnv } from "../test-utils/env.js";
import { buildWorkspaceSkillStatus } from "./skills-status.js";
@@ -43,16 +44,14 @@ function createFixtureSkill(params: {
baseDir: string;
source: string;
}): SkillEntry["skill"] {
const skill = {
return {
name: params.name,
description: params.description,
filePath: params.filePath,
baseDir: params.baseDir,
source: params.source,
sourceInfo: { source: params.source },
sourceInfo: createSyntheticSourceInfo(params.filePath, { source: params.source }),
disableModelInvocation: false,
};
return skill as unknown as SkillEntry["skill"];
}
describe("buildWorkspaceSkillStatus", () => {

View File

@@ -1,3 +1,4 @@
import { createSyntheticSourceInfo } from "@mariozechner/pi-coding-agent";
import { describe, expect, it } from "vitest";
import { resolveSkillsPromptForRun } from "./skills.js";
import type { SkillEntry } from "./skills/types.js";
@@ -37,14 +38,12 @@ function createFixtureSkill(params: {
baseDir: string;
source: string;
}): SkillEntry["skill"] {
const skill = {
return {
name: params.name,
description: params.description,
filePath: params.filePath,
baseDir: params.baseDir,
source: params.source,
sourceInfo: { source: params.source },
sourceInfo: createSyntheticSourceInfo(params.filePath, { source: params.source }),
disableModelInvocation: false,
};
return skill as unknown as SkillEntry["skill"];
}

View File

@@ -1,5 +1,9 @@
import os from "node:os";
import { formatSkillsForPrompt, type Skill } from "@mariozechner/pi-coding-agent";
import {
createSyntheticSourceInfo,
formatSkillsForPrompt,
type Skill,
} from "@mariozechner/pi-coding-agent";
import { describe, expect, it } from "vitest";
import type { OpenClawConfig } from "../../config/config.js";
import type { SkillEntry } from "./types.js";
@@ -10,16 +14,14 @@ import {
} from "./workspace.js";
function makeSkill(name: string, desc = "A skill", filePath = `/skills/${name}/SKILL.md`): Skill {
const skill = {
return {
name,
description: desc,
filePath,
baseDir: `/skills/${name}`,
source: "workspace",
sourceInfo: { source: "workspace" },
sourceInfo: createSyntheticSourceInfo(filePath, { source: "workspace" }),
disableModelInvocation: false,
};
return skill as unknown as Skill;
}
function makeEntry(skill: Skill): SkillEntry {

View File

@@ -1,6 +1,7 @@
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";
@@ -91,14 +92,12 @@ function createFixtureSkill(params: {
baseDir: string;
source: string;
}): SkillEntry["skill"] {
const skill = {
return {
name: params.name,
description: params.description,
filePath: params.filePath,
baseDir: params.baseDir,
source: params.source,
sourceInfo: { source: params.source },
sourceInfo: createSyntheticSourceInfo(params.filePath, { source: params.source }),
disableModelInvocation: false,
};
return skill as unknown as SkillEntry["skill"];
}