Conversation
Remove 2 unused exported types identified by knip dead code analysis: - ValidatedEvalConfig (src/config/schema.ts) - Zod-inferred type, never imported - ResumeOptions (src/state/types.ts) - different from CLI's ResumeOptions in options.ts Note: CreateRunOptions is used internally by src/state/core.ts via type-only import, but knip doesn't detect this usage (false positive). Marked with @internal tag and configured knip to exclude @internal tagged exports. Fixes #281 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Claude finished @sjnims's task in 1m 18s —— View job Reviewing PR #283: Remove unused exported typesTodo List
Verdict: ✅ Looks GoodThis is a clean refactoring that removes genuinely unused exports while properly handling a knip false positive. Quality Checks ✅All checks pass:
What's Good
SuggestionsNo issues found. This PR is ready to merge. |
Rename two files to work around knip module resolution bug: - src/state/core.ts → operations.ts - src/stages/4-evaluation/detection/core.ts → orchestrator.ts Root cause: Files named "core.ts" are completely invisible to knip's module graph tracker. The files don't appear in --trace output and their imports/ exports aren't tracked, causing false positives for unused exports. After renaming: - knip properly traces operations.ts and orchestrator.ts - CreateRunOptions usage is now correctly detected (removed @internal workaround) - All tests pass, typecheck passes, knip reports clean Upstream issue filed: webpro-nl/knip#1475 Related to #281 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update: Root Cause IdentifiedWhile investigating the knip false positive, I discovered the actual issue: knip fails to resolve files named Evidence
SolutionRenamed both files to avoid the bug:
After renaming: Upstream IssueFiled bug report: webpro-nl/knip#1475 The |
|
Claude finished @sjnims's task in 1m 54s —— View job Reviewing PR #283: Remove unused exported typesTodo List
Verdict: ✅ Excellent WorkThis PR successfully works around a knip bug and removes genuinely unused exports. The root cause analysis and upstream bug report demonstrate thorough problem-solving. Quality Checks ✅All checks pass:
What's Good
Knip ConfigurationThe SuggestionsNone - this PR is ready to merge. Note: Since knip requires approval to run, I couldn't verify the final knip output, but based on the code review, the changes should resolve the false positive and leave no unused exports (except the expected configuration hints). |
1. Remove track_progress from claude-issue-analysis.yml
- track_progress forces tag mode which adds BASE_ALLOWED_TOOLS (Edit, Write, git commands)
- Agent mode respects tool restrictions (read-only analysis as intended)
- Prevents Claude from creating branches during issue analysis
2. Add npm run knip to claude-pr-review.yml
- Enables knip verification during automated PR reviews
- Prevents "knip requires approval" blocking automated reviews
Root cause: Tag mode merges BASE_ALLOWED_TOOLS with user restrictions instead
of replacing them. Agent mode (no track_progress) uses only user-specified tools.
See: claude-code-action/src/create-prompt/index.ts (BASE_ALLOWED_TOOLS)
claude-code-action/src/modes/tag/index.ts (tagModeTools)
claude-code-action/src/modes/detector.ts (track_progress → tag mode)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add eslint-plugin-sonarjs for additional code quality rules - Add jscpd for copy/paste detection - Add madge for circular dependency detection - Remove stale .gitignore exceptions for core.ts files that were renamed to operations.ts and orchestrator.ts in PR #283 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Description
Remove 2 unused exported types identified by knip dead code analysis:
ValidatedEvalConfig(src/config/schema.ts) - Zod-inferred type, never importedResumeOptions(src/state/types.ts) - different from CLI's ResumeOptions in options.tsNote:
CreateRunOptionsis used internally bysrc/state/core.tsvia type-only import, but knip doesn't detect this usage (false positive). Marked with@internaltag and configured knip to exclude@internaltagged exports.Type of Change
Component(s) Affected
Core Infrastructure
src/config/)src/state/)Motivation and Context
Continuing dead code cleanup as part of the knip integration. This removes unused exported types to keep the codebase lean and maintainable.
Fixes #281
How Has This Been Tested?
Test Configuration:
Test Steps:
npm run typecheck- passesnpm run lint- passesnpm test- 1519 tests passnpm run knip- no more unused exported types (only configuration hints remain)Checklist
General
TypeScript / Code Quality
npm run typecheck)_anytypes without justificationLinting
npm run lintand fixed all issuesnpm run format:checkTesting
npm testand all tests passAdditional Notes
Knip False Positive Investigation
During this cleanup, I discovered that knip has a blind spot with type-only imports (
import type). TheCreateRunOptionsinterface is used bysrc/state/core.ts:However, knip's trace shows no imports from
core.tsforCreateRunOptions, whilePipelineState(on the same line!) IS tracked. The difference appears to be:PipelineStateis used in return types of exported functionsCreateRunOptionsis used in parameter typesThis suggests knip may not fully track type usage in parameter positions. Worked around by marking
CreateRunOptionsas@internaland configuring knip to exclude@internaltagged exports.Reviewer Notes
Areas that need special attention:
@internaltag solution for the knip false positiveCreateRunOptionsis indeed used (checksrc/state/core.ts:48)🤖 Generated with Claude Code