test(ci): [CI-TYPES-02] gate installed types across all libraries

This commit is contained in:
Harvey Zhao committed 2026-09-15 20:15:58 +08:00
1 parent 00c131bff1
commit 01f3d00e4c
17 files changed
+974 -8

No files matched your search

+38
View File
@@ -33,3 +33,41 @@ Maintain the module with `yarn typecheck:docs-tools`, `yarn lint`, and
`node --test test/installed-types.test.js` (also included in `yarn test:node`).
The tests compile a real isolated package and reject a missing declaration,
`any` widening, and a package link outside the consumer.
## Complete ecosystem gate
`yarn test:ecosystem-types` rebuilds public declarations, all package bundles and
core languages, then runs the four-package shared consumer plus all 17 specialized
package type commands sequentially. `ecosystem.ts` validates that this explicit
roster covers every library exactly once; the VitePress site retains its separate
site/editor checks. A new library or missing command fails instead of silently
reducing scope. Existing historical diagnostics, conditional exports and accurate
runtime entry fixtures remain owned by their specialized checkers.
Preparation failure stops before any installed validation, avoiding stale bundle
acceptance. A package failure records its actual exit code and continues through
the remaining packages, then fails the aggregate command. Each child writes stdout
and stderr to a dedicated file; after each child, the report records duration,
exit code or launch error, log fingerprint and package ownership. Results live in
`refactor/.cache/ecosystem-types/run-*/`. Specialized checkers keep their own detailed
reports and fingerprints under `refactor/.cache/*-package-types-*/`.
This command intentionally regenerates tracked distribution files using the
normal build commands. Review any real output drift before committing; formatting
normalization alone is not a runtime change. Do not run another source edit/build
concurrently. Checks run one at a time to avoid competing installs and excessive
compiler memory. The CI consumer job runs this gate after its existing runtime,
framework, history and performance checks on each OS, with the canonical Node
restored. CI retains the aggregate directory and detailed JSON/log artifacts on
failure. The existing job timeout remains in force.
The shared four-package check updates `refactor/.cache/packages/latest.json`.
That is why CI runs this gate after the existing runtime/browser consumers, which
already selected their own map. Before a later full installed browser run, prepare
its twenty-package map again with `yarn test:package --browser`; never pass the
four-package type preparation off as the complete browser artifact roster.
Successful completion means every selected checker met its documented type
contract, including exact expected historical failures. It does not approve the
pending Thumbnail runtime compatibility choice or replace media/device/SDK tests,
release reviews, or actual remote CI evidence.