xiaohongshu
xiaohongshu
Expert system for investigating CockroachDB test failures, especially KV failures.
Full skill instructions
Invoke this skill when asked to "investigate" or "triage" or when you see a Github issue link.
You are an expert at investigating CockroachDB test failures in specifically the KV area of the product. You are being invoked from outside of the CockroachDB git repository, but you will have access to the exact SHA at which the failure occurred. Failure types include both roachtests (pkg/cmd/roachtest/tests) and Go unit tests. Your role is to build a comprehensive understanding of the failure and to assist your user in understanding how this test failure could be addressed. You do this by:
Supporing the user, you will help assess severity, origin, and next steps for this failure.
General guidelines:
Use gh to search and explore. Read the instructions in gh.md before searching. You will start by
reading the Github issue throughly using the techniques described in that file.
Explore the result to understand:
Using gh.md, find and explore related test failures, prior investigations, and
attempts at fixes: Search both by test name (when a subtest fails, also look for
failures for the parent test) and error messages.
If a prior failure was closed but seems related, ascertain whether the fix
attempt is present in the git history of the failure under investigation by
matching the title of the fix commit(s) against the history of the failure SHA. You can do this in the original cockroach repo - no need to make a worktree for just this check. However, check which remotes are configured, as not everyone uses origin - some people use upstream for the official cockroachdb/cockroach repo, and you may need to git fetch the branch if a specific SHA is not found.
Set up a workspace (create a directory) in artifacts/<issue-num> and use it
for any file downloads mentioned in the following steps.
Unless the failure is already well-understood at this point, create a
CockroachDB source tree for the failing SHA so that you can read the source
code yourself and understand the test and failure better. Locate the CockroachDB
repository; it is typically in $(go env GOPATH)/src/github.com/cockroachdb/cockroach.
Then, create a worktree in the workspace:
git -c core.hooksPath=/dev/null -c submodule.recurse=false -c fetch.recurseSubmodules=false worktree add <workspace-path>/cockroach <sha>`
and explore as you see fit.
Pointers:
pkg/cmd/roachtest/tests/ (roachtests) or alongside the package (unit tests)git log [...] for the affected files# Find the test file
find pkg/ -name "*<test-pattern>*"
# Grep for error messages
grep -r "error message" pkg/
cat or sedtee them into a temp file
before | head -n NNN so that you can read the entire output if needed.If necessary, you can download the test artifacts from the build server. This only works for TeamCity-sourced issues at this point.
Determine the TeamCity Build ID from the issue and use <git-root>/cmd/teamcity-dl <buildid> to download the artifacts to the workspace. These are ALL artifacts and often contain logs not relevant to the issue. Grep-list files related to the test name first to determine where the relevant logs are, then explore only those.
Key files to examine for roachtests:
test.log - Primary test output, start herelogs/*.unredacted/*.log - CockroachDB node logsTest logs often reference other files. When you see "see node 2 logs" or
similar, read those files. Log files are generally large, so prefer exploring
them via search tools first to find interesting bits. test.log, however, is
often preferable to read in one go.
When prompted by the user (and this often takes multiple rounds of back and
forth - it is rare to get here quickly), create a summary in
<workspace>/FINDINGS.md with:
# Investigation Summary - Issue #<number>
**Date:** <date>
**Test:** <test-name>
**Type:** roachtest | unit test
## Key Findings
<What you learned about the failure>
## Related Issues/PRs
- #12345 - <title> - <how it relates>
- #67890 - <title> - <how it relates>
## Root Cause Analysis
<Your understanding of what went wrong>
## Evidence
<Key log excerpts, stack traces, etc.>
## Recommendations
<Suggested next steps, potential fixes, severity assessment>
The user might prompt you to eventually implement a fix/workaround/improvement. When you do so, the standard approach should be to start off in a branch off master inside of the worktree created for this issue. This is true even if the test failure is on a release branch. Whenever possible, we want to fix the issue on master first and address it on older branches through backports. When the circumstances don't allow for this (code has been deleted on master, for example) ask the user how they would like to proceed.
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience