Skip to content

fix(ci): 2 remaining unused TS imports + browser-use 1.1.2 + db.test rolling date#244

Open
erudenko wants to merge 1 commit into
fix/ci-workflow-trigger-broadeningfrom
fix/ci-26430494516
Open

fix(ci): 2 remaining unused TS imports + browser-use 1.1.2 + db.test rolling date#244
erudenko wants to merge 1 commit into
fix/ci-workflow-trigger-broadeningfrom
fix/ci-26430494516

Conversation

@erudenko

Copy link
Copy Markdown
Member

What failed

CI runs 26430494516 and 26430492914 on PR #32 (fix/ci-workflow-trigger-broadening).

The 2026-05-26 commit to that branch fixed rolling dates in integration.test.ts and removed the removeGitignoreEntries unused import from conventions-integration.test.ts, but left two more TS6133 errors — so test (22) (the Node 22 matrix job running pnpm typecheck) still fails.

Once the TS check was unblocked, the next failure would be the marketplace-sync integration test catching a version drift.


Root causes fixed

1. TS6133 — unused vi import in doctor.test.ts

tools/claudeup-core/src/__tests__/unit/doctor.test.ts imported vi from vitest but no test in the file calls vi.mock(), vi.fn(), or vi.spyOn(). tsc --noEmit with noUnusedLocals flags it as TS6133.

Fix: Removed vi from the vitest import line.

2. TS6133 — unused existsSync import in conventions-manager.ts

tools/claudeup-core/src/services/conventions-manager.ts imported existsSync from node:fs but the function body uses readFileOrEmpty (which catches ENOENT internally) and stat from node:fs/promisesexistsSync is never called.

Fix: Removed the import { existsSync } from 'node:fs' line entirely.

3. browser-use version mismatch (marketplace-sync)

plugins/browser-use/plugin.json is at 1.1.2 but .claude-plugin/marketplace.json still showed 1.1.1. The marketplace-sync integration test catches exactly this drift and would fail as the next error after the TS check was fixed.

Fix: Bumped browser-use to 1.1.2 and updated the description to match plugin.json.

4. Time-bomb in db.test.ts deleteOldSessions test (proactive)

plugins/stats/tests/db.test.ts used the hardcoded date "2026-03-26" as the "recent" session in the deleteOldSessions retention test. As of 2026-05-29 that date is 64 days old — within the 90-day window so the test currently passes. But around 2026-06-24 it crosses the threshold, the "recent" session gets deleted, and deletedCount becomes 2 instead of 1.

Fix: Added a module-level const TODAY constant and replaced the hardcoded date with TODAY — same pattern already in integration.test.ts.


Files changed

File Change
tools/claudeup-core/src/__tests__/unit/doctor.test.ts Remove unused vi from vitest import
tools/claudeup-core/src/services/conventions-manager.ts Remove unused existsSync from node:fs import
.claude-plugin/marketplace.json browser-use version 1.1.11.1.2, description updated
plugins/stats/tests/db.test.ts Add TODAY constant; use TODAY in deleteOldSessions recent-session test

Relationship to other PRs


Generated by Claude Code

…dates in db.test

Fixes remaining failures on fix/ci-workflow-trigger-broadening (runs 26430494516 / 26430492914).

The 2026-05-26 commit to that branch fixed rolling dates in integration.test.ts and
removeGitignoreEntries in conventions-integration.test.ts but left three issues:

1. doctor.test.ts imports `vi` from vitest but never calls it — TS6133
2. conventions-manager.ts imports `existsSync` from node:fs but never uses it — TS6133
   (readFileOrEmpty catches ENOENT; stat comes from node:fs/promises)
3. marketplace.json still shows browser-use@1.1.1 while plugin.json is at 1.1.2 —
   causes marketplace-sync integration test to fail once the TS check is fixed

Also fixes a time-bomb in db.test.ts: the deleteOldSessions "recent session" test used
the hardcoded date "2026-03-26" (now 64 days old, within 90-day window today but will
cross the threshold around 2026-06-24 and break the test). Replaced with TODAY constant.
This was referenced May 29, 2026
This was referenced Jun 6, 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.

1 participant