Answer stability round 1: 1 🔴, 2 🟡 (0 misread); empty a group once all its members are gone in a diamond, log the cascade, notice an emptied group

This commit is contained in:
2026-11-17 01:17:57 +01:00
parent 37e7227dea
commit f3500ff81d
6 changed files with 95 additions and 39 deletions
+2 -5
View File
@@ -23,12 +23,9 @@ test("plugin-api re-exports the stable author value surface", () => {
assert.equal(api.definePlugin({ apiVersion: "1.0.0" }).apiVersion, "1.0.0"); // identity helper works through the barrel
});
// A system plugin tells an Ory failure apart by `instanceof`; each client's error class must be the barrel's.
test("plugin-api re-exports the Ory error classes a ctx.system client throws", async () => {
// A plugin matches a Keto failure with `instanceof`, so the barrel must export the class `ctx.system.keto` throws.
test("plugin-api re-exports the KetoError class the Keto client throws", async () => {
const { KetoError } = await import("../auth/keto-client.ts");
assert.equal(api.KetoError, KetoError);
for (const name of ["KratosError", "HydraError", "KetoError"] as const) {
assert.equal(typeof api[name], "function", `missing export: ${name}`);
}
});