An open source design system that's fully customizable and agent ready
TypeScript
ci: skip component checks for internal scripts (#6337)
nynexman4464fc74d7eacc81
diff --git a/.github/scripts/change-scope.cjs b/.github/scripts/change-scope.cjsindex aae444175c..230b1c756a 100644--- a/.github/scripts/change-scope.cjs+++ b/.github/scripts/change-scope.cjs@@ -58,6 +58,7 @@ const THEME_BUILD_PATTERNS = [const NODE_TOOLING_PATHS = new Set(['scripts/score-ledger.mjs','scripts/score-ledger.test.mjs',+ '.github/workflows/crowdin-upload.yml',]);const THEME_DOC_CANDIDATE = /^docs\/themes\/(?!README\.md$)[^/]+\.md$/;@@ -103,7 +104,9 @@ function isKnowledgeRecordPath(filePath) {}function isNodeToolingPath(filePath) {- return NODE_TOOLING_PATHS.has(filePath);+ return (+ NODE_TOOLING_PATHS.has(filePath) || filePath.startsWith('internal/scripts/')+ );}function surfacesForPath(filePath) {diff --git a/.github/scripts/change-scope.test.mjs b/.github/scripts/change-scope.test.mjsindex 2af21d885d..19e502299e 100644--- a/.github/scripts/change-scope.test.mjs+++ b/.github/scripts/change-scope.test.mjs@@ -193,6 +193,20 @@ describe('positive CI surfaces', () => {expect(result.surfaces).toEqual([SURFACES.NODE_TOOLING]);});+ it('admits internal scripts and their upload workflow', () => {+ const result = classifyChanges([+ {filename: '.github/workflows/crowdin-upload.yml'},+ {filename: 'internal/scripts/lib/a-future-strategy.mjs'},+ ]);+ expect(result.toolingOnly).toBe(true);+ });++ it('keeps root scripts on broad CI', () => {+ expect(+ classifyChanges([{filename: 'scripts/build-css.mjs'}]).toolingOnly,+ ).toBe(false);+ });+it('keeps pure specification records in the knowledge singleton', () => {const result = classifyChanges([{filename: 'packages/core/src/Button/Button.spec.md'},diff --git a/.github/scripts/component-audit-scope.cjs b/.github/scripts/component-audit-scope.cjsindex 1a5a381d0d..51f60cd167 100644--- a/.github/scripts/component-audit-scope.cjs+++ b/.github/scripts/component-audit-scope.cjs@@ -42,7 +42,9 @@ function classifyComponentAuditScope(paths, componentPackages) {const isKnownNonComponentSurface = file =>file.startsWith('.changeset/') ||file.startsWith('apps/sandbox/') ||- file.startsWith('packages/cli/');+ file.startsWith('packages/cli/') ||+ file.startsWith('internal/scripts/') ||+ file === '.github/workflows/crowdin-upload.yml';const isSharedRoutingPolicy = file =>file === 'apps/storybook/rtl-audit/rtl-audit-coverage.mjs' ||file === 'apps/storybook/rtl-audit/targets.json' ||diff --git a/.github/scripts/component-audit-scope.test.mjs b/.github/scripts/component-audit-scope.test.mjsindex 1216ed9f33..873b471cff 100644--- a/.github/scripts/component-audit-scope.test.mjs+++ b/.github/scripts/component-audit-scope.test.mjs@@ -89,6 +89,24 @@ describe('component audit scope', () => {);});+ it('skips component audits for internal scripts and their upload workflow', () => {+ expect(+ classifyComponentAuditScope(+ [+ '.github/workflows/crowdin-upload.yml',+ 'internal/scripts/lib/a-future-strategy.mjs',+ ],+ COMPONENT_PACKAGES,+ ),+ ).toEqual(NO_COMPONENT_AUDIT_SCOPE);+ });++ it('keeps root scripts on full component audits', () => {+ expect(+ classifyComponentAuditScope(['scripts/build-css.mjs'], COMPONENT_PACKAGES),+ ).toEqual(FULL_AUDIT_SCOPE);+ });+it('still audits a component changed beside a known non-component surface', () => {expect(classifyComponentAuditScope(diff --git a/docs/specs/AST-030/spec.md b/docs/specs/AST-030/spec.mdindex e413c49c19..f82bb299a5 100644--- a/docs/specs/AST-030/spec.md+++ b/docs/specs/AST-030/spec.md@@ -64,7 +64,7 @@ they are separately named.| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- || `knowledge` | canonical system, family, design, theme, component, and module records | knowledge validation and exact-head spec-owner approval || `docsite` | the docsite application | docsite generation and tests |- | `node-tooling` | individually admitted operational Node programs and their tests whose consumers are covered by Node contract tests | Node Vitest, repository guardrails, and ESLint |+ | `node-tooling` | admitted operational Node tooling whose consumers are covered by Node contract tests | Node Vitest, repository guardrails, and ESLint || `runtime:<package>` | public source and package contract for Core, Lab, Charts, Rich Text, Vega, CLI, and Build | the package's unit/type checks plus current broad build and downstream consumer checks; Build's owner includes production CSS-layer browser behavior || `theme-build` | shipped theme packages and theme compilation outputs | theme tests, theme package builds, theme-family browser behavior, and stable visual evidence where applicable || `storybook-visual` | Storybook stories/configuration and visual, accessibility, or RTL audit infrastructure | Storybook build, preview/visual-acceptance publication, and the applicable browser, visual, accessibility, and RTL checks |@@ -78,8 +78,9 @@ they are separately named.- **FR3 — Classification uses trusted base policy.** Pull-request code MUST NOTchoose its own lane. The workflow MUST load the classifier and every classifierdependency from the trusted base ref, then apply that policy to the merge-base- three-dot path set. Workflow, classifier, classifier-dependency, and routing-test- changes therefore use the broad lane.+ three-dot path set. Workflow changes use the broad lane unless they are an+ admitted tool's non-PR dispatch workflow. Classifier,+ classifier-dependency, and routing-test changes use the broad lane.- **FR4 — Uncertainty fails closed.** A missing merge base, missing trustedclassifier dependency, failed classifier, empty or incomplete file list,ambiguous rename, unknown path, or merge-group event without a trusted PR path@@ -94,15 +95,18 @@ they are separately named.`node-tooling` only when dependency analysis proves that package runtime,component UI, theme/build output, Storybook/visual evidence, and browserbehavior are not changed directly, and every operational consumer has a Node- contract test. Directory-wide or extension-wide admission is prohibited.+ contract test. Directory-wide admission is allowed only for a directory+ dedicated to non-shipped tooling; other directory- or extension-wide+ admission is prohibited.- **FR7 — Required check names remain stable.** `test`, `build`, `docsite-test`,and `lint` MUST continue to report on every pull request through their existingjobs or join jobs. A specialized lane skips owned steps inside those jobs; itdoes not remove historical required contexts. Any owned lane failure MUST failits join.-- **FR8 — The first implementation is one tooling slice.** The first- `node-tooling` admission covers only `scripts/score-ledger.mjs` and- `scripts/score-ledger.test.mjs`. It runs the Node project and the required lint+- **FR8 — Initial tooling admissions.** `node-tooling` covers+ `scripts/score-ledger.mjs`, `scripts/score-ledger.test.mjs`,+ `internal/scripts/`, and `.github/workflows/crowdin-upload.yml`. It runs the+ Node project and the required lintworkflow, including repository guardrails. It skips the UI Vitest project,component analysis, docsite generation, production package, Storybook andSandbox builds, preview/visual-acceptance publication, and browser/theme/visual/