# Technical System Architecture Diagram: Automated CI Failure Resolution
This document provides a comprehensive technical extraction of the provided system architecture diagram, which outlines a two-phase (Offline/Online) process for automated Root Cause Analysis (RCA) and solution execution for Continuous Integration (CI) pipeline failures.
---
## 1. High-Level Segmentation
The diagram is divided into four primary quadrants based on two axes:
* **Vertical Axis:** Separates **Offline** (top) preparation tasks from **Online** (bottom) real-time execution.
* **Horizontal Axis:** Separates **Stage 1: Root Cause Analysis** (left) from **Stage 2: Solution Generation & Execution** (right).
---
## 2. Offline Preparation Phase
### Prep. 1: Success Log Template Deduplication (Top Left)
* **Input:** "Old success logs" (represented by grey icons) and "Latest $x$ success logs" (represented by green icons).
* **Process:** The logs are processed via a **Drain Algorithm**.
* **Output:** A "Success log template" (green icon), which is fed into the Online Stage 1.
### Prep. 2: Offline Knowledge Base Construction (Top Right)
* **Inputs:**
* "Enterprise Document" (T-icon)
* "On-call Q&A Records" (QA-icon)
* **Process Flow:**
1. **Chunking:** Documents are broken down into smaller segments.
2. **Embedding Model:** Chunks are converted into vector representations.
3. **Vector Database:** The final storage for retrieved knowledge, used in Online Stage 2.
---
## 3. Online Execution Phase
### Stage 1: Root Cause Analysis (Bottom Left)
This stage processes an **Original Failed CI Log** through five numbered steps:
1. **Key Log Filtering:** Uses a filter icon to isolate:
* Keywords
* Log Tail
* Log Diff (The difference between the failed log and the success log template).
2. **Key Log Expansion:** Expands context around identified issues:
* Previous Operation Extension
* Later Consequence Expansion
3. **Token Overflow Pruning:** A "scissors" icon indicates optimization of data for LLM context windows:
* Initial Weight Assignment
* Block Weight Enhancement
* Context Window Expansion
* Density Based Ranking
4. **Input Assembly:** Combines **Critical Log Blocks** (red icon) with an **RCA Prompt Template** (green circle).
5. **LLM Processing:** An LLM generates a **Root Cause Analysis Report** (document icon with an 'i' info badge).
### Stage 2: Solution Generation & Execution (Bottom Right)
This stage takes the RCA report and attempts to fix the pipeline through three numbered steps:
6. **Knowledge Retrieval:** Interacts with the Vector Database using:
* Query Generation
* Multi-Route Retrieval
* Reranker
* URL Mapping
* **Output:** "Retrieved Knowledge" (T-icon).
7. **Executable Solution Generation:**
* **Inputs:** Root Cause Analysis Report + Solution Generation Prompt Template + Retrieved Knowledge.
* **Process:** LLM generates an **Executable Solution**.
8. **Tool Execution & Pipeline Rerun:**
* **Inputs:** Executable Solution + Customized Tools + Tool Calling Prompt Template.
* **Process:** LLM executes tools and reruns the pipeline.
* **Final State:** **CI Pipeline Fixed** (blue checkmark icon).
---
## 4. Component and Flow Summary
| Component | Description |
| :--- | :--- |
| **Data Sources** | Success logs, Failed CI logs, Enterprise docs, Q&A records. |
| **Algorithms/Models** | Drain Algorithm, Embedding Model, LLM (used in 3 distinct steps). |
| **Data Structures** | Success log templates, Critical log blocks, Vector Database, RCA Reports. |
| **Logic Flow** | Log Filtering $\rightarrow$ Context Expansion $\rightarrow$ Pruning $\rightarrow$ RCA $\rightarrow$ Knowledge Retrieval $\rightarrow$ Solution Generation $\rightarrow$ Execution. |
## 5. Textual Transcriptions
### Labels and Headers
* **Offline / Online:** Primary horizontal dividers.
* **Prep. 1:** Success Log Template Deduplication.
* **Prep. 2:** Offline Knowledge Base Construction.
* **Stage 1:** Root Cause Analysis.
* **Stage 2:** Solution Generation & Execution.
### Numbered Process Steps
1. **Key Log Filtering**
2. **Key Log Expansion**
3. **Token Overflow Pruning**
4. **Critical Log Blocks**
5. **Root Cause Analysis Report**
6. **Knowledge Retrieval**
7. **Executable Solution**
8. **Tool Execution & Pipeline Rerun**
### Embedded Technical Terms
* **Drain Algorithm:** Used for log templating.
* **Log Diff:** Comparison between success and failure.
* **Token Overflow Pruning Sub-tasks:** Initial Weight Assignment, Block Weight Enhancement, Context Window Expansion, Density Based Ranking.
* **Knowledge Retrieval Sub-tasks:** Query Generation, Multi-Route Retrieval, Reranker, URL Mapping.
* **Final Outcome:** CI Pipeline Fixed.