惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
腾讯CDC
爱范儿
爱范儿
Google DeepMind News
Google DeepMind News
V
V2EX
Blog — PlanetScale
Blog — PlanetScale
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
量子位
F
Fortinet All Blogs
G
Google Developers Blog
T
The Blog of Author Tim Ferriss
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
T
Tailwind CSS Blog
J
Java Code Geeks
S
SegmentFault 最新的问题
D
Docker
博客园 - 司徒正美
The GitHub Blog
The GitHub Blog
Jina AI
Jina AI
M
MIT News - Artificial intelligence
博客园 - 【当耐特】

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
GitHub - TwistTheoryGames/testpick: Run only the tests yo...
Kazutaka_S · 2026-06-18 · via Hacker News: Show HN

npm CI node license

Run only the tests your diff can actually break.

testpick is a test-selection CLI for JavaScript/TypeScript. It looks at what you changed (git diff) and runs just the tests affected by those changes — turning multi-minute CI runs into seconds.

npx testpick map     # one-time: learn which tests touch which code
npx testpick run     # from now on: run only what your changes affect

Demo

$ testpick map
Mapping 23 test file(s) with vitest in 8 single-pass shard(s).
✔ Map saved to .testpick/map.json — 24 source files tracked.

$ vim src/util.ts        # change one file...

$ testpick run
testpick: 1/23 test file(s) affected by 1 change(s).

 ✓ src/greet.test.ts (1 test) 4ms

$ testpick explain       # ...and see *why*
Changed files (1):
  • src/util.ts
Decisions:
  ✓ src/util.ts  [coverage map → 1 test(s)]
      → src/greet.test.ts
Result: run 1 of 23 test file(s).

Want a GIF for your README/socials? A ready-to-run vhs script lives at demo.tape: brew install vhs && vhs demo.tape.

Why not just vitest --changed / jest --onlyChanged?

Those are great — until your code has couplings their static import graph can't see:

  • a module loaded via a runtime-computed path — a plugin registry, DI container, or import(/* @vite-ignore */ pathFromConfig). Vite can glob a literal import(\./${name}.js`)`, but it cannot analyze a path that's data.
  • code reached only at runtime that the static graph over- or under-counts

testpick builds its map from runtime coverage — what each test actually executed — so it captures those edges. Verified example (see testpick-real fixture):

const REGISTRY = { feat: "../features/feat.ts" };
export const load = (n) => import(/* @vite-ignore */ REGISTRY[n]); // Vite can't see this
Change features/feat.ts result
vitest related features/feat.ts No test files found
testpick run runs loader.test.ts

Note: testpick and Vite's module graph are complementary, not strictly better. A coverage map is more precise for runtime-computed couplings and for trimming imported-but-unexecuted modules; the static graph can flag a yet-to-run branch a coverage map hasn't seen. That's why testpick always errs toward running more (see below) — and why it works the same for Jest, where there's no Vite graph.

Safety first

A test selector is only useful if you can trust it not to skip something important. testpick's rule: when in doubt, run more — never less.

  • Changed a file the map doesn't know about (new file, config)? → it runs all tests by default.
  • Pass --ai and it asks an LLM to narrow those unmapped changes to likely tests — but if the model is unsure, it still falls back to running everything. The AI can never cause a skip.
  • testpick explain shows exactly why each test was selected or skipped.

Commands

testpick map [--base <ref>]      # build/refresh the coverage map
testpick run [--base <ref>]      # run only affected tests
testpick explain [--base <ref>]  # dry-run: print the selection + reasoning
Option Meaning
--base <ref> Diff against a ref (CI: --base origin/main). Default: working tree vs HEAD.
--ai Use an LLM (needs ANTHROPIC_API_KEY) to resolve unmapped changes.
--all Escape hatch: run the whole suite.
--full map only: rebuild from scratch instead of incrementally.
-j, --jobs <n> map only: max concurrent coverage passes (default: CPU count).

Fast maps

testpick map is built for speed three ways:

  • Single-pass (Vitest, default): instead of starting the runner once per test file, testpick shards the files across your cores and runs each shard as one serial Vitest process, attributing V8 precise-coverage deltas to each file. Far fewer startups — measurably faster wall-clock and less total CPU than one-process-per-file. Use --per-file to opt out (Jest uses per-file today).
  • Incremental: each test file is hashed; only changed/new files are re-measured. A no-op refresh is instant; editing one test re-maps just that file.
  • Parallel: the per-file path (and the shards) run up to one lane per CPU (-j to tune).

Use --full to force a clean rebuild. If single-pass can't account for a file (e.g. a project config it couldn't merge), that file falls back to isolated per-file measurement automatically — the map is never silently incomplete.

In CI (GitHub Actions)

- run: npm ci
- run: npx testpick run --base origin/${{ github.base_ref }}

Commit .testpick/map.json to share the map across CI runs, or rebuild it on a schedule.

Status

v0.1 — supports Vitest and Jest. Roadmap: faster single-pass map building, monorepo package-level selection, and more runners/languages.

MIT licensed.