Skip to content

refactor: consolidate test suites under tests/ [skip-tag:sdk]#56

Merged
lIang70 merged 1 commit into
mainfrom
refactor/consolidate-tests-dir
May 6, 2026
Merged

refactor: consolidate test suites under tests/ [skip-tag:sdk]#56
lIang70 merged 1 commit into
mainfrom
refactor/consolidate-tests-dir

Conversation

@lIang70

@lIang70 lIang70 commented May 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Promote the existing test-only modules to a dedicated top-level tests/ tree so the repo layout reflects what each subtree is for, rather than hiding integration suites under sdk/ or under a tools/ developer-tools directory.

  • sdk/knowledge/e2e/tests/quality/knowledge/ (in-process retrieval-quality regression suite)
  • tools/conformance/tests/conformance/ (provider conformance suite that hits real HTTP endpoints when credentials are present)

Both targets stay independent Go modules (GOWORK=off) that pin sdk + sdkx via go.mod require directives, so:

  • the 100-document retrieval corpus stays out of every sdk patch tag (it would otherwise inflate every consumer's module cache without any consumer ever running these tests), and
  • the conformance suite keeps testing the exact bytes consumers can go get.

Internal import paths and module names are rewritten to match the new locations; no test logic is changed.

Makefile

  • MODULES_OFFWORK gains tests/quality/knowledge and renames the tools/conformance entry to tests/conformance, so make test still exercises both as compile checks (no credentials → tests self-skip).
  • make conformance is renamed to make test-conformance to match the new test-* family naming.
  • New make test-quality runs the //go:build integration lane of tests/quality/knowledge/ against a real embedding provider (skips cleanly when EMBEDDING_PROVIDER / EMBEDDING_API_KEY / EMBEDDING_MODEL are unset).
  • Help text updated to document the new test family.

[skip-tag:sdk] rationale

The only change under sdk/ is the removal of the sdk/knowledge/e2e/ directory. sdk's public API is untouched, no internal logic changes, no behaviour changes — this is a pure layout refactor and does not warrant a patch bump of the sdk module on its own. The [skip-tag:sdk] marker tells the auto-tag workflow to skip the sdk module for this push; the per-module skip surface is exactly what auto-tag.yml was designed for.

tests/conformance/ and tests/quality/knowledge/ live outside the auto-tag scope (the workflow only watches sdk/** / sdkx/** / voice/**), so they need no special handling.

Test plan

  • make vet — passes across all in-tree + GOWORK=off modules
  • make test — passes; tests/conformance/* and tests/quality/knowledge show up in the offwork lane and run cleanly
  • make test-conformance — runs tests/conformance/... (no creds → suites self-skip cleanly)
  • make test-quality — runs the integration lane (no creds → vector + hybrid tests self-skip cleanly)
  • make help — lists the new test-conformance / test-quality targets

Made with Cursor

Move existing test-only modules into a dedicated tests/ tree so the
top-level layout reflects what each subtree is for, rather than
hiding integration suites under sdk/ or developer-tools dirs:

- sdk/knowledge/e2e/        -> tests/quality/knowledge/
- tools/conformance/        -> tests/conformance/

Both targets are independent Go modules (GOWORK=off) that pin sdk
+ sdkx via go.mod, so the 100-doc retrieval corpus stays out of
every sdk patch tag and the conformance suite keeps testing the
exact bytes consumers can pull. Internal import paths and module
names are updated to match the new locations; no test logic is
changed.

Makefile updates:
- MODULES_OFFWORK gains tests/quality/knowledge and renames the
  tools/conformance entry to tests/conformance, so 'make test'
  still exercises both as compile checks.
- Rename 'make conformance' to 'make test-conformance' and add a
  new 'make test-quality' that runs the integration-tagged lane
  of tests/quality/knowledge against a real embedding provider.

[skip-tag:sdk] because the only sdk/ change is removing the
sdk/knowledge/e2e/ directory; sdk's public API is untouched and
this refactor does not warrant a patch bump on its own.

Co-authored-by: Cursor <cursoragent@cursor.com>
@lIang70
lIang70 merged commit 0258e14 into main May 6, 2026
9 checks passed
@lIang70
lIang70 deleted the refactor/consolidate-tests-dir branch May 6, 2026 02:51
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