import { readFileSync } from "node:fs"; function source(path) { return readFileSync(new URL(path, import.meta.url), "utf8"); } function assert(condition, message) { if (!condition) throw new Error(message); } const page = source("../src/features/organizations/OrganizationsPage.tsx"); const settings = source("../src/features/organizations/OrganizationsAdminPanel.tsx"); const patterns = source("../src/features/organizations/interfacePatterns.ts"); const moduleSource = source("../src/module.ts"); const translations = source("../src/i18n/generatedTranslations.ts"); assert(page.includes("DocumentationHelpLink") && settings.includes("DocumentationHelpLink"), "Workspace and tenant settings expose contextual documentation"); assert(page.includes("ActionBlockerHint") && settings.includes("ActionBlockerHint"), "Read-only states identify action, actor, and destination"); assert(page.includes("disabledReason") && settings.includes("disabledReason"), "Unavailable organization actions explain their state"); assert(page.includes(" void loadModel()") && settings.includes("requestDiscard(() => void load())"), "Reload uses the guarded semantic page action or the settings draft guard"); assert((page.match(/