Add Repomix release smoke

This commit is contained in:
2026-06-26 23:31:50 -07:00
parent 8da552bea1
commit c11ecfdd51
2 changed files with 46 additions and 1 deletions

View File

@@ -18,6 +18,7 @@ PY
release_id="release-$$" release_id="release-$$"
export CONTEXT_KIT_COMPOSE_PROJECT="context-kit-${release_id}" export CONTEXT_KIT_COMPOSE_PROJECT="context-kit-${release_id}"
export CONTEXT_KIT_DATA_DIR="${tmp_dir}/data" export CONTEXT_KIT_DATA_DIR="${tmp_dir}/data"
export CONTEXT_KIT_PROJECT_DIR="${ROOT}"
export CONTEXT_KIT_SEARXNG_PORT="$(pick_port)" export CONTEXT_KIT_SEARXNG_PORT="$(pick_port)"
export CONTEXT_KIT_DOCS_PORT="$(pick_port)" export CONTEXT_KIT_DOCS_PORT="$(pick_port)"
export CONTEXT_KIT_DOCS_SOURCES="config/sources.default.txt" export CONTEXT_KIT_DOCS_SOURCES="config/sources.default.txt"
@@ -90,13 +91,26 @@ git ls-files --cached --error-unmatch \
scripts/mcp-smoke-client.mjs \ scripts/mcp-smoke-client.mjs \
scripts/smoke-web-search.mjs \ scripts/smoke-web-search.mjs \
scripts/smoke-docs.mjs \ scripts/smoke-docs.mjs \
scripts/smoke-repomix.mjs \
scripts/release-check >/dev/null scripts/release-check >/dev/null
bash -n bin/context-kit bash -n bin/context-kit
bash -n scripts/release-check bash -n scripts/release-check
sh -n docker/docs/entrypoint.sh sh -n docker/docs/entrypoint.sh
check_node docker/web-search/patch-mcp-web-search.mjs docker/web-search/overrides/bing.js scripts/mcp-smoke-client.mjs scripts/smoke-web-search.mjs scripts/smoke-docs.mjs check_node docker/web-search/patch-mcp-web-search.mjs docker/web-search/overrides/bing.js scripts/mcp-smoke-client.mjs scripts/smoke-web-search.mjs scripts/smoke-docs.mjs scripts/smoke-repomix.mjs
node -e 'const fs=require("node:fs"); JSON.parse(fs.readFileSync("snippets/opencode.json", "utf8")); JSON.parse(fs.readFileSync("snippets/claude.mcp.json", "utf8"));' node -e 'const fs=require("node:fs"); JSON.parse(fs.readFileSync("snippets/opencode.json", "utf8")); JSON.parse(fs.readFileSync("snippets/claude.mcp.json", "utf8"));'
CONTEXT_KIT_DOCS_HTTP_URL="http://127.0.0.1:8776/mcp" bin/context-kit install opencode > "${tmp_dir}/opencode-default.json"
cmp -s snippets/opencode.json "${tmp_dir}/opencode-default.json" || {
printf 'snippets/opencode.json differs from bin/context-kit install opencode output\n' >&2
diff -u snippets/opencode.json "${tmp_dir}/opencode-default.json" >&2 || true
exit 1
}
CONTEXT_KIT_DOCS_HTTP_URL="http://127.0.0.1:8776/mcp" bin/context-kit install claude > "${tmp_dir}/claude-default.json"
cmp -s snippets/claude.mcp.json "${tmp_dir}/claude-default.json" || {
printf 'snippets/claude.mcp.json differs from bin/context-kit install claude output\n' >&2
diff -u snippets/claude.mcp.json "${tmp_dir}/claude-default.json" >&2 || true
exit 1
}
bin/context-kit install opencode > "${tmp_dir}/opencode.json" bin/context-kit install opencode > "${tmp_dir}/opencode.json"
bin/context-kit install opencode --absolute > "${tmp_dir}/opencode-absolute.json" bin/context-kit install opencode --absolute > "${tmp_dir}/opencode-absolute.json"
bin/context-kit install claude > "${tmp_dir}/claude.json" bin/context-kit install claude > "${tmp_dir}/claude.json"
@@ -122,5 +136,6 @@ bin/context-kit restart
bin/context-kit doctor bin/context-kit doctor
node scripts/smoke-web-search.mjs bin/context-kit web-search node scripts/smoke-web-search.mjs bin/context-kit web-search
node scripts/smoke-docs.mjs bin/context-kit docs node scripts/smoke-docs.mjs bin/context-kit docs
node scripts/smoke-repomix.mjs bin/context-kit repomix
printf 'pass release-check\n' printf 'pass release-check\n'

30
scripts/smoke-repomix.mjs Normal file
View File

@@ -0,0 +1,30 @@
import { requireToolSuccess, runSmoke, textFrom } from "./mcp-smoke-client.mjs";
runSmoke({
usage: "usage: node scripts/smoke-repomix.mjs <command> [args...]",
tmpPrefix: "context-kit-repomix-smoke-",
timeoutMs: 120000,
clientInfo: { name: "context-kit-repomix-smoke", version: "0.0.0" },
scenario: async client => {
const toolNames = await client.requireTools(["pack_codebase"]);
const pack = requireToolSuccess("pack_codebase", await client.callTool("pack_codebase", {
directory: process.cwd(),
compress: true,
includePatterns: "README.md,snippets/opencode.json",
ignorePatterns: "",
topFilesLength: 2,
style: "xml"
}));
const packText = textFrom(pack) || JSON.stringify(pack);
if (!packText.includes("Successfully packed codebase") && !packText.includes("outputId")) {
throw new Error(`pack_codebase returned unexpected payload: ${packText.slice(0, 500)}`);
}
return {
tools: Array.from(toolNames).sort(),
pack_codebase: "pass"
};
}
});