analyze-ci-failures
CUBRID CI Test Failure Analyzer
Analyze failed shell test cases from CircleCI (or other CI) for CUBRID PRs. Produces a categorized report with root cause analysis and fix proposals.
When to Use
- User says "analyze ci failures", "CI 실패 분석", "왜 TC 실패했어", "failed tc 분석"
- User shares a CircleCI URL with test failures
- User has a
failed_tc.txtor similar list of failed test cases - User wants to understand why shell tests failed on a PR
Arguments
/analyze-ci-failures— Interactive: look forfailed_tc.txtin cwd/analyze-ci-failures <circleci-url>— Fetch failures from CircleCI/analyze-ci-failures <file>— Read failure list from specified file
Inputs
The skill needs:
- Failed TC list: A file listing failed test case paths (e.g.,
failed_tc.txt), or a CircleCI URL to fetch from - Test case directory: A directory containing the actual test scripts and answer files (e.g.,
~/cubrid-testcases-private-ex) - Feature context: The branch/PR being tested (to understand what changes might cause failures)
Execution Steps
Step 1: Gather Inputs
- Locate the failed TC list:
- Check arguments for a file path or CircleCI URL
- Check cwd for
failed_tc.txt - Ask user if not found
- Identify the test case base directory:
- Check if
~/cubrid-testcases-private-exexists - Check additional working directories
- Ask user if not found
- Check if
- Identify the feature branch context:
git branch --show-currentgit log --oneline HEAD --not develop | head -20to understand feature changes
Step 2: Fetch CI Failure Details
If a CircleCI URL is provided, use an agent to fetch the actual test failure messages (diffs, error outputs). This provides the actual vs expected output, which is critical for root cause analysis.
Step 3: Read All Failed Test Cases (Parallel)
For each failed TC:
- Read the test script (
.shfile incases/directory) - Read the answer file (
.answerfile — expected output) - Read supporting SQL files (
.sqlfiles used by the test) - Note what the test does: data types involved, operations tested (CRUD, unload/load, copydb, diagdb, etc.)
Use parallel reads — launch all file reads at once since they're independent.
Step 4: Analyze Feature Changes
Understand what the feature branch changes that could cause failures:
- Read key modified source files (use
git diff develop...HEAD --stat) - Identify behavioral changes:
- New file types or storage mechanisms
- Changed output formats (diagdb, show heap header, etc.)
- Disabled or stubbed functions
- New error codes or changed error messages
- Use explore agents in parallel for deeper code analysis if needed
Step 5: Categorize and Analyze
For each failed TC, determine:
- Is it related to the feature? — Match test operations against feature changes
- Root cause hypothesis — Why the test fails given the feature changes
- Category — Group TCs by shared root cause
Common categories:
- Output format mismatch (answer file needs update)
- Disabled/stubbed functionality
- New storage path not handled by existing tool (unloaddb, copydb, etc.)
- Error code changes
- Timeout / CI flakiness
- Unrelated regression
Step 6: Generate Report
Write a structured markdown report with:
# Failed TC Analysis Report: <branch> (<PR link>)
## Background
(Feature description, key behavioral changes)
## Category N: <Root Cause> (X TCs) — <OOS-related? / Feature-related?>
| # | TC | What it tests | Failure | Related? |
|---|-----|--------------|---------|----------|
| ... | ... | ... | ... | ... |
**Root cause analysis**: ...
**Proposed fix**: ...
## Summary
| Category | Count | Related? | Root Cause |
|----------|-------|----------|------------|
| ... | ... | ... | ... |
## Priority Actions
1. P0: ...
2. P1: ...
Step 7: Save and Present
- Save report to
failed_tc_report.mdin the project root (or user-specified location) - Print a concise summary with counts: X related, Y unrelated, Z total
Output Conventions
Language
- Section headers (
##): English - Table content and analysis: English (technical report for broad audience)
- Code, paths, function names: Keep as-is
Style
- Tables for TC listings within each category
- Code blocks for call flow diagrams showing broken vs expected paths
- Bold for key findings and root causes
- Backticks for all code references
- Horizontal rules between major sections
Tips
- When in doubt about source code behavior, use LSP (clangd) to analyze CUBRID C/C++ code. Use
lsp_hoverto check types,lsp_goto_definitionto trace function implementations,lsp_find_referencesto understand call sites, andlsp_diagnosticsto catch issues. This is especially useful when tracing how a changed function affects downstream callers. - When fetching CircleCI results, use API v1.1 (not v2) since v2 requires authentication. Example:
https://circleci.com/api/v1.1/project/github/CUBRID/cubrid/<build_num>/testsworks without credentials. - Always read the actual test script AND answer file — the script tells you what operations are tested, the answer tells you what output is expected
- Look for data types that exceed storage thresholds (e.g.,
varchar(20000), large JSON, CLOB/BLOB) - Check for
diagdb,show heap header,cubrid spacedbin test scripts — these are sensitive to storage format changes - Check for
unloaddb/loaddb/copydb— these require full record resolution - TCs with no diff details from CI may need local reproduction to diagnose
- Group by root cause, not by symptom — multiple TCs often share a single underlying issue
More from vimkim/my-cubrid-skills
jira
Look up CUBRID JIRA issue context. Use when a CBRD-XXXXX ticket is mentioned or when the user asks about a JIRA issue.
9create-testcases
Create CUBRID test cases (unit/SQL/shell) for a given feature or bug fix. Use when the user asks to create tests, write test cases, or mentions testing a CBRD ticket.
9cubrid-manual
Search the CUBRID manual (RST docs in en/ and ko/) for SQL syntax, configuration parameters, API references, admin utilities, and any CUBRID documentation. Use when you need to look up CUBRID behavior, verify SQL semantics, or answer questions about CUBRID features.
9cubrid-pr-review
CUBRID C/C++ PR code review with LSP/clangd analysis and C++ safety checks. Use when reviewing a CUBRID pull request, when the user shares a GitHub PR URL from a CUBRID repo, asks to review or check a pull request, or requests LSP-based analysis of PR changes. Even if the user just pastes a CUBRID PR link without explicit instructions, this skill applies.
9cubrid-pr-create
Create a GitHub PR for the CUBRID project with [CBRD-XXXXX] title format and Korean body with English section headers. Use when the user wants to create a pull request for CUBRID changes.
9cubrid-oos-context
Load CUBRID OOS (Out-of-row Overflow Storage) project context from the local knowledge base. Use this skill whenever OOS is mentioned, when working on the feat/oos branch, when touching oos_file.cpp or OOS-related heap_file.c code, when CBRD-26517/26458/26516 or other OOS JIRA tickets come up, or when you need to understand the OOS architecture, record format, CRUD flows, or MVCC integration. Also trigger when you see OOS-related identifiers like OR_MVCC_FLAG_HAS_OOS, OR_VAR_BIT_OOS, FILE_OOS, oos_insert, oos_read, oos_delete, or heap_record_replace_oos_oids.
9