authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-09-08 01:21:08-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-08 01:21:08-07:00
log7d620506a1fecf07aa2d623e72059d551709ae3a
tree7e797720b38c528b7512911f51bf3da20e456339
parentb28471567cebe20347205059bbbdb3efe1213528
signature Signed by PGP key B5690EEEBB952194

ci(knip): enforce server exports (#10282)


2 files changed, 4 insertions(+), 3 deletions(-)

docs/operations/development.md+3-2
...@@ -74,11 +74,12 @@ Windows investigation while that suite is not a required gate....@@ -74,11 +74,12 @@ Windows investigation while that suite is not a required gate.
74### Unused code74### Unused code
7575
76`vp run knip:check` checks unused files and dependencies across the repo, then76`vp run knip:check` checks unused files and dependencies across the repo, then
77unused runtime exports in `apps/desktop`, `apps/web`, and every internal package under77unused runtime exports in `apps/server`, `apps/desktop`, `apps/web`, and every internal package under
78`packages/`. CI enforces both checks.78`packages/`. CI enforces both checks.
79Exported types and Effect schemas are allowed without consumers. The schema preprocessor79Exported types and Effect schemas are allowed without consumers. The schema preprocessor
80recognizes schema types, including aliases and schema classes; functions that create or decode80recognizes schema types, including aliases and schema classes; functions that create or decode
81schemas remain checked. Completely unused files remain checked too.81schemas remain checked. Canonical Effect service construction APIs stay exported with an explicit
82`@public` annotation, which Knip recognizes. Completely unused files remain checked too.
82Named exports in web UI component modules are kept as complete component sets. Knip ignores83Named exports in web UI component modules are kept as complete component sets. Knip ignores
83unused exports in `apps/web/src/components/ui/*.tsx`, while still reporting an entire unused file.84unused exports in `apps/web/src/components/ui/*.tsx`, while still reporting an entire unused file.
84Use `vp run knip --workspace apps/web` to audit one workspace, including exports,85Use `vp run knip --workspace apps/web` to audit one workspace, including exports,
package.json+1-1
...@@ -27,7 +27,7 @@...@@ -27,7 +27,7 @@
27 "tc": "vp run -r --concurrency-limit 2 typecheck",27 "tc": "vp run -r --concurrency-limit 2 typecheck",
28 "lint": "vp lint --report-unused-disable-directives",28 "lint": "vp lint --report-unused-disable-directives",
29 "knip": "knip --preprocessor ./scripts/knip-schemas.ts",29 "knip": "knip --preprocessor ./scripts/knip-schemas.ts",
30 "knip:check": "knip --include files,dependencies --no-config-hints && knip --workspace apps/desktop --workspace apps/web --workspace packages/client-runtime --workspace packages/contracts --workspace packages/effect-acp --workspace packages/effect-codex-app-server --workspace packages/shared --workspace packages/ssh --workspace packages/tailscale --exports --preprocessor ./scripts/knip-schemas.ts --no-config-hints",30 "knip:check": "knip --include files,dependencies --no-config-hints && knip --workspace apps/server --workspace apps/desktop --workspace apps/web --workspace packages/client-runtime --workspace packages/contracts --workspace packages/effect-acp --workspace packages/effect-codex-app-server --workspace packages/shared --workspace packages/ssh --workspace packages/tailscale --exports --preprocessor ./scripts/knip-schemas.ts --no-config-hints",
31 "knip:production": "knip --production --preprocessor ./scripts/knip-schemas.ts",31 "knip:production": "knip --production --preprocessor ./scripts/knip-schemas.ts",
32 "lint:mobile": "node scripts/mobile-native-static-check.ts",32 "lint:mobile": "node scripts/mobile-native-static-check.ts",
33 "test": "vp run -r test",33 "test": "vp run -r test",