Skip to content

Commit 7d62050

Browse files
ci(knip): enforce server exports (#10282)
1 parent b284715 commit 7d62050

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎docs/operations/development.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,12 @@ Windows investigation while that suite is not a required gate.
7474
### Unused code
7575

7676
`vp run knip:check` checks unused files and dependencies across the repo, then
77-
unused runtime exports in `apps/desktop`, `apps/web`, and every internal package under
77+
unused runtime exports in `apps/server`, `apps/desktop`, `apps/web`, and every internal package under
7878
`packages/`. CI enforces both checks.
7979
Exported types and Effect schemas are allowed without consumers. The schema preprocessor
8080
recognizes schema types, including aliases and schema classes; functions that create or decode
81-
schemas remain checked. Completely unused files remain checked too.
81+
schemas remain checked. Canonical Effect service construction APIs stay exported with an explicit
82+
`@public` annotation, which Knip recognizes. Completely unused files remain checked too.
8283
Named exports in web UI component modules are kept as complete component sets. Knip ignores
8384
unused exports in `apps/web/src/components/ui/*.tsx`, while still reporting an entire unused file.
8485
Use `vp run knip --workspace apps/web` to audit one workspace, including exports,

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"tc": "vp run -r --concurrency-limit 2 typecheck",
2828
"lint": "vp lint --report-unused-disable-directives",
2929
"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",
3131
"knip:production": "knip --production --preprocessor ./scripts/knip-schemas.ts",
3232
"lint:mobile": "node scripts/mobile-native-static-check.ts",
3333
"test": "vp run -r test",

0 commit comments

Comments
 (0)