Skip to content

feat(jobnik-manager): gate pull requests on an unused-code report - #13

Open
CptSchnitz wants to merge 2 commits into
migration/10-sdk-publishfrom
migration/11-knip
Open

feat(jobnik-manager): gate pull requests on an unused-code report#13
CptSchnitz wants to merge 2 commits into
migration/10-sdk-publishfrom
migration/11-knip

Conversation

@CptSchnitz

Copy link
Copy Markdown
Collaborator

Wire knip into the single turbo entry point as a root-scoped //#knip
task and add it to the pull_request checks matrix, so unused files,
exports and dependencies are reported across every workspace on every
pull request.

Declare the known-legitimate exceptions specifically in knip.json
rather than suppressing checks wholesale: the manager's
--import-only tracing bootstrap as an entry point, the Prisma and
OpenAPI-error generated output as ignored paths, the SDK's vitest
type-test files as an entry point, and the handful of dependencies
that are real but invisible to static analysis (a bare-string prettier
config, transitive @types/* needed only for .d.ts resolution, and
e2e's deliberate jobnik-manager dependency that gives turbo's
affected-graph an edge docker can't see).

Everything left over after those exceptions was genuine dead weight,
so it's removed: an unused IConfig interface, a stale pre-vitest jest
config, several unexported-but-still-declared types and helpers,
unused OpenTelemetry semantic-convention constants, a dangling typedoc
config with no invoking script, and a batch of unused dependencies
(date-fns and yaml from the SDK, @types/config and
jest-create-mock-instance from the manager, pretty-quick from both,
since only the root's own copy is ever invoked).

Also declares the previously-unlisted @commitlint/types dependency
that commitlint.config.js has relied on implicitly.

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com


Stack created with GitHub Stacks CLIGive Feedback 💬

Wire knip into the single turbo entry point as a root-scoped `//#knip`
task and add it to the pull_request checks matrix, so unused files,
exports and dependencies are reported across every workspace on every
pull request.

Declare the known-legitimate exceptions specifically in knip.json
rather than suppressing checks wholesale: the manager's
`--import`-only tracing bootstrap as an entry point, the Prisma and
OpenAPI-error generated output as ignored paths, the SDK's vitest
type-test files as an entry point, and the handful of dependencies
that are real but invisible to static analysis (a bare-string prettier
config, transitive `@types/*` needed only for .d.ts resolution, and
e2e's deliberate `jobnik-manager` dependency that gives turbo's
affected-graph an edge docker can't see).

Everything left over after those exceptions was genuine dead weight,
so it's removed: an unused IConfig interface, a stale pre-vitest jest
config, several unexported-but-still-declared types and helpers,
unused OpenTelemetry semantic-convention constants, a dangling typedoc
config with no invoking script, and a batch of unused dependencies
(date-fns and yaml from the SDK, @types/config and
jest-create-mock-instance from the manager, pretty-quick from both,
since only the root's own copy is ever invoked).

Also declares the previously-unlisted @commitlint/types dependency
that commitlint.config.js has relied on implicitly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown

Coverage Report for apps/jobnik-manager

Status Category Percentage Covered / Total
🟢 Lines 100% (🎯 80%) 750 / 750
🟢 Statements 100% (🎯 80%) 767 / 767
🟢 Functions 100% (🎯 80%) 112 / 112
🟢 Branches 100% (🎯 80%) 219 / 219
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
apps/jobnik-manager/src/common/errors.ts 100% 100% 100% 100%
apps/jobnik-manager/src/common/semconv.ts 100% 100% 100% 100%
apps/jobnik-manager/src/common/utils/pagination.ts 100% 100% 100% 100%
apps/jobnik-manager/src/common/utils/tracingHelpers.ts 100% 100% 100% 100%
apps/jobnik-manager/src/stages/models/helper.ts 100% 100% 100% 100%
apps/jobnik-manager/src/tasks/models/taskStateMachine.ts 100% 100% 100% 100%
Generated in workflow #15 for commit efb7309 by the Vitest Coverage Report Action

… alias

knip ignores src/db/prisma/generated/** for unused-export scanning, so it
never parses the generated client file and can't resolve the @prismaClient
path alias to it. It falls back to treating the alias as an unlisted npm
dependency. Normalize errors.ts to use the @prismaClient alias like the
rest of the codebase, and add it to ignoreDependencies.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant