Open-Source Wikis

/

TiDB

/

How to contribute

pingcap/tidb

How to contribute

This wiki section is a contributor's-eye view of the repository: how to pick up work, how to validate changes, and what conventions the codebase enforces. The official end-user contributor guide lives at https://pingcap.github.io/tidb-dev-guide/; this section focuses on the conventions visible in the code itself.

Contributor workflow at a glance

  1. Find work. Browse good first issue and help wanted on GitHub. Search existing issues before filing.
  2. Read the rules. The non-negotiables are in AGENTS.md (root) and CLAUDE.md. Subsystem-specific rules live in deeper AGENTS.md files (e.g., pkg/ddl/AGENTS.md if present) and in docs/agents/.
  3. Build and run tests. See Development workflow and Testing. Run only the smallest test scope that proves correctness; full-package runs are discouraged.
  4. Validate before claiming "done". The repo defines three verification profiles in .agents/skills/tidb-verify-profile: WIP, Ready, Heavy. Ready is required before announcing readiness for review; if there are code changes, Ready includes make lint.
  5. Open the PR. Use gh pr create -T .github/pull_request_template.md. Title format: pkg [, pkg2]: what is changed. Include Issue Number: close #<id> and keep the HTML comment markers intact.

What this section covers

  • Development workflow — branching, building, code/test/PR cycle, when make bazel_prepare is required.
  • Testing — unit, integration, and real-TiKV testing flows, plus the failpoint dance.
  • Debugging — logs, slow log, HTTP introspection, and pkg/util/logutil/ conventions.
  • Patterns and conventions — code style, error handling, concurrency, DDL rules.
  • Tooling — Make, Bazel, generated code, repo helpers under tools/.

Out of scope here

The following are documented elsewhere and intentionally not duplicated:

  • Issue templates and label policies → see .github/ISSUE_TEMPLATE/ and the "Issue rules" section in AGENTS.md.
  • Per-PR checklist for AGENTS.md changes → docs/agents/agents-review-guide.md.
  • The full validation matrix → AGENTS.md -> Task -> Validation Matrix.

If you find drift between this wiki and any of those source-of-truth files, treat the source-of-truth as authoritative.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

How to contribute – TiDB wiki | Factory