# plba-v2-explain-local-http-channel

- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml
- runner: agent_runtime
- mode: full_chain
- passed: True

## Query
Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?

## Actual
{
  "intent": "CODE_QA",
  "sub_intent": "EXPLAIN_LOCAL",
  "graph_id": "CodeQAGraph",
  "conversation_mode": "START",
  "rag_count": 13,
  "llm_answer": "Класс `HttpControlChannel` в файле `http_channel.py` реализует канал управления для HTTP-приложения. В конструкторе (`__init__`) инициализируются атрибуты:\n\n- `_timeout`: таймаут для канала.\n- `_runner`: экземпляр `UvicornThreadRunner`, управляющий запуском uvicorn-сервера.\n- `_factory`: фабрика приложений `HttpControlAppFactory`.\n- `_actions`: набор действий (контролируемых операций).\n\nМетод `start` запускает сервер с приложением, созданным фабрикой, и ассоциирует действия с каналом. Метод `stop` останавливает сервер. Класс использует асинхронный подход через аннотации `async`.",
  "answer_mode": "answered",
  "path_scope": [
    "src/app_runtime/control/http_channel.py"
  ],
  "symbol_candidates": [
    "HttpControlChannel"
  ],
  "layers": [
    "C1_SYMBOL_CATALOG",
    "C0_SOURCE_CHUNKS",
    "C2_DEPENDENCY_GRAPH"
  ]
}

## Steps
[
  {
    "step": "router",
    "status": "completed",
    "timings_ms": {
      "router": 0
    },
    "output": {
      "intent": "CODE_QA",
      "sub_intent": "EXPLAIN_LOCAL",
      "graph_id": "CodeQAGraph",
      "conversation_mode": "START"
    }
  },
  {
    "step": "retrieval",
    "status": "completed",
    "timings_ms": {
      "retrieval": 47
    },
    "output": {
      "rag_count": 13,
      "answer_path_rag_count": 13,
      "resolved_symbol_status": "resolved",
      "resolved_symbol": "HttpControlChannel",
      "requested_layers": [
        "C1_SYMBOL_CATALOG",
        "C0_SOURCE_CHUNKS",
        "C2_DEPENDENCY_GRAPH"
      ]
    },
    "diagnostics": {
      "executed_layers": [
        "C1_SYMBOL_CATALOG",
        "C0_SOURCE_CHUNKS",
        "C2_DEPENDENCY_GRAPH"
      ],
      "retrieval_mode_by_layer": {
        "C1_SYMBOL_CATALOG": "vector",
        "C0_SOURCE_CHUNKS": "vector",
        "C2_DEPENDENCY_GRAPH": "vector"
      },
      "top_k_by_layer": {
        "C1_SYMBOL_CATALOG": 8,
        "C0_SOURCE_CHUNKS": 12,
        "C2_DEPENDENCY_GRAPH": 4
      },
      "filters_by_layer": {
        "C1_SYMBOL_CATALOG": {
          "path_scope": [
            "src/app_runtime/control/http_channel.py"
          ]
        },
        "C0_SOURCE_CHUNKS": {
          "path_scope": [
            "src/app_runtime/control/http_channel.py"
          ]
        },
        "C2_DEPENDENCY_GRAPH": {
          "path_scope": [
            "src/app_runtime/control/http_channel.py"
          ]
        }
      },
      "fallback": {
        "used": false,
        "reason": null
      },
      "retrieval_by_layer_ms": {
        "C1_SYMBOL_CATALOG": 23,
        "C0_SOURCE_CHUNKS": 11,
        "C2_DEPENDENCY_GRAPH": 13
      }
    }
  },
  {
    "step": "pre_evidence_gate",
    "status": "passed",
    "timings_ms": {
      "pre_evidence_gate": 0
    },
    "output": {
      "passed": true,
      "failure_reasons": [],
      "degraded_message": ""
    }
  },
  {
    "step": "llm",
    "status": "completed",
    "timings_ms": {
      "llm": 1155
    },
    "output": {
      "prompt_name": "code_qa_explain_local_answer",
      "answer_preview": "Класс `HttpControlChannel` в файле `http_channel.py` реализует канал управления для HTTP-приложения. В конструкторе (`__init__`) инициализируются атрибуты:\n\n- `_timeout`: таймаут для канала.\n- `_runner`: экземпляр `UvicornThreadRunner`, управляющий запуском uvicorn-сервера.\n- `_factory`: фабрика при"
    }
  },
  {
    "step": "post_evidence_gate",
    "status": "passed",
    "timings_ms": {
      "post_evidence_gate": 0,
      "repair": 0
    },
    "output": {
      "passed": true,
      "reasons": [],
      "repair_used": false
    }
  }
]

## Diagnostics
{
  "intent_correct": null,
  "target_found": true,
  "layers_used": [
    "C1_SYMBOL_CATALOG",
    "C0_SOURCE_CHUNKS",
    "C2_DEPENDENCY_GRAPH"
  ],
  "retrieval_sufficient": true,
  "answer_mode": "normal",
  "router_result": {
    "intent": "CODE_QA",
    "graph_id": "CodeQAGraph",
    "conversation_mode": "START",
    "retrieval_profile": "code",
    "sub_intent": "EXPLAIN_LOCAL",
    "path_scope": [
      "src/app_runtime/control/http_channel.py"
    ],
    "layers": [
      "C1_SYMBOL_CATALOG",
      "C0_SOURCE_CHUNKS",
      "C2_DEPENDENCY_GRAPH"
    ],
    "symbol_resolution_status": "resolved"
  },
  "retrieval_request": {
    "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c",
    "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?",
    "sub_intent": "EXPLAIN_LOCAL",
    "path_scope": [
      "src/app_runtime/control/http_channel.py"
    ],
    "requested_layers": [
      "C1_SYMBOL_CATALOG",
      "C0_SOURCE_CHUNKS",
      "C2_DEPENDENCY_GRAPH"
    ]
  },
  "per_layer_outcome": [
    {
      "layer_id": "C1_SYMBOL_CATALOG",
      "hit_count": 8,
      "empty": false,
      "fallback_used": false
    },
    {
      "layer_id": "C0_SOURCE_CHUNKS",
      "hit_count": 1,
      "empty": false,
      "fallback_used": false
    },
    {
      "layer_id": "C2_DEPENDENCY_GRAPH",
      "hit_count": 4,
      "empty": false,
      "fallback_used": false
    }
  ],
  "empty_layers": [],
  "evidence_gate_decision": {
    "sufficient": true,
    "failure_reasons": [],
    "evidence_count": 13
  },
  "failure_reasons": [],
  "timings_ms": {
    "router": 0,
    "retrieval": 47,
    "pre_evidence_gate": 0,
    "llm": 1155
  }
}

## Mismatches
- none