investigate-flaky-test

Investigate RediSearch flaky-test failures from Jira keys, CI logs, or test ids and propose root-cause fixes.

6.2k|596|Updated May 5, 2016
One-click install
npx skills add https://github.com/RediSearch/RediSearch --skill investigate-flaky-test
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: investigate-flaky-test
Source: https://github.com/RediSearch/RediSearch/tree/main/.skills/investigate-flaky-test
Command: npx skills add https://github.com/RediSearch/RediSearch --skill investigate-flaky-test

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Flaky tests in the RediSearch repository waste engineering time and erode CI trust. This Skill turns a vague flaky-test report into an evidence-backed root-cause analysis, so you fix the actual race, timeout, or lifecycle bug instead of guessing or masking the failure.

Core Features & Use Cases

  • Evidence Collection: Gathers context from Jira issues, GitHub Actions run logs and artifacts, local log files, and failure excerpts using the gh CLI.
  • Failure Classification: Categorizes failures as assertion races, timeouts, Redis/RLTest lifecycle issues, coordinator-only behavior, sanitizer crashes, or environment problems.
  • Root-Cause Fix Proposals: Traces failures through Python flow tests, C/C++ unit tests, Rust panics, and coordinator paths to propose targeted fixes with verification commands.
  • Use Case: A CI run fails intermittently on test_expire:testExpire. Provide the GitHub Actions run URL, and the Skill downloads the logs, identifies a missing wait in the test, and proposes a fix with the exact pytest verification command.

Quick Start

Investigate the flaky test reported in Jira issue MOD-1234 and propose a root-cause fix with verification steps.

Frequently Asked Questions about investigate-flaky-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I investigate a flaky test failure in RediSearch CI?

Provide a GitHub Actions run URL, run id, Jira key, or test id. The Skill uses the gh CLI to fetch failed job logs and Test Logs artifacts, classifies the failure, traces the root cause in the test and production code, and proposes a fix with verification commands.

How do I download GitHub Actions logs for a failed RediSearch test?

Use gh run view <run_id> --repo RediSearch/RediSearch --log-failed for failed job logs, and gh run download <run_id> to fetch artifacts. CI artifacts typically contain testslogs/*.log files plus redisearch.so binaries for debugging.

What inputs does the flaky test investigation accept?

It accepts a Jira issue key such as MOD-1234, a GitHub Actions run or job URL, a PR URL, a run id, a test id like test_file:testName, or a local log file with a failure excerpt. Any of these can serve as the starting evidence.

Can the skill suggest skipping or quarantining a flaky test?

No. The Skill explicitly refuses workaround-only fixes, quarantine, and skip_until suggestions. When evidence is insufficient, it lists the missing data needed or recommends a diagnostic PR that adds focused debug logging for the next occurrence.

How do I verify a fix for a flaky Python flow test?

Run ./build.sh RUN_PYTEST ENABLE_ASSERT=1 TEST_TIMEOUT=20 TEST="<test_file>:<test_name>". For coordinator-specific tests, prefix with REDIS_STANDALONE=0. Timing-sensitive failures should be repeated enough times to gain confidence.

What types of flaky test failures can be classified?

Failures are classified as assertion races, timeout or performance issues, Redis/RLTest lifecycle problems like save/reload or cursor reap, coordinator-only behavior, sanitizer or crash issues, environment problems, or unknown when evidence is insufficient.