Add skill governance and runtime routing
This commit is contained in:
1 parent
6f09408423
commit
41dcfcdef7
71 files changed
+7057
-102
No files matched your search
@@ -0,0 +1,22 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import {
|
||||
meetsTrustTier,
|
||||
normalizeTrustTier,
|
||||
promoteTrustTier,
|
||||
} from "./trust.js";
|
||||
|
||||
describe("trust tiers", () => {
|
||||
it("compares minimum trust tiers", () => {
|
||||
expect(meetsTrustTier("T2", "T2")).toBe(true);
|
||||
expect(meetsTrustTier("T1", "T2")).toBe(false);
|
||||
expect(meetsTrustTier("T4", "T2")).toBe(true);
|
||||
});
|
||||
|
||||
it("normalizes and promotes tiers monotonically", () => {
|
||||
expect(normalizeTrustTier("T3", "T1")).toBe("T3");
|
||||
expect(normalizeTrustTier("bad", "T1")).toBe("T1");
|
||||
expect(promoteTrustTier("T1", "T2")).toBe("T2");
|
||||
expect(promoteTrustTier("T3", "T2")).toBe("T3");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user