test: stabilize codex harness probes

This commit is contained in:
Peter Steinberger
2026-04-23 17:04:36 +01:00
parent 802646e004
commit feecc53b6b
5 changed files with 76 additions and 18 deletions

View File

@@ -72,18 +72,15 @@
},
"approvalPolicy": {
"type": "string",
"enum": ["never", "on-request", "on-failure", "untrusted"],
"default": "never"
"enum": ["never", "on-request", "on-failure", "untrusted"]
},
"sandbox": {
"type": "string",
"enum": ["read-only", "workspace-write", "danger-full-access"],
"default": "danger-full-access"
"enum": ["read-only", "workspace-write", "danger-full-access"]
},
"approvalsReviewer": {
"type": "string",
"enum": ["user", "guardian_subagent"],
"default": "user"
"enum": ["user", "guardian_subagent"]
},
"serviceTier": { "type": ["string", "null"], "enum": ["fast", "flex", null] }
}

View File

@@ -214,4 +214,23 @@ describe("Codex app-server config", () => {
expect(manifest.uiHints[`appServer.${key}`]).toBeTruthy();
}
});
it("does not schema-default mode-derived policy fields", async () => {
const manifest = JSON.parse(
await fs.readFile(new URL("../../openclaw.plugin.json", import.meta.url), "utf8"),
) as {
configSchema: {
properties: {
appServer: {
properties: Record<string, { default?: unknown }>;
};
};
};
};
const appServerProperties = manifest.configSchema.properties.appServer.properties;
expect(appServerProperties.approvalPolicy?.default).toBeUndefined();
expect(appServerProperties.sandbox?.default).toBeUndefined();
expect(appServerProperties.approvalsReviewer?.default).toBeUndefined();
});
});