feat(sdk): promote execution, diagnostics, and query engines

Merged
UN
4mo ago
+19217-14087

Summary

  • promote linked-test execution, batch execution, test-run lifecycle, eval, stats, telemetry, list, search, query pagination, rendering, filters, and parsers into public SDK ownership
  • preserve CLI compatibility through thin re-export shells and reference-identity tests
  • route SDK runtime and evaluation directly through SDK modules, eliminating the reviewed SDK-to-CLI inversion
  • shrink the mandatory private-core import baseline from 62 sources / 538 edges to 51 sources / 412 edges and reduce the ESLint suppression budget from 158 to 157

pm lineage

  • pm-oslr — execution and diagnostics SDK promotion, completed
  • pm-rjqr — public query wrapper lineage, completed; implementation ownership follow-up recorded
  • pm-9x6e — zero-boundary capstone, returned open with the exact 51-source / 412-edge remainder

Verification

  • pnpm release:gates
  • exact 100/100/100/100 coverage: 37,232 statements, 26,504 branches, 7,533 functions, 36,335 lines across 292 files / 5,738 tests
  • 100% repository and exported/member docstring coverage
  • static quality, package boundary, token budget, security, version, and release gates
  • 12-package packed npx smoke and 88-command temporary-directory dogfood
  • installed tarball public-SDK proof: list=1, search=1, eval nDCG=1
  • Sentry/telemetry gate green; transient intermediate relocation event diagnosed and resolved
  • Greptile exact-head review 63dfd757-1e8b-4f11-904c-959c50b8fe28: confidence 5/5, no review comments, no files requiring attention

Summary by cubic

Promotes list/search engines and linked-test execution (with background runs), eval, telemetry, and stats into the public sdk, with CLI commands now thin compatibility exports. Clarifies in docs that noTruncate intentionally overrides limit for list responses.

  • New Features

    • Typed sdk APIs: runList, runSearch (with pagination/rendering/parsers), runEval, runStats, runTelemetry, runTest, runTestAll, and test‑run lifecycle.
    • full list mode and typed results (ListedItem, ListFullResult, tree/projection types); exported query parsers and item‑filter option types.
  • Refactors

    • CLI commands are compatibility exports; runtime/evaluation route through the sdk. Private‑core boundary remains at 51 sources / 412 edges; update-many behavior unchanged.
    • Governance/runtime hardening and analyzer parity: lexical helpers with inline docs, normalized unknown‑error formatting, correct count‑only searches, full dedupe child corpus, positive test‑all timeouts, telemetry limit validation, and restored empty eval --fail-under semantics (with strict validation). Canonical governance exports in sdk/index.ts; normalized list‑filter resolvers.
    • CI/analysis: pin DeepSource TypeScript ESM settings (dialect: typescript, environment: [nodejs, vitest], module_system: es-modules, high complexity threshold) to prevent misclassification.
    • Docs and release hygiene: docs/SDK.md/inventory updated (clarifies noTruncate > limit), changelog regenerated; Windows packed‑extension install test uses an explicit timeout and now passes.
    • Quality gates: static‑quality script at scripts/release/static-quality-gate.mts run via pnpm exec tsx; suppression map pruned; ESLint suppression budget lowered to 154.