Skip to content

chore(ci): wire JS tools unit tests into CI - #1436

Open
Dhravya wants to merge 2 commits into
docs/supermemory-skill-1417from
chore/ci-js-tools-unit-tests
Open

chore(ci): wire JS tools unit tests into CI#1436
Dhravya wants to merge 2 commits into
docs/supermemory-skill-1417from
chore/ci-js-tools-unit-tests

Conversation

@Dhravya

@Dhravya Dhravya commented Aug 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Add tools/ai-sdk unit test jobs to ci.yml
  • Update turbo.json and root package.json scripts
  • Refresh bun.lock

Stacked on #1435

Test plan

  • CI passes on this branch

Made with Cursor

Wire @supermemory/tools and @supermemory/ai-sdk unit tests into CI and
update workspace turbo config and lockfile.

Co-authored-by: Cursor <cursoragent@cursor.com>
@claude

claude Bot commented Aug 8, 2026

Copy link
Copy Markdown

Claude finished @Dhravya's task in 1m 38s —— View job


Reviewing PR

  • Analyze PR diff and changes
  • Investigate Cursor Bugbot's concern about AI SDK tests skipping tools build
  • Check if the issue is valid or a false positive
  • Provide review summary

Overview: Adds unit test jobs for JS SDK packages (memory-graph, tools, ai-sdk) to CI workflow with corresponding turbo.json task definitions.

Issues found:

Cursor Bugbot correctly identified a real issue. The packages/ai-sdk test:unit will fail on a clean checkout:

  1. packages/ai-sdk/src/tools.unit.test.ts imports from ./tools
  2. ./tools.ts re-exports from @supermemory/tools/ai-sdk
  3. @supermemory/tools/package.json maps ./ai-sdk./dist/ai-sdk.js
  4. dist/ is gitignored and won't exist on fresh checkout

The CI runs bun run --cwd directly instead of via turbo, so the turbo.json task dependencies don't help here.

Fix options:

  1. Build tools first in CI (simplest):
- name: Run JS SDK unit tests
  run: |
    bun run --cwd packages/memory-graph test
    bun run --cwd packages/tools build   # Add this
    bun run --cwd packages/tools test:unit
    bun run --cwd packages/ai-sdk test:unit
  1. Use turbo for test execution (more consistent):
- name: Run JS SDK unit tests  
  run: bunx turbo run test:unit --filter='@supermemory/tools' --filter='@supermemory/ai-sdk' --filter='@supermemory/memory-graph'

But this requires test:unit to have "dependsOn": ["^build"] in turbo.json.

Fix this →

Score: 7/10 — Real bug that will cause CI failures on clean checkout. Quick fix needed.


| Branch: chore/ci-js-tools-unit-tests

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 8, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
supermemory-mcp 9b92a51 Aug 18 2026, 03:30 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 8, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
supermemory-app 9b92a51 Commit Preview URL

Branch Preview URL
Aug 18 2026, 03:29 PM

@socket-security

socket-security Bot commented Aug 8, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​types/​bun@​1.3.10 ⏵ 1.3.141001004887100
Updatednpm/​@​anthropic-ai/​sdk@​0.91.1 ⏵ 0.116.066 -1310091 +4100100
Updatednpm/​@​ai-sdk/​openai@​3.0.53 ⏵ 4.0.36721008898100
Addednpm/​openai@​7.4.078100100100100
Addednpm/​ai@​7.0.589910010099100

View full report

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 78269ff. Configure here.

Comment thread .github/workflows/ci.yml
run: |
bun run --cwd packages/memory-graph test
bun run --cwd packages/tools test:unit
bun run --cwd packages/ai-sdk test:unit

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI SDK tests skip tools build

Medium Severity

The new CI step runs packages/ai-sdk test:unit without building @supermemory/tools first. That test loads ./tools, which re-exports from @supermemory/tools/ai-sdk via exports to dist/, and dist/ is not in the repo, so a clean checkout is likely to fail when resolving those modules.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 78269ff. Configure here.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview: Adds unit test jobs for JS SDK packages (memory-graph, tools, ai-sdk) to CI workflow with corresponding turbo.json task definitions.

Issues found: None — this looks good to ship.

Verification:

  • ✅ All referenced test scripts exist in their respective package.json files
  • packages/memory-graph has testvitest run
  • packages/tools has test:unit → runs specific unit test files
  • packages/ai-sdk has test:unitvitest run src/tools.unit.test.ts
  • ✅ turbo.json task configuration is correct (test depends on ^build, test:unit is standalone)

Score: 10/10

Dhravya commented Aug 8, 2026

Copy link
Copy Markdown
Member Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label Main to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Dhravya
Dhravya requested a review from MaheshtheDev August 18, 2026 15:20
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