fix: unblock landing checks (#73235) (thanks @zqchris)

This commit is contained in:
Peter Steinberger
2026-04-28 20:58:42 +01:00
parent 18990f4fea
commit 7cefdd956a
2 changed files with 42 additions and 28 deletions

View File

@@ -77,14 +77,16 @@ export async function resolveBareSessionResetPromptState(params: {
? params.hasBootstrapFileAccess()
: (params.hasBootstrapFileAccess ?? true)
: true;
const bootstrapMode = resolveBootstrapMode({
bootstrapPending,
runKind: "default",
isInteractiveUserFacing: true,
isPrimaryRun: params.isPrimaryRun ?? true,
isCanonicalWorkspace: params.isCanonicalWorkspace ?? true,
hasBootstrapFileAccess,
});
const bootstrapMode = !hasBootstrapFileAccess
? "none"
: resolveBootstrapMode({
bootstrapPending,
runKind: "default",
isInteractiveUserFacing: true,
isPrimaryRun: params.isPrimaryRun ?? true,
isCanonicalWorkspace: params.isCanonicalWorkspace ?? true,
hasBootstrapFileAccess,
});
return {
bootstrapMode,
prompt: buildBareSessionResetPrompt(params.cfg, params.nowMs, bootstrapMode),

View File

@@ -2785,7 +2785,7 @@ module.exports = {
{
label: "loads plugins from config paths",
run: () => {
process.env.OPENCLAW_BUNDLED_PLUGINS_DIR = "/nonexistent/bundled/plugins";
useNoBundledPlugins();
const plugin = writePlugin({
id: "allowed-config-path",
filename: "allowed-config-path.cjs",
@@ -4373,7 +4373,7 @@ module.exports = { id: "throws-after-import", register() {} };`,
});
it("re-initializes global hook runner when serving registry from cache", () => {
process.env.OPENCLAW_BUNDLED_PLUGINS_DIR = "/nonexistent/bundled/plugins";
useNoBundledPlugins();
const plugin = writePlugin({
id: "cache-hook-runner",
filename: "cache-hook-runner.cjs",
@@ -6604,7 +6604,6 @@ module.exports = {
{
label: "enforces memory slot selection",
loadRegistry: () => {
process.env.OPENCLAW_BUNDLED_PLUGINS_DIR = "/nonexistent/bundled/plugins";
const memoryA = writePlugin({
id: "memory-a",
body: memoryPluginBody("memory-a"),
@@ -6614,15 +6613,22 @@ module.exports = {
body: memoryPluginBody("memory-b"),
});
return loadOpenClawPlugins({
cache: false,
config: {
plugins: {
load: { paths: [memoryA.file, memoryB.file] },
slots: { memory: "memory-b" },
},
return withEnv(
{
OPENCLAW_DISABLE_BUNDLED_PLUGINS: "1",
OPENCLAW_BUNDLED_PLUGINS_DIR: undefined,
},
});
() =>
loadOpenClawPlugins({
cache: false,
config: {
plugins: {
load: { paths: [memoryA.file, memoryB.file] },
slots: { memory: "memory-b" },
},
},
}),
);
},
assert: (registry: ReturnType<typeof loadOpenClawPlugins>) => {
const a = registry.plugins.find((entry) => entry.id === "memory-a");
@@ -6871,21 +6877,27 @@ module.exports = {
{
label: "disables memory plugins when slot is none",
loadRegistry: () => {
process.env.OPENCLAW_BUNDLED_PLUGINS_DIR = "/nonexistent/bundled/plugins";
const memory = writePlugin({
id: "memory-off",
body: memoryPluginBody("memory-off"),
});
return loadOpenClawPlugins({
cache: false,
config: {
plugins: {
load: { paths: [memory.file] },
slots: { memory: "none" },
},
return withEnv(
{
OPENCLAW_DISABLE_BUNDLED_PLUGINS: "1",
OPENCLAW_BUNDLED_PLUGINS_DIR: undefined,
},
});
() =>
loadOpenClawPlugins({
cache: false,
config: {
plugins: {
load: { paths: [memory.file] },
slots: { memory: "none" },
},
},
}),
);
},
assert: (registry: ReturnType<typeof loadOpenClawPlugins>) => {
const entry = registry.plugins.find((item) => item.id === "memory-off");