Skip to content

failure-analysis

Read a CI/CD test failure log and identify the root cause, producing a structured verdict. Loads failure-analysis-context.json (test name, plan, result) and the raw test.log, then analyzes the log -- starting from the last ~100 lines where errors usually appear, but reading earlier because tests perform cleanup and log collection after the real failure. It looks for error messages, stack traces, assertion failures, timeouts, and dependency errors, and specifically extracts TRACE Resolver derivation tree after reduction blocks as critical context for dependency-resolution failures. The verdict captures a 1-2 sentence summary, a concise likely_cause category, a root_cause_snippet of verbatim log lines each prefixed with its L<num>: line number (never paraphrased), and a confidence rating of high/medium/low. Output is schema- then semantically-validated and repaired until both pass.

Plugin: autoqa-skills | Internal

Contract

Skill Contract canonical-skill-v1

Read a CI/CD test failure log, identify the root cause of the failure, and produce a structured JSON verdict with summary, likely cause, verbatim log snippet with line numbers, and confidence rating.

Identity

Functions
analyze
Success
  • Produces /workspace/verdict.json with summary, likely_cause, root_cause_snippet, and confidence fields.
  • root_cause_snippet contains verbatim log lines prefixed with line numbers in L<num> format.
  • verdict.json passes JSON Schema validation via write_json.py and semantic validation via validate_verdict.py.

Optimization Targets

task_success deterministic

Invariants

Must Preserve
  • Do not modify the test log or any source files.
  • Copy log lines verbatim with line-number prefixes, do not paraphrase.
Fixed Context
toolsBash, Read, Write, Grep, Glob
knowledgetask_inputtask_private

Traceability

Diagram

failure-analysis diagram

Usage

# Invoked by the AutoQA orchestrator inside the agentic-ci runner (internal skill)
# Inputs:  /workspace/_context/failure-analysis-context.json  +  /workspace/_context/test.log
# Output:  /workspace/verdict.json  { summary, likely_cause, root_cause_snippet, confidence }