Cherry-pick one specific git commit into the current TiKV branch with strict already-applied pre-checks, conflict resolution based on full code understanding, TiKV-specific validation, and deep review only if the pick is applied. Use when asked to apply a single commit SHA onto this repository, especially when conflicts are likely or the change is production-critical.
Cherry-pick one commit safely and repeatably in TiKV: check if it is already applied, avoid rerere, resolve conflicts with real subsystem understanding, run the repository’s required checks, and deep-review the effective change only if the pick is applied.
commit_sha: the source commit to cherry-pickgit rerere for conflict resolution.AGENTS.md and use TiKV’s repository entrypoints from Makefile.make format and make clippy as authoritative repository checks, not raw cargo fmt or raw cargo clippy.make clippy fails in scripts/deny, record that separately from Clippy lint results because scripts/clippy-all may not have run yet.git status --porcelain must be empty.git show -s --format='%H%n%s' <commit_sha>grep_key from the subject line. Prefer PR numbers like #1234, otherwise choose another unique token.git log --oneline --grep '<grep_key>'git cherry-pick -x <commit_sha>git status.git show <commit_sha>git blame -w on HEAD for the relevant ours-side linesgit add <paths>make formatgit cherry-pick --continuegit cherry-pick --skipskipped (empty patch)If the result is picked or picked (conflicts resolved), validation is required.
cargo check --allmake clippyenv EXTRA_CARGO_ARGS=$TESTNAME make test_with_nextest when you can name a focused test target./scripts/test $TESTNAME -- --nocapture when a specific Rust test name is already knownsrc/storage, src/server, components/raftstore, components/raftstore-v2, components/cdc, or the correct focused target is unclear, run make testdeep-review skill after the pick so the final report covers problem summary, solution mechanics, findings, and TiKV-specific validation gaps.- Result: `picked` / `picked (conflicts resolved)` / `skipped (already applied)` / `skipped (empty patch)` / `blocked (dirty worktree)`
- Pre-check:
- `git log --oneline --grep "<grep_key>"`: [matched / no match]
- Cherry-pick:
- Command: `git cherry-pick -x <commit_sha>`
- Conflicts: [none | list files]
- Conflict analysis (only for non-trivial or semantic conflicts):
- Ours-side provenance: `<prior_commit_sha>` - <prior_subject> (from `git blame -w`)
- Intent check: [compatible / conflicting] with rationale
- Resolve notes:
- [What changed, why, and evidence]
- Validation:
- `make format`: [pass / fail / blocked / not run]
- `cargo check --all`: [pass / fail / blocked]
- Focused tests or `make test`: [pass / fail / not run]
- `make clippy`: [pass / fail / blocked]
- `scripts/deny` within `make clippy`: [pass / fail / not reached]
- `scripts/clippy-all` within `make clippy`: [pass / fail / not reached]