Skip to content

chore(connect): remove stale typebox test importing deleted src/types/typebox - #510

Merged
jannik-stacks merged 1 commit into
stx-labs:mainfrom
hugo-stacks:claude/cool-kirch-7cd83e
Sep 10, 2026
Merged

jannik-stacks merged 1 commit into
stx-labs:mainfrom
hugo-stacks:claude/cool-kirch-7cd83e

Conversation

@hugo-stacks

Copy link
Copy Markdown
Contributor

Description

As a contributor to @stacks/connect, I want npx vitest run in packages/connect to pass on a clean checkout, so that the test suite is usable as a signal.

1. Motivation for change

The test suite has been broken on main since the SIP-030 switch. Running npx vitest run in packages/connect fails at collection:

Error: Failed to load url ../src/types/typebox (resolved id: ../src/types/typebox)
  in /packages/connect/tests/typebox.test.ts. Does the file exist?

tests/typebox.test.ts imports ../src/types/typebox, but that module is not in the tree. Tracing the history:

  • cb82258 (feat!: Switch to SIP-030) added both src/types/typebox.ts and tests/typebox.test.ts.
  • 7f3063a (ci: update publishing, sub-commit chore: remove unused files) deleted src/types/typebox.ts (and the empty src/types/zod.ts) but left the test behind.

Because no workflow in .github/workflows runs the test suite, the orphaned test went unnoticed. The failure takes down the whole run, including the unrelated request.test.ts.

2. What was changed

  • Deleted packages/connect/tests/typebox.test.ts.
  • Removed the commented-out export block in packages/connect/src/index.ts that referenced the same deleted module:
// TODO: (next)
// We won't expose these types (TypeBox and Zod) until they are final and stable.
// TypeBox
// Only export the outermost typebox schemas
// export { ClarityValueTypeBoxSchema, PostConditionTypeBoxSchema } from './types/typebox';

I went with deleting the test rather than restoring the schemas, since 7f3063a removed the source deliberately under "remove unused files", the schemas were never exported, and the TODO comment says they were not final. If reviving TypeBox schemas is still on the roadmap, they are recoverable with git show 7f3063a^:packages/connect/src/types/typebox.ts and the test can come back alongside them.

No @sinclair/typebox devDependency needed removing: it was never declared in any package.json, and only appears in package-lock.json transitively via @jest/schemas.

3. How does this impact application developers

No impact. Both changes are test-only or comment-only; nothing in the published bundle or type surface changes. No changeset for that reason.

4. Link to relevant issues and documentation

None; found while running the suite locally.

5. Examples of use cases

N/A - no API surface change.

Type of Change

  • New feature
  • Bug fix
  • API reference/documentation update
  • Other (test maintenance)

Does this introduce a breaking change?

No.

Are documentation updates required?

No.

  • Link to documentation updates:

Testing information

  1. Testing required: just confirm the suite runs.
  2. To reproduce the original failure, check out main and run npx vitest run in packages/connect.
  3. Affected code paths: none at runtime. src/index.ts change is comment-only.

Before (on main):

FAIL  tests/typebox.test.ts [ tests/typebox.test.ts ]
Error: Failed to load url ../src/types/typebox
Test Files  1 failed | 1 passed (2)

After (this branch):

✓ tests/request.test.ts (11 tests) 3ms
Test Files  1 passed (1)
     Tests  11 passed (11)

Also verified green: tsc --project tsconfig.json --noEmit, ESLint, and Prettier on the touched file.

Two notes for reviewers, both pre-existing and left alone here:

  • There is no test step in .github/workflows, which is why this sat broken. Worth adding so it cannot recur.
  • packages/connect/tsconfig.test.json is not wired to any npm script, and tsc --project tsconfig.test.json --noEmit currently fails on a mixed-array signInputs literal at tests/request.test.ts:99 (vitest does not type-check, so it does not surface). Out of scope for this PR.

Checklist

  • Code is commented where needed
  • Unit test coverage for new or modified code paths (n/a - removes a dead test; remaining suite passes)
  • Changelog is updated (n/a - no published behavior change, so no changeset)
  • Tag @jannik-stacks for review

@jannik-stacks
jannik-stacks enabled auto-merge (squash) September 10, 2026 10:30
@jannik-stacks
jannik-stacks self-requested a review September 10, 2026 10:30
@jannik-stacks
jannik-stacks merged commit 75bf278 into stx-labs:main Sep 10, 2026
3 checks passed
@hugo-stacks
hugo-stacks deleted the claude/cool-kirch-7cd83e branch September 10, 2026 10:32
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