Skip to content

Fix/libs telemetry#229

Merged
KIvanow merged 6 commits into
masterfrom
fix/libs-telemetry
May 31, 2026
Merged

Fix/libs telemetry#229
KIvanow merged 6 commits into
masterfrom
fix/libs-telemetry

Conversation

@KIvanow

@KIvanow KIvanow commented May 31, 2026

Copy link
Copy Markdown
Member

Summary

Changes

Checklist

  • Unit / integration tests added
  • Docs added / updated
  • Roborev review passed — run roborev review --branch or /roborev-review-branch in Claude Code (internal)
  • Competitive analysis done / discussed (internal)
  • Blog post about it discussed (internal)

Note

Low Risk
Changes are mostly additive tooling and dependency wiring; default installs gain PostHog unless users opt out via existing telemetry flags.

Overview
Adds a new packages/cache-benchmark-ts workspace package: a TypeScript semantic-cache benchmark CLI that mirrors the Python harness, with betterdb and upstash adapters, HuggingFace dataset loaders, threshold sweeps, and snake_case JSON output for cross-tool compatibility.

The BetterDB adapter exercises @betterdb/semantic-cache in modes from bare thresholding through rerank, LLM judge, and Monitor API autotune; benchmarks disable package analytics during runs.

Python packaging: posthog moves from the optional analytics extra into core dependencies on betterdb-agent-cache and betterdb-semantic-cache, so telemetry works without installing extras. pnpm-lock.yaml picks up the new package and related transitive deps (e.g. transformers, Upstash).

Reviewed by Cursor Bugbot for commit e1b0c28. Bugbot is set up for automated code reviews on this repo. Configure here.

KIvanow and others added 6 commits May 28, 2026 19:48
…ache

Mirrors the Python benchmark harness with TS-native tooling:
- BetterDB adapter wrapping @betterdb/semantic-cache (bare/local/full/autotune modes)
- Upstash adapter wrapping @upstash/semantic-cache for competitive comparison
- HuggingFace dataset loaders (STSb, SICK, PAWS-Wiki, vCache LM Arena) with local JSONL caching
- Local embedding via @huggingface/transformers (bge-small-en-v1.5, all-MiniLM-L6-v2)
- F1/precision/recall/FPR metrics with latency percentiles
- snake_case JSON output compatible with Python harness report tools

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ws than limit

The cache key was (dataset, config, split) with no limit component. A run
with limit=500 would cache 500 rows, then a subsequent run with limit=5000
would get a cache hit and silently return only 500 rows.

Fix: if the cached file has fewer rows than the requested limit, treat it
as stale and re-download.
…he_lmarena

String(undefined) produces the literal string "undefined" which passes
the !prompt truthy check. Check for null/undefined before String()
conversion so rows with missing prompt fields are skipped.
…mark-ts-harness

# Conflicts:
#	pnpm-lock.yaml
posthog was behind an optional `analytics` extra that no user ever
installed, resulting in 0 telemetry despite increasing downloads.
Making it a core dependency ensures the PostHog client is always
available when the baked API key is present.
@KIvanow KIvanow merged commit a743d00 into master May 31, 2026
3 checks passed
@KIvanow KIvanow deleted the fix/libs-telemetry branch May 31, 2026 19:00
@github-actions github-actions Bot locked and limited conversation to collaborators May 31, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant