From ecd44945bc4b515db724289f14e599d83d9f1949 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Wed, 20 May 2026 11:18:29 +0100 Subject: [PATCH] Enforce canonical platform table alignment in pre-push audit Adds canonical-platform-table/no-legacy-align-helper to canonical-platform-audit.mjs: any platform table file that calls the legacy `getPlatformTableHeadClass()` or `getPlatformTableCellClass()` helper now fails the audit (which runs in the pre-push hook). Authors are pointed at the kind-based wrappers and the canonical column-kind file. Two intentional allowlist entries: - sharedPlatformPage.tsx: the kind-based wrappers internally delegate to the align-based helpers; that's the one legitimate call site. - KubernetesClustersTable.tsx: another agent has this file mid-staged in their working tree. Removing this entry is part of that file's migration commit (drop the entry whenever the file moves to the *ForKind wrappers). To support per-rule exemptions cleanly, the audit's inner loop now honours an optional `allowFiles: Set` on each HELPER_RULE entry. Existing rules are unchanged; only the new rule uses it. The platformOverviewLayout.guardrails.test.ts assertions are updated to match the kind-based forms (regex match on the new getPlatformTableHeadClassForKind('') ...