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

Reviewing PR #1436

  • Analyze PR diff and changes
  • Check existing review comments
  • Verify Cursor Bugbot's finding about AI SDK tests
  • Submit review

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's finding is valid. The packages/ai-sdk/src/tools.ts file imports from @supermemory/tools/ai-sdk:

export { supermemoryTools, ... } from "@supermemory/tools/ai-sdk"

This maps to packages/tools/dist/ai-sdk.js per the package exports. Since there's no build step in CI before running tests, the dist/ folder won't exist on a clean checkout and the ai-sdk test will fail.

Fix options:

  1. Add a build step before tests:
- name: Build tools package
  run: bun run --cwd packages/tools build

- name: Run JS SDK unit tests
  run: |
    bun run --cwd packages/memory-graph test
    bun run --cwd packages/tools test:unit
    bun run --cwd packages/ai-sdk test:unit
  1. Or use turbo with proper dependency configuration (add dependsOn: ["^build"] to test:unit in turbo.json):
- name: Run JS SDK unit tests
  run: bunx turbo run test:unit --filter='@supermemory/memory-graph' --filter='@supermemory/tools' --filter='@supermemory/ai-sdk'

Fix this →

Score: 8/10 — Real issue that will cause CI failures on clean checkout, but straightforward to fix.

View job run

@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 05c0566 Aug 08 2026, 02:51 AM

@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 failed
View logs
supermemory-app 78269ff Aug 08 2026, 02:48 AM

@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 +499 -1100
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>
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