Repository navigation
spec(AST-082): native build scripts may read core until the portable entry ships - #8048
Conversation
…e entry ships FR16 allows a native build script to read core's theme entries and component documentation at build time while core has no portable entry. The boundary check lists each read by name and refuses any other; no native runtime code or generated binding imports core.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report
The exact-head preview is not available yet. Generated by PR Enrichment workflow | View current CI run |
There was a problem hiding this comment.
Approval of this amendment waits on an engineering owner's decision: it changes spec:AST-082 FR16, a current requirement, and no engineering owner has approved this head yet. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request (the author may do so if they are an engineering owner); what must be settled is FR16's interim list of build-time reads of core and whether that list is complete. Independently of that decision, the record needs these fixes:
- The list leaves out core's built-in icon names, which
packages/native/scripts/core-docs.mjsalready reads from core's icon registry for the FR17 icon coverage test, so the amended FR16 would refuse that read; name it in the list (covering the native tests that read through the same loader) or remove the read. - DEC-7 still says native reads core only through the portable entry; point it at FR16's interim exception.
[Automated review]
| and native never imports core outside the portable entry. Until the portable | ||
| entry ships, a native build script may read core at build time through | ||
| `@astryxdesign/core/theme` and `@astryxdesign/core/theme/tokens`, and read | ||
| core's component documentation as data, to generate native code. The |
There was a problem hiding this comment.
This list leaves out a read main already makes: packages/native/scripts/core-docs.mjs (readCoreIconNames) reads core's src/Icon/globalIconRegistry.tsx, and the FR17 icon coverage test (packages/native/src/icons/defaults.test.ts) relies on it. Under the next sentence the boundary check would have to refuse that read. Either name core's built-in icon names here (and let the exception cover the native tests that read through the same loader), or remove the read.
|
/approve-spec e80747a BLOCKED |
…R16's interim reads
|
/approve-spec f7e7c76 |
|
/approve-spec 0c6f7b7 |
There was a problem hiding this comment.
This amendment is ready to land: an engineering owner approved the spec:AST-082 FR16 and DEC-7 changes at this exact head, and the interim list now names every build-time read of core that native makes on main and in the open native work. One optional wording tweak: FR16's verification row still lists an import of the web theme entry from native as refused beside the newly allowed theme-entry read, so writing "from native runtime code" there would remove the overlap.
[Automated review]
| | FR13 | Dependency manifest audit of each native platform package | platform SDK; first-party project; a React Native out-of-tree desktop platform; third-party optional integration; third-party fork | A third-party library or fork is required to install, build, or render on the platform | | ||
| | FR14 | Compiler and render output comparison, core dependency graph check, and a web type surface diff | each maintained theme with and without the native package installed; runtime-mounted and built CSS; components; web types before and after | Any byte of CSS, mounted rules, or rendered web markup differs, core depends on native, or a web prop disappears outside a planned minor | | ||
| | FR15 | Package metadata and release-channel checks | native package manifest; a stable release; a canary release | The native package is publishable as a stable release before a platform is supported | | ||
| | FR16 | Package-boundary check, plus a native fixture app installed and bundled without `react-dom` or StyleX | an import of the portable entry; an import of a core component or the web theme entry from native; a listed build-time read from a native build script; an unlisted one; a core import of native; a core contract change | Native resolves a DOM type, `react-dom`, StyleX, or a web module; either direction of the boundary is crossed, an unlisted build-time read passes; or a core contract change does not reach native contracts on the next build | |
There was a problem hiding this comment.
Optional wording: @astryxdesign/core/theme is core's theme entry, which this record says "includes the web theme compiler", so this row now both refuses "an import of a core component or the web theme entry from native" and allows it as "a listed build-time read from a native build script". FR16's split (a build script may read it; no native runtime code imports core) decides which applies; writing "from native runtime code" in the first state would remove the overlap.
Exact decision needed
Whether native build scripts may read core before core's portable entry exists.
Existing authority searched
spec:AST-082FR16 lets native read core only through a portable entry, which doesn't exist yet (Current-state impact).packages/native/specs/swift/library/) and the contract generator already read core at build time: the theme entries and the component documentation.Decision
@astryxdesign/core/themeand@astryxdesign/core/theme/tokens, and read core's component documentation as data, to generate native code.Rejected alternatives
Claim scope and non-goals
The portable entry's design (DEC-8) and the run-time boundary are unchanged.
Evidence and implementation relationship
Record only. The boundary check that enforces the list is a separate change.
Writing rubric results
Scope
Validation
Prettier-formatted with the repository config; spec validation runs in CI.