Skip to content

Comments

Rename SDK to sdk-typescript, add e2e download test#7

Merged
mgoldsborough merged 4 commits intomainfrom
refactor/rename-sdk-typescript
Feb 20, 2026
Merged

Rename SDK to sdk-typescript, add e2e download test#7
mgoldsborough merged 4 commits intomainfrom
refactor/rename-sdk-typescript

Conversation

@mgoldsborough
Copy link
Contributor

Summary

  • Rename packages/sdk to packages/sdk-typescript to match sdk-python naming convention (npm package name @nimblebrain/mpak-sdk is unchanged)
  • Update path references in PUBLISHING.md, README.md, SECURITY.md
  • Add integration test that downloads a real .mcpb bundle from CDN, verifies SHA256 integrity, extracts the zip, and validates the manifest

Test plan

  • pnpm --filter @nimblebrain/mpak-sdk test — 44 unit tests pass
  • pnpm --filter @nimblebrain/mpak-sdk test:integration — 14 integration tests pass (including new e2e download test)
  • pnpm typecheck — 7/7 packages pass
  • pnpm lint — 5/5 packages pass

cc @shwetank-dev @JoeCardoso13

Rename the directory to match sdk-python naming convention. The npm
package name (@nimblebrain/mpak-sdk) is unchanged.

Add an integration test that downloads a real bundle from the CDN,
verifies SHA256 integrity, extracts the zip, and validates the manifest.
JoeCardoso13
JoeCardoso13 previously approved these changes Feb 18, 2026
Copy link
Collaborator

@JoeCardoso13 JoeCardoso13 left a comment

Choose a reason for hiding this comment

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

Findings

The rename is thorough across all reference points (docs, lock file, package.json, pnpm workspace), no problems there. The new e2e test has a few minor issues. The most important of which is a test hanging with a cryptic timeout message, meaning they're all small.


MINOR-1 — 6 unused imports added to the integration test

File: packages/sdk-typescript/tests/client.integration.test.ts

These 6 imports are new but none are used in the new test:

import { mkdtemp, rm, readFile, readdir } from "fs/promises";  // unused
import { tmpdir } from "os";                                    // unused
import { join } from "path";                                    // unused

Only createHash (from crypto) and JSZip are actually used. These look like leftovers from an initial disk-based implementation draft that was replaced with the current in-memory JSZip approach. The PR claims pnpm lint — 5/5 packages pass, so the linter apparently isn't catching unused imports in test files — worth checking the ESLint config.


MINOR-2 — No explicit timeout on fetch(download.url)

File: packages/sdk-typescript/tests/client.integration.test.ts

const response = await fetch(download.url);

If the CDN stalls (not just a connection timeout but a hung response), this awaits indefinitely until vitest's global test timeout fires — producing a generic "test timed out" error rather than a clear "download failed" message. A simple AbortSignal.timeout() would make failures more diagnostic:

const response = await fetch(download.url, { signal: AbortSignal.timeout(30_000) });

MINOR-3 (cross-PR) — PRODUCT.md not updated

File: PRODUCT.md (introduced by PR #6, currently open)

PRODUCT.md shows the monorepo layout with sdk/ and python-sdk/, neither of which match the actual directory names after both PRs land. One of the two PRs should own fixing this before merging.

- Remove unused imports from integration test (MINOR-1)
- Add AbortSignal.timeout to CDN fetch in e2e test (MINOR-2)
- Extend lint scope to include tests/
- Add 404 handling to searchBundles/searchSkills (fixes #8)
- Add sdk-typescript-ci.yml (lint, format, typecheck, test)
- Add sdk-typescript-publish.yml (tag-based OIDC publish to npm)
- Update README with badges and release docs
@mgoldsborough
Copy link
Contributor Author

closes #8

Copy link
Collaborator

@JoeCardoso13 JoeCardoso13 left a comment

Choose a reason for hiding this comment

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

Re-review

All previous findings addressed. Issue #8 bugs fixed with proper 404 handling in searchBundles and searchSkills. LGTM.

Status

Item Status
MINOR-1 (unused imports) Fixed
MINOR-2 (fetch timeout) Fixed (AbortSignal.timeout(30_000))
MINOR-3 (PRODUCT.md) Fixed in PR #6
Issue #8 Bug 1 (searchBundles 404 → wrong error class) Fixed (explicit 404 check before generic !response.ok)
Issue #8 Bug 2 (getBundle 404 for echo bundle) Fixed (registry-side + integration test passing)
Lint scope extended to tests/ Good
CI + publish workflows Good

@mgoldsborough mgoldsborough merged commit e0bc6d6 into main Feb 20, 2026
5 checks passed
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