Skip to content

CI: 51 failed workflow runs — unused TS imports + stale test dates + structural workflow trigger problem #26

@erudenko

Description

@erudenko

Summary

Automated CI maintenance audit (2026-04-11) found 51 total failed workflow runs across Test Plugins and Test Stats Plugin workflows. This issue documents the root causes, existing fix PRs, and a structural problem that prevents CI from validating those fixes.


Failed Runs (10 most recent)

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

Root Cause 1: TypeScript noUnusedLocals violations (TS6133/TS6196)

tsc --noEmit fails on Node 20 and 22 in tools/claudeup-core due to three unused imports left behind after refactors:

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

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

plugins/stats/tests/db.test.ts used the hardcoded date "2026-03-26" for getSessionSummary assertions. The getSessionSummary function uses a rolling 7-day query window — by 2026-04-06 that date was outside the window, causing the query to return 0 rows and the assertion session_count === 2 to fail.


Existing Fix: PR #24

PR #24 (fix(ci): remove 3 unused TS imports + fix stale stats test dates) on branch fix/ci-24065489776-ts-and-dates correctly fixes all four issues (verified by code inspection):

  • removeGitignoreEntries removed from conventions-integration.test.ts
  • vi removed from doctor.test.ts
  • existsSync removed from conventions-manager.ts
  • getSessionSummary test replaced hardcoded date with dynamic TODAY

PRs #22 and #23 address the same problems but include extra unrelated feature commits; PR #24 is the minimal focused fix.


Structural Problem: CI workflows cannot validate the fix

This is the blocking issue.

Both test-plugins.yml and test-stats.yml only trigger on:

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

Since 2026-04-07T19:42:39Z, main was replaced with a distribution-only orphan commit (4070f70) with the message "dist: publish magus v7.3.0 (16 plugins) — Distribution-only repo for MadAppGang/magus marketplace. Source code: https://github.com/MadAppGang/magus-src".

As a result:


Recommended Actions

  1. Merge PR fix(ci): remove 3 unused TS imports + fix stale stats dates + re-enable CI triggers #24 — the code fix is correct (verified by static inspection). This closes the source-branch failures.

  2. Update workflow triggers — Either:

    • Add the source code branch(es) to the branches: list in both workflow files, OR
    • Move CI entirely to magus-src (where the source now lives)

    Example fix for test-plugins.yml / test-stats.yml:

    on:
      push:
        branches: [main, fix/ci-type-errors-and-stale-test-date]
      pull_request:
        branches: [main, fix/ci-type-errors-and-stale-test-date]
  3. Consider closing stale branches — There are 30+ fix/ci-* branches from previous maintenance runs. Most are superseded by PR fix(ci): remove 3 unused TS imports + fix stale stats dates + re-enable CI triggers #24 and can be deleted.


Opened by automated CI maintenance agent — 2026-04-11

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