Skip to content

CI failures: TS6133 unused imports + stale stats test dates — fix ready but blocked by orphan main branch #27

@erudenko

Description

@erudenko

Summary

Eight CI runs have been failing since early April 2026 due to two root causes. The fix is fully implemented in branch fix/ci-typescript-and-stats-dates, but a structural branching issue blocks the normal PR-to-main workflow.


Failing CI runs

Run ID Workflow Branch Date Failure step
24065489776 Test Plugins main 2026-04-07 Run type check
24063290384 Test Plugins main 2026-04-07 Run type check
24040412328 Test Plugins fix/ci-type-errors-and-stale-test-date 2026-04-06 Run type check
24040412326 Test Stats Plugin fix/ci-type-errors-and-stale-test-date 2026-04-06 Run unit and integration tests
24029941408 Test Plugins main 2026-04-06 Run type check
24029941414 Test Stats Plugin main 2026-04-06 Run unit and integration tests
24029844275 Test Plugins main 2026-04-06 Run type check
24029792832 Test Plugins main 2026-04-06 Run type check

Root cause 1: TypeScript unused imports (TS6133 / TS6196)

tools/claudeup-core/tsconfig.json has "noUnusedLocals": true. Four imports were left behind after refactors, causing tsc --noEmit to fail on both Node 20 and Node 22:

File Unused import
tools/claudeup-core/src/__tests__/integration/conventions-integration.test.ts removeGitignoreEntries
tools/claudeup-core/src/__tests__/unit/doctor.test.ts vi
tools/claudeup-core/src/services/conventions-manager.ts existsSync
tools/claudeup-core/src/services/doctor.ts InstalledPluginEntry

Root cause 2: Stale hardcoded test dates in plugins/stats

plugins/stats/tests/db.test.ts and integration.test.ts used the hardcoded date "2026-03-26". This date has drifted outside the 7-day and 14-day rolling query windows used by getSessionSummary, getTopTools, and getDurationTrend, causing those tests to return zero results and fail assertions.


The fix

A single clean commit (2b684b7) in branch fix/ci-typescript-and-stats-dates addresses both issues:

  • Removes the 4 unused imports
  • Replaces "2026-03-26" with dynamic TODAY / YESTERDAY / TWO_DAYS_AGO constants

The fix is minimal (6 files, 31 insertions, 27 deletions) and built directly on top of the last failing main commit (4b44218).


Structural blocker: main is now a dist-only orphan

As of 2026-04-07, main was converted to a dist-only orphan branch (4070f70 — dist: publish magus v7.3.0). This branch has no shared git history with the source branches (fix/*, tools/*, etc.).

Consequences:

  1. GitHub refuses PRs from source branches to main with: "The branch has no history in common with main"
  2. CI no longer runs on pushes to main (no .github/workflows/ in the orphan)
  3. The 3 open fix PRs — fix(ci): remove unused TS imports + fix stale stats test dates #22, fix(ci): resolve merge conflict — unused TS imports + stale stats test dates #23, fix(ci): remove 3 unused TS imports + fix stale stats dates + re-enable CI triggers #24 — all target fix/ci-type-errors-and-stale-test-date (not main), so CI has never run to verify them
  4. A fourth attempted fix branch (fix/ci-ts-errors-and-stale-dates-main-pr) was pushed but the PR creation to main also failed for the same reason

Recommended actions

  1. Close PRs fix(ci): remove unused TS imports + fix stale stats test dates #22, fix(ci): resolve merge conflict — unused TS imports + stale stats test dates #23, fix(ci): remove 3 unused TS imports + fix stale stats dates + re-enable CI triggers #24 — they target a dead-end branch and CI cannot verify them
  2. Decide on the source branch workflow: if fix/ci-typescript-and-stats-dates (or a rebase of it onto the current source HEAD) is the right base, open a PR from it to whatever branch now serves as the integration target
  3. Update .github/workflows/test-plugins.yml and test-stats.yml to trigger on the new source branch instead of main (since main is now dist-only and will never have .github/)
  4. Alternatively: cherry-pick 2b684b7 into the source development branch directly

Branches available

Branch Description Contains fix
fix/ci-typescript-and-stats-dates Clean 1-commit fix on top of 4b44218
fix/ci-typescript-and-stats-dates-resolved Same fix + conflict resolution (used by PR #23)
fix/ci-24065489776-ts-and-dates Similar fix, older base
fix/ci-24065489776 Multiple fix attempts on top of 4b44218

https://claude.ai/code/session_01AKeDLHMWZBCdJ3f3GRtNTJ

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingci

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions