Skip to content

fix(ci): consolidated — TS imports, stale dates, browser-use version, unrestricted triggers - #33

Open
erudenko wants to merge 5 commits into
fix/ci-type-errors-and-stale-test-datefrom
fix/ci-consolidated
Open

fix(ci): consolidated — TS imports, stale dates, browser-use version, unrestricted triggers#33
erudenko wants to merge 5 commits into
fix/ci-type-errors-and-stale-test-datefrom
fix/ci-consolidated

Conversation

@erudenko

Copy link
Copy Markdown
Member

What this PR fixes

This consolidates all outstanding CI failures into a single, self-contained PR that is based on top of PR #24 (the comprehensive code fix) and adds the final workflow-trigger broadening from PR #32.

Failed runs addressed

Run ID Workflow Branch Failure
24065489776 Test Plugins main tsc --noEmit — 3 unused TS imports
24063290384 Test Plugins main shared-deps out of sync + type check
24298790072 Test Plugins fix/ci-workflow-trigger-broadening type check (inherited from base)
24298790076 Test Stats Plugin fix/ci-workflow-trigger-broadening stale date in time-windowed queries
24298782547 Test Stats Plugin fix/ci-workflow-trigger-broadening stale date in time-windowed queries
24298781727 Test Plugins fix/ci-workflow-trigger-broadening type check (inherited from base)
24276607217 Test Plugins fix/ci-24065489776-ts-and-dates browser-use version mismatch
24276583408 Test Stats Plugin fix/ci-type-errors-and-stale-test-date stale date
24276582786 Test Plugins fix/ci-type-errors-and-stale-test-date type check
24040412326 Test Stats Plugin fix/ci-type-errors-and-stale-test-date stale date

Root causes & fixes

1. Unused TypeScript imports (TS6133) — inherited from PR #24

tsc --noEmit fails under noUnusedLocals for three 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

Fix: removed all three (carried in from PR #24 head).

2. Stale hardcoded test dates — inherited from PR #24

plugins/stats/tests/db.test.ts and integration.test.ts used "2026-03-26" which is now 17 days old — outside the 7-day and 14-day rolling query windows used by getSessionSummary, getTopTools, and getDurationTrend. Those tests assert length > 0 / specific counts and return zero rows.

Fix: dynamic TODAY/YESTERDAY/TWO_DAYS_AGO constants (carried in from PR #24 head).

3. browser-use version mismatch — inherited from PR #24

plugins/browser-use/plugin.json was bumped to v1.1.2 but .claude-plugin/marketplace.json was left at v1.1.1. The marketplace-sync integration test catches exactly this drift.

Fix: marketplace.json bumped to 1.1.2 (carried in from PR #24 head).

4. Hardcoded branch filters in workflow triggers — new commit in this PR

Both test-plugins.yml and test-stats.yml had a branches allowlist:

push:
  branches: [main, fix/ci-type-errors-and-stale-test-date]
pull_request:
  branches: [main, fix/ci-type-errors-and-stale-test-date]

Any branch not in that list (every new fix/* or feat/* branch) was invisible to CI — pushes and PRs only triggered GitGuardian. This is why PRs #22, #23, #28, #31, and #32 all lacked test CI runs.

Fix: removed the branches key entirely from both triggers in both files. Path filters already limit CI to relevant file changes, so there is no noise increase.


Why PR #32 was still failing

PR #32 (fix/ci-workflow-trigger-broadening) only changed the workflow YAML — it was stacked directly on fix/ci-type-errors-and-stale-test-date, which still had the broken TS imports and stale dates. CI ran (the trigger fix worked), but the tests themselves failed.

This PR is branched from PR #24's head (fix/ci-24065489776-ts-and-dates) so all code-level fixes are already present. The single new commit removes the branch filters.

Supersedes

Does NOT supersede

claude and others added 5 commits April 11, 2026 00:38
TypeScript type check (tsc --noEmit) fails on main with four TS6133/TS6196
errors — unused imports that were left behind after refactors:

  • conventions-integration.test.ts: removeGitignoreEntries (never called)
  • doctor.test.ts: vi (never used)
  • conventions-manager.ts: existsSync (never used after refactor)
  • doctor.ts: InstalledPluginEntry type (parameter removed)

Stats tests (db.test.ts, integration.test.ts) were using the hardcoded date
"2026-03-26" which has drifted outside the 7/14-day query windows, causing
getSessionSummary, getTopTools and getDurationTrend tests to return zero
results and fail assertions.

Fix: replace hardcoded dates with dynamic TODAY/YESTERDAY/TWO_DAYS_AGO
constants so the tests stay green regardless of when CI runs.

Fixes CI runs: 24065489776, 24063290384, 24029941408, 24029941414

https://claude.ai/code/session_01Vc3jfA2et2zDDpenc4EcrW
main is now a dist-only orphan (4070f70) with no source code, so CI will
never fire on main again. Add the source branch to the trigger list so
this PR gets validated by CI.

https://claude.ai/code/session_011jT6rDWtzsZphizRMFEp96
…st-date

main is now a dist-only orphan (4070f70) with no source code, so CI will
never fire on main again. Add the source branch to the trigger list so
this PR gets validated by CI.

https://claude.ai/code/session_011jT6rDWtzsZphizRMFEp96
…ce.json

plugin.json already listed v1.1.2 (re-fix oneOf schema rejection from
browser-use#4211), but marketplace.json was never updated — causing the
marketplace-sync integration test to fail with a version mismatch error.

Fixes CI run 24276607217 (test (22) — Run integration tests)."
Both test-plugins.yml and test-stats.yml had a hardcoded `branches`
allowlist that restricted CI to only fire on `main` and
`fix/ci-type-errors-and-stale-test-date`. Any other branch (fix,
feature, etc.) was invisible to CI — only GitGuardian would fire.

Remove the `branches` key entirely from both `push` and `pull_request`
triggers in both workflow files. Path filters already ensure CI only
runs when relevant files change, so there is no noise increase.
This was referenced Apr 12, 2026
This was referenced Aug 16, 2026
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