perf(test): skip skills snapshot work in fast env

This commit is contained in:
Peter Steinberger
2026-02-14 20:07:47 +00:00
parent 9762e48134
commit e1220c48f5
2 changed files with 36 additions and 16 deletions

View File

@@ -127,6 +127,16 @@ export async function ensureSkillSnapshot(params: {
skillsSnapshot?: SessionEntry["skillsSnapshot"];
systemSent: boolean;
}> {
if (process.env.OPENCLAW_TEST_FAST === "1") {
// In fast unit-test runs we skip filesystem scanning, watchers, and session-store writes.
// Dedicated skills tests cover snapshot generation behavior.
return {
sessionEntry: params.sessionEntry,
skillsSnapshot: params.sessionEntry?.skillsSnapshot,
systemSent: params.sessionEntry?.systemSent ?? false,
};
}
const {
sessionEntry,
sessionStore,