Investigate a failed GreptimeDB fuzz CI target link by downloading GitHub Actions job logs plus fuzz artifacts such as kind logs, monitor dumps, and CSV dumps, then correlate the failure with local GreptimeDB source code. Use when the user provides a failed fuzz CI target/job URL or asks to diagnose GreptimeDB fuzz CI failures.
72
88%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Investigate failed fuzz-test jobs for GreptimeTeam/greptimedb from a local
checkout. The purpose is to download the failed job's CI output and fuzz artifacts,
then explain the likely cause by correlating the evidence with GreptimeDB source.
Always pass --repo GreptimeTeam/greptimedb to gh; local remotes may point to
forks. Keep the workflow read-only: do not rerun jobs, cancel workflows, push,
comment on PRs, or delete artifacts unless the user explicitly asks.
Use this skill for fuzz CI only. In .github/workflows/integration.yml, fuzz failures
are the CI jobs that use .github/actions/fuzz-test:
fuzztest — standalone fuzz targets.unstable-fuzztest — unstable standalone fuzz target.distributed-fuzztest — distributed cluster fuzz targets.distributed-fuzztest-with-chaos — distributed fuzz targets with Chaos Mesh.Each matrix job runs a semantic group of targets on one prepared environment.
The group defaults to fail-fast: after the first target failure it captures that
target's diagnostics and marks the remaining targets as skipped. The workflow
strategy still uses fail-fast: false, so failures do not cancel other groups.
The reusable action .github/actions/fuzz-test/action.yaml delegates each target
to .github/scripts/run-fuzz-targets.sh. CI passes FUZZ_BIN_DIR, so the script
runs the prebuilt target executable:
<prebuilt-fuzz-binary> -max_total_time=<seconds> \
-artifact_prefix=<target-dir>/libfuzzer/Without FUZZ_BIN_DIR, such as during local reproduction, the script falls back
to cargo fuzz run <target> --fuzz-dir tests-fuzz -D -s none with the same
libFuzzer arguments.
Failed jobs upload one group artifact. Its stable name identifies the job kind, mode, and group, for example:
fuzz-distributed-remote-wal-database-and-regular-tableThe artifact contains manifest.json, summary.md, and one directory per target
under targets/<target>/. A failed distributed target can include fuzz.log,
libFuzzer reproducers, CSV/SQL traces, Kind logs, monitor dumps, and Kubernetes
state. Setup failures use targets/setup/.
The normal user input is a CI target link: a GitHub Actions job URL for one failed matrix target. Treat that URL as the primary source of truth. Example:
https://github.com/GreptimeTeam/greptimedb/actions/runs/29000666156/job/86062894741Also accept these fallback inputs:
https://github.com/GreptimeTeam/greptimedb/actions/runs/29000666156.Parse ids from URLs:
REPO=GreptimeTeam/greptimedb
RUN_ID=29000666156
JOB_ID=86062894741When the input is a job URL, do not ask for the target name first. Use the job id to fetch metadata, then derive the group and mode from the job name. A distributed fuzz job name usually contains the CI group tuple:
Fuzz Test (Distributed, <mode>, <group>)
Fuzz Test with Chaos (Distributed, <mode>, <group>)If only a run URL is provided, list failed jobs and choose the fuzz job matching the group/mode. Ask only when multiple fuzz jobs are plausible and there is no group, mode, artifact, or job-url clue.
gh must be installed and authenticated (gh auth status). Actions logs and
artifacts commonly require authentication even for a public repo.jq, unzip, and standard shell tools are useful for reducing logs./tmp/greptimedb-fuzz-ci.Create a scratch directory:
mkdir -p /tmp/greptimedb-fuzz-ci/$RUN_ID
cd /tmp/greptimedb-fuzz-ci/$RUN_IDFetch run metadata:
gh run view "$RUN_ID" --repo "$REPO" \
--json databaseId,name,displayTitle,event,headBranch,headSha,status,conclusion,createdAt,updatedAt,url,workflowName \
> run.jsonFetch all jobs through the REST API:
gh api "repos/$REPO/actions/runs/$RUN_ID/jobs?per_page=100" \
--paginate --jq '.jobs[]' \
| jq -s '{jobs: .}' > jobs.jsonList failed fuzz-like jobs:
jq -r '
.jobs[]
| select(.conclusion != null and .conclusion != "success")
| select(.name | test("Fuzz Test|fuzz"; "i"))
| [.id, .name, .status, .conclusion, .html_url] | @tsv
' jobs.jsonFor a known JOB_ID, capture job name and step outcomes:
jq -r --arg id "$JOB_ID" '
.jobs[] | select((.id | tostring) == $id) |
"job=\(.name) conclusion=\(.conclusion) url=\(.html_url)",
(.steps[]? | [.number, .name, .status, .conclusion, .started_at, .completed_at] | @tsv)
' jobs.json > job-summary.txtRecord the fuzz job kind, matrix mode, group, failed step, event type, branch, and
head SHA. Do not assume main for PR or merge-queue runs. The failed target is
authoritative in the downloaded artifact's manifest.json; do not guess it from
the group name.
Download the selected job's log; this is the authoritative target CI output for the
cargo fuzz run command:
gh run view "$RUN_ID" --repo "$REPO" --job "$JOB_ID" --log > job-$JOB_ID.logDownload the full workflow log only when setup/build context matters:
gh run view "$RUN_ID" --repo "$REPO" --log > run-$RUN_ID.logFallback if gh run view --log is incomplete. The job logs endpoint returns a
plain text stream, while the full run logs endpoint returns a zip archive:
gh api "repos/$REPO/actions/jobs/$JOB_ID/logs" > job-$JOB_ID.log
gh api "repos/$REPO/actions/runs/$RUN_ID/logs" > run-$RUN_ID-logs.zip
unzip -oq run-$RUN_ID-logs.zip -d run-logsIn the job log, inspect the Run Fuzz Test step first. Capture:
max_total_time;List artifacts:
gh api "repos/$REPO/actions/runs/$RUN_ID/artifacts?per_page=100" \
--paginate --jq '.artifacts[]' \
| jq -s '{artifacts: .}' > artifacts.json
jq -r '.artifacts[] | [.id, .name, .expired, .size_in_bytes] | @tsv' artifacts.jsonMatch the one group artifact by job kind, mode slug, and group slug. If the display
name does not make the slug obvious, list the run artifacts and choose the unique
fuzz-* artifact whose suffix matches the group. Do not search for separate Kind,
monitor, or CSV artifacts; these are target subdirectories in the group artifact.
Download exact artifacts when possible:
ARTIFACT='fuzz-distributed-remote-wal-database-and-regular-table'
gh run download "$RUN_ID" --repo "$REPO" --name "$ARTIFACT" --dir artifacts/"$ARTIFACT"Fallback by artifact id:
ARTIFACT_ID=$(jq -r --arg name "$ARTIFACT" '.artifacts[] | select(.name == $name and (.expired | not)) | .id' artifacts.json | head -n 1)
if [ -z "$ARTIFACT_ID" ]; then
echo "Artifact not found or expired: $ARTIFACT"
exit 1
fi
gh api "repos/$REPO/actions/artifacts/$ARTIFACT_ID/zip" > artifact-$ARTIFACT_ID.zip
mkdir -p artifacts/"$ARTIFACT"
unzip -oq artifact-$ARTIFACT_ID.zip -d artifacts/"$ARTIFACT"After download, read the manifest before the bulk logs:
jq -r '.[] | [.target, .status, .exit_code, .after_prior_failure, .artifact_collection] | @tsv' \
artifacts/"$ARTIFACT"/manifest.jsonSelect the first failure entry as the primary target. Entries with
skipped_after_failure did not run; entries with after_prior_failure=true ran
against a potentially contaminated shared environment. Note expired or missing
artifacts explicitly; retention is currently short (retention-days: 3).
Evidence for target <target> is rooted at
artifacts/$ARTIFACT/targets/<target>/. result.json records timestamps, status,
exit code, fuzz budget, prior-failure provenance, and artifact collection status.
fuzz.log is the complete libFuzzer output from the prebuilt target executable in
CI; local fallback runs it through cargo fuzz run.
Kind logs under targets/<target>/kind/ come from an immediate failure snapshot
and usually include Kubernetes state plus container logs. Prioritize:
Monitor dumps under targets/<target>/monitor/ are collected by
.github/scripts/collect-fuzz-monitor-artifacts.sh. They may include:
state.log, sql.log, copy.log, port-forward.log;*.show_create_table.sql for _gt_logs and OpenTelemetry trace tables;_gt_logs, opentelemetry_traces,
opentelemetry_traces_operations, and opentelemetry_traces_services.CSV and SQL traces are under targets/<target>/csv/. LibFuzzer crash or timeout
reproducers are under targets/<target>/libfuzzer/. Kubernetes descriptions and
events are under targets/<target>/kubernetes/. Standalone service logs are under
targets/<target>/service/ when available.
Before drilling into a specific error string, build a small macro-level model of
the failure. This prevents overfitting on the loudest symptom, such as
libFuzzer: deadly signal, Internal error, or a cleanup warning.
Record the key timestamps in order:
Use the timeline to classify the failure phase: setup, workload execution, storage/WAL/write path, query path, cleanup, or runner infrastructure.
For distributed fuzz failures, identify the chain from outer symptom to inner cause candidate. Prefer this shape:
fuzz panic/assertion
-> client-visible SQL/gRPC/HTTP error
-> frontend or monitor error
-> meta/datanode/flownode component error
-> storage/WAL/object-store/Kafka/etcd/k8s dependency errorAt each boundary, decide whether that layer produced the error or merely wrapped and forwarded a downstream error. Do not stop at wrapper errors unless there is no deeper evidence.
For distributed targets, scan evidence in this order unless the timeline points elsewhere:
For each layer, answer two questions: "is this the first causal error?" and "is this layer producing or propagating the failure?"
When a failure appears configuration-related, compare all three levels before claiming a config did or did not take effect:
If a logged value differs from the expected config, explicitly state whether the config was not applied, was overridden by another layer, or refers to a different kind of timeout/retry/deadline.
Before final classification, list at least two plausible causes and the evidence that supports or weakens each, for example:
Then choose the most likely cause and keep the confidence scoped. It is often valid to have high confidence in the observed error chain but only medium confidence in the ultimate cause category.
Include one or two falsifiable checks, such as a same-SHA rerun, a fixed reproducer, a cross-target pattern in the same dependency mode, or one missing artifact/log that would change the conclusion.
Extract high-signal lines from job logs and artifacts:
grep -RInE '(^|[^[:alpha:]])(ERROR|Error|WARN|panic|panicked|FAILED|failure|timeout|Timeout|assert|backtrace|SIG[A-Z]+|OOMKilled|CrashLoopBackOff|ImagePullBackOff|libFuzzer|AddressSanitizer|UndefinedBehaviorSanitizer)' \
job-$JOB_ID.log run-$RUN_ID.log job-logs run-logs artifacts 2>/dev/null > signals.txtThen identify the first causal failure, not the last cleanup error. A typical order:
cargo fuzz run output in job-$JOB_ID.log.Avoid common mistakes:
fuzz; match mode
and target.main if the run used a different SHA.Read the tested SHA:
HEAD_SHA=$(jq -r '.headSha // empty' run.json)
if [ -z "$HEAD_SHA" ]; then
echo "Error: HEAD_SHA is empty or null"
exit 1
fi
UPSTREAM_REMOTE=$(git remote -v \
| awk '/GreptimeTeam\/greptimedb(\.git)?\/?([[:space:]])/ { print $1; exit }')
UPSTREAM_REMOTE=${UPSTREAM_REMOTE:-origin}
git rev-parse --verify "$HEAD_SHA^{commit}" >/dev/null 2>&1 \
|| git fetch "$UPSTREAM_REMOTE" "$HEAD_SHA"If local HEAD differs, inspect files at that SHA or create a temporary worktree:
git worktree add --detach /tmp/greptimedb-fuzz-ci/$RUN_ID/source "$HEAD_SHA"Remove temporary worktrees after investigation with git worktree remove <path>.
Never overwrite the user's current branch.
Start from concrete strings: fuzz target name, panic text, assertion message, error variant, SQL statement, or log message. Search/read the matching source at the run SHA.
Useful entry points:
tests-fuzz/ — fuzz targets, operation generators, checkers, dump paths..github/actions/fuzz-test/action.yaml — exact CI fuzz runner configuration..github/workflows/integration.yml — fuzz matrix and artifact upload names..github/scripts/collect-fuzz-monitor-artifacts.sh — monitor dump contents.src/mito2/AGENTS.md — storage/WAL/region failures.src/metric-engine/AGENTS.md — metric/logical table failures.src/frontend/AGENTS.md — SQL/protocol/query orchestration failures.src/meta-srv/AGENTS.md — metadata/procedure/routing failures.src/flow/AGENTS.md — flow failures.When reporting code evidence, cite the file/function/line and quote the log line that reaches it. Separate confirmed facts from hypotheses.
Use this taxonomy:
Use this structure:
## Summary
- Likely cause: <one sentence>
- Confidence: high|medium|low
- Classification: product bug|fuzz/test bug|flake/race|environment/infra|unknown
- Confidence basis: <which parts are confirmed vs inferred>
## Evidence
- `<job log or artifact path>`: quoted line(s)
- `<source-file:line>`: relevant code path
## Reasoning
<short chain from fuzz target -> CI output -> artifact logs -> source code>
## Alternative hypotheses
- <hypothesis>: <supporting and weakening evidence>
- <hypothesis>: <supporting and weakening evidence>
## Next steps
1. <minimal fix, reproduction command, or verification command>
2. <rerun command or extra log needed, if any>
## What would disprove this
- <specific rerun, artifact, log line, or reproducer result that would change the diagnosis>If logs or artifacts cannot be downloaded because gh is not authenticated or the
artifacts expired, say so directly and include the exact command/error.
7fd0a7b
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.