pingcap/tidb · Archived

tidb-test-diff-triage

Triage unexpected TiDB test diffs that seem unrelated to the current PR. Use when plan/result/testdata changes appear after merge/rebase or only in specific local runs, especially to quickly rule in/out failpoint enablement issues.

First seen May 16, 2026

Installation

$ npx skills add pingcap/tidb --skill tidb-test-diff-triage

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from pingcap/tidb.

npx skills add pingcap/tidb

Browse all from pingcap/tidb

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 40.4K
License LICENSES
Default branch master
Status Archived

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,101 B
  • docs SUMMARY.md 260 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 2 installs

SKILL.md

TiDB Test Diff Triage

Trigger

Use this workflow when:

  • A test diff appears, but touched code in the PR does not explain that behavior change.
  • A single test run and full-suite run produce different outputs.
  • Planner/executor testdata changed unexpectedly after merge/rebase.

Rule 1: rule out failpoint setup first

In TiDB, many test behaviors rely on failpoint instrumentation. -tags=intest,deadlock does not enable failpoints.

  • Use docs/agents/testing-flow.md -> Failpoint decision for unit tests against the affected package.
  • If any hit exists, rerun with Failpoint-enabled run and add -count=1 to the go test command for reproducibility.
  • If the diff disappears after failpoint enable, classify it as an environment/setup issue instead of a logic regression.

Rule 2: isolate merge impact

If failpoint is not the cause:

  1. Reproduce with minimal target (-run <TestName> -count=1).
  2. Compare good/bad commits and bisect the merged range.
  3. Identify first bad commit before updating expected outputs.

Useful commands:

git bisect start
git bisect bad <bad_commit>
git bisect good <good_commit>

Rule 3: update testdata only after the cause is proven

Only sync expected plan/result when one of these is true:

  • Upstream merge intentionally changed optimizer behavior.
  • Existing test expectation is stale but query semantics are unchanged.

Do not record/update testdata before root cause is identified.

Output format for investigation notes

  • Symptom: what diff changed.
  • Scope: single test vs full suite.
  • Failpoint check: commands and result.
  • First bad commit: hash and title (if bisected).
  • Conclusion: setup issue / upstream behavior change / local regression.
  • Action: rerun with failpoint, sync expected, or continue fixing code.