From 96523606f62a36fe74be19186f369bf7daec3e87 Mon Sep 17 00:00:00 2001 From: liuxiaocs7 Date: Wed, 26 Aug 2026 15:39:17 +0800 Subject: [PATCH] fix(build): derive Astryx surface inventory from @astryxdesign/core MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The file-level Astryx surface inventory could not see most of the design system. Its known-component set was a hand-maintained 47-name list while @astryxdesign/core ships ~190 components, so Timestamp, ChatMessage, Thumbnail and others were invisible — removing such a component from a file left its inventory row byte-identical and the coverage gate saw nothing. Severity also recognized only raw button/input/select, so a hand-rolled replacement for a shipped component scored aligned. Derive the component set by parsing the installed @astryxdesign/core declarations (hard error if the package is absent, so the artifact never silently regenerates with a partial set), add a reimplementation severity tier for a local component that shadows a shipped twin it does not import, and regenerate the committed inventory. Generated-by: Claude Opus 4.8 via Claude Code --- .github/workflows/ci.yml | 6 +- docs/astryx-alignment-inventory.md | 5 +- docs/astryx-surface-file-inventory.md | 170 +++---- package.json | 1 + scripts/ci-test-plan.test.mjs | 14 + scripts/generate-astryx-surface-inventory.mjs | 445 +++++++++++++----- ...generate-astryx-surface-inventory.test.mjs | 189 ++++++++ 7 files changed, 638 insertions(+), 192 deletions(-) create mode 100644 scripts/generate-astryx-surface-inventory.test.mjs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b73068e25b..909faf54a0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -131,7 +131,7 @@ jobs: fi - name: Install dependencies - if: steps.plan.outputs.code == 'true' || steps.plan.outputs.asf_source == 'true' || steps.plan.outputs.cli_package == 'true' || steps.plan.outputs.release_contract == 'true' + if: steps.plan.outputs.code == 'true' || steps.plan.outputs.astryx_surface == 'true' || steps.plan.outputs.asf_source == 'true' || steps.plan.outputs.cli_package == 'true' || steps.plan.outputs.release_contract == 'true' run: npm ci # The header audit above remains install-free. The complete source gate @@ -155,7 +155,9 @@ jobs: # directly instead of being hidden behind an earlier compilation failure. - name: Astryx surface inventory if: steps.plan.outputs.code == 'true' || steps.plan.outputs.astryx_surface == 'true' - run: npm run astryx:surface-inventory + run: | + npm run astryx:surface-inventory + npm run astryx:surface-inventory:test - name: Build if: steps.plan.outputs.code == 'true' || steps.plan.outputs.cli_package == 'true' || steps.plan.outputs.release_contract == 'true' diff --git a/docs/astryx-alignment-inventory.md b/docs/astryx-alignment-inventory.md index 6b291758ab..264191655b 100644 --- a/docs/astryx-alignment-inventory.md +++ b/docs/astryx-alignment-inventory.md @@ -23,7 +23,9 @@ Maps [Astryx wiki](https://github.com/facebook/astryx/wiki) conventions onto Maka product surfaces. Severity: **blocker** (raw control when an Astryx twin -exists / broken hierarchy) · **polish** (off-scale px, density). +exists / broken hierarchy) · **reimplementation** (a public `@maka/ui` export +shadows a shipped Astryx component — a review signal, not proof) · **polish** +(off-scale px, density). ## Wiki smell checklist (searchable) @@ -34,6 +36,7 @@ exists / broken hierarchy) · **polish** (off-scale px, density). | Design · radius | Nested radii not `outer − gap` | Role radii | | Design · elevation | Raw `box-shadow` / magic z-index | Elevation tokens | | API · Use the System | Raw `