import { readFile } from "node:fs/promises"; import { describe, expect, it } from "vitest"; describe("Go usage core compatibility fixture", () => { it("freezes Shanghai boundaries, exclusions, dedupe, scope, and redaction", async () => { const fixture = JSON.parse(await readFile("contracts/usage/core-v1.json", "utf8")); expect(fixture).toEqual({ version: 1, timeZone: "Asia/Shanghai", excluded: { sources: ["api"], providers: ["mock"] }, dedupeKey: "jobId", scopes: { personal: "accountId", organization_admin: "organizationId", super_admin: "all" }, organizationAdminRedaction: ["accountUsername"] }); }); });