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
- Find work. Browse
good first issueandhelp wantedon GitHub. Search existing issues before filing. - Read the rules. The non-negotiables are in
AGENTS.md(root) andCLAUDE.md. Subsystem-specific rules live in deeperAGENTS.mdfiles (e.g.,pkg/ddl/AGENTS.mdif present) and indocs/agents/. - Build and run tests. See Development workflow and Testing. Run only the smallest test scope that proves correctness; full-package runs are discouraged.
- Validate before claiming "done". The repo defines three verification profiles in
.agents/skills/tidb-verify-profile:WIP,Ready,Heavy.Readyis required before announcing readiness for review; if there are code changes,Readyincludesmake lint. - Open the PR. Use
gh pr create -T .github/pull_request_template.md. Title format:pkg [, pkg2]: what is changed. IncludeIssue 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_prepareis 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 inAGENTS.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.