Skip to content

refactor(server): clean unused imports/mocks in specs, drop needless any casts - #261

Merged
buzz-code merged 1 commit into
mainfrom
claude/refactor-debt-2026-11-07
Nov 8, 2026
Merged

buzz-code merged 1 commit into
mainfrom
claude/refactor-debt-2026-11-07

Conversation

@buzz-code

Copy link
Copy Markdown
Owner

Scope

Small, behavior-preserving cleanup in server/ only. No endpoint, client or submodule changes. No roadmap entry (internal only).

  • Specs: removed unused imports (BaseEntityModule, DataSource, TypeOrmModule, getDataSourceToken, Test, teacherReportFile, BulkToPdfReportGenerator, Repository), unused shadowed mockRepository declaration, and dead global.MockBaseEntityModule export + unused local in entities.module.spec.ts.
  • student-by-year.config.ts, student-percent-report.config.ts: replaced (data[0] as any).headers = X with Object.assign(data[0], { headers: X }) (same runtime effect, no any).

Checked, left alone

  • tsc --noUnusedLocals is clean for non-test, non-migration src. Migrations untouched.
  • No commented-out code found.
  • Remaining any in doAction(req, body) overrides must match the signature in server/shared (separate repo), so unchanged.
  • Duplicated doAction switch blocks differ too much to extract a helper safely. No new utilities added.

Tests

cd server && npx jest: 130 suites, 1276 tests passed. Client untouched, client tests not run.

Notes

Ops tracking: buzz-code/ops not accessible from this session, so no issue was linked.


Generated by Claude Code

… any casts

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012GTicrQTzEeoiZ5N4vLecC
@buzz-code
buzz-code merged commit 7915eb8 into main Nov 8, 2026
4 checks passed
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.

2 participants