ййй
This commit is contained in:
@@ -21,7 +21,7 @@ It uses agent components directly:
|
||||
|
||||
```bash
|
||||
PYTHONPATH=. python -m tests.pipeline_setup_v3.run \
|
||||
--cases-dir tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_smoke.yaml \
|
||||
--cases-dir tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_smoke.yaml \
|
||||
--run-name smoke_v3
|
||||
```
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ defaults:
|
||||
runner: code_qa_eval
|
||||
mode: router_rag
|
||||
input:
|
||||
repo_path: "../../../pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo"
|
||||
repo_path: "../../fixtures/code_qa_repo"
|
||||
project_id: code_qa_repo
|
||||
|
||||
cases:
|
||||
|
||||
@@ -2,7 +2,7 @@ defaults:
|
||||
runner: runtime
|
||||
mode: full_chain
|
||||
input:
|
||||
repo_path: "../../../pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo"
|
||||
repo_path: "../../fixtures/code_qa_repo"
|
||||
project_id: code_qa_repo_full_chain
|
||||
|
||||
cases:
|
||||
|
||||
@@ -2,7 +2,7 @@ defaults:
|
||||
runner: runtime
|
||||
mode: router_rag
|
||||
input:
|
||||
repo_path: "../../../pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo"
|
||||
repo_path: "../../fixtures/code_qa_repo"
|
||||
project_id: code_qa_repo_runtime
|
||||
|
||||
cases:
|
||||
|
||||
@@ -0,0 +1,275 @@
|
||||
defaults:
|
||||
runner: runtime
|
||||
mode: full_chain
|
||||
input:
|
||||
rag_session_id: "fb7e0690-e737-44ca-acc6-e38a0687a5ee"
|
||||
|
||||
cases:
|
||||
# DOCUMENTATION_EXPLAIN
|
||||
- id: docs-v1-explain-system-flow-telegram-loop
|
||||
query: "Объясни как работает цикл отправки уведомлений в Telegram"
|
||||
expected:
|
||||
router:
|
||||
intent: DOCUMENTATION_EXPLAIN
|
||||
sub_intent: SYSTEM_FLOW_EXPLAIN
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: true
|
||||
doc_scope_contains: ["logic.telegram_notification_loop"]
|
||||
layers_include: ["D1_DOCUMENT_CATALOG", "D4_WORKFLOW_INDEX", "D5_RELATION_GRAPH"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_all: ["TelegramNotifyWorker", "интервал"]
|
||||
answer_mode: answered
|
||||
|
||||
- id: docs-v1-explain-component-control-channel
|
||||
query: "Объясни как устроен компонент TelegramControlChannel"
|
||||
expected:
|
||||
router:
|
||||
intent: DOCUMENTATION_EXPLAIN
|
||||
sub_intent: COMPONENT_EXPLAIN
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: true
|
||||
entity_candidates_contain: ["TelegramControlChannel"]
|
||||
layers_include: ["D1_DOCUMENT_CATALOG", "D2_FACT_INDEX", "D5_RELATION_GRAPH"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_all: ["control plane", "/health"]
|
||||
answer_mode: answered
|
||||
|
||||
- id: docs-v1-explain-api-health-endpoint
|
||||
query: "Объясни что делает API метод /health"
|
||||
expected:
|
||||
router:
|
||||
intent: DOCUMENTATION_EXPLAIN
|
||||
sub_intent: API_METHOD_EXPLAIN
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: true
|
||||
doc_scope_contains: ["api.health_endpoint"]
|
||||
layers_include: ["D1_DOCUMENT_CATALOG", "D2_FACT_INDEX", "D4_WORKFLOW_INDEX", "D0_DOC_CHUNKS"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_all: ["HTTP 200", "HTTP 503"]
|
||||
answer_mode: answered
|
||||
|
||||
- id: docs-v1-explain-entity-runtime-health
|
||||
query: "Что такое сущность runtime health?"
|
||||
expected:
|
||||
router:
|
||||
intent: DOCUMENTATION_EXPLAIN
|
||||
sub_intent: ENTITY_EXPLAIN
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: true
|
||||
entity_candidates_contain: ["WorkerHealth", "WorkerStatus"]
|
||||
doc_scope_contains: ["domain.runtime_health"]
|
||||
layers_include: ["D1_DOCUMENT_CATALOG", "D3_ENTITY_CATALOG", "D5_RELATION_GRAPH"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_all: ["наблюдаемости", "telegram_notify"]
|
||||
answer_mode: answered
|
||||
|
||||
# DISCOVERY folded into DOCUMENTATION_EXPLAIN
|
||||
- id: docs-v1-discovery-find-documents-telegram-api
|
||||
query: "Найди документацию по Telegram API и control plane"
|
||||
expected:
|
||||
router:
|
||||
intent: DOCUMENTATION_EXPLAIN
|
||||
sub_intent: RELATED_DOCS_EXPLAIN
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: true
|
||||
layers_include: ["D1_DOCUMENT_CATALOG", "D2_FACT_INDEX"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_all: ["/health", "/send"]
|
||||
answer_mode: answered
|
||||
|
||||
- id: docs-v1-discovery-find-by-entity-telegramnotifyworker
|
||||
query: "Какие документы связаны с сущностью TelegramNotifyWorker?"
|
||||
expected:
|
||||
router:
|
||||
intent: DOCUMENTATION_EXPLAIN
|
||||
sub_intent: RELATED_DOCS_EXPLAIN
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: true
|
||||
entity_candidates_contain: ["TelegramNotifyWorker"]
|
||||
layers_include: ["D5_RELATION_GRAPH", "D1_DOCUMENT_CATALOG"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_all: ["logic.telegram_notification_loop", "api.health_endpoint"]
|
||||
answer_mode: answered
|
||||
|
||||
- id: docs-v1-discovery-find-by-topic-health
|
||||
query: "Где в документации описан health runtime?"
|
||||
expected:
|
||||
router:
|
||||
intent: DOCUMENTATION_EXPLAIN
|
||||
sub_intent: RELATED_DOCS_EXPLAIN
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: true
|
||||
layers_include: ["D5_RELATION_GRAPH", "D1_DOCUMENT_CATALOG"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_all: ["api.health_endpoint", "domain.runtime_health"]
|
||||
answer_mode: answered
|
||||
|
||||
# NAVIGATION folded into DOCUMENTATION_EXPLAIN
|
||||
- id: docs-v1-navigation-related-docs-health-endpoint
|
||||
query: "Какие документы связаны с endpoint /health?"
|
||||
expected:
|
||||
router:
|
||||
intent: DOCUMENTATION_EXPLAIN
|
||||
sub_intent: RELATED_DOCS_EXPLAIN
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: true
|
||||
doc_scope_contains: ["api.health_endpoint"]
|
||||
layers_include: ["D5_RELATION_GRAPH", "D1_DOCUMENT_CATALOG"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_all: ["architecture.telegram_notify_app", "domain.runtime_health"]
|
||||
answer_mode: answered
|
||||
|
||||
- id: docs-v1-navigation-parent-child-architecture
|
||||
query: "Покажи навигацию от overview архитектуры к дочерним документам"
|
||||
expected:
|
||||
router:
|
||||
intent: DOCUMENTATION_EXPLAIN
|
||||
sub_intent: RELATED_DOCS_EXPLAIN
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: true
|
||||
doc_scope_contains: ["architecture.telegram_notify_app"]
|
||||
layers_include: ["D5_RELATION_GRAPH", "D1_DOCUMENT_CATALOG"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_all: ["api.health_endpoint", "logic.telegram_notification_loop"]
|
||||
answer_mode: answered
|
||||
|
||||
- id: docs-v1-navigation-workflow-send-message
|
||||
query: "По каким документам идти, чтобы понять сценарий ручной отправки сообщения?"
|
||||
expected:
|
||||
router:
|
||||
intent: DOCUMENTATION_EXPLAIN
|
||||
sub_intent: RELATED_DOCS_EXPLAIN
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: true
|
||||
layers_include: ["D5_RELATION_GRAPH", "D1_DOCUMENT_CATALOG"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_all: ["api.send_message_endpoint", "logic.telegram_notification_loop"]
|
||||
answer_mode: answered
|
||||
|
||||
# OPENAPI_GENERATION
|
||||
- id: docs-v1-openapi-method-health-endpoint
|
||||
query: "Сгенерируй OpenAPI для метода /health по документации"
|
||||
expected:
|
||||
router:
|
||||
intent: OPENAPI_GENERATION
|
||||
sub_intent: OPENAPI_METHOD_GENERATE
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: true
|
||||
filters_contain:
|
||||
doc_type: api_method
|
||||
doc_scope_contains: ["api.health_endpoint"]
|
||||
layers_include: ["D1_DOCUMENT_CATALOG", "D2_FACT_INDEX", "D0_DOC_CHUNKS"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_all: ["paths:", "/health", "get:"]
|
||||
answer_mode: structured_spec
|
||||
|
||||
- id: docs-v1-openapi-fragment-send-request
|
||||
query: "Сгенерируй request schema для endpoint /send по документации"
|
||||
expected:
|
||||
router:
|
||||
intent: OPENAPI_GENERATION
|
||||
sub_intent: OPENAPI_FRAGMENT_GENERATE
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: true
|
||||
filters_contain:
|
||||
doc_type: api_method
|
||||
doc_scope_contains: ["api.send_message_endpoint"]
|
||||
layers_include: ["D1_DOCUMENT_CATALOG", "D2_FACT_INDEX", "D0_DOC_CHUNKS"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_all: ["message", "type:", "string"]
|
||||
answer_mode: structured_spec
|
||||
|
||||
- id: docs-v1-openapi-fragment-control-actions-response
|
||||
query: "Собери response schema для /actions/{action} по документации"
|
||||
expected:
|
||||
router:
|
||||
intent: OPENAPI_GENERATION
|
||||
sub_intent: OPENAPI_FRAGMENT_GENERATE
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: true
|
||||
filters_contain:
|
||||
doc_type: api_method
|
||||
doc_scope_contains: ["api.control_actions_endpoint"]
|
||||
layers_include: ["D1_DOCUMENT_CATALOG", "D2_FACT_INDEX", "D0_DOC_CHUNKS"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_all: ["status", "detail"]
|
||||
answer_mode: structured_spec
|
||||
|
||||
# NEGATIVE / NOT FOUND
|
||||
- id: docs-v1-discovery-find-by-entity-nonexistent
|
||||
query: "Какие документы связаны с сущностью PaymentTransaction?"
|
||||
expected:
|
||||
router:
|
||||
intent: DOCUMENTATION_EXPLAIN
|
||||
sub_intent: RELATED_DOCS_EXPLAIN
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: false
|
||||
entity_candidates_contain: ["PaymentTransaction"]
|
||||
layers_include: ["D3_ENTITY_CATALOG", "D1_DOCUMENT_CATALOG", "D5_RELATION_GRAPH"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_all: ["не найдена"]
|
||||
excludes: ["вероятно", "исходя из названия"]
|
||||
pipeline:
|
||||
answer_mode: degraded
|
||||
|
||||
- id: docs-v1-openapi-method-nonexistent
|
||||
query: "Сгенерируй OpenAPI для endpoint /orders по документации"
|
||||
expected:
|
||||
router:
|
||||
intent: OPENAPI_GENERATION
|
||||
sub_intent: OPENAPI_METHOD_GENERATE
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: false
|
||||
filters_contain:
|
||||
doc_type: api_method
|
||||
layers_include: ["D1_DOCUMENT_CATALOG", "D2_FACT_INDEX", "D0_DOC_CHUNKS"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_all: ["не найден"]
|
||||
excludes: ["paths:", "/orders", "post:"]
|
||||
pipeline:
|
||||
answer_mode: degraded
|
||||
@@ -0,0 +1,271 @@
|
||||
defaults:
|
||||
runner: runtime
|
||||
mode: full_chain
|
||||
input:
|
||||
rag_session_id: "fb7e0690-e737-44ca-acc6-e38a0687a5ee"
|
||||
|
||||
cases:
|
||||
# ============================================================
|
||||
# DOCUMENTATION_EXPLAIN / SYSTEM_FLOW_EXPLAIN
|
||||
# ============================================================
|
||||
- id: docs-v2-system-flow-telegram-loop
|
||||
query: "Объясни как работает цикл отправки уведомлений в Telegram"
|
||||
expected:
|
||||
router:
|
||||
intent: DOCUMENTATION_EXPLAIN
|
||||
sub_intent: SYSTEM_FLOW_EXPLAIN
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: true
|
||||
doc_scope_contains: ["logic.telegram_notification_loop"]
|
||||
layers_include: ["D1_DOCUMENT_CATALOG", "D4_WORKFLOW_INDEX", "D5_RELATION_GRAPH", "D0_DOC_CHUNKS"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_any: ["TelegramNotifyWorker", "интервал", "degraded"]
|
||||
answer_mode: answered
|
||||
|
||||
- id: docs-v2-system-flow-health-check
|
||||
query: "Как происходит получение health состояния runtime?"
|
||||
expected:
|
||||
router:
|
||||
intent: DOCUMENTATION_EXPLAIN
|
||||
sub_intent: SYSTEM_FLOW_EXPLAIN
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: true
|
||||
doc_scope_contains: ["api.health_endpoint", "domain.runtime_health"]
|
||||
layers_include: ["D1_DOCUMENT_CATALOG", "D4_WORKFLOW_INDEX", "D5_RELATION_GRAPH", "D0_DOC_CHUNKS"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_any: ["/health", "HTTP 200", "HTTP 503", "payload"]
|
||||
answer_mode: answered
|
||||
|
||||
# ============================================================
|
||||
# DOCUMENTATION_EXPLAIN / COMPONENT_EXPLAIN
|
||||
# ============================================================
|
||||
- id: docs-v2-component-control-channel
|
||||
query: "Объясни как работает компонент TelegramControlChannel"
|
||||
expected:
|
||||
router:
|
||||
intent: DOCUMENTATION_EXPLAIN
|
||||
sub_intent: COMPONENT_EXPLAIN
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: true
|
||||
entity_candidates_contain: ["TelegramControlChannel"]
|
||||
layers_include: ["D1_DOCUMENT_CATALOG", "D2_FACT_INDEX", "D5_RELATION_GRAPH", "D0_DOC_CHUNKS"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_any: ["/health", "/actions/{action}", "/send"]
|
||||
answer_mode: answered
|
||||
|
||||
- id: docs-v2-component-runtime-manager
|
||||
query: "Какую роль в системе играет RuntimeManager?"
|
||||
expected:
|
||||
router:
|
||||
intent: DOCUMENTATION_EXPLAIN
|
||||
sub_intent: COMPONENT_EXPLAIN
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: true
|
||||
entity_candidates_contain: ["RuntimeManager"]
|
||||
layers_include: ["D1_DOCUMENT_CATALOG", "D2_FACT_INDEX", "D5_RELATION_GRAPH", "D0_DOC_CHUNKS"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_any: ["runtime", "регистр", "TelegramNotifyModule"]
|
||||
answer_mode: answered
|
||||
|
||||
# ============================================================
|
||||
# DOCUMENTATION_EXPLAIN / API_METHOD_EXPLAIN
|
||||
# ============================================================
|
||||
- id: docs-v2-api-health-endpoint
|
||||
query: "Объясни что делает endpoint /health"
|
||||
expected:
|
||||
router:
|
||||
intent: DOCUMENTATION_EXPLAIN
|
||||
sub_intent: API_METHOD_EXPLAIN
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: true
|
||||
doc_scope_contains: ["api.health_endpoint"]
|
||||
layers_include: ["D1_DOCUMENT_CATALOG", "D2_FACT_INDEX", "D4_WORKFLOW_INDEX", "D0_DOC_CHUNKS"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_any: ["HTTP 200", "HTTP 503", "payload", "components"]
|
||||
answer_mode: answered
|
||||
|
||||
- id: docs-v2-api-send-endpoint
|
||||
query: "Как работает endpoint /send?"
|
||||
expected:
|
||||
router:
|
||||
intent: DOCUMENTATION_EXPLAIN
|
||||
sub_intent: API_METHOD_EXPLAIN
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: true
|
||||
doc_scope_contains: ["api.send_message_endpoint"]
|
||||
layers_include: ["D1_DOCUMENT_CATALOG", "D2_FACT_INDEX", "D4_WORKFLOW_INDEX", "D0_DOC_CHUNKS"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_any: ["message", "HTTP 400", "HTTP 500", "TelegramSendService"]
|
||||
answer_mode: answered
|
||||
|
||||
# ============================================================
|
||||
# DOCUMENTATION_EXPLAIN / ENTITY_EXPLAIN
|
||||
# ============================================================
|
||||
- id: docs-v2-entity-runtime-health
|
||||
query: "Что такое runtime health?"
|
||||
expected:
|
||||
router:
|
||||
intent: DOCUMENTATION_EXPLAIN
|
||||
sub_intent: ENTITY_EXPLAIN
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: true
|
||||
doc_scope_contains: ["domain.runtime_health"]
|
||||
layers_include: ["D3_ENTITY_CATALOG", "D1_DOCUMENT_CATALOG", "D5_RELATION_GRAPH", "D0_DOC_CHUNKS"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_any: ["наблюдаемости", "WorkerHealth", "WorkerStatus", "telegram_notify"]
|
||||
answer_mode: answered
|
||||
|
||||
- id: docs-v2-entity-worker-status
|
||||
query: "Объясни сущность WorkerStatus"
|
||||
expected:
|
||||
router:
|
||||
intent: DOCUMENTATION_EXPLAIN
|
||||
sub_intent: ENTITY_EXPLAIN
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: true
|
||||
entity_candidates_contain: ["WorkerStatus"]
|
||||
layers_include: ["D3_ENTITY_CATALOG", "D1_DOCUMENT_CATALOG", "D5_RELATION_GRAPH", "D0_DOC_CHUNKS"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_any: ["ok", "degraded", "unhealthy"]
|
||||
answer_mode: answered
|
||||
|
||||
# ============================================================
|
||||
# DOCUMENTATION_EXPLAIN / RELATED_DOCS_EXPLAIN
|
||||
# ============================================================
|
||||
- id: docs-v2-related-docs-health
|
||||
query: "Какие документы связаны с endpoint /health?"
|
||||
expected:
|
||||
router:
|
||||
intent: DOCUMENTATION_EXPLAIN
|
||||
sub_intent: RELATED_DOCS_EXPLAIN
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: true
|
||||
doc_scope_contains: ["api.health_endpoint"]
|
||||
layers_include: ["D5_RELATION_GRAPH", "D1_DOCUMENT_CATALOG", "D0_DOC_CHUNKS"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_any: ["domain.runtime_health", "architecture.telegram_notify_app"]
|
||||
answer_mode: answered
|
||||
|
||||
- id: docs-v2-related-docs-architecture-overview
|
||||
query: "Какие дочерние документы есть у overview архитектуры сервиса?"
|
||||
expected:
|
||||
router:
|
||||
intent: DOCUMENTATION_EXPLAIN
|
||||
sub_intent: RELATED_DOCS_EXPLAIN
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: true
|
||||
doc_scope_contains: ["architecture.telegram_notify_app"]
|
||||
layers_include: ["D5_RELATION_GRAPH", "D1_DOCUMENT_CATALOG", "D0_DOC_CHUNKS"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_any: ["api.health_endpoint", "api.send_message_endpoint", "logic.telegram_notification_loop"]
|
||||
answer_mode: answered
|
||||
|
||||
# ============================================================
|
||||
# OPENAPI_GENERATION / OPENAPI_METHOD_GENERATE
|
||||
# ============================================================
|
||||
- id: docs-v2-openapi-health
|
||||
query: "Сгенерируй OpenAPI для endpoint /health по документации"
|
||||
expected:
|
||||
router:
|
||||
intent: OPENAPI_GENERATION
|
||||
sub_intent: OPENAPI_METHOD_GENERATE
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: true
|
||||
doc_scope_contains: ["api.health_endpoint"]
|
||||
layers_include: ["D1_DOCUMENT_CATALOG", "D2_FACT_INDEX", "D0_DOC_CHUNKS"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_any: ["paths:", "/health", "get:"]
|
||||
answer_mode: structured_spec
|
||||
|
||||
# ============================================================
|
||||
# OPENAPI_GENERATION / OPENAPI_FRAGMENT_GENERATE
|
||||
# ============================================================
|
||||
- id: docs-v2-openapi-fragment-send-request
|
||||
query: "Сгенерируй request schema для endpoint /send"
|
||||
expected:
|
||||
router:
|
||||
intent: OPENAPI_GENERATION
|
||||
sub_intent: OPENAPI_FRAGMENT_GENERATE
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: true
|
||||
doc_scope_contains: ["api.send_message_endpoint"]
|
||||
layers_include: ["D1_DOCUMENT_CATALOG", "D2_FACT_INDEX", "D0_DOC_CHUNKS"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_any: ["message", "string"]
|
||||
answer_mode: structured_spec
|
||||
|
||||
# ============================================================
|
||||
# GENERAL_QA / GENERIC_QA
|
||||
# ============================================================
|
||||
- id: docs-v2-general-overview
|
||||
query: "Что вообще описано в документации по этому сервису?"
|
||||
expected:
|
||||
router:
|
||||
intent: GENERAL_QA
|
||||
sub_intent: GENERIC_QA
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: true
|
||||
layers_include: ["D1_DOCUMENT_CATALOG", "D0_DOC_CHUNKS"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_any: ["архитектура", "API", "worker", "runtime"]
|
||||
answer_mode: answered
|
||||
|
||||
# ============================================================
|
||||
# NEGATIVE / DEGRADED
|
||||
# ============================================================
|
||||
- id: docs-v2-negative-missing-entity
|
||||
query: "Что такое сущность PaymentTransaction?"
|
||||
expected:
|
||||
router:
|
||||
intent: DOCUMENTATION_EXPLAIN
|
||||
sub_intent: ENTITY_EXPLAIN
|
||||
graph_id: DocsQAGraph
|
||||
conversation_mode: START
|
||||
retrieval:
|
||||
non_empty: false
|
||||
entity_candidates_contain: ["PaymentTransaction"]
|
||||
layers_include: ["D3_ENTITY_CATALOG", "D1_DOCUMENT_CATALOG", "D5_RELATION_GRAPH", "D0_DOC_CHUNKS"]
|
||||
llm:
|
||||
non_empty: true
|
||||
contains_any: ["не найдена", "нет в документации"]
|
||||
pipeline:
|
||||
answer_mode: degraded
|
||||
@@ -0,0 +1,220 @@
|
||||
# full_chain_docs_intents_v3.yaml
|
||||
|
||||
defaults:
|
||||
runner: runtime
|
||||
mode: pre_llm
|
||||
input:
|
||||
rag_session_id: "fb7e0690-e737-44ca-acc6-e38a0687a5ee"
|
||||
|
||||
cases:
|
||||
|
||||
# ============================================================
|
||||
# SYSTEM FLOW (расширено)
|
||||
# ============================================================
|
||||
|
||||
- id: v3-system-flow-telegram-loop-1
|
||||
query: "Объясни цикл отправки уведомлений"
|
||||
expected:
|
||||
router:
|
||||
intent: DOCUMENTATION_EXPLAIN
|
||||
sub_intent: SYSTEM_FLOW_EXPLAIN
|
||||
|
||||
- id: v3-system-flow-telegram-loop-2
|
||||
query: "Как работает процесс отправки уведомлений в Telegram?"
|
||||
expected:
|
||||
router:
|
||||
intent: DOCUMENTATION_EXPLAIN
|
||||
sub_intent: SYSTEM_FLOW_EXPLAIN
|
||||
|
||||
- id: v3-system-flow-telegram-loop-3
|
||||
query: "Опиши workflow Telegram уведомлений"
|
||||
expected:
|
||||
router:
|
||||
intent: DOCUMENTATION_EXPLAIN
|
||||
sub_intent: SYSTEM_FLOW_EXPLAIN
|
||||
|
||||
- id: v3-system-flow-health-1
|
||||
query: "Как работает health check runtime?"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: SYSTEM_FLOW_EXPLAIN
|
||||
|
||||
- id: v3-system-flow-health-2
|
||||
query: "Как происходит проверка состояния runtime?"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: SYSTEM_FLOW_EXPLAIN
|
||||
|
||||
# ============================================================
|
||||
# COMPONENT (расширено)
|
||||
# ============================================================
|
||||
|
||||
- id: v3-component-runtime-manager-1
|
||||
query: "Что делает RuntimeManager?"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: COMPONENT_EXPLAIN
|
||||
|
||||
- id: v3-component-runtime-manager-2
|
||||
query: "Как устроен RuntimeManager?"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: COMPONENT_EXPLAIN
|
||||
|
||||
- id: v3-component-runtime-manager-3
|
||||
query: "Опиши компонент RuntimeManager"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: COMPONENT_EXPLAIN
|
||||
|
||||
- id: v3-component-control-channel-1
|
||||
query: "Как работает TelegramControlChannel?"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: COMPONENT_EXPLAIN
|
||||
|
||||
- id: v3-component-control-channel-2
|
||||
query: "Роль TelegramControlChannel в системе"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: COMPONENT_EXPLAIN
|
||||
|
||||
# ============================================================
|
||||
# API (расширено)
|
||||
# ============================================================
|
||||
|
||||
- id: v3-api-health-1
|
||||
query: "Что делает /health?"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: API_METHOD_EXPLAIN
|
||||
|
||||
- id: v3-api-health-2
|
||||
query: "Как работает health endpoint?"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: API_METHOD_EXPLAIN
|
||||
|
||||
- id: v3-api-health-3
|
||||
query: "Опиши endpoint health"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: API_METHOD_EXPLAIN
|
||||
|
||||
- id: v3-api-send-1
|
||||
query: "Что делает /send?"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: API_METHOD_EXPLAIN
|
||||
|
||||
- id: v3-api-send-2
|
||||
query: "Как работает send endpoint?"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: API_METHOD_EXPLAIN
|
||||
|
||||
- id: v3-api-send-3
|
||||
query: "Опиши endpoint отправки сообщений"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: API_METHOD_EXPLAIN
|
||||
|
||||
# ============================================================
|
||||
# ENTITY (расширено)
|
||||
# ============================================================
|
||||
|
||||
- id: v3-entity-runtime-health-1
|
||||
query: "Что такое runtime health?"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: ENTITY_EXPLAIN
|
||||
|
||||
- id: v3-entity-runtime-health-2
|
||||
query: "Объясни runtime health"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: ENTITY_EXPLAIN
|
||||
|
||||
- id: v3-entity-worker-status-1
|
||||
query: "Что такое WorkerStatus?"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: ENTITY_EXPLAIN
|
||||
|
||||
- id: v3-entity-worker-status-2
|
||||
query: "Опиши статус воркера"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: ENTITY_EXPLAIN
|
||||
|
||||
# ============================================================
|
||||
# RELATED DOCS (расширено)
|
||||
# ============================================================
|
||||
|
||||
- id: v3-related-health-1
|
||||
query: "Что связано с /health?"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: RELATED_DOCS_EXPLAIN
|
||||
|
||||
- id: v3-related-health-2
|
||||
query: "Какие документы относятся к health endpoint?"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: RELATED_DOCS_EXPLAIN
|
||||
|
||||
- id: v3-related-send-1
|
||||
query: "Какие документы связаны с /send?"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: RELATED_DOCS_EXPLAIN
|
||||
|
||||
- id: v3-related-architecture-1
|
||||
query: "Какие документы связаны с архитектурой?"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: RELATED_DOCS_EXPLAIN
|
||||
|
||||
# ============================================================
|
||||
# GENERAL (расширено)
|
||||
# ============================================================
|
||||
|
||||
- id: v3-general-1
|
||||
query: "Что есть в документации?"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: GENERIC_QA
|
||||
|
||||
- id: v3-general-2
|
||||
query: "Какая структура документации?"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: GENERIC_QA
|
||||
|
||||
- id: v3-general-3
|
||||
query: "С чего начать читать документацию?"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: GENERIC_QA
|
||||
|
||||
# ============================================================
|
||||
# NEGATIVE (расширено)
|
||||
# ============================================================
|
||||
|
||||
- id: v3-negative-1
|
||||
query: "Что такое PaymentTransaction?"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: ENTITY_EXPLAIN
|
||||
|
||||
- id: v3-negative-2
|
||||
query: "Объясни сущность UnknownEntity"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: ENTITY_EXPLAIN
|
||||
|
||||
- id: v3-negative-3
|
||||
query: "Что делает endpoint /unknown?"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: API_METHOD_EXPLAIN
|
||||
@@ -0,0 +1,79 @@
|
||||
# full_chain_docs_intents_v4.yaml
|
||||
|
||||
defaults:
|
||||
runner: runtime
|
||||
mode: full_chain
|
||||
input:
|
||||
rag_session_id: "fb7e0690-e737-44ca-acc6-e38a0687a5ee"
|
||||
|
||||
cases:
|
||||
|
||||
# SYSTEM FLOW
|
||||
- id: v4-system-flow
|
||||
query: "Объясни как работает цикл отправки уведомлений"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: SYSTEM_FLOW_EXPLAIN
|
||||
|
||||
# COMPONENT
|
||||
- id: v4-component
|
||||
query: "Как работает RuntimeManager?"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: COMPONENT_EXPLAIN
|
||||
|
||||
# API
|
||||
- id: v4-api
|
||||
query: "Что делает endpoint /health?"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: API_METHOD_EXPLAIN
|
||||
|
||||
# ENTITY
|
||||
- id: v4-entity
|
||||
query: "Что такое runtime health?"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: ENTITY_EXPLAIN
|
||||
|
||||
# RELATED DOCS
|
||||
- id: v4-related
|
||||
query: "Какие документы связаны с endpoint /health?"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: RELATED_DOCS_EXPLAIN
|
||||
|
||||
# OPENAPI METHOD
|
||||
- id: v4-openapi-method
|
||||
query: "Сгенерируй OpenAPI для endpoint /health"
|
||||
expected:
|
||||
router:
|
||||
intent: OPENAPI_GENERATION
|
||||
|
||||
# OPENAPI FRAGMENT
|
||||
- id: v4-openapi-fragment
|
||||
query: "Сгенерируй request schema для endpoint /send"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: OPENAPI_FRAGMENT_GENERATE
|
||||
|
||||
# GENERAL
|
||||
- id: v4-general
|
||||
query: "Что описано в документации?"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: GENERIC_QA
|
||||
|
||||
# NEGATIVE
|
||||
- id: v4-negative
|
||||
query: "Что такое PaymentTransaction?"
|
||||
expected:
|
||||
router:
|
||||
sub_intent: ENTITY_EXPLAIN
|
||||
|
||||
# EDGE MIXED
|
||||
- id: v4-mixed
|
||||
query: "Как работает /send и какие есть связанные документы?"
|
||||
expected:
|
||||
router:
|
||||
intent: DOCUMENTATION_EXPLAIN
|
||||
@@ -10,12 +10,23 @@ _src = _agent_root / "src"
|
||||
if _src.exists() and str(_src) not in sys.path:
|
||||
sys.path.insert(0, str(_src))
|
||||
|
||||
from app.modules.rag.persistence.repository import RagRepository
|
||||
from tests.pipeline_setup_v3.shared.env_loader import load_pipeline_setup_env
|
||||
from tests.pipeline_setup_v3.shared.rag_indexer import RagSessionIndexer
|
||||
|
||||
|
||||
def main() -> int:
|
||||
argv = ["reindex", *sys.argv[1:]]
|
||||
from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.cli import main as cli_main
|
||||
import argparse
|
||||
|
||||
return cli_main(argv)
|
||||
parser = argparse.ArgumentParser(description="Index a repo for pipeline_setup_v3")
|
||||
parser.add_argument("--repo-path", required=True, help="Repository path to index")
|
||||
parser.add_argument("--project-id", default=None, help="Optional project id override")
|
||||
ns = parser.parse_args(sys.argv[1:])
|
||||
|
||||
load_pipeline_setup_env(start_dir=Path(__file__).resolve().parents[1])
|
||||
repo_path = Path(str(ns.repo_path)).expanduser().resolve()
|
||||
RagSessionIndexer(RagRepository()).index_repo(repo_path, project_id=ns.project_id)
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -15,18 +15,9 @@ class ArtifactWriter:
|
||||
|
||||
def write_case(self, result: V3CaseResult) -> None:
|
||||
stem = f"{result.case.source_file.stem}_{result.case.case_id}"
|
||||
payload = {
|
||||
"case_id": result.case.case_id,
|
||||
"source_file": result.case.source_file.as_posix(),
|
||||
"runner": result.case.runner,
|
||||
"mode": result.case.mode,
|
||||
"query": result.case.query,
|
||||
"actual": result.actual,
|
||||
"passed": result.passed,
|
||||
"mismatches": result.mismatches,
|
||||
"details": result.details,
|
||||
}
|
||||
payload = self._json_payload(result)
|
||||
(self.run_dir / f"{stem}.json").write_text(json.dumps(payload, ensure_ascii=False, indent=2), encoding="utf-8")
|
||||
diagnostics = self._diagnostics_without_prompt(result.details)
|
||||
lines = [
|
||||
f"# {result.case.case_id}",
|
||||
"",
|
||||
@@ -41,17 +32,161 @@ class ArtifactWriter:
|
||||
"## Actual",
|
||||
json.dumps(result.actual, ensure_ascii=False, indent=2),
|
||||
"",
|
||||
"## Steps",
|
||||
json.dumps(result.details.get("steps") or [], ensure_ascii=False, indent=2),
|
||||
"## Pipeline Steps",
|
||||
*self._md_steps(result),
|
||||
"",
|
||||
"## Diagnostics",
|
||||
json.dumps(result.details.get("diagnostics") or {}, ensure_ascii=False, indent=2),
|
||||
json.dumps(diagnostics, ensure_ascii=False, indent=2),
|
||||
"",
|
||||
*self._llm_request_section(result.details),
|
||||
"",
|
||||
"## Mismatches",
|
||||
*([f"- {item}" for item in result.mismatches] or ["- none"]),
|
||||
]
|
||||
(self.run_dir / f"{stem}.md").write_text("\n".join(lines), encoding="utf-8")
|
||||
|
||||
def _json_payload(self, result: V3CaseResult) -> dict:
|
||||
return {
|
||||
"meta": {
|
||||
"case_id": result.case.case_id,
|
||||
"source_file": result.case.source_file.as_posix(),
|
||||
"runner": result.case.runner,
|
||||
"mode": result.case.mode,
|
||||
"passed": result.passed,
|
||||
"mismatches": result.mismatches,
|
||||
"actual": result.actual,
|
||||
},
|
||||
"pipeline_steps": list(result.details.get("pipeline_steps") or []),
|
||||
}
|
||||
|
||||
def _md_steps(self, result: V3CaseResult) -> list[str]:
|
||||
steps = list(result.details.get("pipeline_steps") or [])
|
||||
if not steps:
|
||||
return ["- none"]
|
||||
lines: list[str] = []
|
||||
for item in steps:
|
||||
step = str(item.get("step") or "").strip() or "unknown"
|
||||
status = str(item.get("status") or "").strip()
|
||||
lines.append(f"### {step}")
|
||||
if status:
|
||||
lines.append(f"- status: {status}")
|
||||
timings = item.get("timings_ms") or {}
|
||||
if timings:
|
||||
lines.append(f"- timings_ms: {json.dumps(timings, ensure_ascii=False)}")
|
||||
lines.append("```json")
|
||||
lines.append(json.dumps({"input": item.get("input") or {}, "output": item.get("output") or {}}, ensure_ascii=False, indent=2))
|
||||
lines.append("```")
|
||||
lines.append("")
|
||||
return lines[:-1] if lines and not lines[-1] else lines
|
||||
|
||||
def _diagnostics_without_prompt(self, details: dict) -> dict:
|
||||
diagnostics = dict(details.get("diagnostics") or {})
|
||||
diagnostics.pop("prompt", None)
|
||||
return diagnostics
|
||||
|
||||
def _llm_request_section(self, details: dict) -> list[str]:
|
||||
llm_request = dict(details.get("llm_request") or {})
|
||||
if not llm_request:
|
||||
llm_request = dict((details.get("diagnostics") or {}).get("prompt") or {})
|
||||
if not llm_request:
|
||||
return []
|
||||
lines = [
|
||||
"## LLM Request",
|
||||
f"- prompt_name: {llm_request.get('prompt_name') or '—'}",
|
||||
f"- log_context: {llm_request.get('log_context') or '—'}",
|
||||
]
|
||||
prompt_stats = dict(llm_request.get("prompt_stats") or {})
|
||||
if prompt_stats:
|
||||
lines.extend(
|
||||
[
|
||||
"",
|
||||
"### Prompt Stats",
|
||||
"```json",
|
||||
json.dumps(prompt_stats, ensure_ascii=False, indent=2),
|
||||
"```",
|
||||
]
|
||||
)
|
||||
system_prompt = str(llm_request.get("system_prompt") or "").strip()
|
||||
user_prompt = str(llm_request.get("user_prompt") or "").strip()
|
||||
lines.extend(
|
||||
[
|
||||
"",
|
||||
"### System Prompt",
|
||||
"```text",
|
||||
system_prompt or "—",
|
||||
"```",
|
||||
"",
|
||||
"### User Prompt",
|
||||
*self._render_user_prompt(user_prompt),
|
||||
]
|
||||
)
|
||||
return lines
|
||||
|
||||
def _render_user_prompt(self, user_prompt: str) -> list[str]:
|
||||
payload = self._parse_json(user_prompt)
|
||||
if payload is None:
|
||||
return ["```text", user_prompt or "—", "```"]
|
||||
lines = ["```json", json.dumps(payload, ensure_ascii=False, indent=2), "```"]
|
||||
lines.extend(self._prompt_overview(payload))
|
||||
return lines
|
||||
|
||||
def _prompt_overview(self, payload: dict) -> list[str]:
|
||||
lines = ["", "### User Prompt Overview"]
|
||||
for key in ("question", "intent", "sub_intent"):
|
||||
value = payload.get(key)
|
||||
if value is not None:
|
||||
lines.append(f"- {key}: {value}")
|
||||
lines.extend(self._prompt_collection_line("documents", payload.get("documents")))
|
||||
lines.extend(self._prompt_collection_line("facts", payload.get("facts")))
|
||||
lines.extend(self._prompt_collection_line("relations", payload.get("relations")))
|
||||
api_contract = payload.get("api_contract")
|
||||
if isinstance(api_contract, dict):
|
||||
lines.append("- api_contract:")
|
||||
lines.extend(self._api_contract_lines(api_contract))
|
||||
return lines
|
||||
|
||||
def _prompt_collection_line(self, name: str, value) -> list[str]:
|
||||
items = value if isinstance(value, list) else []
|
||||
if not items:
|
||||
return [f"- {name}: 0"]
|
||||
samples: list[str] = []
|
||||
for item in items[:3]:
|
||||
if not isinstance(item, dict):
|
||||
continue
|
||||
sample = str(
|
||||
item.get("title")
|
||||
or item.get("content")
|
||||
or item.get("path")
|
||||
or item.get("doc_id")
|
||||
or item.get("id")
|
||||
or ""
|
||||
).strip()
|
||||
if sample:
|
||||
samples.append(" ".join(sample.split()))
|
||||
suffix = f" | samples: {', '.join(samples)}" if samples else ""
|
||||
return [f"- {name}: {len(items)}{suffix}"]
|
||||
|
||||
def _api_contract_lines(self, api_contract: dict) -> list[str]:
|
||||
lines: list[str] = []
|
||||
path = str(api_contract.get("path") or "").strip() or "—"
|
||||
method = str(api_contract.get("method") or "").strip() or "—"
|
||||
request_schema = api_contract.get("request_schema")
|
||||
response_schema = api_contract.get("response_schema")
|
||||
lines.append(f" path: {path}")
|
||||
lines.append(f" method: {method}")
|
||||
lines.append(f" has_request_schema: {bool(request_schema)}")
|
||||
lines.append(f" has_response_schema: {bool(response_schema)}")
|
||||
return lines
|
||||
|
||||
def _parse_json(self, text: str) -> dict | None:
|
||||
if not text.strip():
|
||||
return None
|
||||
try:
|
||||
payload = json.loads(text)
|
||||
except json.JSONDecodeError:
|
||||
return None
|
||||
return payload if isinstance(payload, dict) else None
|
||||
|
||||
def write_summary(self, results: list[V3CaseResult]) -> Path:
|
||||
path = self.run_dir / "summary.md"
|
||||
path.write_text(SummaryComposer().compose(results), encoding="utf-8")
|
||||
|
||||
@@ -94,15 +94,21 @@ class CaseDirectoryLoader:
|
||||
else None
|
||||
),
|
||||
path_scope_contains=tuple(str(item) for item in retrieval.get("path_scope_contains") or []),
|
||||
doc_scope_contains=tuple(str(item) for item in retrieval.get("doc_scope_contains") or []),
|
||||
symbol_candidates_contain=tuple(str(item) for item in retrieval.get("symbol_candidates_contain") or []),
|
||||
entity_candidates_contain=tuple(str(item) for item in retrieval.get("entity_candidates_contain") or []),
|
||||
layers_include=tuple(str(item) for item in retrieval.get("layers_include") or []),
|
||||
filters_contain={str(k): str(v) for k, v in dict(retrieval.get("filters_contain") or {}).items()},
|
||||
),
|
||||
llm=LlmExpectation(
|
||||
non_empty=llm.get("non_empty"),
|
||||
contains_all=tuple(str(item) for item in llm.get("contains_all") or []),
|
||||
excludes=tuple(str(item) for item in llm.get("excludes") or []),
|
||||
answer_mode=str(llm.get("answer_mode") or "").strip() or None,
|
||||
),
|
||||
pipeline=PipelineExpectation(
|
||||
answer_mode=str(pipeline.get("answer_mode") or llm.get("answer_mode") or "").strip() or None
|
||||
),
|
||||
pipeline=PipelineExpectation(answer_mode=str(pipeline.get("answer_mode") or "").strip() or None),
|
||||
)
|
||||
|
||||
def _normalize_runner(self, value: str) -> str:
|
||||
|
||||
@@ -30,8 +30,11 @@ class RetrievalExpectation:
|
||||
min_rows: int | None = None
|
||||
direct_symbol_test_hits_max: int | None = None
|
||||
path_scope_contains: tuple[str, ...] = ()
|
||||
doc_scope_contains: tuple[str, ...] = ()
|
||||
symbol_candidates_contain: tuple[str, ...] = ()
|
||||
entity_candidates_contain: tuple[str, ...] = ()
|
||||
layers_include: tuple[str, ...] = ()
|
||||
filters_contain: dict[str, str] = field(default_factory=dict)
|
||||
|
||||
|
||||
@dataclass(slots=True, frozen=True)
|
||||
@@ -39,6 +42,7 @@ class LlmExpectation:
|
||||
non_empty: bool | None = None
|
||||
contains_all: tuple[str, ...] = ()
|
||||
excludes: tuple[str, ...] = ()
|
||||
answer_mode: str | None = None
|
||||
|
||||
|
||||
@dataclass(slots=True, frozen=True)
|
||||
|
||||
@@ -11,8 +11,18 @@ from tests.pipeline_setup_v3.core.validators import CaseValidator
|
||||
|
||||
|
||||
class V3Runner:
|
||||
def __init__(self, cases_dir: Path, results_dir: Path, run_name: str) -> None:
|
||||
def __init__(
|
||||
self,
|
||||
cases_dir: Path,
|
||||
results_dir: Path,
|
||||
run_name: str,
|
||||
*,
|
||||
pipeline_mode: str = "full",
|
||||
router_llm_mode: str = "deterministic",
|
||||
) -> None:
|
||||
self._cases_dir = cases_dir
|
||||
self._pipeline_mode = pipeline_mode
|
||||
self._router_llm_mode = router_llm_mode
|
||||
self._validator = CaseValidator()
|
||||
self._sessions = RagSessionProvider()
|
||||
self._agent_runtime = None
|
||||
@@ -48,5 +58,8 @@ class V3Runner:
|
||||
if self._agent_runtime is None:
|
||||
from tests.pipeline_setup_v3.runtime.agent_runtime_adapter import AgentRuntimeAdapter
|
||||
|
||||
self._agent_runtime = AgentRuntimeAdapter()
|
||||
self._agent_runtime = AgentRuntimeAdapter(
|
||||
pipeline_mode=self._pipeline_mode,
|
||||
router_llm_mode=self._router_llm_mode,
|
||||
)
|
||||
return self._agent_runtime
|
||||
|
||||
@@ -25,7 +25,7 @@ class RagSessionProvider:
|
||||
|
||||
def _build_indexer(self):
|
||||
from app.modules.rag.persistence.repository import RagRepository
|
||||
from tests.pipeline_setup.utils.rag_indexer import RagSessionIndexer
|
||||
from tests.pipeline_setup_v3.shared.rag_indexer import RagSessionIndexer
|
||||
|
||||
if self._repository is None:
|
||||
self._repository = RagRepository()
|
||||
|
||||
@@ -39,14 +39,26 @@ class CaseValidator:
|
||||
for path in retrieval.path_scope_contains:
|
||||
if not any(path in item for item in actual.get("path_scope") or ()):
|
||||
mismatches.append(f"path_scope should contain '{path}', got {list(actual.get('path_scope') or ())}")
|
||||
for path in retrieval.doc_scope_contains:
|
||||
if not any(path in item for item in actual.get("doc_scope") or ()):
|
||||
mismatches.append(f"doc_scope should contain '{path}', got {list(actual.get('doc_scope') or ())}")
|
||||
for symbol in retrieval.symbol_candidates_contain:
|
||||
if symbol not in (actual.get("symbol_candidates") or ()):
|
||||
mismatches.append(f"symbol_candidates should contain '{symbol}', got {list(actual.get('symbol_candidates') or ())}")
|
||||
for entity in retrieval.entity_candidates_contain:
|
||||
if entity not in (actual.get("entity_candidates") or ()):
|
||||
mismatches.append(f"entity_candidates should contain '{entity}', got {list(actual.get('entity_candidates') or ())}")
|
||||
for layer in retrieval.layers_include:
|
||||
if layer not in (actual.get("layers") or ()):
|
||||
mismatches.append(f"layers should include '{layer}', got {list(actual.get('layers') or ())}")
|
||||
for key, value in retrieval.filters_contain.items():
|
||||
actual_filters = dict(actual.get("filters") or {})
|
||||
if str(actual_filters.get(key) or "") != value:
|
||||
mismatches.append(f"filters[{key}] should be '{value}', got '{actual_filters.get(key)}'")
|
||||
|
||||
def _check_llm(self, case: V3Case, actual: dict, mismatches: list[str]) -> None:
|
||||
if str(actual.get("pipeline_mode") or "") == "pre_llm_only":
|
||||
return
|
||||
llm = case.expectations.llm
|
||||
answer = str(actual.get("llm_answer") or "").strip()
|
||||
if llm.non_empty and not answer:
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
"""Entrypoint: runs the orders API. Uses src layout (package order_app under src/)."""
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
# Add src to path so "order_app" is importable from repo root
|
||||
_root = Path(__file__).resolve().parent
|
||||
_src = _root / "src"
|
||||
if str(_src) not in sys.path:
|
||||
sys.path.insert(0, str(_src))
|
||||
|
||||
from order_app.api.orders import create_app
|
||||
|
||||
app = create_app()
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(host="0.0.0.0", port=8000)
|
||||
@@ -0,0 +1 @@
|
||||
"""Fixture package for CODE_QA pipeline: orders domain, API, services."""
|
||||
@@ -0,0 +1,3 @@
|
||||
from order_app.api.orders import create_app
|
||||
|
||||
__all__ = ["create_app"]
|
||||
@@ -0,0 +1,30 @@
|
||||
"""Orders API handlers."""
|
||||
|
||||
from flask import Flask, request, jsonify
|
||||
|
||||
from order_app.services.order_service import OrderService
|
||||
from order_app.repositories.order_repository import OrderRepository
|
||||
|
||||
|
||||
def create_app() -> Flask:
|
||||
app = Flask(__name__)
|
||||
repo = OrderRepository()
|
||||
service = OrderService(repo)
|
||||
|
||||
@app.route("/orders", methods=["POST"])
|
||||
def create_order():
|
||||
data = request.get_json() or {}
|
||||
order = service.create_order(
|
||||
product_id=data.get("product_id"),
|
||||
quantity=data.get("quantity", 1),
|
||||
)
|
||||
return jsonify({"order_id": order.id, "status": order.status}), 201
|
||||
|
||||
@app.route("/orders/<order_id>", methods=["GET"])
|
||||
def get_order(order_id: str):
|
||||
order = service.get_order(order_id)
|
||||
if order is None:
|
||||
return jsonify({"error": "not found"}), 404
|
||||
return jsonify({"id": order.id, "status": order.status})
|
||||
|
||||
return app
|
||||
@@ -0,0 +1,3 @@
|
||||
from order_app.domain.order import Order
|
||||
|
||||
__all__ = ["Order"]
|
||||
@@ -0,0 +1,11 @@
|
||||
"""Domain model for an order."""
|
||||
|
||||
import uuid
|
||||
|
||||
|
||||
class Order:
|
||||
def __init__(self, product_id: str = "", quantity: int = 1) -> None:
|
||||
self.id = str(uuid.uuid4())
|
||||
self.product_id = product_id
|
||||
self.quantity = quantity
|
||||
self.status = "pending"
|
||||
@@ -0,0 +1,3 @@
|
||||
from order_app.repositories.order_repository import OrderRepository
|
||||
|
||||
__all__ = ["OrderRepository"]
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
"""Persistence for Order entities."""
|
||||
|
||||
from order_app.domain.order import Order
|
||||
|
||||
|
||||
class OrderRepository:
|
||||
_store: dict[str, Order] = {}
|
||||
|
||||
def save(self, order: Order) -> Order:
|
||||
self._store[order.id] = order
|
||||
return order
|
||||
|
||||
def find_by_id(self, order_id: str) -> Order | None:
|
||||
return self._store.get(order_id)
|
||||
@@ -0,0 +1,3 @@
|
||||
from order_app.services.order_service import OrderService
|
||||
|
||||
__all__ = ["OrderService"]
|
||||
@@ -0,0 +1,16 @@
|
||||
"""Order business logic: delegates to repository."""
|
||||
|
||||
from order_app.domain.order import Order
|
||||
from order_app.repositories.order_repository import OrderRepository
|
||||
|
||||
|
||||
class OrderService:
|
||||
def __init__(self, repository: OrderRepository) -> None:
|
||||
self._repo = repository
|
||||
|
||||
def create_order(self, product_id: str | None = None, quantity: int = 1) -> Order:
|
||||
order = Order(product_id=product_id or "", quantity=quantity)
|
||||
return self._repo.save(order)
|
||||
|
||||
def get_order(self, order_id: str) -> Order | None:
|
||||
return self._repo.find_by_id(order_id)
|
||||
@@ -0,0 +1,3 @@
|
||||
from order_app.utils.helpers import format_order_id
|
||||
|
||||
__all__ = ["format_order_id"]
|
||||
@@ -0,0 +1,6 @@
|
||||
"""Shared utilities for the code_qa fixture repo."""
|
||||
|
||||
|
||||
def format_order_id(raw: str) -> str:
|
||||
"""Normalize order id for display."""
|
||||
return raw.strip().lower() or "unknown"
|
||||
@@ -0,0 +1,35 @@
|
||||
"""Tests for OrderService. Repo uses src layout: add src to path for order_app."""
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
# Fixture repo root; parent of tests/
|
||||
_repo_root = Path(__file__).resolve().parent.parent
|
||||
_src = _repo_root / "src"
|
||||
if str(_src) not in sys.path:
|
||||
sys.path.insert(0, str(_src))
|
||||
|
||||
from order_app.domain.order import Order
|
||||
from order_app.services.order_service import OrderService
|
||||
from order_app.repositories.order_repository import OrderRepository
|
||||
|
||||
|
||||
def test_create_order() -> None:
|
||||
repo = OrderRepository()
|
||||
service = OrderService(repo)
|
||||
order = service.create_order(product_id="prod-1", quantity=2)
|
||||
assert isinstance(order, Order)
|
||||
assert order.product_id == "prod-1"
|
||||
assert order.quantity == 2
|
||||
assert order.status == "pending"
|
||||
|
||||
|
||||
def test_get_order_returns_saved_order() -> None:
|
||||
repo = OrderRepository()
|
||||
service = OrderService(repo)
|
||||
created = service.create_order(product_id="p1")
|
||||
found = service.get_order(created.id)
|
||||
assert found is not None
|
||||
assert found.id == created.id
|
||||
@@ -11,7 +11,7 @@ _src = _agent_root / "src"
|
||||
if _src.exists() and str(_src) not in sys.path:
|
||||
sys.path.insert(0, str(_src))
|
||||
|
||||
from tests.pipeline_setup.env_loader import load_pipeline_setup_env
|
||||
from tests.pipeline_setup_v3.shared.env_loader import load_pipeline_setup_env
|
||||
from tests.pipeline_setup_v3.core.runner import V3Runner
|
||||
|
||||
|
||||
@@ -20,13 +20,26 @@ def main(argv: list[str] | None = None) -> int:
|
||||
parser.add_argument("--cases-dir", required=True, help="Directory or file with YAML case files")
|
||||
parser.add_argument("--run-name", default="manual_run", help="Output directory prefix")
|
||||
parser.add_argument("--results-dir", default=None, help="Override results root directory")
|
||||
parser.add_argument("--pipeline-mode", default="full", choices=["full", "pre_llm_only"], help="Pipeline execution mode")
|
||||
parser.add_argument(
|
||||
"--router-llm-mode",
|
||||
default="deterministic",
|
||||
choices=["deterministic", "llm_disambiguation"],
|
||||
help="Intent router mode: deterministic only or deterministic with optional LLM disambiguation",
|
||||
)
|
||||
ns = parser.parse_args(argv)
|
||||
|
||||
cases_dir = Path(str(ns.cases_dir)).expanduser().resolve()
|
||||
results_dir = Path(str(ns.results_dir)).expanduser().resolve() if ns.results_dir else Path(__file__).resolve().parent / "test_results"
|
||||
load_pipeline_setup_env(start_dir=_agent_root / "tests" / "pipeline_setup")
|
||||
load_pipeline_setup_env(start_dir=Path(__file__).resolve().parent)
|
||||
|
||||
runner = V3Runner(cases_dir=cases_dir, results_dir=results_dir, run_name=str(ns.run_name).strip() or "manual_run")
|
||||
runner = V3Runner(
|
||||
cases_dir=cases_dir,
|
||||
results_dir=results_dir,
|
||||
run_name=str(ns.run_name).strip() or "manual_run",
|
||||
pipeline_mode=str(ns.pipeline_mode).strip() or "full",
|
||||
router_llm_mode=str(ns.router_llm_mode).strip() or "deterministic",
|
||||
)
|
||||
print(f"Cases dir: {cases_dir}")
|
||||
print(f"Run dir: {runner.run_dir}")
|
||||
results, summary_path = runner.run()
|
||||
|
||||
@@ -4,6 +4,7 @@ import math
|
||||
|
||||
from app.modules.agent.runtime import (
|
||||
AgentRuntimeExecutor,
|
||||
DocsQAPipelineRunner,
|
||||
RuntimeRepoContextFactory,
|
||||
RuntimeRetrievalAdapter,
|
||||
)
|
||||
@@ -11,6 +12,7 @@ from app.modules.agent.llm import AgentLlmService
|
||||
from app.modules.agent.llm.prompt_loader import PromptLoader
|
||||
from app.modules.agent.runtime.steps.context import build_retrieval_request, build_retrieval_result
|
||||
from app.modules.agent.intent_router_v2 import ConversationState, IntentRouterV2
|
||||
from app.modules.agent.intent_router_v2.factory import GigaChatIntentRouterFactory
|
||||
from app.modules.shared.gigachat.client import GigaChatClient
|
||||
from app.modules.shared.gigachat.settings import GigaChatSettings
|
||||
from app.modules.shared.gigachat.token_provider import GigaChatTokenProvider
|
||||
@@ -18,13 +20,17 @@ from tests.pipeline_setup_v3.core.models import ExecutionPayload, V3Case
|
||||
|
||||
|
||||
class AgentRuntimeAdapter:
|
||||
def __init__(self) -> None:
|
||||
self._router = IntentRouterV2()
|
||||
def __init__(self, *, pipeline_mode: str = "full", router_llm_mode: str = "deterministic") -> None:
|
||||
self._pipeline_mode = pipeline_mode
|
||||
self._router_llm_mode = router_llm_mode
|
||||
self._router = self._build_router()
|
||||
self._repo_context_factory = RuntimeRepoContextFactory()
|
||||
self._retrieval = RuntimeRetrievalAdapter()
|
||||
self._executor: AgentRuntimeExecutor | None = None
|
||||
|
||||
def execute(self, case: V3Case, rag_session_id: str | None) -> ExecutionPayload:
|
||||
if self._is_docs_calibration_case(case):
|
||||
return self._execute_docs_case(case, rag_session_id)
|
||||
if case.mode == "router_only":
|
||||
return self._run_router_only(case)
|
||||
if not rag_session_id:
|
||||
@@ -35,6 +41,25 @@ class AgentRuntimeAdapter:
|
||||
return self._run_full_chain(case, rag_session_id)
|
||||
raise ValueError(f"Unsupported mode: {case.mode}")
|
||||
|
||||
def _execute_docs_case(self, case: V3Case, rag_session_id: str | None) -> ExecutionPayload:
|
||||
route = self._route(case.query)
|
||||
if route.intent == "CODE_QA":
|
||||
return self._stubbed_code_payload(case, route)
|
||||
if case.mode == "router_only":
|
||||
actual = self._actual_from_route(route)
|
||||
actual["code_intents_stubbed"] = True
|
||||
details = {
|
||||
"query": case.query,
|
||||
"router_result": route.model_dump(mode="json"),
|
||||
"rag_rows": [],
|
||||
"diagnostics": {"code_intents_stubbed": True},
|
||||
"pipeline_steps": _router_only_steps(case.query, route),
|
||||
}
|
||||
return ExecutionPayload(actual=actual, details=details)
|
||||
if not rag_session_id:
|
||||
raise ValueError(f"Case '{case.case_id}' requires rag_session_id or repo_path")
|
||||
return self._run_docs_chain(case, rag_session_id)
|
||||
|
||||
def _run_router_only(self, case: V3Case) -> ExecutionPayload:
|
||||
route = self._route(case.query)
|
||||
actual = self._actual_from_route(route)
|
||||
@@ -42,6 +67,7 @@ class AgentRuntimeAdapter:
|
||||
"query": case.query,
|
||||
"router_result": route.model_dump(mode="json"),
|
||||
"rag_rows": [],
|
||||
"pipeline_steps": _router_only_steps(case.query, route),
|
||||
}
|
||||
return ExecutionPayload(actual=actual, details=details)
|
||||
|
||||
@@ -66,6 +92,14 @@ class AgentRuntimeAdapter:
|
||||
"retrieval_result": retrieval_result.model_dump(mode="json"),
|
||||
"rag_rows": raw_rows,
|
||||
"symbol_resolution": symbol_resolution,
|
||||
"pipeline_steps": _router_rag_steps(
|
||||
query=case.query,
|
||||
route=route.model_dump(mode="json"),
|
||||
retrieval_request=request.model_dump(mode="json"),
|
||||
retrieval_result=retrieval_result.model_dump(mode="json"),
|
||||
rag_rows=raw_rows,
|
||||
symbol_resolution=symbol_resolution,
|
||||
),
|
||||
}
|
||||
return ExecutionPayload(actual=actual, details=details)
|
||||
|
||||
@@ -92,12 +126,23 @@ class AgentRuntimeAdapter:
|
||||
"validation": result.validation.model_dump(mode="json"),
|
||||
"token_usage": _token_usage(result),
|
||||
"steps": list(result.runtime_trace),
|
||||
"pipeline_steps": _full_chain_steps(
|
||||
query=case.query,
|
||||
route=route.model_dump(mode="json") if route else {},
|
||||
retrieval_request=request.model_dump(mode="json") if request else {},
|
||||
runtime_trace=list(result.runtime_trace),
|
||||
),
|
||||
}
|
||||
return ExecutionPayload(actual=actual, details=details)
|
||||
|
||||
def _route(self, query: str):
|
||||
return self._router.route(query, ConversationState(), self._repo_context_factory.build())
|
||||
|
||||
def _build_router(self) -> IntentRouterV2:
|
||||
if self._router_llm_mode == "llm_disambiguation":
|
||||
return GigaChatIntentRouterFactory().build()
|
||||
return IntentRouterV2()
|
||||
|
||||
def _retrieve_rows(self, rag_session_id: str, request) -> list[dict]:
|
||||
if request.sub_intent == "OPEN_FILE" and request.path_scope:
|
||||
return self._retrieval.retrieve_exact_files(
|
||||
@@ -162,6 +207,154 @@ class AgentRuntimeAdapter:
|
||||
self._executor = AgentRuntimeExecutor(_build_llm())
|
||||
return self._executor
|
||||
|
||||
def _docs_runner_instance(self) -> DocsQAPipelineRunner:
|
||||
return DocsQAPipelineRunner(
|
||||
router=self._router,
|
||||
retrieval_adapter=self._retrieval,
|
||||
repo_context=self._repo_context_factory.build(),
|
||||
llm=None if self._pipeline_mode == "pre_llm_only" else _build_llm(),
|
||||
)
|
||||
|
||||
def _run_docs_chain(self, case: V3Case, rag_session_id: str) -> ExecutionPayload:
|
||||
result = self._docs_runner_instance().run(case.query, rag_session_id, mode=self._pipeline_mode)
|
||||
actual = self._actual_from_docs_result(result)
|
||||
details = {
|
||||
"query": case.query,
|
||||
"router_result": result.router_result.model_dump(mode="json"),
|
||||
"retrieval_request": result.retrieval_request.model_dump(mode="json"),
|
||||
"diagnostics": result.diagnostics.model_dump(mode="json"),
|
||||
"llm_request": dict(result.llm_request or {}),
|
||||
"rag_rows": list(result.raw_rows),
|
||||
"pipeline_steps": [
|
||||
_input_step(case.query),
|
||||
{
|
||||
"step": "router",
|
||||
"input": {"query": case.query},
|
||||
"output": {
|
||||
"intent": result.router_result.intent,
|
||||
"sub_intent": result.router_result.query_plan.sub_intent,
|
||||
"graph_id": result.router_result.graph_id,
|
||||
"conversation_mode": result.router_result.conversation_mode,
|
||||
},
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {"query": case.query},
|
||||
"output": {
|
||||
"answer_mode": result.answer_mode,
|
||||
"prompt_name": result.prompt_name,
|
||||
"llm_request": {
|
||||
"prompt_name": result.llm_request.get("prompt_name"),
|
||||
"log_context": result.llm_request.get("log_context"),
|
||||
"prompt_stats": dict(result.llm_request.get("prompt_stats") or {}),
|
||||
},
|
||||
"degraded_reason": result.degraded_reason,
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
return ExecutionPayload(actual=actual, details=details)
|
||||
|
||||
def _actual_from_docs_result(self, result) -> dict:
|
||||
route = result.router_result
|
||||
request = result.retrieval_request
|
||||
diagnostics = result.diagnostics
|
||||
entity_candidates = tuple(diagnostics.query_entity_candidates or self._docs_entity_candidates(result.raw_rows))
|
||||
doc_scope = tuple(diagnostics.doc_ids or self._docs_scope(result.raw_rows))
|
||||
return {
|
||||
"intent": route.intent,
|
||||
"sub_intent": route.query_plan.sub_intent,
|
||||
"graph_id": route.graph_id,
|
||||
"conversation_mode": route.conversation_mode,
|
||||
"rag_count": len(result.raw_rows),
|
||||
"llm_answer": result.answer,
|
||||
"answer_mode": _docs_answer_status(result.answer_mode, self._pipeline_mode),
|
||||
"path_scope": tuple(getattr(request, "path_scope", []) or []),
|
||||
"doc_scope": doc_scope,
|
||||
"entity_candidates": entity_candidates,
|
||||
"symbol_candidates": (),
|
||||
"layers": tuple(request.requested_layers or []),
|
||||
"filters": {
|
||||
"doc_type": getattr(request.retrieval_spec.filters, "doc_type", None),
|
||||
},
|
||||
"pipeline_mode": self._pipeline_mode,
|
||||
"gate_decision": diagnostics.gate_decision,
|
||||
"prompt_used": result.prompt_name,
|
||||
"llm_mode": diagnostics.llm_mode,
|
||||
"degraded_reason": result.degraded_reason or None,
|
||||
"code_intents_stubbed": True,
|
||||
}
|
||||
|
||||
def _stubbed_code_payload(self, case: V3Case, route) -> ExecutionPayload:
|
||||
actual = {
|
||||
"intent": route.intent,
|
||||
"sub_intent": route.query_plan.sub_intent,
|
||||
"graph_id": route.graph_id,
|
||||
"conversation_mode": route.conversation_mode,
|
||||
"rag_count": 0,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "stubbed",
|
||||
"status": "stubbed",
|
||||
"reason": "code intents are temporarily disabled during docs pipeline calibration",
|
||||
"layers": (),
|
||||
"symbol_candidates": (),
|
||||
"code_intents_stubbed": True,
|
||||
}
|
||||
details = {
|
||||
"query": case.query,
|
||||
"router_result": route.model_dump(mode="json"),
|
||||
"rag_rows": [],
|
||||
"diagnostics": {
|
||||
"code_intents_stubbed": True,
|
||||
"degraded_reason": "code_intent_stubbed",
|
||||
},
|
||||
"pipeline_steps": [
|
||||
_input_step(case.query),
|
||||
{
|
||||
"step": "router",
|
||||
"input": {"query": case.query},
|
||||
"output": {
|
||||
"intent": route.intent,
|
||||
"sub_intent": route.query_plan.sub_intent,
|
||||
"graph_id": route.graph_id,
|
||||
"conversation_mode": route.conversation_mode,
|
||||
},
|
||||
},
|
||||
{
|
||||
"step": "code_stub",
|
||||
"input": {"query": case.query},
|
||||
"output": {
|
||||
"status": "stubbed",
|
||||
"reason": "code intents are temporarily disabled during docs pipeline calibration",
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
return ExecutionPayload(actual=actual, details=details)
|
||||
|
||||
def _is_docs_calibration_case(self, case: V3Case) -> bool:
|
||||
return "suite_03_docs" in case.source_file.as_posix()
|
||||
|
||||
def _docs_scope(self, rows: list[dict]) -> list[str]:
|
||||
values: list[str] = []
|
||||
for row in rows:
|
||||
metadata = dict(row.get("metadata") or {})
|
||||
for candidate in (metadata.get("document_id"), metadata.get("doc_id")):
|
||||
value = str(candidate or "").strip()
|
||||
if value and value not in values:
|
||||
values.append(value)
|
||||
return values
|
||||
|
||||
def _docs_entity_candidates(self, rows: list[dict]) -> list[str]:
|
||||
values: list[str] = []
|
||||
for row in rows:
|
||||
if str(row.get("layer") or "") != "D3_ENTITY_CATALOG":
|
||||
continue
|
||||
title = str(row.get("title") or "").strip()
|
||||
if title and title not in values:
|
||||
values.append(title)
|
||||
return values
|
||||
|
||||
|
||||
def _build_llm() -> AgentLlmService:
|
||||
settings = GigaChatSettings.from_env()
|
||||
@@ -175,6 +368,16 @@ def _answer_status(answer_mode: str, llm_used: bool) -> str:
|
||||
return answer_mode
|
||||
|
||||
|
||||
def _docs_answer_status(answer_mode: str, pipeline_mode: str) -> str:
|
||||
if pipeline_mode != "pre_llm_only":
|
||||
return answer_mode
|
||||
if answer_mode == "ready":
|
||||
return "answered"
|
||||
if answer_mode == "ready_partial":
|
||||
return "structured_spec"
|
||||
return answer_mode
|
||||
|
||||
|
||||
def _token_usage(result) -> dict:
|
||||
draft = result.draft_answer
|
||||
if draft is None:
|
||||
@@ -185,3 +388,108 @@ def _token_usage(result) -> dict:
|
||||
"prompt_name": draft.prompt_name,
|
||||
"tokens_in_estimate": tokens_in_estimate,
|
||||
}
|
||||
|
||||
|
||||
def _router_only_steps(query: str, route) -> list[dict]:
|
||||
route_dump = route.model_dump(mode="json")
|
||||
return [
|
||||
_input_step(query),
|
||||
{
|
||||
"step": "router",
|
||||
"input": {"query": query},
|
||||
"output": {
|
||||
"intent": route_dump.get("intent"),
|
||||
"sub_intent": dict(route_dump.get("query_plan") or {}).get("sub_intent"),
|
||||
"graph_id": route_dump.get("graph_id"),
|
||||
"conversation_mode": route_dump.get("conversation_mode"),
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
def _router_rag_steps(
|
||||
*,
|
||||
query: str,
|
||||
route: dict,
|
||||
retrieval_request: dict,
|
||||
retrieval_result: dict,
|
||||
rag_rows: list[dict],
|
||||
symbol_resolution: dict,
|
||||
) -> list[dict]:
|
||||
return [
|
||||
_input_step(query),
|
||||
{
|
||||
"step": "router",
|
||||
"input": {"query": query},
|
||||
"output": {
|
||||
"intent": route.get("intent"),
|
||||
"sub_intent": dict(route.get("query_plan") or {}).get("sub_intent"),
|
||||
"graph_id": route.get("graph_id"),
|
||||
"conversation_mode": route.get("conversation_mode"),
|
||||
},
|
||||
},
|
||||
{
|
||||
"step": "retrieval_planning",
|
||||
"input": {
|
||||
"query": query,
|
||||
"router_result": {
|
||||
"intent": route.get("intent"),
|
||||
"sub_intent": dict(route.get("query_plan") or {}).get("sub_intent"),
|
||||
"graph_id": route.get("graph_id"),
|
||||
},
|
||||
},
|
||||
"output": retrieval_request,
|
||||
},
|
||||
{
|
||||
"step": "retrieval",
|
||||
"input": retrieval_request,
|
||||
"output": {
|
||||
"rag_count": len(rag_rows),
|
||||
"retrieval_result": retrieval_result,
|
||||
"symbol_resolution": symbol_resolution,
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
def _full_chain_steps(*, query: str, route: dict, retrieval_request: dict, runtime_trace: list[dict]) -> list[dict]:
|
||||
steps = [_input_step(query)]
|
||||
for raw_step in runtime_trace:
|
||||
step = dict(raw_step)
|
||||
name = str(step.get("step") or "").strip()
|
||||
if name == "router":
|
||||
step.setdefault("input", {"query": query})
|
||||
if name == "retrieval":
|
||||
steps.append(
|
||||
{
|
||||
"step": "retrieval_planning",
|
||||
"input": {
|
||||
"query": query,
|
||||
"router_result": {
|
||||
"intent": route.get("intent"),
|
||||
"sub_intent": dict(route.get("query_plan") or {}).get("sub_intent"),
|
||||
"graph_id": route.get("graph_id"),
|
||||
},
|
||||
},
|
||||
"output": retrieval_request,
|
||||
}
|
||||
)
|
||||
step.setdefault("input", retrieval_request)
|
||||
steps.append(
|
||||
{
|
||||
"step": name,
|
||||
"status": step.get("status"),
|
||||
"timings_ms": step.get("timings_ms") or {},
|
||||
"input": step.get("input") or {},
|
||||
"output": step.get("output") or {},
|
||||
}
|
||||
)
|
||||
return steps
|
||||
|
||||
|
||||
def _input_step(query: str) -> dict:
|
||||
return {
|
||||
"step": "input_query",
|
||||
"input": {"query": query},
|
||||
"output": {"query": query},
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
"""Shared helpers for pipeline_setup_v3."""
|
||||
@@ -0,0 +1,40 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from app.modules.shared.env_loader import load_workspace_env
|
||||
|
||||
|
||||
def load_pipeline_setup_env(start_dir: str | Path | None = None) -> list[Path]:
|
||||
base = Path(start_dir or Path.cwd()).resolve()
|
||||
loaded = load_workspace_env(start_dir=base)
|
||||
env_path = _find_v3_root(base) / ".env"
|
||||
if env_path.is_file():
|
||||
_apply_env_file(env_path)
|
||||
loaded.append(env_path)
|
||||
return loaded
|
||||
|
||||
|
||||
def _find_v3_root(base: Path) -> Path:
|
||||
for directory in (base, *base.parents):
|
||||
if directory.name == "pipeline_setup_v3" and (directory / "__init__.py").is_file():
|
||||
return directory
|
||||
raise RuntimeError(f"Unable to locate tests/pipeline_setup_v3 root from: {base}")
|
||||
|
||||
|
||||
def _apply_env_file(path: Path) -> None:
|
||||
for raw_line in path.read_text(encoding="utf-8").splitlines():
|
||||
line = raw_line.strip()
|
||||
if not line or line.startswith("#") or "=" not in line:
|
||||
continue
|
||||
key, raw_value = line.split("=", 1)
|
||||
name = key.removeprefix("export ").strip()
|
||||
if name:
|
||||
os.environ[name] = _normalize_value(raw_value.strip())
|
||||
|
||||
|
||||
def _normalize_value(value: str) -> str:
|
||||
if len(value) >= 2 and value[0] == value[-1] and value[0] in {"'", '"'}:
|
||||
return value[1:-1]
|
||||
return value
|
||||
@@ -0,0 +1,110 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
import hashlib
|
||||
import logging
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING
|
||||
from uuid import uuid4
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from app.modules.rag.persistence.repository import RagRepository
|
||||
|
||||
|
||||
class LocalRepoFileCollector:
|
||||
_SKIP_DIRS = {".git", ".venv", "venv", "__pycache__", ".pytest_cache", "node_modules"}
|
||||
_TEXT_EXTENSIONS = {
|
||||
".py", ".md", ".txt", ".rst", ".json", ".yaml", ".yml", ".toml", ".ini", ".cfg", ".env",
|
||||
".js", ".ts", ".tsx", ".jsx", ".sql", ".sh",
|
||||
}
|
||||
|
||||
def __init__(self, root: Path, max_bytes: int = 300_000) -> None:
|
||||
self._root = root
|
||||
self._max_bytes = max_bytes
|
||||
|
||||
def collect(self) -> list[dict]:
|
||||
files: list[dict] = []
|
||||
for path in sorted(self._root.rglob("*")):
|
||||
if not path.is_file() or self._should_skip(path):
|
||||
continue
|
||||
item = self._read_file(path)
|
||||
if item:
|
||||
files.append(item)
|
||||
return files
|
||||
|
||||
def _should_skip(self, path: Path) -> bool:
|
||||
rel_parts = path.relative_to(self._root).parts
|
||||
if not rel_parts or rel_parts[0] != "docs":
|
||||
return True
|
||||
if any(part in self._SKIP_DIRS for part in rel_parts):
|
||||
return True
|
||||
if any(part.startswith(".") for part in rel_parts):
|
||||
return True
|
||||
if path.suffix.lower() not in self._TEXT_EXTENSIONS:
|
||||
return True
|
||||
return path.stat().st_size > self._max_bytes
|
||||
|
||||
def _read_file(self, path: Path) -> dict | None:
|
||||
raw = path.read_bytes()
|
||||
if b"\x00" in raw:
|
||||
return None
|
||||
content = raw.decode("utf-8", errors="ignore")
|
||||
return {
|
||||
"path": path.relative_to(self._root).as_posix(),
|
||||
"content": content,
|
||||
"content_hash": hashlib.sha256(content.encode("utf-8")).hexdigest(),
|
||||
}
|
||||
|
||||
|
||||
class DeterministicEmbedder:
|
||||
def __init__(self, dim: int = 64) -> None:
|
||||
self._dim = dim
|
||||
|
||||
def embed(self, texts: list[str]) -> list[list[float]]:
|
||||
return [self._embed_one(text) for text in texts]
|
||||
|
||||
def _embed_one(self, text: str) -> list[float]:
|
||||
digest = hashlib.sha256(text.encode("utf-8")).digest()
|
||||
values: list[float] = []
|
||||
while len(values) < self._dim:
|
||||
for byte in digest:
|
||||
values.append((byte / 127.5) - 1.0)
|
||||
if len(values) == self._dim:
|
||||
break
|
||||
digest = hashlib.sha256(digest).digest()
|
||||
return values
|
||||
|
||||
|
||||
class RagSessionIndexer:
|
||||
def __init__(self, repository: "RagRepository") -> None:
|
||||
from app.modules.rag.services.rag_service import RagService
|
||||
|
||||
self._repository = repository
|
||||
self._rag = RagService(embedder=DeterministicEmbedder(), repository=repository)
|
||||
|
||||
def index_repo(self, repo_path: Path, project_id: str | None = None) -> str:
|
||||
self._repository.ensure_tables()
|
||||
rag_session_id = str(uuid4())
|
||||
resolved_project_id = project_id or repo_path.name
|
||||
self._repository.upsert_session(rag_session_id, resolved_project_id)
|
||||
files = LocalRepoFileCollector(repo_path).collect()
|
||||
if not files:
|
||||
raise ValueError(f"No indexable text files found under: {repo_path}")
|
||||
logger = logging.getLogger("app.modules.rag.services.rag_service")
|
||||
previous_level = logger.level
|
||||
logger.setLevel(logging.ERROR)
|
||||
try:
|
||||
asyncio.run(
|
||||
self._rag.index_snapshot(
|
||||
rag_session_id=rag_session_id,
|
||||
files=files,
|
||||
progress_cb=self._print_progress,
|
||||
)
|
||||
)
|
||||
finally:
|
||||
logger.setLevel(previous_level)
|
||||
print(f"rag_session_id={rag_session_id}")
|
||||
return rag_session_id
|
||||
|
||||
def _print_progress(self, current_file_index: int, total_files: int, current_file_name: str) -> None:
|
||||
print(f"[{current_file_index}/{total_files}] {current_file_name}")
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "docs-v2-api-health-endpoint",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v2.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "full_chain",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 2,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.health_endpoint"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": "api_method"
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Объясни что делает endpoint /health"
|
||||
},
|
||||
"output": {
|
||||
"query": "Объясни что делает endpoint /health"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Объясни что делает endpoint /health"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Объясни что делает endpoint /health"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 2265,
|
||||
"tokens_in_estimate": 665
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+368
@@ -0,0 +1,368 @@
|
||||
# docs-v2-api-health-endpoint
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v2.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: full_chain
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
Объясни что делает endpoint /health
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 2,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.health_endpoint"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": "api_method"
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Объясни что делает endpoint /health"
|
||||
},
|
||||
"output": {
|
||||
"query": "Объясни что делает endpoint /health"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Объясни что делает endpoint /health"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Объясни что делает endpoint /health"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 2265,
|
||||
"tokens_in_estimate": 665
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"layers_used": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 1,
|
||||
"facts_found": 0,
|
||||
"relations_found": 0,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "endpoint",
|
||||
"matched_anchor_value": "/health",
|
||||
"exact_anchor_match": true,
|
||||
"docs_layers_requested": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.send_message_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"domain.runtime_health",
|
||||
"architecture.telegram_notify_app"
|
||||
]
|
||||
},
|
||||
"D2_FACT_INDEX": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"f85d982c272a2ee6baeadc433221a20e684cd8ef01cb4788d6f76d05ca56d6d0",
|
||||
"b8e44c3adb74aaa6c91ae8815fa091289e58dd3990a3a1b63e850c62075aea75",
|
||||
"b6bfad59b3bf00f199b5ef90c1208af19664de700413e7354468a93a4abaaa2f",
|
||||
"a8a325e0815b3a2a870ba2825f3afb3f41056b4c091df4c3bb3418ffd20891dd",
|
||||
"bafb867ffed41c9db637df98d6cd5f6722d7747bbebc6c03e6f0d0caf3b7f9f3"
|
||||
]
|
||||
},
|
||||
"D4_WORKFLOW_INDEX": {
|
||||
"hits": 3,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [
|
||||
"/health"
|
||||
],
|
||||
"resolved_anchor_candidates": [
|
||||
"api.health_endpoint",
|
||||
"docs/documentation/api/health-endpoint.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"api.health_endpoint"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/documentation/api/health-endpoint.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"HTTP API /health",
|
||||
"Scenario"
|
||||
],
|
||||
"relation_hits_count": 0,
|
||||
"relation_targets": [],
|
||||
"fallback_doc_hits_count": 1,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 0,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 1,
|
||||
"facts": 0,
|
||||
"relations": 0,
|
||||
"chunks": 0,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "evidence_sufficient",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty",
|
||||
"exact_anchor_match"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_explain_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 393,
|
||||
"user_chars": 2265,
|
||||
"tokens_in_estimate": 665
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты объясняешь документацию системы.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные факты
|
||||
- Не додумывай
|
||||
- Если данных недостаточно, скажи это явно
|
||||
- Объясняй структурировано
|
||||
|
||||
Формат ответа:
|
||||
1. Краткое описание
|
||||
2. Основные элементы
|
||||
3. Как это работает
|
||||
4. Связи с другими частями системы (если есть)
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Объясни что делает endpoint /health",
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "HTTP API /health",
|
||||
"content": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"metadata": {
|
||||
"name": "health_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"health",
|
||||
"control-plane"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"TelegramNotifyWorker",
|
||||
"RuntimeManager",
|
||||
"WorkerHealth"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.health_endpoint",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"summary_text": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [],
|
||||
"relations": []
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Объясни что делает endpoint /health
|
||||
- intent: DOCUMENTATION_EXPLAIN
|
||||
- sub_intent: API_METHOD_EXPLAIN
|
||||
- documents: 1 | samples: HTTP API /health
|
||||
- facts: 0
|
||||
- relations: 0
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "docs-v2-api-send-endpoint",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v2.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "full_chain",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 2,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": "api_method"
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Как работает endpoint /send?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Как работает endpoint /send?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Как работает endpoint /send?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Как работает endpoint /send?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 2309,
|
||||
"tokens_in_estimate": 676
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+367
@@ -0,0 +1,367 @@
|
||||
# docs-v2-api-send-endpoint
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v2.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: full_chain
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
Как работает endpoint /send?
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 2,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": "api_method"
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Как работает endpoint /send?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Как работает endpoint /send?"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Как работает endpoint /send?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Как работает endpoint /send?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 2309,
|
||||
"tokens_in_estimate": 676
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"layers_used": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 1,
|
||||
"facts_found": 0,
|
||||
"relations_found": 0,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "endpoint",
|
||||
"matched_anchor_value": "/send",
|
||||
"exact_anchor_match": true,
|
||||
"docs_layers_requested": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.send_message_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/README.md"
|
||||
]
|
||||
},
|
||||
"D2_FACT_INDEX": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"f85d982c272a2ee6baeadc433221a20e684cd8ef01cb4788d6f76d05ca56d6d0",
|
||||
"b8e44c3adb74aaa6c91ae8815fa091289e58dd3990a3a1b63e850c62075aea75",
|
||||
"bafb867ffed41c9db637df98d6cd5f6722d7747bbebc6c03e6f0d0caf3b7f9f3",
|
||||
"54bbcbac242f1c85ec3280236ed5841998a8a3a548ff16cbf0b5acafbff469e3",
|
||||
"b6bfad59b3bf00f199b5ef90c1208af19664de700413e7354468a93a4abaaa2f"
|
||||
]
|
||||
},
|
||||
"D4_WORKFLOW_INDEX": {
|
||||
"hits": 3,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [
|
||||
"/send"
|
||||
],
|
||||
"resolved_anchor_candidates": [
|
||||
"api.send_message_endpoint",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"HTTP API /send",
|
||||
"Scenario"
|
||||
],
|
||||
"relation_hits_count": 0,
|
||||
"relation_targets": [],
|
||||
"fallback_doc_hits_count": 1,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 0,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 1,
|
||||
"facts": 0,
|
||||
"relations": 0,
|
||||
"chunks": 0,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "evidence_sufficient",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty",
|
||||
"exact_anchor_match"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_explain_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 393,
|
||||
"user_chars": 2309,
|
||||
"tokens_in_estimate": 676
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты объясняешь документацию системы.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные факты
|
||||
- Не додумывай
|
||||
- Если данных недостаточно, скажи это явно
|
||||
- Объясняй структурировано
|
||||
|
||||
Формат ответа:
|
||||
1. Краткое описание
|
||||
2. Основные элементы
|
||||
3. Как это работает
|
||||
4. Связи с другими частями системы (если есть)
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Как работает endpoint /send?",
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"title": "HTTP API /send",
|
||||
"content": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"metadata": {
|
||||
"name": "send_message_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"telegram",
|
||||
"manual-send"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /send",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "5fbf2e33510b0676a3a53b957a4569bd3c2c31fb7719546602c573421ccaa32d",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlAppFactory",
|
||||
"TelegramSendService",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.send_message_endpoint",
|
||||
"source_path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"summary_text": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [],
|
||||
"relations": []
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Как работает endpoint /send?
|
||||
- intent: DOCUMENTATION_EXPLAIN
|
||||
- sub_intent: API_METHOD_EXPLAIN
|
||||
- documents: 1 | samples: HTTP API /send
|
||||
- facts: 0
|
||||
- relations: 0
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "docs-v2-component-control-channel",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v2.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "full_chain",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 20,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [
|
||||
"TelegramControlChannel"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Объясни как работает компонент TelegramControlChannel"
|
||||
},
|
||||
"output": {
|
||||
"query": "Объясни как работает компонент TelegramControlChannel"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Объясни как работает компонент TelegramControlChannel"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Объясни как работает компонент TelegramControlChannel"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 21517,
|
||||
"tokens_in_estimate": 5478
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+900
@@ -0,0 +1,900 @@
|
||||
# docs-v2-component-control-channel
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v2.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: full_chain
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
Объясни как работает компонент TelegramControlChannel
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 20,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [
|
||||
"TelegramControlChannel"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Объясни как работает компонент TelegramControlChannel"
|
||||
},
|
||||
"output": {
|
||||
"query": "Объясни как работает компонент TelegramControlChannel"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Объясни как работает компонент TelegramControlChannel"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Объясни как работает компонент TelegramControlChannel"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 21517,
|
||||
"tokens_in_estimate": 5478
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"layers_used": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 6,
|
||||
"facts_found": 2,
|
||||
"relations_found": 6,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "component",
|
||||
"matched_anchor_value": "TelegramControlChannel",
|
||||
"exact_anchor_match": false,
|
||||
"docs_layers_requested": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop"
|
||||
]
|
||||
},
|
||||
"D2_FACT_INDEX": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"b480201013a7e5231146f665773ebc54af37c28135f407c6b758304c74561645",
|
||||
"b8e44c3adb74aaa6c91ae8815fa091289e58dd3990a3a1b63e850c62075aea75",
|
||||
"bafb867ffed41c9db637df98d6cd5f6722d7747bbebc6c03e6f0d0caf3b7f9f3",
|
||||
"54bbcbac242f1c85ec3280236ed5841998a8a3a548ff16cbf0b5acafbff469e3",
|
||||
"b6bfad59b3bf00f199b5ef90c1208af19664de700413e7354468a93a4abaaa2f"
|
||||
]
|
||||
},
|
||||
"D5_RELATION_GRAPH": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"afec31fd062e392dcd9699a92c7ab61fd4b1273c1a2b16702b23d55d8d0c47ac",
|
||||
"711fb2edb82dd222deaba3c91768b18cbbd453009235823282813c6e867dc2c1",
|
||||
"eec79f7a02b804337e791ef231784862ae26e0599eb20224790e9d4f085fa9c0",
|
||||
"5f4909bde905cd3d294ad307074a05e4ae4deefcafe6272cd2d0436e73acb8dd",
|
||||
"ae34fe4b3cd2b47632b13b1e32303e842b57948aa21160abe8d9b478995e1d74"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [
|
||||
"TelegramControlChannel"
|
||||
],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [
|
||||
"TelegramControlChannel"
|
||||
],
|
||||
"resolved_anchor_candidates": [
|
||||
"api.control_actions_endpoint",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"logic.telegram_notification_loop",
|
||||
"docs/documentation/logic/telegram-notification-loop.md",
|
||||
"api.send_message_endpoint",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"docs/README.md",
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"docs/documentation/logic/telegram-notification-loop.md",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"HTTP API /actions/{action}",
|
||||
"Архитектура Telegram Notify App",
|
||||
"Readme",
|
||||
"Сущность runtime health",
|
||||
"Цикл отправки уведомлений в Telegram",
|
||||
"HTTP API /send",
|
||||
"api.control_actions_endpoint:workflow_step",
|
||||
"api.control_actions_endpoint:mentions_entity",
|
||||
"api.control_actions_endpoint:parent",
|
||||
"api.control_actions_endpoint:related_api",
|
||||
"api.control_actions_endpoint:related_logic",
|
||||
"api.control_actions_endpoint:part_of",
|
||||
"architecture.telegram_notify_app:child",
|
||||
"architecture.telegram_notify_app:related_api",
|
||||
"api.control_actions_endpoint:Функциональные требования",
|
||||
"api.control_actions_endpoint:Нефункциональные требования",
|
||||
"api.control_actions_endpoint:Сценарий",
|
||||
"api.control_actions_endpoint:Summary",
|
||||
"api.control_actions_endpoint:Описание",
|
||||
"api.control_actions_endpoint:Входные параметры"
|
||||
],
|
||||
"relation_hits_count": 6,
|
||||
"relation_targets": [
|
||||
"api.control_actions_endpoint:parent",
|
||||
"api.control_actions_endpoint:related_api",
|
||||
"api.control_actions_endpoint:related_logic",
|
||||
"api.control_actions_endpoint:part_of",
|
||||
"architecture.telegram_notify_app:child",
|
||||
"architecture.telegram_notify_app:related_api"
|
||||
],
|
||||
"fallback_doc_hits_count": 12,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 2,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 6,
|
||||
"facts": 2,
|
||||
"relations": 6,
|
||||
"chunks": 6,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "evidence_sufficient",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_explain_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 393,
|
||||
"user_chars": 21517,
|
||||
"tokens_in_estimate": 5478
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты объясняешь документацию системы.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные факты
|
||||
- Не додумывай
|
||||
- Если данных недостаточно, скажи это явно
|
||||
- Объясняй структурировано
|
||||
|
||||
Формат ответа:
|
||||
1. Краткое описание
|
||||
2. Основные элементы
|
||||
3. Как это работает
|
||||
4. Связи с другими частями системы (если есть)
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Объясни как работает компонент TelegramControlChannel",
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"content": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"metadata": {
|
||||
"name": "control_actions_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"control-plane",
|
||||
"lifecycle"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"ControlActionSet",
|
||||
"JSONResponse"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.control_actions_endpoint",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"summary_text": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"content": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"metadata": {
|
||||
"name": "telegram_notify_app_overview",
|
||||
"tags": [
|
||||
"architecture",
|
||||
"telegram",
|
||||
"plba",
|
||||
"runtime"
|
||||
],
|
||||
"type": "architecture_overview",
|
||||
"layer": "system",
|
||||
"links": [
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "docs_root",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"children": [
|
||||
"api.health_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"doc_kind": "spec",
|
||||
"entities": [
|
||||
"TelegramNotifyModule",
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramControlChannel",
|
||||
"TelegramSendService",
|
||||
"RuntimeManager"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "architecture.telegram_notify_app",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"summary_text": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/README.md",
|
||||
"title": "Readme",
|
||||
"content": "Readme",
|
||||
"metadata": {
|
||||
"name": "",
|
||||
"tags": [],
|
||||
"type": "",
|
||||
"layer": "",
|
||||
"links": [],
|
||||
"owner": null,
|
||||
"title": "Readme",
|
||||
"doc_id": null,
|
||||
"module": "",
|
||||
"parent": null,
|
||||
"status": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "81d952f1a6ea85b76f75e0e57f33b8fa4b2bf3cb7db11b91b90171aeedd655a6",
|
||||
"children": [],
|
||||
"doc_kind": "readme",
|
||||
"entities": [],
|
||||
"updated_at": null,
|
||||
"doc_version": null,
|
||||
"document_id": "docs/README.md",
|
||||
"source_path": "docs/README.md",
|
||||
"summary_text": "",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "Сущность runtime health",
|
||||
"content": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"metadata": {
|
||||
"name": "runtime_health",
|
||||
"tags": [
|
||||
"domain",
|
||||
"health",
|
||||
"observability"
|
||||
],
|
||||
"type": "domain_entity",
|
||||
"layer": "domain",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "used_by",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Сущность runtime health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"WorkerHealth",
|
||||
"WorkerStatus",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "domain.runtime_health",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"summary_text": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/logic/telegram-notification-loop.md",
|
||||
"title": "Цикл отправки уведомлений в Telegram",
|
||||
"content": "`TelegramNotifyWorker` после старта runtime запускает отдельный поток, сразу делает первую попытку отправки сообщения и затем повторяет отправку через заданный интервал. При ошибках доставки или отсутствии credentials worker не останавливает сервис, а переводит собственное состояние в `degraded`. Этот workflow определяет основной полезный цикл приложения.",
|
||||
"metadata": {
|
||||
"name": "telegram_notification_loop",
|
||||
"tags": [
|
||||
"logic",
|
||||
"telegram",
|
||||
"worker",
|
||||
"scheduling"
|
||||
],
|
||||
"type": "logic_block",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Цикл отправки уведомлений в Telegram",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "0f62f9b4dab261ca4ca34575ff5d84411a22c90b780c52eda388782b94f08470",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramSendService",
|
||||
"WorkerHealth",
|
||||
"WorkerStatus"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "logic.telegram_notification_loop",
|
||||
"source_path": "docs/documentation/logic/telegram-notification-loop.md",
|
||||
"summary_text": "`TelegramNotifyWorker` после старта runtime запускает отдельный поток, сразу делает первую попытку отправки сообщения и затем повторяет отправку через заданный интервал. При ошибках доставки или отсутствии credentials worker не останавливает сервис, а переводит собственное состояние в `degraded`. Этот workflow определяет основной полезный цикл приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"title": "HTTP API /send",
|
||||
"content": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"metadata": {
|
||||
"name": "send_message_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"telegram",
|
||||
"manual-send"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /send",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "5fbf2e33510b0676a3a53b957a4569bd3c2c31fb7719546602c573421ccaa32d",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlAppFactory",
|
||||
"TelegramSendService",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.send_message_endpoint",
|
||||
"source_path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"summary_text": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [
|
||||
{
|
||||
"layer": "D2_FACT_INDEX",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:workflow_step",
|
||||
"content": "api.control_actions_endpoint workflow_step HTTP control plane запущен.",
|
||||
"metadata": {
|
||||
"tags": [],
|
||||
"owner": null,
|
||||
"anchor": "Сценарий",
|
||||
"doc_id": null,
|
||||
"object": "HTTP control plane запущен.",
|
||||
"fact_id": "b480201013a7e5231146f665773ebc54af37c28135f407c6b758304c74561645",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"predicate": "workflow_step",
|
||||
"object_ref": null,
|
||||
"subject_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D2_FACT_INDEX",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:mentions_entity",
|
||||
"content": "api.control_actions_endpoint mentions_entity ControlActionSet",
|
||||
"metadata": {
|
||||
"tags": [],
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.entities",
|
||||
"doc_id": null,
|
||||
"object": "ControlActionSet",
|
||||
"fact_id": "bafb867ffed41c9db637df98d6cd5f6722d7747bbebc6c03e6f0d0caf3b7f9f3",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"predicate": "mentions_entity",
|
||||
"object_ref": null,
|
||||
"subject_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"relations": [
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:parent",
|
||||
"content": "api.control_actions_endpoint parent architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.parent",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "afec31fd062e392dcd9699a92c7ab61fd4b1273c1a2b16702b23d55d8d0c47ac",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "parent",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:related_api",
|
||||
"content": "api.control_actions_endpoint related_api api.health_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "api.health_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "711fb2edb82dd222deaba3c91768b18cbbd453009235823282813c6e867dc2c1",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_api",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:related_logic",
|
||||
"content": "api.control_actions_endpoint related_logic logic.telegram_notification_loop",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "logic.telegram_notification_loop",
|
||||
"doc_version": null,
|
||||
"relation_id": "eec79f7a02b804337e791ef231784862ae26e0599eb20224790e9d4f085fa9c0",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_logic",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:part_of",
|
||||
"content": "api.control_actions_endpoint part_of architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "5f4909bde905cd3d294ad307074a05e4ae4deefcafe6272cd2d0436e73acb8dd",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "part_of",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "architecture.telegram_notify_app:child",
|
||||
"content": "architecture.telegram_notify_app child api.control_actions_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.children",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"source_id": "architecture.telegram_notify_app",
|
||||
"target_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "ae34fe4b3cd2b47632b13b1e32303e842b57948aa21160abe8d9b478995e1d74",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "child",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "architecture.telegram_notify_app:related_api",
|
||||
"content": "architecture.telegram_notify_app related_api api.control_actions_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"source_id": "architecture.telegram_notify_app",
|
||||
"target_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "02530527e6e1d1e23316c9d25d0b30658d6c70063eb6e1d732d55c5ba29c9795",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_api",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Объясни как работает компонент TelegramControlChannel
|
||||
- intent: DOCUMENTATION_EXPLAIN
|
||||
- sub_intent: COMPONENT_EXPLAIN
|
||||
- documents: 6 | samples: HTTP API /actions/{action}, Архитектура Telegram Notify App, Readme
|
||||
- facts: 2 | samples: api.control_actions_endpoint:workflow_step, api.control_actions_endpoint:mentions_entity
|
||||
- relations: 6 | samples: api.control_actions_endpoint:parent, api.control_actions_endpoint:related_api, api.control_actions_endpoint:related_logic
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "docs-v2-component-runtime-manager",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v2.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "full_chain",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 20,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [
|
||||
"RuntimeManager"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Какую роль в системе играет RuntimeManager?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Какую роль в системе играет RuntimeManager?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Какую роль в системе играет RuntimeManager?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Какую роль в системе играет RuntimeManager?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 21507,
|
||||
"tokens_in_estimate": 5475
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+900
@@ -0,0 +1,900 @@
|
||||
# docs-v2-component-runtime-manager
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v2.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: full_chain
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
Какую роль в системе играет RuntimeManager?
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 20,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [
|
||||
"RuntimeManager"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Какую роль в системе играет RuntimeManager?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Какую роль в системе играет RuntimeManager?"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Какую роль в системе играет RuntimeManager?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Какую роль в системе играет RuntimeManager?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 21507,
|
||||
"tokens_in_estimate": 5475
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"layers_used": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 6,
|
||||
"facts_found": 2,
|
||||
"relations_found": 6,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "none",
|
||||
"matched_anchor_value": null,
|
||||
"exact_anchor_match": false,
|
||||
"docs_layers_requested": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop"
|
||||
]
|
||||
},
|
||||
"D2_FACT_INDEX": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"b480201013a7e5231146f665773ebc54af37c28135f407c6b758304c74561645",
|
||||
"b8e44c3adb74aaa6c91ae8815fa091289e58dd3990a3a1b63e850c62075aea75",
|
||||
"bafb867ffed41c9db637df98d6cd5f6722d7747bbebc6c03e6f0d0caf3b7f9f3",
|
||||
"54bbcbac242f1c85ec3280236ed5841998a8a3a548ff16cbf0b5acafbff469e3",
|
||||
"b6bfad59b3bf00f199b5ef90c1208af19664de700413e7354468a93a4abaaa2f"
|
||||
]
|
||||
},
|
||||
"D5_RELATION_GRAPH": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"afec31fd062e392dcd9699a92c7ab61fd4b1273c1a2b16702b23d55d8d0c47ac",
|
||||
"711fb2edb82dd222deaba3c91768b18cbbd453009235823282813c6e867dc2c1",
|
||||
"eec79f7a02b804337e791ef231784862ae26e0599eb20224790e9d4f085fa9c0",
|
||||
"5f4909bde905cd3d294ad307074a05e4ae4deefcafe6272cd2d0436e73acb8dd",
|
||||
"ae34fe4b3cd2b47632b13b1e32303e842b57948aa21160abe8d9b478995e1d74"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [
|
||||
"RuntimeManager"
|
||||
],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [
|
||||
"RuntimeManager"
|
||||
],
|
||||
"resolved_anchor_candidates": [
|
||||
"api.control_actions_endpoint",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"logic.telegram_notification_loop",
|
||||
"docs/documentation/logic/telegram-notification-loop.md",
|
||||
"api.send_message_endpoint",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"docs/README.md",
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"docs/documentation/logic/telegram-notification-loop.md",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"HTTP API /actions/{action}",
|
||||
"Архитектура Telegram Notify App",
|
||||
"Readme",
|
||||
"Сущность runtime health",
|
||||
"Цикл отправки уведомлений в Telegram",
|
||||
"HTTP API /send",
|
||||
"api.control_actions_endpoint:workflow_step",
|
||||
"api.control_actions_endpoint:mentions_entity",
|
||||
"api.control_actions_endpoint:parent",
|
||||
"api.control_actions_endpoint:related_api",
|
||||
"api.control_actions_endpoint:related_logic",
|
||||
"api.control_actions_endpoint:part_of",
|
||||
"architecture.telegram_notify_app:child",
|
||||
"architecture.telegram_notify_app:related_api",
|
||||
"api.control_actions_endpoint:Функциональные требования",
|
||||
"api.control_actions_endpoint:Нефункциональные требования",
|
||||
"api.control_actions_endpoint:Сценарий",
|
||||
"api.control_actions_endpoint:Summary",
|
||||
"api.control_actions_endpoint:Описание",
|
||||
"api.control_actions_endpoint:Входные параметры"
|
||||
],
|
||||
"relation_hits_count": 6,
|
||||
"relation_targets": [
|
||||
"api.control_actions_endpoint:parent",
|
||||
"api.control_actions_endpoint:related_api",
|
||||
"api.control_actions_endpoint:related_logic",
|
||||
"api.control_actions_endpoint:part_of",
|
||||
"architecture.telegram_notify_app:child",
|
||||
"architecture.telegram_notify_app:related_api"
|
||||
],
|
||||
"fallback_doc_hits_count": 12,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 2,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 6,
|
||||
"facts": 2,
|
||||
"relations": 6,
|
||||
"chunks": 6,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "evidence_sufficient",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_explain_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 393,
|
||||
"user_chars": 21507,
|
||||
"tokens_in_estimate": 5475
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты объясняешь документацию системы.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные факты
|
||||
- Не додумывай
|
||||
- Если данных недостаточно, скажи это явно
|
||||
- Объясняй структурировано
|
||||
|
||||
Формат ответа:
|
||||
1. Краткое описание
|
||||
2. Основные элементы
|
||||
3. Как это работает
|
||||
4. Связи с другими частями системы (если есть)
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Какую роль в системе играет RuntimeManager?",
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"content": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"metadata": {
|
||||
"name": "control_actions_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"control-plane",
|
||||
"lifecycle"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"ControlActionSet",
|
||||
"JSONResponse"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.control_actions_endpoint",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"summary_text": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"content": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"metadata": {
|
||||
"name": "telegram_notify_app_overview",
|
||||
"tags": [
|
||||
"architecture",
|
||||
"telegram",
|
||||
"plba",
|
||||
"runtime"
|
||||
],
|
||||
"type": "architecture_overview",
|
||||
"layer": "system",
|
||||
"links": [
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "docs_root",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"children": [
|
||||
"api.health_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"doc_kind": "spec",
|
||||
"entities": [
|
||||
"TelegramNotifyModule",
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramControlChannel",
|
||||
"TelegramSendService",
|
||||
"RuntimeManager"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "architecture.telegram_notify_app",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"summary_text": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/README.md",
|
||||
"title": "Readme",
|
||||
"content": "Readme",
|
||||
"metadata": {
|
||||
"name": "",
|
||||
"tags": [],
|
||||
"type": "",
|
||||
"layer": "",
|
||||
"links": [],
|
||||
"owner": null,
|
||||
"title": "Readme",
|
||||
"doc_id": null,
|
||||
"module": "",
|
||||
"parent": null,
|
||||
"status": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "81d952f1a6ea85b76f75e0e57f33b8fa4b2bf3cb7db11b91b90171aeedd655a6",
|
||||
"children": [],
|
||||
"doc_kind": "readme",
|
||||
"entities": [],
|
||||
"updated_at": null,
|
||||
"doc_version": null,
|
||||
"document_id": "docs/README.md",
|
||||
"source_path": "docs/README.md",
|
||||
"summary_text": "",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "Сущность runtime health",
|
||||
"content": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"metadata": {
|
||||
"name": "runtime_health",
|
||||
"tags": [
|
||||
"domain",
|
||||
"health",
|
||||
"observability"
|
||||
],
|
||||
"type": "domain_entity",
|
||||
"layer": "domain",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "used_by",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Сущность runtime health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"WorkerHealth",
|
||||
"WorkerStatus",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "domain.runtime_health",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"summary_text": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/logic/telegram-notification-loop.md",
|
||||
"title": "Цикл отправки уведомлений в Telegram",
|
||||
"content": "`TelegramNotifyWorker` после старта runtime запускает отдельный поток, сразу делает первую попытку отправки сообщения и затем повторяет отправку через заданный интервал. При ошибках доставки или отсутствии credentials worker не останавливает сервис, а переводит собственное состояние в `degraded`. Этот workflow определяет основной полезный цикл приложения.",
|
||||
"metadata": {
|
||||
"name": "telegram_notification_loop",
|
||||
"tags": [
|
||||
"logic",
|
||||
"telegram",
|
||||
"worker",
|
||||
"scheduling"
|
||||
],
|
||||
"type": "logic_block",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Цикл отправки уведомлений в Telegram",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "0f62f9b4dab261ca4ca34575ff5d84411a22c90b780c52eda388782b94f08470",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramSendService",
|
||||
"WorkerHealth",
|
||||
"WorkerStatus"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "logic.telegram_notification_loop",
|
||||
"source_path": "docs/documentation/logic/telegram-notification-loop.md",
|
||||
"summary_text": "`TelegramNotifyWorker` после старта runtime запускает отдельный поток, сразу делает первую попытку отправки сообщения и затем повторяет отправку через заданный интервал. При ошибках доставки или отсутствии credentials worker не останавливает сервис, а переводит собственное состояние в `degraded`. Этот workflow определяет основной полезный цикл приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"title": "HTTP API /send",
|
||||
"content": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"metadata": {
|
||||
"name": "send_message_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"telegram",
|
||||
"manual-send"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /send",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "5fbf2e33510b0676a3a53b957a4569bd3c2c31fb7719546602c573421ccaa32d",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlAppFactory",
|
||||
"TelegramSendService",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.send_message_endpoint",
|
||||
"source_path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"summary_text": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [
|
||||
{
|
||||
"layer": "D2_FACT_INDEX",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:workflow_step",
|
||||
"content": "api.control_actions_endpoint workflow_step HTTP control plane запущен.",
|
||||
"metadata": {
|
||||
"tags": [],
|
||||
"owner": null,
|
||||
"anchor": "Сценарий",
|
||||
"doc_id": null,
|
||||
"object": "HTTP control plane запущен.",
|
||||
"fact_id": "b480201013a7e5231146f665773ebc54af37c28135f407c6b758304c74561645",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"predicate": "workflow_step",
|
||||
"object_ref": null,
|
||||
"subject_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D2_FACT_INDEX",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:mentions_entity",
|
||||
"content": "api.control_actions_endpoint mentions_entity ControlActionSet",
|
||||
"metadata": {
|
||||
"tags": [],
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.entities",
|
||||
"doc_id": null,
|
||||
"object": "ControlActionSet",
|
||||
"fact_id": "bafb867ffed41c9db637df98d6cd5f6722d7747bbebc6c03e6f0d0caf3b7f9f3",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"predicate": "mentions_entity",
|
||||
"object_ref": null,
|
||||
"subject_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"relations": [
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:parent",
|
||||
"content": "api.control_actions_endpoint parent architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.parent",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "afec31fd062e392dcd9699a92c7ab61fd4b1273c1a2b16702b23d55d8d0c47ac",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "parent",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:related_api",
|
||||
"content": "api.control_actions_endpoint related_api api.health_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "api.health_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "711fb2edb82dd222deaba3c91768b18cbbd453009235823282813c6e867dc2c1",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_api",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:related_logic",
|
||||
"content": "api.control_actions_endpoint related_logic logic.telegram_notification_loop",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "logic.telegram_notification_loop",
|
||||
"doc_version": null,
|
||||
"relation_id": "eec79f7a02b804337e791ef231784862ae26e0599eb20224790e9d4f085fa9c0",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_logic",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:part_of",
|
||||
"content": "api.control_actions_endpoint part_of architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "5f4909bde905cd3d294ad307074a05e4ae4deefcafe6272cd2d0436e73acb8dd",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "part_of",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "architecture.telegram_notify_app:child",
|
||||
"content": "architecture.telegram_notify_app child api.control_actions_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.children",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"source_id": "architecture.telegram_notify_app",
|
||||
"target_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "ae34fe4b3cd2b47632b13b1e32303e842b57948aa21160abe8d9b478995e1d74",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "child",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "architecture.telegram_notify_app:related_api",
|
||||
"content": "architecture.telegram_notify_app related_api api.control_actions_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"source_id": "architecture.telegram_notify_app",
|
||||
"target_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "02530527e6e1d1e23316c9d25d0b30658d6c70063eb6e1d732d55c5ba29c9795",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_api",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Какую роль в системе играет RuntimeManager?
|
||||
- intent: DOCUMENTATION_EXPLAIN
|
||||
- sub_intent: COMPONENT_EXPLAIN
|
||||
- documents: 6 | samples: HTTP API /actions/{action}, Архитектура Telegram Notify App, Readme
|
||||
- facts: 2 | samples: api.control_actions_endpoint:workflow_step, api.control_actions_endpoint:mentions_entity
|
||||
- relations: 6 | samples: api.control_actions_endpoint:parent, api.control_actions_endpoint:related_api, api.control_actions_endpoint:related_logic
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "docs-v2-entity-runtime-health",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v2.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "full_chain",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 26,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.health_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [
|
||||
"runtime health"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Что такое runtime health?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Что такое runtime health?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Что такое runtime health?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Что такое runtime health?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 20267,
|
||||
"tokens_in_estimate": 5165
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+865
@@ -0,0 +1,865 @@
|
||||
# docs-v2-entity-runtime-health
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v2.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: full_chain
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
Что такое runtime health?
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 26,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.health_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [
|
||||
"runtime health"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что такое runtime health?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Что такое runtime health?"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что такое runtime health?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что такое runtime health?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 20267,
|
||||
"tokens_in_estimate": 5165
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"layers_used": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 6,
|
||||
"facts_found": 0,
|
||||
"relations_found": 6,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "none",
|
||||
"matched_anchor_value": null,
|
||||
"exact_anchor_match": false,
|
||||
"docs_layers_requested": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D3_ENTITY_CATALOG": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"api.health_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"domain.runtime_health"
|
||||
]
|
||||
},
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"domain.runtime_health",
|
||||
"api.health_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.control_actions_endpoint",
|
||||
"architecture.telegram_notify_app"
|
||||
]
|
||||
},
|
||||
"D5_RELATION_GRAPH": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"79bdb0a74713df6064008179ca8c5c186dc23e4e1c5e2c9607b0bdddeba50f93",
|
||||
"af2a4f7c1b677b908410ba720915405e10dbd0870e30a3c6e3aa2468550ddf0e",
|
||||
"77f5d358ab85b3d92018b6b51da7c39773148dfd346686e8832a45370c841160",
|
||||
"c718b1939621233295ccaf6e8203e7fd94f3dd1bfb88f10c51bc5e33d53a24aa",
|
||||
"616f5cbf25da83cb51d8d0741a7fc351620c9ca2c6513fa2094b4aa476f0912a"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.health_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [
|
||||
"runtime health"
|
||||
],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [],
|
||||
"resolved_anchor_candidates": [
|
||||
"api.health_endpoint",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"domain.runtime_health",
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"logic.telegram_notification_loop",
|
||||
"docs/documentation/logic/telegram-notification-loop.md",
|
||||
"api.control_actions_endpoint",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"api.send_message_endpoint",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"api.health_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"docs/documentation/logic/telegram-notification-loop.md",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"RuntimeManager",
|
||||
"WorkerStatus",
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramControlChannel",
|
||||
"WorkerHealth",
|
||||
"Сущность runtime health",
|
||||
"HTTP API /health",
|
||||
"Цикл отправки уведомлений в Telegram",
|
||||
"HTTP API /actions/{action}",
|
||||
"Архитектура Telegram Notify App",
|
||||
"HTTP API /send",
|
||||
"domain.runtime_health:parent",
|
||||
"domain.runtime_health:part_of",
|
||||
"api.health_endpoint:depends_on",
|
||||
"api.health_endpoint:parent",
|
||||
"api.health_endpoint:part_of",
|
||||
"domain.runtime_health:used_by",
|
||||
"api.health_endpoint:Сценарий",
|
||||
"api.health_endpoint:Нефункциональные требования",
|
||||
"api.health_endpoint:Summary",
|
||||
"api.health_endpoint:Описание",
|
||||
"api.health_endpoint:Функциональные требования",
|
||||
"api.health_endpoint:Входные параметры"
|
||||
],
|
||||
"relation_hits_count": 6,
|
||||
"relation_targets": [
|
||||
"domain.runtime_health:parent",
|
||||
"domain.runtime_health:part_of",
|
||||
"api.health_endpoint:depends_on",
|
||||
"api.health_endpoint:parent",
|
||||
"api.health_endpoint:part_of",
|
||||
"domain.runtime_health:used_by"
|
||||
],
|
||||
"fallback_doc_hits_count": 12,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 0,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 6,
|
||||
"facts": 0,
|
||||
"relations": 6,
|
||||
"chunks": 6,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "evidence_sufficient",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_explain_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 393,
|
||||
"user_chars": 20267,
|
||||
"tokens_in_estimate": 5165
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты объясняешь документацию системы.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные факты
|
||||
- Не додумывай
|
||||
- Если данных недостаточно, скажи это явно
|
||||
- Объясняй структурировано
|
||||
|
||||
Формат ответа:
|
||||
1. Краткое описание
|
||||
2. Основные элементы
|
||||
3. Как это работает
|
||||
4. Связи с другими частями системы (если есть)
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Что такое runtime health?",
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "Сущность runtime health",
|
||||
"content": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"metadata": {
|
||||
"name": "runtime_health",
|
||||
"tags": [
|
||||
"domain",
|
||||
"health",
|
||||
"observability"
|
||||
],
|
||||
"type": "domain_entity",
|
||||
"layer": "domain",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "used_by",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Сущность runtime health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"WorkerHealth",
|
||||
"WorkerStatus",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "domain.runtime_health",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"summary_text": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "HTTP API /health",
|
||||
"content": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"metadata": {
|
||||
"name": "health_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"health",
|
||||
"control-plane"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"TelegramNotifyWorker",
|
||||
"RuntimeManager",
|
||||
"WorkerHealth"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.health_endpoint",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"summary_text": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/logic/telegram-notification-loop.md",
|
||||
"title": "Цикл отправки уведомлений в Telegram",
|
||||
"content": "`TelegramNotifyWorker` после старта runtime запускает отдельный поток, сразу делает первую попытку отправки сообщения и затем повторяет отправку через заданный интервал. При ошибках доставки или отсутствии credentials worker не останавливает сервис, а переводит собственное состояние в `degraded`. Этот workflow определяет основной полезный цикл приложения.",
|
||||
"metadata": {
|
||||
"name": "telegram_notification_loop",
|
||||
"tags": [
|
||||
"logic",
|
||||
"telegram",
|
||||
"worker",
|
||||
"scheduling"
|
||||
],
|
||||
"type": "logic_block",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Цикл отправки уведомлений в Telegram",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "0f62f9b4dab261ca4ca34575ff5d84411a22c90b780c52eda388782b94f08470",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramSendService",
|
||||
"WorkerHealth",
|
||||
"WorkerStatus"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "logic.telegram_notification_loop",
|
||||
"source_path": "docs/documentation/logic/telegram-notification-loop.md",
|
||||
"summary_text": "`TelegramNotifyWorker` после старта runtime запускает отдельный поток, сразу делает первую попытку отправки сообщения и затем повторяет отправку через заданный интервал. При ошибках доставки или отсутствии credentials worker не останавливает сервис, а переводит собственное состояние в `degraded`. Этот workflow определяет основной полезный цикл приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"content": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"metadata": {
|
||||
"name": "control_actions_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"control-plane",
|
||||
"lifecycle"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"ControlActionSet",
|
||||
"JSONResponse"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.control_actions_endpoint",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"summary_text": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"content": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"metadata": {
|
||||
"name": "telegram_notify_app_overview",
|
||||
"tags": [
|
||||
"architecture",
|
||||
"telegram",
|
||||
"plba",
|
||||
"runtime"
|
||||
],
|
||||
"type": "architecture_overview",
|
||||
"layer": "system",
|
||||
"links": [
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "docs_root",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"children": [
|
||||
"api.health_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"doc_kind": "spec",
|
||||
"entities": [
|
||||
"TelegramNotifyModule",
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramControlChannel",
|
||||
"TelegramSendService",
|
||||
"RuntimeManager"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "architecture.telegram_notify_app",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"summary_text": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"title": "HTTP API /send",
|
||||
"content": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"metadata": {
|
||||
"name": "send_message_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"telegram",
|
||||
"manual-send"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /send",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "5fbf2e33510b0676a3a53b957a4569bd3c2c31fb7719546602c573421ccaa32d",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlAppFactory",
|
||||
"TelegramSendService",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.send_message_endpoint",
|
||||
"source_path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"summary_text": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [],
|
||||
"relations": [
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "domain.runtime_health:parent",
|
||||
"content": "domain.runtime_health parent architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.parent",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"source_id": "domain.runtime_health",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "79bdb0a74713df6064008179ca8c5c186dc23e4e1c5e2c9607b0bdddeba50f93",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "parent",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "domain.runtime_health:part_of",
|
||||
"content": "domain.runtime_health part_of architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"source_id": "domain.runtime_health",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "af2a4f7c1b677b908410ba720915405e10dbd0870e30a3c6e3aa2468550ddf0e",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "part_of",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "api.health_endpoint:depends_on",
|
||||
"content": "api.health_endpoint depends_on domain.runtime_health",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"source_id": "api.health_endpoint",
|
||||
"target_id": "domain.runtime_health",
|
||||
"doc_version": null,
|
||||
"relation_id": "77f5d358ab85b3d92018b6b51da7c39773148dfd346686e8832a45370c841160",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "depends_on",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "api.health_endpoint:parent",
|
||||
"content": "api.health_endpoint parent architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.parent",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"source_id": "api.health_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "c718b1939621233295ccaf6e8203e7fd94f3dd1bfb88f10c51bc5e33d53a24aa",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "parent",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "api.health_endpoint:part_of",
|
||||
"content": "api.health_endpoint part_of architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"source_id": "api.health_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "616f5cbf25da83cb51d8d0741a7fc351620c9ca2c6513fa2094b4aa476f0912a",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "part_of",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "domain.runtime_health:used_by",
|
||||
"content": "domain.runtime_health used_by api.health_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"source_id": "domain.runtime_health",
|
||||
"target_id": "api.health_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "801650f8bcbfbfbefd35c14447bfef7b3c3827313db790efa7faf47db860f8c4",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "used_by",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Что такое runtime health?
|
||||
- intent: DOCUMENTATION_EXPLAIN
|
||||
- sub_intent: ENTITY_EXPLAIN
|
||||
- documents: 6 | samples: Сущность runtime health, HTTP API /health, Цикл отправки уведомлений в Telegram
|
||||
- facts: 0
|
||||
- relations: 6 | samples: domain.runtime_health:parent, domain.runtime_health:part_of, api.health_endpoint:depends_on
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "docs-v2-entity-worker-status",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v2.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "full_chain",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 4,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop"
|
||||
],
|
||||
"entity_candidates": [
|
||||
"WorkerStatus"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Объясни сущность WorkerStatus"
|
||||
},
|
||||
"output": {
|
||||
"query": "Объясни сущность WorkerStatus"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Объясни сущность WorkerStatus"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Объясни сущность WorkerStatus"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 2555,
|
||||
"tokens_in_estimate": 737
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+384
@@ -0,0 +1,384 @@
|
||||
# docs-v2-entity-worker-status
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v2.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: full_chain
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
Объясни сущность WorkerStatus
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 4,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop"
|
||||
],
|
||||
"entity_candidates": [
|
||||
"WorkerStatus"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Объясни сущность WorkerStatus"
|
||||
},
|
||||
"output": {
|
||||
"query": "Объясни сущность WorkerStatus"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Объясни сущность WorkerStatus"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Объясни сущность WorkerStatus"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 2555,
|
||||
"tokens_in_estimate": 737
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"layers_used": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 1,
|
||||
"facts_found": 0,
|
||||
"relations_found": 0,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "entity",
|
||||
"matched_anchor_value": "WorkerStatus",
|
||||
"exact_anchor_match": true,
|
||||
"docs_layers_requested": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D3_ENTITY_CATALOG": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint"
|
||||
]
|
||||
},
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"architecture.telegram_notify_app"
|
||||
]
|
||||
},
|
||||
"D5_RELATION_GRAPH": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"5f4909bde905cd3d294ad307074a05e4ae4deefcafe6272cd2d0436e73acb8dd",
|
||||
"711fb2edb82dd222deaba3c91768b18cbbd453009235823282813c6e867dc2c1",
|
||||
"eec79f7a02b804337e791ef231784862ae26e0599eb20224790e9d4f085fa9c0",
|
||||
"c718b1939621233295ccaf6e8203e7fd94f3dd1bfb88f10c51bc5e33d53a24aa",
|
||||
"616f5cbf25da83cb51d8d0741a7fc351620c9ca2c6513fa2094b4aa476f0912a"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"logic.telegram_notification_loop",
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [
|
||||
"WorkerStatus"
|
||||
],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [
|
||||
"WorkerStatus"
|
||||
],
|
||||
"resolved_anchor_candidates": [
|
||||
"domain.runtime_health",
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"logic.telegram_notification_loop",
|
||||
"docs/documentation/logic/telegram-notification-loop.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"docs/documentation/logic/telegram-notification-loop.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"WorkerStatus",
|
||||
"logic.telegram_notification_loop:Details",
|
||||
"Сущность runtime health"
|
||||
],
|
||||
"relation_hits_count": 0,
|
||||
"relation_targets": [],
|
||||
"fallback_doc_hits_count": 2,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 0,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 1,
|
||||
"facts": 0,
|
||||
"relations": 0,
|
||||
"chunks": 1,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "evidence_sufficient",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty",
|
||||
"exact_anchor_match"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_explain_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 393,
|
||||
"user_chars": 2555,
|
||||
"tokens_in_estimate": 737
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты объясняешь документацию системы.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные факты
|
||||
- Не додумывай
|
||||
- Если данных недостаточно, скажи это явно
|
||||
- Объясняй структурировано
|
||||
|
||||
Формат ответа:
|
||||
1. Краткое описание
|
||||
2. Основные элементы
|
||||
3. Как это работает
|
||||
4. Связи с другими частями системы (если есть)
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Объясни сущность WorkerStatus",
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "Сущность runtime health",
|
||||
"content": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"metadata": {
|
||||
"name": "runtime_health",
|
||||
"tags": [
|
||||
"domain",
|
||||
"health",
|
||||
"observability"
|
||||
],
|
||||
"type": "domain_entity",
|
||||
"layer": "domain",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "used_by",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Сущность runtime health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"WorkerHealth",
|
||||
"WorkerStatus",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "domain.runtime_health",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"summary_text": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [],
|
||||
"relations": []
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Объясни сущность WorkerStatus
|
||||
- intent: DOCUMENTATION_EXPLAIN
|
||||
- sub_intent: ENTITY_EXPLAIN
|
||||
- documents: 1 | samples: Сущность runtime health
|
||||
- facts: 0
|
||||
- relations: 0
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "docs-v2-general-overview",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v2.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "full_chain",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "GENERAL_QA",
|
||||
"sub_intent": "GENERIC_QA",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 12,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_general_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Что вообще описано в документации по этому сервису?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Что вообще описано в документации по этому сервису?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Что вообще описано в документации по этому сервису?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "GENERAL_QA",
|
||||
"sub_intent": "GENERIC_QA",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Что вообще описано в документации по этому сервису?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_general_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_general_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 345,
|
||||
"user_chars": 7589,
|
||||
"tokens_in_estimate": 1984
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+493
@@ -0,0 +1,493 @@
|
||||
# docs-v2-general-overview
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v2.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: full_chain
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
Что вообще описано в документации по этому сервису?
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "GENERAL_QA",
|
||||
"sub_intent": "GENERIC_QA",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 12,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_general_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что вообще описано в документации по этому сервису?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Что вообще описано в документации по этому сервису?"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что вообще описано в документации по этому сервису?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "GENERAL_QA",
|
||||
"sub_intent": "GENERIC_QA",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что вообще описано в документации по этому сервису?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_general_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_general_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 345,
|
||||
"user_chars": 7589,
|
||||
"tokens_in_estimate": 1984
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "GENERAL_QA",
|
||||
"sub_intent": "GENERIC_QA",
|
||||
"layers_used": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 4,
|
||||
"facts_found": 0,
|
||||
"relations_found": 0,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_general_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "none",
|
||||
"matched_anchor_value": null,
|
||||
"exact_anchor_match": false,
|
||||
"docs_layers_requested": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 4,
|
||||
"top_ids": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [],
|
||||
"resolved_anchor_candidates": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"api.health_endpoint",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"api.send_message_endpoint",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/README.md",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"Readme",
|
||||
"HTTP API /actions/{action}",
|
||||
"HTTP API /health",
|
||||
"HTTP API /send",
|
||||
"docs/README.md:Структура",
|
||||
"docs/README.md:Навигация",
|
||||
"docs/README.md:Правила и шаблоны",
|
||||
"api.control_actions_endpoint:Summary",
|
||||
"api.control_actions_endpoint:Описание",
|
||||
"api.control_actions_endpoint:Сценарий",
|
||||
"api.control_actions_endpoint:Функциональные требования",
|
||||
"docs/README.md:Project Docs"
|
||||
],
|
||||
"relation_hits_count": 0,
|
||||
"relation_targets": [],
|
||||
"fallback_doc_hits_count": 12,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 0,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 4,
|
||||
"facts": 0,
|
||||
"relations": 0,
|
||||
"chunks": 8,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "evidence_sufficient",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_general_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 345,
|
||||
"user_chars": 7589,
|
||||
"tokens_in_estimate": 1984
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты отвечаешь на общий вопрос по документации проекта.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные документы и факты
|
||||
- Не додумывай отсутствующие детали
|
||||
- Если данных недостаточно, скажи это прямо
|
||||
- Дай короткий понятный ответ без лишней структуры
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Что вообще описано в документации по этому сервису?",
|
||||
"intent": "GENERAL_QA",
|
||||
"sub_intent": "GENERIC_QA",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/README.md",
|
||||
"title": "Readme",
|
||||
"content": "Readme",
|
||||
"metadata": {
|
||||
"name": "",
|
||||
"tags": [],
|
||||
"type": "",
|
||||
"layer": "",
|
||||
"links": [],
|
||||
"owner": null,
|
||||
"title": "Readme",
|
||||
"doc_id": null,
|
||||
"module": "",
|
||||
"parent": null,
|
||||
"status": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "81d952f1a6ea85b76f75e0e57f33b8fa4b2bf3cb7db11b91b90171aeedd655a6",
|
||||
"children": [],
|
||||
"doc_kind": "readme",
|
||||
"entities": [],
|
||||
"updated_at": null,
|
||||
"doc_version": null,
|
||||
"document_id": "docs/README.md",
|
||||
"source_path": "docs/README.md",
|
||||
"summary_text": "",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"content": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"metadata": {
|
||||
"name": "control_actions_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"control-plane",
|
||||
"lifecycle"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"ControlActionSet",
|
||||
"JSONResponse"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.control_actions_endpoint",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"summary_text": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "HTTP API /health",
|
||||
"content": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"metadata": {
|
||||
"name": "health_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"health",
|
||||
"control-plane"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"TelegramNotifyWorker",
|
||||
"RuntimeManager",
|
||||
"WorkerHealth"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.health_endpoint",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"summary_text": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"title": "HTTP API /send",
|
||||
"content": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"metadata": {
|
||||
"name": "send_message_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"telegram",
|
||||
"manual-send"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /send",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "5fbf2e33510b0676a3a53b957a4569bd3c2c31fb7719546602c573421ccaa32d",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlAppFactory",
|
||||
"TelegramSendService",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.send_message_endpoint",
|
||||
"source_path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"summary_text": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [],
|
||||
"relations": []
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Что вообще описано в документации по этому сервису?
|
||||
- intent: GENERAL_QA
|
||||
- sub_intent: GENERIC_QA
|
||||
- documents: 4 | samples: Readme, HTTP API /actions/{action}, HTTP API /health
|
||||
- facts: 0
|
||||
- relations: 0
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "docs-v2-negative-missing-entity",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v2.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "full_chain",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 0,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "degraded",
|
||||
"path_scope": [],
|
||||
"doc_scope": [],
|
||||
"entity_candidates": [
|
||||
"PaymentTransaction"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "reject",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": "not_found_exact_anchor",
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Что такое сущность PaymentTransaction?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Что такое сущность PaymentTransaction?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Что такое сущность PaymentTransaction?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Что такое сущность PaymentTransaction?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "degraded",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 182,
|
||||
"tokens_in_estimate": 144
|
||||
}
|
||||
},
|
||||
"degraded_reason": "not_found_exact_anchor"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+307
@@ -0,0 +1,307 @@
|
||||
# docs-v2-negative-missing-entity
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v2.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: full_chain
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
Что такое сущность PaymentTransaction?
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 0,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "degraded",
|
||||
"path_scope": [],
|
||||
"doc_scope": [],
|
||||
"entity_candidates": [
|
||||
"PaymentTransaction"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "reject",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": "not_found_exact_anchor",
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что такое сущность PaymentTransaction?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Что такое сущность PaymentTransaction?"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что такое сущность PaymentTransaction?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что такое сущность PaymentTransaction?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "degraded",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 182,
|
||||
"tokens_in_estimate": 144
|
||||
}
|
||||
},
|
||||
"degraded_reason": "not_found_exact_anchor"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"layers_used": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 0,
|
||||
"facts_found": 0,
|
||||
"relations_found": 0,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": false,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "entity",
|
||||
"matched_anchor_value": "PaymentTransaction",
|
||||
"exact_anchor_match": false,
|
||||
"docs_layers_requested": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D3_ENTITY_CATALOG": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint"
|
||||
]
|
||||
},
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"architecture.telegram_notify_app"
|
||||
]
|
||||
},
|
||||
"D5_RELATION_GRAPH": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"5f4909bde905cd3d294ad307074a05e4ae4deefcafe6272cd2d0436e73acb8dd",
|
||||
"711fb2edb82dd222deaba3c91768b18cbbd453009235823282813c6e867dc2c1",
|
||||
"eec79f7a02b804337e791ef231784862ae26e0599eb20224790e9d4f085fa9c0",
|
||||
"c718b1939621233295ccaf6e8203e7fd94f3dd1bfb88f10c51bc5e33d53a24aa",
|
||||
"616f5cbf25da83cb51d8d0741a7fc351620c9ca2c6513fa2094b4aa476f0912a"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [
|
||||
"PaymentTransaction"
|
||||
],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [
|
||||
"PaymentTransaction"
|
||||
],
|
||||
"resolved_anchor_candidates": [],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [],
|
||||
"doc_paths": [],
|
||||
"doc_titles": [],
|
||||
"relation_hits_count": 0,
|
||||
"relation_targets": [],
|
||||
"fallback_doc_hits_count": 0,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 0,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 0,
|
||||
"facts": 0,
|
||||
"relations": 0,
|
||||
"chunks": 0,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "reject",
|
||||
"gate_decision_reason": "not_found_exact_anchor",
|
||||
"gate_missing_requirements": [
|
||||
"retrieval_non_empty",
|
||||
"exact_anchor_match"
|
||||
],
|
||||
"gate_satisfied_requirements": [],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "degraded",
|
||||
"degrade_reason": "not_found_exact_anchor",
|
||||
"degraded_reason": "not_found_exact_anchor",
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_explain_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 393,
|
||||
"user_chars": 182,
|
||||
"tokens_in_estimate": 144
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты объясняешь документацию системы.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные факты
|
||||
- Не додумывай
|
||||
- Если данных недостаточно, скажи это явно
|
||||
- Объясняй структурировано
|
||||
|
||||
Формат ответа:
|
||||
1. Краткое описание
|
||||
2. Основные элементы
|
||||
3. Как это работает
|
||||
4. Связи с другими частями системы (если есть)
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Что такое сущность PaymentTransaction?",
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"documents": [],
|
||||
"facts": [],
|
||||
"relations": []
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Что такое сущность PaymentTransaction?
|
||||
- intent: DOCUMENTATION_EXPLAIN
|
||||
- sub_intent: ENTITY_EXPLAIN
|
||||
- documents: 0
|
||||
- facts: 0
|
||||
- relations: 0
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "docs-v2-openapi-fragment-send-request",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v2.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "full_chain",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "OPENAPI_GENERATION",
|
||||
"sub_intent": "OPENAPI_FRAGMENT_GENERATE",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 1,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "structured_spec",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": "api_method"
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "partial",
|
||||
"prompt_used": "docs_openapi_fragment_answer",
|
||||
"llm_mode": "yaml",
|
||||
"degraded_reason": "fragment_payload_only",
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Сгенерируй request schema для endpoint /send"
|
||||
},
|
||||
"output": {
|
||||
"query": "Сгенерируй request schema для endpoint /send"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Сгенерируй request schema для endpoint /send"
|
||||
},
|
||||
"output": {
|
||||
"intent": "OPENAPI_GENERATION",
|
||||
"sub_intent": "OPENAPI_FRAGMENT_GENERATE",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Сгенерируй request schema для endpoint /send"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready_partial",
|
||||
"prompt_name": "docs_openapi_fragment_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_openapi_fragment_answer",
|
||||
"log_context": "graph.project_qa.docs.openapi",
|
||||
"prompt_stats": {
|
||||
"system_chars": 319,
|
||||
"user_chars": 2748,
|
||||
"tokens_in_estimate": 767
|
||||
}
|
||||
},
|
||||
"degraded_reason": "fragment_payload_only"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+383
@@ -0,0 +1,383 @@
|
||||
# docs-v2-openapi-fragment-send-request
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v2.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: full_chain
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
Сгенерируй request schema для endpoint /send
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "OPENAPI_GENERATION",
|
||||
"sub_intent": "OPENAPI_FRAGMENT_GENERATE",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 1,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "structured_spec",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": "api_method"
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "partial",
|
||||
"prompt_used": "docs_openapi_fragment_answer",
|
||||
"llm_mode": "yaml",
|
||||
"degraded_reason": "fragment_payload_only",
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Сгенерируй request schema для endpoint /send"
|
||||
},
|
||||
"output": {
|
||||
"query": "Сгенерируй request schema для endpoint /send"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Сгенерируй request schema для endpoint /send"
|
||||
},
|
||||
"output": {
|
||||
"intent": "OPENAPI_GENERATION",
|
||||
"sub_intent": "OPENAPI_FRAGMENT_GENERATE",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Сгенерируй request schema для endpoint /send"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready_partial",
|
||||
"prompt_name": "docs_openapi_fragment_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_openapi_fragment_answer",
|
||||
"log_context": "graph.project_qa.docs.openapi",
|
||||
"prompt_stats": {
|
||||
"system_chars": 319,
|
||||
"user_chars": 2748,
|
||||
"tokens_in_estimate": 767
|
||||
}
|
||||
},
|
||||
"degraded_reason": "fragment_payload_only"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "OPENAPI_GENERATION",
|
||||
"sub_intent": "OPENAPI_FRAGMENT_GENERATE",
|
||||
"layers_used": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 1,
|
||||
"facts_found": 0,
|
||||
"relations_found": 0,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [
|
||||
"method",
|
||||
"schema_fragment"
|
||||
],
|
||||
"openapi_status": {
|
||||
"has_path": true,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_openapi_fragment_answer",
|
||||
"llm_mode": "yaml",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "endpoint",
|
||||
"matched_anchor_value": "/send",
|
||||
"exact_anchor_match": true,
|
||||
"docs_layers_requested": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 7,
|
||||
"top_ids": [
|
||||
"api.send_message_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/README.md"
|
||||
]
|
||||
},
|
||||
"D2_FACT_INDEX": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"f85d982c272a2ee6baeadc433221a20e684cd8ef01cb4788d6f76d05ca56d6d0",
|
||||
"b8e44c3adb74aaa6c91ae8815fa091289e58dd3990a3a1b63e850c62075aea75",
|
||||
"bafb867ffed41c9db637df98d6cd5f6722d7747bbebc6c03e6f0d0caf3b7f9f3",
|
||||
"54bbcbac242f1c85ec3280236ed5841998a8a3a548ff16cbf0b5acafbff469e3",
|
||||
"b6bfad59b3bf00f199b5ef90c1208af19664de700413e7354468a93a4abaaa2f"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [
|
||||
"/send"
|
||||
],
|
||||
"resolved_anchor_candidates": [
|
||||
"api.send_message_endpoint",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"HTTP API /send"
|
||||
],
|
||||
"relation_hits_count": 0,
|
||||
"relation_targets": [],
|
||||
"fallback_doc_hits_count": 1,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 0,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 1,
|
||||
"facts": 0,
|
||||
"relations": 0,
|
||||
"chunks": 0,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": true,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": true
|
||||
}
|
||||
},
|
||||
"gate_decision": "partial",
|
||||
"gate_decision_reason": "fragment_payload_only",
|
||||
"gate_missing_requirements": [
|
||||
"http_method_found",
|
||||
"contract_fields_found",
|
||||
"status_codes_found"
|
||||
],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty",
|
||||
"exact_anchor_match",
|
||||
"path_found",
|
||||
"payload_description_found",
|
||||
"api_method_filter"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": true,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": true
|
||||
},
|
||||
"requested_fragment_type": "request_schema",
|
||||
"fragment_evidence_found": [
|
||||
"path",
|
||||
"payload_description"
|
||||
],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready_partial",
|
||||
"degrade_reason": "fragment_payload_only",
|
||||
"degraded_reason": "fragment_payload_only",
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_openapi_fragment_answer
|
||||
- log_context: graph.project_qa.docs.openapi
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 319,
|
||||
"user_chars": 2748,
|
||||
"tokens_in_estimate": 767
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты генерируешь часть OpenAPI schema по документации API.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
- api_contract
|
||||
|
||||
Правила:
|
||||
- Только schema
|
||||
- Без полного OpenAPI документа
|
||||
- Используй только данные из payload
|
||||
- Не придумывай поля
|
||||
- Верни ТОЛЬКО YAML без пояснений
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Сгенерируй request schema для endpoint /send",
|
||||
"intent": "OPENAPI_GENERATION",
|
||||
"sub_intent": "OPENAPI_FRAGMENT_GENERATE",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"title": "HTTP API /send",
|
||||
"content": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"metadata": {
|
||||
"name": "send_message_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"telegram",
|
||||
"manual-send"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /send",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "5fbf2e33510b0676a3a53b957a4569bd3c2c31fb7719546602c573421ccaa32d",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlAppFactory",
|
||||
"TelegramSendService",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.send_message_endpoint",
|
||||
"source_path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"summary_text": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [],
|
||||
"relations": [],
|
||||
"api_contract": {
|
||||
"path": "/send",
|
||||
"method": "",
|
||||
"request_schema": null,
|
||||
"response_schema": null,
|
||||
"diagnostics": {
|
||||
"has_path": true,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false,
|
||||
"status_codes_found": false,
|
||||
"payload_description_found": true,
|
||||
"missing_required_fields": [
|
||||
"method",
|
||||
"schema_fragment"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Сгенерируй request schema для endpoint /send
|
||||
- intent: OPENAPI_GENERATION
|
||||
- sub_intent: OPENAPI_FRAGMENT_GENERATE
|
||||
- documents: 1 | samples: HTTP API /send
|
||||
- facts: 0
|
||||
- relations: 0
|
||||
- api_contract:
|
||||
path: /send
|
||||
method: —
|
||||
has_request_schema: False
|
||||
has_response_schema: False
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "docs-v2-openapi-health",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v2.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "full_chain",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "OPENAPI_GENERATION",
|
||||
"sub_intent": "OPENAPI_METHOD_GENERATE",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 1,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "structured_spec",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.health_endpoint"
|
||||
],
|
||||
"entity_candidates": [
|
||||
"OpenAPI"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": "api_method"
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "partial",
|
||||
"prompt_used": "docs_openapi_answer",
|
||||
"llm_mode": "yaml",
|
||||
"degraded_reason": "answered_with_gaps",
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Сгенерируй OpenAPI для endpoint /health по документации"
|
||||
},
|
||||
"output": {
|
||||
"query": "Сгенерируй OpenAPI для endpoint /health по документации"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Сгенерируй OpenAPI для endpoint /health по документации"
|
||||
},
|
||||
"output": {
|
||||
"intent": "OPENAPI_GENERATION",
|
||||
"sub_intent": "OPENAPI_METHOD_GENERATE",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Сгенерируй OpenAPI для endpoint /health по документации"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready_partial",
|
||||
"prompt_name": "docs_openapi_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_openapi_answer",
|
||||
"log_context": "graph.project_qa.docs.openapi",
|
||||
"prompt_stats": {
|
||||
"system_chars": 399,
|
||||
"user_chars": 2733,
|
||||
"tokens_in_estimate": 783
|
||||
}
|
||||
},
|
||||
"degraded_reason": "answered_with_gaps"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+395
@@ -0,0 +1,395 @@
|
||||
# docs-v2-openapi-health
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v2.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: full_chain
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
Сгенерируй OpenAPI для endpoint /health по документации
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "OPENAPI_GENERATION",
|
||||
"sub_intent": "OPENAPI_METHOD_GENERATE",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 1,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "structured_spec",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.health_endpoint"
|
||||
],
|
||||
"entity_candidates": [
|
||||
"OpenAPI"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": "api_method"
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "partial",
|
||||
"prompt_used": "docs_openapi_answer",
|
||||
"llm_mode": "yaml",
|
||||
"degraded_reason": "answered_with_gaps",
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Сгенерируй OpenAPI для endpoint /health по документации"
|
||||
},
|
||||
"output": {
|
||||
"query": "Сгенерируй OpenAPI для endpoint /health по документации"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Сгенерируй OpenAPI для endpoint /health по документации"
|
||||
},
|
||||
"output": {
|
||||
"intent": "OPENAPI_GENERATION",
|
||||
"sub_intent": "OPENAPI_METHOD_GENERATE",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Сгенерируй OpenAPI для endpoint /health по документации"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready_partial",
|
||||
"prompt_name": "docs_openapi_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_openapi_answer",
|
||||
"log_context": "graph.project_qa.docs.openapi",
|
||||
"prompt_stats": {
|
||||
"system_chars": 399,
|
||||
"user_chars": 2733,
|
||||
"tokens_in_estimate": 783
|
||||
}
|
||||
},
|
||||
"degraded_reason": "answered_with_gaps"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "OPENAPI_GENERATION",
|
||||
"sub_intent": "OPENAPI_METHOD_GENERATE",
|
||||
"layers_used": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 1,
|
||||
"facts_found": 0,
|
||||
"relations_found": 0,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [
|
||||
"method",
|
||||
"request_schema",
|
||||
"response_schema"
|
||||
],
|
||||
"openapi_status": {
|
||||
"has_path": true,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_openapi_answer",
|
||||
"llm_mode": "yaml",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "endpoint",
|
||||
"matched_anchor_value": "/health",
|
||||
"exact_anchor_match": true,
|
||||
"docs_layers_requested": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 7,
|
||||
"top_ids": [
|
||||
"api.send_message_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"domain.runtime_health",
|
||||
"architecture.telegram_notify_app"
|
||||
]
|
||||
},
|
||||
"D2_FACT_INDEX": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"f85d982c272a2ee6baeadc433221a20e684cd8ef01cb4788d6f76d05ca56d6d0",
|
||||
"b8e44c3adb74aaa6c91ae8815fa091289e58dd3990a3a1b63e850c62075aea75",
|
||||
"b6bfad59b3bf00f199b5ef90c1208af19664de700413e7354468a93a4abaaa2f",
|
||||
"a8a325e0815b3a2a870ba2825f3afb3f41056b4c091df4c3bb3418ffd20891dd",
|
||||
"bafb867ffed41c9db637df98d6cd5f6722d7747bbebc6c03e6f0d0caf3b7f9f3"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [
|
||||
"OpenAPI"
|
||||
],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [
|
||||
"/health",
|
||||
"OpenAPI"
|
||||
],
|
||||
"resolved_anchor_candidates": [
|
||||
"api.health_endpoint",
|
||||
"docs/documentation/api/health-endpoint.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"api.health_endpoint"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/documentation/api/health-endpoint.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"HTTP API /health"
|
||||
],
|
||||
"relation_hits_count": 0,
|
||||
"relation_targets": [],
|
||||
"fallback_doc_hits_count": 1,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 0,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 1,
|
||||
"facts": 0,
|
||||
"relations": 0,
|
||||
"chunks": 0,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": true,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": true,
|
||||
"payload_description": true
|
||||
}
|
||||
},
|
||||
"gate_decision": "partial",
|
||||
"gate_decision_reason": "answered_with_gaps",
|
||||
"gate_missing_requirements": [
|
||||
"http_method_found",
|
||||
"contract_fields_found"
|
||||
],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty",
|
||||
"exact_anchor_match",
|
||||
"path_found",
|
||||
"status_codes_found",
|
||||
"payload_description_found",
|
||||
"api_method_filter"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": true,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": true,
|
||||
"payload_description": true
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready_partial",
|
||||
"degrade_reason": "answered_with_gaps",
|
||||
"degraded_reason": "answered_with_gaps",
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_openapi_answer
|
||||
- log_context: graph.project_qa.docs.openapi
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 399,
|
||||
"user_chars": 2733,
|
||||
"tokens_in_estimate": 783
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты генерируешь OpenAPI спецификацию по документации API.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
- api_contract
|
||||
|
||||
Правила:
|
||||
- Используй только данные из документации
|
||||
- Не придумывай поля
|
||||
- Если данных нет, не заполняй
|
||||
- Верни ТОЛЬКО YAML без пояснений
|
||||
|
||||
Формат:
|
||||
paths:
|
||||
/path:
|
||||
method:
|
||||
summary: ...
|
||||
requestBody:
|
||||
responses:
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Сгенерируй OpenAPI для endpoint /health по документации",
|
||||
"intent": "OPENAPI_GENERATION",
|
||||
"sub_intent": "OPENAPI_METHOD_GENERATE",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "HTTP API /health",
|
||||
"content": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"metadata": {
|
||||
"name": "health_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"health",
|
||||
"control-plane"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"TelegramNotifyWorker",
|
||||
"RuntimeManager",
|
||||
"WorkerHealth"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.health_endpoint",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"summary_text": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [],
|
||||
"relations": [],
|
||||
"api_contract": {
|
||||
"path": "/health",
|
||||
"method": "",
|
||||
"request_schema": null,
|
||||
"response_schema": null,
|
||||
"diagnostics": {
|
||||
"has_path": true,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false,
|
||||
"status_codes_found": true,
|
||||
"payload_description_found": true,
|
||||
"missing_required_fields": [
|
||||
"method",
|
||||
"request_schema",
|
||||
"response_schema"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Сгенерируй OpenAPI для endpoint /health по документации
|
||||
- intent: OPENAPI_GENERATION
|
||||
- sub_intent: OPENAPI_METHOD_GENERATE
|
||||
- documents: 1 | samples: HTTP API /health
|
||||
- facts: 0
|
||||
- relations: 0
|
||||
- api_contract:
|
||||
path: /health
|
||||
method: —
|
||||
has_request_schema: False
|
||||
has_response_schema: False
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "docs-v2-related-docs-architecture-overview",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v2.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "full_chain",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "RELATED_DOCS_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 5,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"architecture.telegram_notify_app"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D5_RELATION_GRAPH",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "graph_summary",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Какие дочерние документы есть у overview архитектуры сервиса?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Какие дочерние документы есть у overview архитектуры сервиса?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Какие дочерние документы есть у overview архитектуры сервиса?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "RELATED_DOCS_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Какие дочерние документы есть у overview архитектуры сервиса?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 3236,
|
||||
"tokens_in_estimate": 908
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+372
@@ -0,0 +1,372 @@
|
||||
# docs-v2-related-docs-architecture-overview
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v2.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: full_chain
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
Какие дочерние документы есть у overview архитектуры сервиса?
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "RELATED_DOCS_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 5,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"architecture.telegram_notify_app"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D5_RELATION_GRAPH",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "graph_summary",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Какие дочерние документы есть у overview архитектуры сервиса?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Какие дочерние документы есть у overview архитектуры сервиса?"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Какие дочерние документы есть у overview архитектуры сервиса?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "RELATED_DOCS_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Какие дочерние документы есть у overview архитектуры сервиса?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 3236,
|
||||
"tokens_in_estimate": 908
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "RELATED_DOCS_EXPLAIN",
|
||||
"layers_used": [
|
||||
"D5_RELATION_GRAPH",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 0,
|
||||
"facts_found": 0,
|
||||
"relations_found": 3,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "graph_summary",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "workflow",
|
||||
"matched_anchor_value": "архитектуры",
|
||||
"exact_anchor_match": false,
|
||||
"docs_layers_requested": [
|
||||
"D5_RELATION_GRAPH",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D5_RELATION_GRAPH"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D5_RELATION_GRAPH",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D5_RELATION_GRAPH"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D5_RELATION_GRAPH"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D5_RELATION_GRAPH": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"305bab0c6567d93a2b453a9d70b676f9ecd8de083ef36f5cf3398747c25ebf94",
|
||||
"7bd0428d23e9b20f7d65202cc269e45b3d1e7aed7b5df4a35581fd88677be29b",
|
||||
"0eb7f73fcda8556439e06f5eeb5ce064ae32b6cd3129353f5b1b4eb3db626d88",
|
||||
"ae34fe4b3cd2b47632b13b1e32303e842b57948aa21160abe8d9b478995e1d74",
|
||||
"145ccbb861a8fb621286ec9c888ce69677168d35c7871c70537e888ce3a5b910"
|
||||
]
|
||||
},
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 0,
|
||||
"top_ids": [],
|
||||
"skipped": true,
|
||||
"reason": "relation_primary_sufficient"
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 2,
|
||||
"top_ids": [
|
||||
"architecture.telegram_notify_app"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [],
|
||||
"resolved_anchor_candidates": [
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"architecture.telegram_notify_app"
|
||||
],
|
||||
"anchor_candidates": [
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"architecture.telegram_notify_app"
|
||||
],
|
||||
"selected_anchor": "architecture.telegram_notify_app_overview",
|
||||
"anchor_selection_reason": "relation_neighbor",
|
||||
"anchor_match_type": "semantic_fallback",
|
||||
"doc_ids": [
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"architecture.telegram_notify_app"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"architecture.telegram_notify_app:child",
|
||||
"architecture.telegram_notify_app:related_api",
|
||||
"architecture.telegram_notify_app:parent",
|
||||
"architecture.telegram_notify_app:Summary",
|
||||
"architecture.telegram_notify_app:Details"
|
||||
],
|
||||
"relation_hits_count": 3,
|
||||
"relation_targets": [
|
||||
"architecture.telegram_notify_app:child",
|
||||
"architecture.telegram_notify_app:related_api",
|
||||
"architecture.telegram_notify_app:parent"
|
||||
],
|
||||
"fallback_doc_hits_count": 2,
|
||||
"fallback_used": true,
|
||||
"fact_hits": 0,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 0,
|
||||
"facts": 0,
|
||||
"relations": 3,
|
||||
"chunks": 2,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "relation_evidence_available",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_explain_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 393,
|
||||
"user_chars": 3236,
|
||||
"tokens_in_estimate": 908
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты объясняешь документацию системы.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные факты
|
||||
- Не додумывай
|
||||
- Если данных недостаточно, скажи это явно
|
||||
- Объясняй структурировано
|
||||
|
||||
Формат ответа:
|
||||
1. Краткое описание
|
||||
2. Основные элементы
|
||||
3. Как это работает
|
||||
4. Связи с другими частями системы (если есть)
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Какие дочерние документы есть у overview архитектуры сервиса?",
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "RELATED_DOCS_EXPLAIN",
|
||||
"documents": [],
|
||||
"facts": [],
|
||||
"relations": [
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "architecture.telegram_notify_app:child",
|
||||
"content": "architecture.telegram_notify_app child api.send_message_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.children",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"source_id": "architecture.telegram_notify_app",
|
||||
"target_id": "api.send_message_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "305bab0c6567d93a2b453a9d70b676f9ecd8de083ef36f5cf3398747c25ebf94",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "child",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "architecture.telegram_notify_app:related_api",
|
||||
"content": "architecture.telegram_notify_app related_api api.health_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"source_id": "architecture.telegram_notify_app",
|
||||
"target_id": "api.health_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "7bd0428d23e9b20f7d65202cc269e45b3d1e7aed7b5df4a35581fd88677be29b",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_api",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "architecture.telegram_notify_app:parent",
|
||||
"content": "architecture.telegram_notify_app parent docs_root",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.parent",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"source_id": "architecture.telegram_notify_app",
|
||||
"target_id": "docs_root",
|
||||
"doc_version": null,
|
||||
"relation_id": "e01922b36e3cc60d9349f89e43fcd4a92c6a01394b0028d6b6d56801b258645d",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "parent",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Какие дочерние документы есть у overview архитектуры сервиса?
|
||||
- intent: DOCUMENTATION_EXPLAIN
|
||||
- sub_intent: RELATED_DOCS_EXPLAIN
|
||||
- documents: 0
|
||||
- facts: 0
|
||||
- relations: 3 | samples: architecture.telegram_notify_app:child, architecture.telegram_notify_app:related_api, architecture.telegram_notify_app:parent
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "docs-v2-related-docs-health",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v2.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "full_chain",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "RELATED_DOCS_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 14,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.health_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D5_RELATION_GRAPH",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "graph_summary",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Какие документы связаны с endpoint /health?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Какие документы связаны с endpoint /health?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Какие документы связаны с endpoint /health?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "RELATED_DOCS_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Какие документы связаны с endpoint /health?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 7998,
|
||||
"tokens_in_estimate": 2098
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+516
@@ -0,0 +1,516 @@
|
||||
# docs-v2-related-docs-health
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v2.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: full_chain
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
Какие документы связаны с endpoint /health?
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "RELATED_DOCS_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 14,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.health_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D5_RELATION_GRAPH",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "graph_summary",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Какие документы связаны с endpoint /health?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Какие документы связаны с endpoint /health?"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Какие документы связаны с endpoint /health?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "RELATED_DOCS_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Какие документы связаны с endpoint /health?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 7998,
|
||||
"tokens_in_estimate": 2098
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "RELATED_DOCS_EXPLAIN",
|
||||
"layers_used": [
|
||||
"D5_RELATION_GRAPH",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 0,
|
||||
"facts_found": 0,
|
||||
"relations_found": 8,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "graph_summary",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "endpoint",
|
||||
"matched_anchor_value": "/health",
|
||||
"exact_anchor_match": false,
|
||||
"docs_layers_requested": [
|
||||
"D5_RELATION_GRAPH",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D5_RELATION_GRAPH"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D5_RELATION_GRAPH",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D5_RELATION_GRAPH"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D5_RELATION_GRAPH"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D5_RELATION_GRAPH": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"5f4909bde905cd3d294ad307074a05e4ae4deefcafe6272cd2d0436e73acb8dd",
|
||||
"711fb2edb82dd222deaba3c91768b18cbbd453009235823282813c6e867dc2c1",
|
||||
"eec79f7a02b804337e791ef231784862ae26e0599eb20224790e9d4f085fa9c0",
|
||||
"c718b1939621233295ccaf6e8203e7fd94f3dd1bfb88f10c51bc5e33d53a24aa",
|
||||
"616f5cbf25da83cb51d8d0741a7fc351620c9ca2c6513fa2094b4aa476f0912a"
|
||||
]
|
||||
},
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 0,
|
||||
"top_ids": [],
|
||||
"skipped": true,
|
||||
"reason": "relation_primary_sufficient"
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [
|
||||
"/health"
|
||||
],
|
||||
"resolved_anchor_candidates": [
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"docs/documentation/api/send-message-endpoint.md",
|
||||
"api.control_actions_endpoint"
|
||||
],
|
||||
"anchor_candidates": [
|
||||
"api.health_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"selected_anchor": "api.health_endpoint",
|
||||
"anchor_selection_reason": "doc_id matches requested endpoint slug",
|
||||
"anchor_match_type": "exact_path",
|
||||
"doc_ids": [
|
||||
"api.health_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"api.control_actions_endpoint:part_of",
|
||||
"api.control_actions_endpoint:related_api",
|
||||
"api.control_actions_endpoint:related_logic",
|
||||
"api.health_endpoint:parent",
|
||||
"api.health_endpoint:part_of",
|
||||
"api.health_endpoint:depends_on",
|
||||
"api.send_message_endpoint:parent",
|
||||
"api.control_actions_endpoint:parent",
|
||||
"api.control_actions_endpoint:Summary",
|
||||
"api.control_actions_endpoint:Описание",
|
||||
"api.control_actions_endpoint:Сценарий",
|
||||
"api.control_actions_endpoint:Функциональные требования",
|
||||
"api.control_actions_endpoint:Нефункциональные требования",
|
||||
"api.control_actions_endpoint:Входные параметры"
|
||||
],
|
||||
"relation_hits_count": 8,
|
||||
"relation_targets": [
|
||||
"api.control_actions_endpoint:part_of",
|
||||
"api.control_actions_endpoint:related_api",
|
||||
"api.control_actions_endpoint:related_logic",
|
||||
"api.health_endpoint:parent",
|
||||
"api.health_endpoint:part_of",
|
||||
"api.health_endpoint:depends_on",
|
||||
"api.send_message_endpoint:parent",
|
||||
"api.control_actions_endpoint:parent"
|
||||
],
|
||||
"fallback_doc_hits_count": 6,
|
||||
"fallback_used": true,
|
||||
"fact_hits": 0,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 0,
|
||||
"facts": 0,
|
||||
"relations": 8,
|
||||
"chunks": 6,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "relation_evidence_available",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty",
|
||||
"exact_anchor_match"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_explain_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 393,
|
||||
"user_chars": 7998,
|
||||
"tokens_in_estimate": 2098
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты объясняешь документацию системы.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные факты
|
||||
- Не додумывай
|
||||
- Если данных недостаточно, скажи это явно
|
||||
- Объясняй структурировано
|
||||
|
||||
Формат ответа:
|
||||
1. Краткое описание
|
||||
2. Основные элементы
|
||||
3. Как это работает
|
||||
4. Связи с другими частями системы (если есть)
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Какие документы связаны с endpoint /health?",
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "RELATED_DOCS_EXPLAIN",
|
||||
"documents": [],
|
||||
"facts": [],
|
||||
"relations": [
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:part_of",
|
||||
"content": "api.control_actions_endpoint part_of architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "5f4909bde905cd3d294ad307074a05e4ae4deefcafe6272cd2d0436e73acb8dd",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "part_of",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:related_api",
|
||||
"content": "api.control_actions_endpoint related_api api.health_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "api.health_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "711fb2edb82dd222deaba3c91768b18cbbd453009235823282813c6e867dc2c1",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_api",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:related_logic",
|
||||
"content": "api.control_actions_endpoint related_logic logic.telegram_notification_loop",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "logic.telegram_notification_loop",
|
||||
"doc_version": null,
|
||||
"relation_id": "eec79f7a02b804337e791ef231784862ae26e0599eb20224790e9d4f085fa9c0",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_logic",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "api.health_endpoint:parent",
|
||||
"content": "api.health_endpoint parent architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.parent",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"source_id": "api.health_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "c718b1939621233295ccaf6e8203e7fd94f3dd1bfb88f10c51bc5e33d53a24aa",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "parent",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "api.health_endpoint:part_of",
|
||||
"content": "api.health_endpoint part_of architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"source_id": "api.health_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "616f5cbf25da83cb51d8d0741a7fc351620c9ca2c6513fa2094b4aa476f0912a",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "part_of",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "api.health_endpoint:depends_on",
|
||||
"content": "api.health_endpoint depends_on domain.runtime_health",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"source_id": "api.health_endpoint",
|
||||
"target_id": "domain.runtime_health",
|
||||
"doc_version": null,
|
||||
"relation_id": "77f5d358ab85b3d92018b6b51da7c39773148dfd346686e8832a45370c841160",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "depends_on",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"title": "api.send_message_endpoint:parent",
|
||||
"content": "api.send_message_endpoint parent architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.parent",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "5fbf2e33510b0676a3a53b957a4569bd3c2c31fb7719546602c573421ccaa32d",
|
||||
"source_id": "api.send_message_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "33eb0aa97f06d0afcaa4c230b5f5b73fa2fbfa5861ea9367b6c92f8a6fe0c054",
|
||||
"source_path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "parent",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:parent",
|
||||
"content": "api.control_actions_endpoint parent architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.parent",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "afec31fd062e392dcd9699a92c7ab61fd4b1273c1a2b16702b23d55d8d0c47ac",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "parent",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Какие документы связаны с endpoint /health?
|
||||
- intent: DOCUMENTATION_EXPLAIN
|
||||
- sub_intent: RELATED_DOCS_EXPLAIN
|
||||
- documents: 0
|
||||
- facts: 0
|
||||
- relations: 8 | samples: api.control_actions_endpoint:part_of, api.control_actions_endpoint:related_api, api.control_actions_endpoint:related_logic
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "docs-v2-system-flow-health-check",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v2.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "full_chain",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "SYSTEM_FLOW_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 23,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"domain.runtime_health",
|
||||
"api.health_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Как происходит получение health состояния runtime?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Как происходит получение health состояния runtime?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Как происходит получение health состояния runtime?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "SYSTEM_FLOW_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Как происходит получение health состояния runtime?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 22272,
|
||||
"tokens_in_estimate": 5667
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+909
@@ -0,0 +1,909 @@
|
||||
# docs-v2-system-flow-health-check
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v2.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: full_chain
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
Как происходит получение health состояния runtime?
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "SYSTEM_FLOW_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 23,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"domain.runtime_health",
|
||||
"api.health_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Как происходит получение health состояния runtime?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Как происходит получение health состояния runtime?"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Как происходит получение health состояния runtime?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "SYSTEM_FLOW_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Как происходит получение health состояния runtime?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 22272,
|
||||
"tokens_in_estimate": 5667
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "SYSTEM_FLOW_EXPLAIN",
|
||||
"layers_used": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 6,
|
||||
"facts_found": 0,
|
||||
"relations_found": 8,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "none",
|
||||
"matched_anchor_value": null,
|
||||
"exact_anchor_match": false,
|
||||
"docs_layers_requested": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"domain.runtime_health",
|
||||
"api.health_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.control_actions_endpoint",
|
||||
"architecture.telegram_notify_app"
|
||||
]
|
||||
},
|
||||
"D4_WORKFLOW_INDEX": {
|
||||
"hits": 3,
|
||||
"top_ids": [
|
||||
"api.health_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
]
|
||||
},
|
||||
"D5_RELATION_GRAPH": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"801650f8bcbfbfbefd35c14447bfef7b3c3827313db790efa7faf47db860f8c4",
|
||||
"8595d7b82fecdb7ef579fa8961cda6799bb21970061e5bc221d4dd7a3d53fd04",
|
||||
"af2a4f7c1b677b908410ba720915405e10dbd0870e30a3c6e3aa2468550ddf0e",
|
||||
"c718b1939621233295ccaf6e8203e7fd94f3dd1bfb88f10c51bc5e33d53a24aa",
|
||||
"616f5cbf25da83cb51d8d0741a7fc351620c9ca2c6513fa2094b4aa476f0912a"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.health_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [],
|
||||
"resolved_anchor_candidates": [
|
||||
"domain.runtime_health",
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"api.health_endpoint",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"logic.telegram_notification_loop",
|
||||
"docs/documentation/logic/telegram-notification-loop.md",
|
||||
"api.control_actions_endpoint",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"api.send_message_endpoint",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"domain.runtime_health",
|
||||
"api.health_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"docs/documentation/logic/telegram-notification-loop.md",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"Сущность runtime health",
|
||||
"HTTP API /health",
|
||||
"Цикл отправки уведомлений в Telegram",
|
||||
"HTTP API /actions/{action}",
|
||||
"Архитектура Telegram Notify App",
|
||||
"HTTP API /send",
|
||||
"Scenario",
|
||||
"domain.runtime_health:used_by",
|
||||
"domain.runtime_health:related_logic",
|
||||
"domain.runtime_health:part_of",
|
||||
"api.health_endpoint:parent",
|
||||
"api.health_endpoint:part_of",
|
||||
"api.health_endpoint:depends_on",
|
||||
"domain.runtime_health:parent",
|
||||
"api.control_actions_endpoint:related_api",
|
||||
"api.health_endpoint:Сценарий",
|
||||
"api.health_endpoint:Нефункциональные требования",
|
||||
"api.health_endpoint:Summary",
|
||||
"api.health_endpoint:Описание",
|
||||
"api.health_endpoint:Функциональные требования",
|
||||
"api.health_endpoint:Входные параметры"
|
||||
],
|
||||
"relation_hits_count": 8,
|
||||
"relation_targets": [
|
||||
"domain.runtime_health:used_by",
|
||||
"domain.runtime_health:related_logic",
|
||||
"domain.runtime_health:part_of",
|
||||
"api.health_endpoint:parent",
|
||||
"api.health_endpoint:part_of",
|
||||
"api.health_endpoint:depends_on",
|
||||
"domain.runtime_health:parent",
|
||||
"api.control_actions_endpoint:related_api"
|
||||
],
|
||||
"fallback_doc_hits_count": 12,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 0,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 6,
|
||||
"facts": 0,
|
||||
"relations": 8,
|
||||
"chunks": 6,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "evidence_sufficient",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_explain_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 393,
|
||||
"user_chars": 22272,
|
||||
"tokens_in_estimate": 5667
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты объясняешь документацию системы.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные факты
|
||||
- Не додумывай
|
||||
- Если данных недостаточно, скажи это явно
|
||||
- Объясняй структурировано
|
||||
|
||||
Формат ответа:
|
||||
1. Краткое описание
|
||||
2. Основные элементы
|
||||
3. Как это работает
|
||||
4. Связи с другими частями системы (если есть)
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Как происходит получение health состояния runtime?",
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "SYSTEM_FLOW_EXPLAIN",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "Сущность runtime health",
|
||||
"content": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"metadata": {
|
||||
"name": "runtime_health",
|
||||
"tags": [
|
||||
"domain",
|
||||
"health",
|
||||
"observability"
|
||||
],
|
||||
"type": "domain_entity",
|
||||
"layer": "domain",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "used_by",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Сущность runtime health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"WorkerHealth",
|
||||
"WorkerStatus",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "domain.runtime_health",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"summary_text": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "HTTP API /health",
|
||||
"content": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"metadata": {
|
||||
"name": "health_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"health",
|
||||
"control-plane"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"TelegramNotifyWorker",
|
||||
"RuntimeManager",
|
||||
"WorkerHealth"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.health_endpoint",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"summary_text": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/logic/telegram-notification-loop.md",
|
||||
"title": "Цикл отправки уведомлений в Telegram",
|
||||
"content": "`TelegramNotifyWorker` после старта runtime запускает отдельный поток, сразу делает первую попытку отправки сообщения и затем повторяет отправку через заданный интервал. При ошибках доставки или отсутствии credentials worker не останавливает сервис, а переводит собственное состояние в `degraded`. Этот workflow определяет основной полезный цикл приложения.",
|
||||
"metadata": {
|
||||
"name": "telegram_notification_loop",
|
||||
"tags": [
|
||||
"logic",
|
||||
"telegram",
|
||||
"worker",
|
||||
"scheduling"
|
||||
],
|
||||
"type": "logic_block",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Цикл отправки уведомлений в Telegram",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "0f62f9b4dab261ca4ca34575ff5d84411a22c90b780c52eda388782b94f08470",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramSendService",
|
||||
"WorkerHealth",
|
||||
"WorkerStatus"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "logic.telegram_notification_loop",
|
||||
"source_path": "docs/documentation/logic/telegram-notification-loop.md",
|
||||
"summary_text": "`TelegramNotifyWorker` после старта runtime запускает отдельный поток, сразу делает первую попытку отправки сообщения и затем повторяет отправку через заданный интервал. При ошибках доставки или отсутствии credentials worker не останавливает сервис, а переводит собственное состояние в `degraded`. Этот workflow определяет основной полезный цикл приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"content": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"metadata": {
|
||||
"name": "control_actions_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"control-plane",
|
||||
"lifecycle"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"ControlActionSet",
|
||||
"JSONResponse"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.control_actions_endpoint",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"summary_text": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"content": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"metadata": {
|
||||
"name": "telegram_notify_app_overview",
|
||||
"tags": [
|
||||
"architecture",
|
||||
"telegram",
|
||||
"plba",
|
||||
"runtime"
|
||||
],
|
||||
"type": "architecture_overview",
|
||||
"layer": "system",
|
||||
"links": [
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "docs_root",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"children": [
|
||||
"api.health_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"doc_kind": "spec",
|
||||
"entities": [
|
||||
"TelegramNotifyModule",
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramControlChannel",
|
||||
"TelegramSendService",
|
||||
"RuntimeManager"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "architecture.telegram_notify_app",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"summary_text": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"title": "HTTP API /send",
|
||||
"content": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"metadata": {
|
||||
"name": "send_message_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"telegram",
|
||||
"manual-send"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /send",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "5fbf2e33510b0676a3a53b957a4569bd3c2c31fb7719546602c573421ccaa32d",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlAppFactory",
|
||||
"TelegramSendService",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.send_message_endpoint",
|
||||
"source_path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"summary_text": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [],
|
||||
"relations": [
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "domain.runtime_health:used_by",
|
||||
"content": "domain.runtime_health used_by api.health_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"source_id": "domain.runtime_health",
|
||||
"target_id": "api.health_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "801650f8bcbfbfbefd35c14447bfef7b3c3827313db790efa7faf47db860f8c4",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "used_by",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "domain.runtime_health:related_logic",
|
||||
"content": "domain.runtime_health related_logic logic.telegram_notification_loop",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"source_id": "domain.runtime_health",
|
||||
"target_id": "logic.telegram_notification_loop",
|
||||
"doc_version": null,
|
||||
"relation_id": "8595d7b82fecdb7ef579fa8961cda6799bb21970061e5bc221d4dd7a3d53fd04",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_logic",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "domain.runtime_health:part_of",
|
||||
"content": "domain.runtime_health part_of architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"source_id": "domain.runtime_health",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "af2a4f7c1b677b908410ba720915405e10dbd0870e30a3c6e3aa2468550ddf0e",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "part_of",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "api.health_endpoint:parent",
|
||||
"content": "api.health_endpoint parent architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.parent",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"source_id": "api.health_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "c718b1939621233295ccaf6e8203e7fd94f3dd1bfb88f10c51bc5e33d53a24aa",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "parent",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "api.health_endpoint:part_of",
|
||||
"content": "api.health_endpoint part_of architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"source_id": "api.health_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "616f5cbf25da83cb51d8d0741a7fc351620c9ca2c6513fa2094b4aa476f0912a",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "part_of",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "api.health_endpoint:depends_on",
|
||||
"content": "api.health_endpoint depends_on domain.runtime_health",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"source_id": "api.health_endpoint",
|
||||
"target_id": "domain.runtime_health",
|
||||
"doc_version": null,
|
||||
"relation_id": "77f5d358ab85b3d92018b6b51da7c39773148dfd346686e8832a45370c841160",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "depends_on",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "domain.runtime_health:parent",
|
||||
"content": "domain.runtime_health parent architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.parent",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"source_id": "domain.runtime_health",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "79bdb0a74713df6064008179ca8c5c186dc23e4e1c5e2c9607b0bdddeba50f93",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "parent",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:related_api",
|
||||
"content": "api.control_actions_endpoint related_api api.health_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "api.health_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "711fb2edb82dd222deaba3c91768b18cbbd453009235823282813c6e867dc2c1",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_api",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Как происходит получение health состояния runtime?
|
||||
- intent: DOCUMENTATION_EXPLAIN
|
||||
- sub_intent: SYSTEM_FLOW_EXPLAIN
|
||||
- documents: 6 | samples: Сущность runtime health, HTTP API /health, Цикл отправки уведомлений в Telegram
|
||||
- facts: 0
|
||||
- relations: 8 | samples: domain.runtime_health:used_by, domain.runtime_health:related_logic, domain.runtime_health:part_of
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "docs-v2-system-flow-telegram-loop",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v2.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "full_chain",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "SYSTEM_FLOW_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 18,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.send_message_endpoint",
|
||||
"domain.runtime_health",
|
||||
"api.health_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"docs/README.md"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Объясни как работает цикл отправки уведомлений в Telegram"
|
||||
},
|
||||
"output": {
|
||||
"query": "Объясни как работает цикл отправки уведомлений в Telegram"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Объясни как работает цикл отправки уведомлений в Telegram"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "SYSTEM_FLOW_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Объясни как работает цикл отправки уведомлений в Telegram"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 17592,
|
||||
"tokens_in_estimate": 4497
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+785
@@ -0,0 +1,785 @@
|
||||
# docs-v2-system-flow-telegram-loop
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v2.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: full_chain
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
Объясни как работает цикл отправки уведомлений в Telegram
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "SYSTEM_FLOW_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 18,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.send_message_endpoint",
|
||||
"domain.runtime_health",
|
||||
"api.health_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"docs/README.md"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Объясни как работает цикл отправки уведомлений в Telegram"
|
||||
},
|
||||
"output": {
|
||||
"query": "Объясни как работает цикл отправки уведомлений в Telegram"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Объясни как работает цикл отправки уведомлений в Telegram"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "SYSTEM_FLOW_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Объясни как работает цикл отправки уведомлений в Telegram"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 17592,
|
||||
"tokens_in_estimate": 4497
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "SYSTEM_FLOW_EXPLAIN",
|
||||
"layers_used": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 6,
|
||||
"facts_found": 0,
|
||||
"relations_found": 3,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "none",
|
||||
"matched_anchor_value": null,
|
||||
"exact_anchor_match": false,
|
||||
"docs_layers_requested": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"architecture.telegram_notify_app",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.send_message_endpoint",
|
||||
"domain.runtime_health",
|
||||
"api.health_endpoint"
|
||||
]
|
||||
},
|
||||
"D4_WORKFLOW_INDEX": {
|
||||
"hits": 3,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
]
|
||||
},
|
||||
"D5_RELATION_GRAPH": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"305bab0c6567d93a2b453a9d70b676f9ecd8de083ef36f5cf3398747c25ebf94",
|
||||
"7bd0428d23e9b20f7d65202cc269e45b3d1e7aed7b5df4a35581fd88677be29b",
|
||||
"0eb7f73fcda8556439e06f5eeb5ce064ae32b6cd3129353f5b1b4eb3db626d88",
|
||||
"ae34fe4b3cd2b47632b13b1e32303e842b57948aa21160abe8d9b478995e1d74",
|
||||
"145ccbb861a8fb621286ec9c888ce69677168d35c7871c70537e888ce3a5b910"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"logic.telegram_notification_loop",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/README.md"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [],
|
||||
"resolved_anchor_candidates": [
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"logic.telegram_notification_loop",
|
||||
"docs/documentation/logic/telegram-notification-loop.md",
|
||||
"api.send_message_endpoint",
|
||||
"docs/documentation/api/send-message-endpoint.md",
|
||||
"domain.runtime_health",
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"api.health_endpoint",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"api.control_actions_endpoint",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"docs/README.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.send_message_endpoint",
|
||||
"domain.runtime_health",
|
||||
"api.health_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"docs/README.md"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"docs/documentation/logic/telegram-notification-loop.md",
|
||||
"docs/documentation/api/send-message-endpoint.md",
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"docs/README.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"Архитектура Telegram Notify App",
|
||||
"Цикл отправки уведомлений в Telegram",
|
||||
"HTTP API /send",
|
||||
"Сущность runtime health",
|
||||
"HTTP API /health",
|
||||
"HTTP API /actions/{action}",
|
||||
"Scenario",
|
||||
"architecture.telegram_notify_app:child",
|
||||
"architecture.telegram_notify_app:related_api",
|
||||
"architecture.telegram_notify_app:parent",
|
||||
"logic.telegram_notification_loop:Summary",
|
||||
"logic.telegram_notification_loop:Details",
|
||||
"architecture.telegram_notify_app:Summary",
|
||||
"architecture.telegram_notify_app:Details",
|
||||
"docs/README.md:Навигация",
|
||||
"api.health_endpoint:Функциональные требования"
|
||||
],
|
||||
"relation_hits_count": 3,
|
||||
"relation_targets": [
|
||||
"architecture.telegram_notify_app:child",
|
||||
"architecture.telegram_notify_app:related_api",
|
||||
"architecture.telegram_notify_app:parent"
|
||||
],
|
||||
"fallback_doc_hits_count": 12,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 0,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 6,
|
||||
"facts": 0,
|
||||
"relations": 3,
|
||||
"chunks": 6,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "evidence_sufficient",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_explain_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 393,
|
||||
"user_chars": 17592,
|
||||
"tokens_in_estimate": 4497
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты объясняешь документацию системы.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные факты
|
||||
- Не додумывай
|
||||
- Если данных недостаточно, скажи это явно
|
||||
- Объясняй структурировано
|
||||
|
||||
Формат ответа:
|
||||
1. Краткое описание
|
||||
2. Основные элементы
|
||||
3. Как это работает
|
||||
4. Связи с другими частями системы (если есть)
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Объясни как работает цикл отправки уведомлений в Telegram",
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "SYSTEM_FLOW_EXPLAIN",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"content": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"metadata": {
|
||||
"name": "telegram_notify_app_overview",
|
||||
"tags": [
|
||||
"architecture",
|
||||
"telegram",
|
||||
"plba",
|
||||
"runtime"
|
||||
],
|
||||
"type": "architecture_overview",
|
||||
"layer": "system",
|
||||
"links": [
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "docs_root",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"children": [
|
||||
"api.health_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"doc_kind": "spec",
|
||||
"entities": [
|
||||
"TelegramNotifyModule",
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramControlChannel",
|
||||
"TelegramSendService",
|
||||
"RuntimeManager"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "architecture.telegram_notify_app",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"summary_text": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/logic/telegram-notification-loop.md",
|
||||
"title": "Цикл отправки уведомлений в Telegram",
|
||||
"content": "`TelegramNotifyWorker` после старта runtime запускает отдельный поток, сразу делает первую попытку отправки сообщения и затем повторяет отправку через заданный интервал. При ошибках доставки или отсутствии credentials worker не останавливает сервис, а переводит собственное состояние в `degraded`. Этот workflow определяет основной полезный цикл приложения.",
|
||||
"metadata": {
|
||||
"name": "telegram_notification_loop",
|
||||
"tags": [
|
||||
"logic",
|
||||
"telegram",
|
||||
"worker",
|
||||
"scheduling"
|
||||
],
|
||||
"type": "logic_block",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Цикл отправки уведомлений в Telegram",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "0f62f9b4dab261ca4ca34575ff5d84411a22c90b780c52eda388782b94f08470",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramSendService",
|
||||
"WorkerHealth",
|
||||
"WorkerStatus"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "logic.telegram_notification_loop",
|
||||
"source_path": "docs/documentation/logic/telegram-notification-loop.md",
|
||||
"summary_text": "`TelegramNotifyWorker` после старта runtime запускает отдельный поток, сразу делает первую попытку отправки сообщения и затем повторяет отправку через заданный интервал. При ошибках доставки или отсутствии credentials worker не останавливает сервис, а переводит собственное состояние в `degraded`. Этот workflow определяет основной полезный цикл приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"title": "HTTP API /send",
|
||||
"content": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"metadata": {
|
||||
"name": "send_message_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"telegram",
|
||||
"manual-send"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /send",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "5fbf2e33510b0676a3a53b957a4569bd3c2c31fb7719546602c573421ccaa32d",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlAppFactory",
|
||||
"TelegramSendService",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.send_message_endpoint",
|
||||
"source_path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"summary_text": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "Сущность runtime health",
|
||||
"content": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"metadata": {
|
||||
"name": "runtime_health",
|
||||
"tags": [
|
||||
"domain",
|
||||
"health",
|
||||
"observability"
|
||||
],
|
||||
"type": "domain_entity",
|
||||
"layer": "domain",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "used_by",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Сущность runtime health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"WorkerHealth",
|
||||
"WorkerStatus",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "domain.runtime_health",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"summary_text": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "HTTP API /health",
|
||||
"content": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"metadata": {
|
||||
"name": "health_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"health",
|
||||
"control-plane"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"TelegramNotifyWorker",
|
||||
"RuntimeManager",
|
||||
"WorkerHealth"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.health_endpoint",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"summary_text": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"content": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"metadata": {
|
||||
"name": "control_actions_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"control-plane",
|
||||
"lifecycle"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"ControlActionSet",
|
||||
"JSONResponse"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.control_actions_endpoint",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"summary_text": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [],
|
||||
"relations": [
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "architecture.telegram_notify_app:child",
|
||||
"content": "architecture.telegram_notify_app child api.send_message_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.children",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"source_id": "architecture.telegram_notify_app",
|
||||
"target_id": "api.send_message_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "305bab0c6567d93a2b453a9d70b676f9ecd8de083ef36f5cf3398747c25ebf94",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "child",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "architecture.telegram_notify_app:related_api",
|
||||
"content": "architecture.telegram_notify_app related_api api.health_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"source_id": "architecture.telegram_notify_app",
|
||||
"target_id": "api.health_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "7bd0428d23e9b20f7d65202cc269e45b3d1e7aed7b5df4a35581fd88677be29b",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_api",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "architecture.telegram_notify_app:parent",
|
||||
"content": "architecture.telegram_notify_app parent docs_root",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.parent",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"source_id": "architecture.telegram_notify_app",
|
||||
"target_id": "docs_root",
|
||||
"doc_version": null,
|
||||
"relation_id": "e01922b36e3cc60d9349f89e43fcd4a92c6a01394b0028d6b6d56801b258645d",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "parent",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Объясни как работает цикл отправки уведомлений в Telegram
|
||||
- intent: DOCUMENTATION_EXPLAIN
|
||||
- sub_intent: SYSTEM_FLOW_EXPLAIN
|
||||
- documents: 6 | samples: Архитектура Telegram Notify App, Цикл отправки уведомлений в Telegram, HTTP API /send
|
||||
- facts: 0
|
||||
- relations: 3 | samples: architecture.telegram_notify_app:child, architecture.telegram_notify_app:related_api, architecture.telegram_notify_app:parent
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
@@ -0,0 +1,20 @@
|
||||
# pipeline_setup_v3 summary
|
||||
|
||||
Passed: 14/14
|
||||
|
||||
| File | Case | Mode | Query | Actual sub-intent | RAG layers | Tokens | Pass |
|
||||
|------|------|------|-------|-------------------|------------|--------|------|
|
||||
| full_chain_docs_intents_v2.yaml | docs-v2-system-flow-telegram-loop | full_chain | Объясни как работает цикл отправки уведомлений в Telegram | SYSTEM_FLOW_EXPLAIN | D0_DOC_CHUNKS:6, D1_DOCUMENT_CATALOG:6, D4_WORKFLOW_INDEX:3, D5_RELATION_GRAPH:3 | 4497 | ✓ |
|
||||
| full_chain_docs_intents_v2.yaml | docs-v2-system-flow-health-check | full_chain | Как происходит получение health состояния runtime? | SYSTEM_FLOW_EXPLAIN | D0_DOC_CHUNKS:6, D1_DOCUMENT_CATALOG:6, D4_WORKFLOW_INDEX:3, D5_RELATION_GRAPH:8 | 5667 | ✓ |
|
||||
| full_chain_docs_intents_v2.yaml | docs-v2-component-control-channel | full_chain | Объясни как работает компонент TelegramControlChannel | COMPONENT_EXPLAIN | D0_DOC_CHUNKS:6, D1_DOCUMENT_CATALOG:6, D2_FACT_INDEX:2, D5_RELATION_GRAPH:6 | 5478 | ✓ |
|
||||
| full_chain_docs_intents_v2.yaml | docs-v2-component-runtime-manager | full_chain | Какую роль в системе играет RuntimeManager? | COMPONENT_EXPLAIN | D0_DOC_CHUNKS:6, D1_DOCUMENT_CATALOG:6, D2_FACT_INDEX:2, D5_RELATION_GRAPH:6 | 5475 | ✓ |
|
||||
| full_chain_docs_intents_v2.yaml | docs-v2-api-health-endpoint | full_chain | Объясни что делает endpoint /health | API_METHOD_EXPLAIN | D1_DOCUMENT_CATALOG:1, D4_WORKFLOW_INDEX:1 | 665 | ✓ |
|
||||
| full_chain_docs_intents_v2.yaml | docs-v2-api-send-endpoint | full_chain | Как работает endpoint /send? | API_METHOD_EXPLAIN | D1_DOCUMENT_CATALOG:1, D4_WORKFLOW_INDEX:1 | 676 | ✓ |
|
||||
| full_chain_docs_intents_v2.yaml | docs-v2-entity-runtime-health | full_chain | Что такое runtime health? | ENTITY_EXPLAIN | D0_DOC_CHUNKS:6, D1_DOCUMENT_CATALOG:6, D3_ENTITY_CATALOG:8, D5_RELATION_GRAPH:6 | 5165 | ✓ |
|
||||
| full_chain_docs_intents_v2.yaml | docs-v2-entity-worker-status | full_chain | Объясни сущность WorkerStatus | ENTITY_EXPLAIN | D0_DOC_CHUNKS:1, D1_DOCUMENT_CATALOG:1, D3_ENTITY_CATALOG:2 | 737 | ✓ |
|
||||
| full_chain_docs_intents_v2.yaml | docs-v2-related-docs-health | full_chain | Какие документы связаны с endpoint /health? | RELATED_DOCS_EXPLAIN | D0_DOC_CHUNKS:6, D5_RELATION_GRAPH:8 | 2098 | ✓ |
|
||||
| full_chain_docs_intents_v2.yaml | docs-v2-related-docs-architecture-overview | full_chain | Какие дочерние документы есть у overview архитектуры сервиса? | RELATED_DOCS_EXPLAIN | D0_DOC_CHUNKS:2, D5_RELATION_GRAPH:3 | 908 | ✓ |
|
||||
| full_chain_docs_intents_v2.yaml | docs-v2-openapi-health | full_chain | Сгенерируй OpenAPI для endpoint /health по документации | OPENAPI_METHOD_GENERATE | D1_DOCUMENT_CATALOG:1 | 783 | ✓ |
|
||||
| full_chain_docs_intents_v2.yaml | docs-v2-openapi-fragment-send-request | full_chain | Сгенерируй request schema для endpoint /send | OPENAPI_FRAGMENT_GENERATE | D1_DOCUMENT_CATALOG:1 | 767 | ✓ |
|
||||
| full_chain_docs_intents_v2.yaml | docs-v2-general-overview | full_chain | Что вообще описано в документации по этому сервису? | GENERIC_QA | D0_DOC_CHUNKS:8, D1_DOCUMENT_CATALOG:4 | 1984 | ✓ |
|
||||
| full_chain_docs_intents_v2.yaml | docs-v2-negative-missing-entity | full_chain | Что такое сущность PaymentTransaction? | ENTITY_EXPLAIN | — | 144 | ✓ |
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "v3-api-health-1",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "pre_llm",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 10,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.health_endpoint"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": "api_method"
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Что делает /health?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Что делает /health?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Что делает /health?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Что делает /health?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 4201,
|
||||
"tokens_in_estimate": 1149
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+429
@@ -0,0 +1,429 @@
|
||||
# v3-api-health-1
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: pre_llm
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
Что делает /health?
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 10,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.health_endpoint"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": "api_method"
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что делает /health?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Что делает /health?"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что делает /health?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что делает /health?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 4201,
|
||||
"tokens_in_estimate": 1149
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"layers_used": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 1,
|
||||
"facts_found": 2,
|
||||
"relations_found": 0,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "endpoint",
|
||||
"matched_anchor_value": "/health",
|
||||
"exact_anchor_match": true,
|
||||
"docs_layers_requested": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"domain.runtime_health",
|
||||
"api.health_endpoint",
|
||||
"docs/README.md",
|
||||
"architecture.telegram_notify_app",
|
||||
"logic.telegram_notification_loop"
|
||||
]
|
||||
},
|
||||
"D2_FACT_INDEX": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"1cff54331a52b7a92946e7afabe7e45d7e3ec693b59546f9666e494396593bc3",
|
||||
"0d923b02d15cef527d51740b7a09378a7dc74fb58db27cd059a8658ad11601a5",
|
||||
"3d3b6fcc21144cb68657be099291db0ae36d61d32d6d72fd5b7c3cb81f379877",
|
||||
"0b70cbff38a527cecfb53d3f72d573e9da1826cc75bd4cb92357e1de10988204",
|
||||
"ce6d44c30418b0b171433a144f78d4bbf53b7a060d9b7cd42b9feecc8ca3044e"
|
||||
]
|
||||
},
|
||||
"D4_WORKFLOW_INDEX": {
|
||||
"hits": 3,
|
||||
"top_ids": [
|
||||
"api.health_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.health_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [
|
||||
"/health"
|
||||
],
|
||||
"resolved_anchor_candidates": [
|
||||
"api.health_endpoint",
|
||||
"docs/documentation/api/health-endpoint.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"api.health_endpoint"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/documentation/api/health-endpoint.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"HTTP API /health",
|
||||
"Scenario",
|
||||
"api.health_endpoint:Сценарий",
|
||||
"api.health_endpoint:workflow_step",
|
||||
"api.health_endpoint:mentions_entity",
|
||||
"api.health_endpoint:Нефункциональные требования",
|
||||
"api.health_endpoint:Summary",
|
||||
"api.health_endpoint:Описание",
|
||||
"api.health_endpoint:Функциональные требования",
|
||||
"api.health_endpoint:Входные параметры"
|
||||
],
|
||||
"relation_hits_count": 0,
|
||||
"relation_targets": [],
|
||||
"fallback_doc_hits_count": 7,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 2,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 1,
|
||||
"facts": 2,
|
||||
"relations": 0,
|
||||
"chunks": 6,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "evidence_sufficient",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty",
|
||||
"exact_anchor_match"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_explain_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 393,
|
||||
"user_chars": 4201,
|
||||
"tokens_in_estimate": 1149
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты объясняешь документацию системы.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные факты
|
||||
- Не додумывай
|
||||
- Если данных недостаточно, скажи это явно
|
||||
- Объясняй структурировано
|
||||
|
||||
Формат ответа:
|
||||
1. Краткое описание
|
||||
2. Основные элементы
|
||||
3. Как это работает
|
||||
4. Связи с другими частями системы (если есть)
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Что делает /health?",
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "HTTP API /health",
|
||||
"content": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"metadata": {
|
||||
"name": "health_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"health",
|
||||
"control-plane"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"TelegramNotifyWorker",
|
||||
"RuntimeManager",
|
||||
"WorkerHealth"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.health_endpoint",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"summary_text": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [
|
||||
{
|
||||
"layer": "D2_FACT_INDEX",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "api.health_endpoint:workflow_step",
|
||||
"content": "api.health_endpoint workflow_step Предусловия:**",
|
||||
"metadata": {
|
||||
"tags": [],
|
||||
"owner": null,
|
||||
"anchor": "Сценарий",
|
||||
"doc_id": null,
|
||||
"object": "Предусловия:**",
|
||||
"fact_id": "1cff54331a52b7a92946e7afabe7e45d7e3ec693b59546f9666e494396593bc3",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"predicate": "workflow_step",
|
||||
"object_ref": null,
|
||||
"subject_id": "api.health_endpoint",
|
||||
"doc_version": null,
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D2_FACT_INDEX",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "api.health_endpoint:mentions_entity",
|
||||
"content": "api.health_endpoint mentions_entity TelegramControlChannel",
|
||||
"metadata": {
|
||||
"tags": [],
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.entities",
|
||||
"doc_id": null,
|
||||
"object": "TelegramControlChannel",
|
||||
"fact_id": "3d3b6fcc21144cb68657be099291db0ae36d61d32d6d72fd5b7c3cb81f379877",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"predicate": "mentions_entity",
|
||||
"object_ref": null,
|
||||
"subject_id": "api.health_endpoint",
|
||||
"doc_version": null,
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"relations": []
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Что делает /health?
|
||||
- intent: DOCUMENTATION_EXPLAIN
|
||||
- sub_intent: API_METHOD_EXPLAIN
|
||||
- documents: 1 | samples: HTTP API /health
|
||||
- facts: 2 | samples: api.health_endpoint:workflow_step, api.health_endpoint:mentions_entity
|
||||
- relations: 0
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "v3-api-health-2",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "pre_llm",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 17,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.send_message_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"domain.runtime_health",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"logic.telegram_notification_loop"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": "api_method"
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Как работает health endpoint?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Как работает health endpoint?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Как работает health endpoint?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Как работает health endpoint?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 16622,
|
||||
"tokens_in_estimate": 4254
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+754
@@ -0,0 +1,754 @@
|
||||
# v3-api-health-2
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: pre_llm
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
Как работает health endpoint?
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 17,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.send_message_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"domain.runtime_health",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"logic.telegram_notification_loop"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": "api_method"
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Как работает health endpoint?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Как работает health endpoint?"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Как работает health endpoint?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Как работает health endpoint?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 16622,
|
||||
"tokens_in_estimate": 4254
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"layers_used": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 6,
|
||||
"facts_found": 2,
|
||||
"relations_found": 0,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "topic",
|
||||
"matched_anchor_value": null,
|
||||
"exact_anchor_match": false,
|
||||
"docs_layers_requested": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.send_message_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"domain.runtime_health",
|
||||
"architecture.telegram_notify_app"
|
||||
]
|
||||
},
|
||||
"D2_FACT_INDEX": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"f85d982c272a2ee6baeadc433221a20e684cd8ef01cb4788d6f76d05ca56d6d0",
|
||||
"b8e44c3adb74aaa6c91ae8815fa091289e58dd3990a3a1b63e850c62075aea75",
|
||||
"b6bfad59b3bf00f199b5ef90c1208af19664de700413e7354468a93a4abaaa2f",
|
||||
"a8a325e0815b3a2a870ba2825f3afb3f41056b4c091df4c3bb3418ffd20891dd",
|
||||
"bafb867ffed41c9db637df98d6cd5f6722d7747bbebc6c03e6f0d0caf3b7f9f3"
|
||||
]
|
||||
},
|
||||
"D4_WORKFLOW_INDEX": {
|
||||
"hits": 3,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [],
|
||||
"resolved_anchor_candidates": [
|
||||
"api.send_message_endpoint",
|
||||
"docs/documentation/api/send-message-endpoint.md",
|
||||
"api.control_actions_endpoint",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"api.health_endpoint",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"domain.runtime_health",
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"logic.telegram_notification_loop",
|
||||
"docs/documentation/logic/telegram-notification-loop.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"api.send_message_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"domain.runtime_health",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"logic.telegram_notification_loop"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/documentation/api/send-message-endpoint.md",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"docs/documentation/logic/telegram-notification-loop.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"HTTP API /send",
|
||||
"HTTP API /actions/{action}",
|
||||
"HTTP API /health",
|
||||
"Сущность runtime health",
|
||||
"Архитектура Telegram Notify App",
|
||||
"Цикл отправки уведомлений в Telegram",
|
||||
"api.control_actions_endpoint:workflow_step",
|
||||
"api.control_actions_endpoint:mentions_entity",
|
||||
"Scenario",
|
||||
"api.control_actions_endpoint:Функциональные требования",
|
||||
"api.control_actions_endpoint:Нефункциональные требования",
|
||||
"api.control_actions_endpoint:Сценарий",
|
||||
"api.control_actions_endpoint:Summary",
|
||||
"api.control_actions_endpoint:Описание",
|
||||
"api.control_actions_endpoint:Входные параметры"
|
||||
],
|
||||
"relation_hits_count": 0,
|
||||
"relation_targets": [],
|
||||
"fallback_doc_hits_count": 12,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 2,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 6,
|
||||
"facts": 2,
|
||||
"relations": 0,
|
||||
"chunks": 6,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "evidence_sufficient",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_explain_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 393,
|
||||
"user_chars": 16622,
|
||||
"tokens_in_estimate": 4254
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты объясняешь документацию системы.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные факты
|
||||
- Не додумывай
|
||||
- Если данных недостаточно, скажи это явно
|
||||
- Объясняй структурировано
|
||||
|
||||
Формат ответа:
|
||||
1. Краткое описание
|
||||
2. Основные элементы
|
||||
3. Как это работает
|
||||
4. Связи с другими частями системы (если есть)
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Как работает health endpoint?",
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"title": "HTTP API /send",
|
||||
"content": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"metadata": {
|
||||
"name": "send_message_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"telegram",
|
||||
"manual-send"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /send",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "5fbf2e33510b0676a3a53b957a4569bd3c2c31fb7719546602c573421ccaa32d",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlAppFactory",
|
||||
"TelegramSendService",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.send_message_endpoint",
|
||||
"source_path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"summary_text": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"content": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"metadata": {
|
||||
"name": "control_actions_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"control-plane",
|
||||
"lifecycle"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"ControlActionSet",
|
||||
"JSONResponse"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.control_actions_endpoint",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"summary_text": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "HTTP API /health",
|
||||
"content": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"metadata": {
|
||||
"name": "health_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"health",
|
||||
"control-plane"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"TelegramNotifyWorker",
|
||||
"RuntimeManager",
|
||||
"WorkerHealth"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.health_endpoint",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"summary_text": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "Сущность runtime health",
|
||||
"content": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"metadata": {
|
||||
"name": "runtime_health",
|
||||
"tags": [
|
||||
"domain",
|
||||
"health",
|
||||
"observability"
|
||||
],
|
||||
"type": "domain_entity",
|
||||
"layer": "domain",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "used_by",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Сущность runtime health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"WorkerHealth",
|
||||
"WorkerStatus",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "domain.runtime_health",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"summary_text": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"content": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"metadata": {
|
||||
"name": "telegram_notify_app_overview",
|
||||
"tags": [
|
||||
"architecture",
|
||||
"telegram",
|
||||
"plba",
|
||||
"runtime"
|
||||
],
|
||||
"type": "architecture_overview",
|
||||
"layer": "system",
|
||||
"links": [
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "docs_root",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"children": [
|
||||
"api.health_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"doc_kind": "spec",
|
||||
"entities": [
|
||||
"TelegramNotifyModule",
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramControlChannel",
|
||||
"TelegramSendService",
|
||||
"RuntimeManager"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "architecture.telegram_notify_app",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"summary_text": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/logic/telegram-notification-loop.md",
|
||||
"title": "Цикл отправки уведомлений в Telegram",
|
||||
"content": "`TelegramNotifyWorker` после старта runtime запускает отдельный поток, сразу делает первую попытку отправки сообщения и затем повторяет отправку через заданный интервал. При ошибках доставки или отсутствии credentials worker не останавливает сервис, а переводит собственное состояние в `degraded`. Этот workflow определяет основной полезный цикл приложения.",
|
||||
"metadata": {
|
||||
"name": "telegram_notification_loop",
|
||||
"tags": [
|
||||
"logic",
|
||||
"telegram",
|
||||
"worker",
|
||||
"scheduling"
|
||||
],
|
||||
"type": "logic_block",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Цикл отправки уведомлений в Telegram",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "0f62f9b4dab261ca4ca34575ff5d84411a22c90b780c52eda388782b94f08470",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramSendService",
|
||||
"WorkerHealth",
|
||||
"WorkerStatus"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "logic.telegram_notification_loop",
|
||||
"source_path": "docs/documentation/logic/telegram-notification-loop.md",
|
||||
"summary_text": "`TelegramNotifyWorker` после старта runtime запускает отдельный поток, сразу делает первую попытку отправки сообщения и затем повторяет отправку через заданный интервал. При ошибках доставки или отсутствии credentials worker не останавливает сервис, а переводит собственное состояние в `degraded`. Этот workflow определяет основной полезный цикл приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [
|
||||
{
|
||||
"layer": "D2_FACT_INDEX",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:workflow_step",
|
||||
"content": "api.control_actions_endpoint workflow_step Название:** Выполнение control action runtime",
|
||||
"metadata": {
|
||||
"tags": [],
|
||||
"owner": null,
|
||||
"anchor": "Сценарий",
|
||||
"doc_id": null,
|
||||
"object": "Название:** Выполнение control action runtime",
|
||||
"fact_id": "f85d982c272a2ee6baeadc433221a20e684cd8ef01cb4788d6f76d05ca56d6d0",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"predicate": "workflow_step",
|
||||
"object_ref": null,
|
||||
"subject_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D2_FACT_INDEX",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:mentions_entity",
|
||||
"content": "api.control_actions_endpoint mentions_entity JSONResponse",
|
||||
"metadata": {
|
||||
"tags": [],
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.entities",
|
||||
"doc_id": null,
|
||||
"object": "JSONResponse",
|
||||
"fact_id": "b6bfad59b3bf00f199b5ef90c1208af19664de700413e7354468a93a4abaaa2f",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"predicate": "mentions_entity",
|
||||
"object_ref": null,
|
||||
"subject_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"relations": []
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Как работает health endpoint?
|
||||
- intent: DOCUMENTATION_EXPLAIN
|
||||
- sub_intent: API_METHOD_EXPLAIN
|
||||
- documents: 6 | samples: HTTP API /send, HTTP API /actions/{action}, HTTP API /health
|
||||
- facts: 2 | samples: api.control_actions_endpoint:workflow_step, api.control_actions_endpoint:mentions_entity
|
||||
- relations: 0
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "v3-api-health-3",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "pre_llm",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 17,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.send_message_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"domain.runtime_health",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"logic.telegram_notification_loop"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": "api_method"
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Опиши endpoint health"
|
||||
},
|
||||
"output": {
|
||||
"query": "Опиши endpoint health"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Опиши endpoint health"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Опиши endpoint health"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 16614,
|
||||
"tokens_in_estimate": 4252
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+754
@@ -0,0 +1,754 @@
|
||||
# v3-api-health-3
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: pre_llm
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
Опиши endpoint health
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 17,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.send_message_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"domain.runtime_health",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"logic.telegram_notification_loop"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": "api_method"
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Опиши endpoint health"
|
||||
},
|
||||
"output": {
|
||||
"query": "Опиши endpoint health"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Опиши endpoint health"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Опиши endpoint health"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 16614,
|
||||
"tokens_in_estimate": 4252
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"layers_used": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 6,
|
||||
"facts_found": 2,
|
||||
"relations_found": 0,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "topic",
|
||||
"matched_anchor_value": null,
|
||||
"exact_anchor_match": false,
|
||||
"docs_layers_requested": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.send_message_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"domain.runtime_health",
|
||||
"architecture.telegram_notify_app"
|
||||
]
|
||||
},
|
||||
"D2_FACT_INDEX": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"f85d982c272a2ee6baeadc433221a20e684cd8ef01cb4788d6f76d05ca56d6d0",
|
||||
"b8e44c3adb74aaa6c91ae8815fa091289e58dd3990a3a1b63e850c62075aea75",
|
||||
"b6bfad59b3bf00f199b5ef90c1208af19664de700413e7354468a93a4abaaa2f",
|
||||
"a8a325e0815b3a2a870ba2825f3afb3f41056b4c091df4c3bb3418ffd20891dd",
|
||||
"bafb867ffed41c9db637df98d6cd5f6722d7747bbebc6c03e6f0d0caf3b7f9f3"
|
||||
]
|
||||
},
|
||||
"D4_WORKFLOW_INDEX": {
|
||||
"hits": 3,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [],
|
||||
"resolved_anchor_candidates": [
|
||||
"api.send_message_endpoint",
|
||||
"docs/documentation/api/send-message-endpoint.md",
|
||||
"api.control_actions_endpoint",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"api.health_endpoint",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"domain.runtime_health",
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"logic.telegram_notification_loop",
|
||||
"docs/documentation/logic/telegram-notification-loop.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"api.send_message_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"domain.runtime_health",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"logic.telegram_notification_loop"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/documentation/api/send-message-endpoint.md",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"docs/documentation/logic/telegram-notification-loop.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"HTTP API /send",
|
||||
"HTTP API /actions/{action}",
|
||||
"HTTP API /health",
|
||||
"Сущность runtime health",
|
||||
"Архитектура Telegram Notify App",
|
||||
"Цикл отправки уведомлений в Telegram",
|
||||
"api.control_actions_endpoint:workflow_step",
|
||||
"api.control_actions_endpoint:mentions_entity",
|
||||
"Scenario",
|
||||
"api.control_actions_endpoint:Функциональные требования",
|
||||
"api.control_actions_endpoint:Нефункциональные требования",
|
||||
"api.control_actions_endpoint:Сценарий",
|
||||
"api.control_actions_endpoint:Summary",
|
||||
"api.control_actions_endpoint:Описание",
|
||||
"api.control_actions_endpoint:Входные параметры"
|
||||
],
|
||||
"relation_hits_count": 0,
|
||||
"relation_targets": [],
|
||||
"fallback_doc_hits_count": 12,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 2,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 6,
|
||||
"facts": 2,
|
||||
"relations": 0,
|
||||
"chunks": 6,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "evidence_sufficient",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_explain_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 393,
|
||||
"user_chars": 16614,
|
||||
"tokens_in_estimate": 4252
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты объясняешь документацию системы.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные факты
|
||||
- Не додумывай
|
||||
- Если данных недостаточно, скажи это явно
|
||||
- Объясняй структурировано
|
||||
|
||||
Формат ответа:
|
||||
1. Краткое описание
|
||||
2. Основные элементы
|
||||
3. Как это работает
|
||||
4. Связи с другими частями системы (если есть)
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Опиши endpoint health",
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"title": "HTTP API /send",
|
||||
"content": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"metadata": {
|
||||
"name": "send_message_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"telegram",
|
||||
"manual-send"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /send",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "5fbf2e33510b0676a3a53b957a4569bd3c2c31fb7719546602c573421ccaa32d",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlAppFactory",
|
||||
"TelegramSendService",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.send_message_endpoint",
|
||||
"source_path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"summary_text": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"content": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"metadata": {
|
||||
"name": "control_actions_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"control-plane",
|
||||
"lifecycle"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"ControlActionSet",
|
||||
"JSONResponse"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.control_actions_endpoint",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"summary_text": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "HTTP API /health",
|
||||
"content": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"metadata": {
|
||||
"name": "health_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"health",
|
||||
"control-plane"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"TelegramNotifyWorker",
|
||||
"RuntimeManager",
|
||||
"WorkerHealth"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.health_endpoint",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"summary_text": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "Сущность runtime health",
|
||||
"content": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"metadata": {
|
||||
"name": "runtime_health",
|
||||
"tags": [
|
||||
"domain",
|
||||
"health",
|
||||
"observability"
|
||||
],
|
||||
"type": "domain_entity",
|
||||
"layer": "domain",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "used_by",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Сущность runtime health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"WorkerHealth",
|
||||
"WorkerStatus",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "domain.runtime_health",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"summary_text": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"content": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"metadata": {
|
||||
"name": "telegram_notify_app_overview",
|
||||
"tags": [
|
||||
"architecture",
|
||||
"telegram",
|
||||
"plba",
|
||||
"runtime"
|
||||
],
|
||||
"type": "architecture_overview",
|
||||
"layer": "system",
|
||||
"links": [
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "docs_root",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"children": [
|
||||
"api.health_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"doc_kind": "spec",
|
||||
"entities": [
|
||||
"TelegramNotifyModule",
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramControlChannel",
|
||||
"TelegramSendService",
|
||||
"RuntimeManager"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "architecture.telegram_notify_app",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"summary_text": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/logic/telegram-notification-loop.md",
|
||||
"title": "Цикл отправки уведомлений в Telegram",
|
||||
"content": "`TelegramNotifyWorker` после старта runtime запускает отдельный поток, сразу делает первую попытку отправки сообщения и затем повторяет отправку через заданный интервал. При ошибках доставки или отсутствии credentials worker не останавливает сервис, а переводит собственное состояние в `degraded`. Этот workflow определяет основной полезный цикл приложения.",
|
||||
"metadata": {
|
||||
"name": "telegram_notification_loop",
|
||||
"tags": [
|
||||
"logic",
|
||||
"telegram",
|
||||
"worker",
|
||||
"scheduling"
|
||||
],
|
||||
"type": "logic_block",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Цикл отправки уведомлений в Telegram",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "0f62f9b4dab261ca4ca34575ff5d84411a22c90b780c52eda388782b94f08470",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramSendService",
|
||||
"WorkerHealth",
|
||||
"WorkerStatus"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "logic.telegram_notification_loop",
|
||||
"source_path": "docs/documentation/logic/telegram-notification-loop.md",
|
||||
"summary_text": "`TelegramNotifyWorker` после старта runtime запускает отдельный поток, сразу делает первую попытку отправки сообщения и затем повторяет отправку через заданный интервал. При ошибках доставки или отсутствии credentials worker не останавливает сервис, а переводит собственное состояние в `degraded`. Этот workflow определяет основной полезный цикл приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [
|
||||
{
|
||||
"layer": "D2_FACT_INDEX",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:workflow_step",
|
||||
"content": "api.control_actions_endpoint workflow_step Название:** Выполнение control action runtime",
|
||||
"metadata": {
|
||||
"tags": [],
|
||||
"owner": null,
|
||||
"anchor": "Сценарий",
|
||||
"doc_id": null,
|
||||
"object": "Название:** Выполнение control action runtime",
|
||||
"fact_id": "f85d982c272a2ee6baeadc433221a20e684cd8ef01cb4788d6f76d05ca56d6d0",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"predicate": "workflow_step",
|
||||
"object_ref": null,
|
||||
"subject_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D2_FACT_INDEX",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:mentions_entity",
|
||||
"content": "api.control_actions_endpoint mentions_entity JSONResponse",
|
||||
"metadata": {
|
||||
"tags": [],
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.entities",
|
||||
"doc_id": null,
|
||||
"object": "JSONResponse",
|
||||
"fact_id": "b6bfad59b3bf00f199b5ef90c1208af19664de700413e7354468a93a4abaaa2f",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"predicate": "mentions_entity",
|
||||
"object_ref": null,
|
||||
"subject_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"relations": []
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Опиши endpoint health
|
||||
- intent: DOCUMENTATION_EXPLAIN
|
||||
- sub_intent: API_METHOD_EXPLAIN
|
||||
- documents: 6 | samples: HTTP API /send, HTTP API /actions/{action}, HTTP API /health
|
||||
- facts: 2 | samples: api.control_actions_endpoint:workflow_step, api.control_actions_endpoint:mentions_entity
|
||||
- relations: 0
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "v3-api-send-1",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "pre_llm",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 10,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": "api_method"
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Что делает /send?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Что делает /send?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Что делает /send?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Что делает /send?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 4384,
|
||||
"tokens_in_estimate": 1195
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+428
@@ -0,0 +1,428 @@
|
||||
# v3-api-send-1
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: pre_llm
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
Что делает /send?
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 10,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": "api_method"
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что делает /send?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Что делает /send?"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что делает /send?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что делает /send?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 4384,
|
||||
"tokens_in_estimate": 1195
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"layers_used": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 1,
|
||||
"facts_found": 2,
|
||||
"relations_found": 0,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "endpoint",
|
||||
"matched_anchor_value": "/send",
|
||||
"exact_anchor_match": true,
|
||||
"docs_layers_requested": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.send_message_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"docs/README.md"
|
||||
]
|
||||
},
|
||||
"D2_FACT_INDEX": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"6bf0a662808009874a108d0c97f7cca7fc4ff7a3a3d66e0947b31bf813cfdf4d",
|
||||
"dc979c31d511a14d3af89f5f5c493fcfc0c9f2090dc16fb20ff874f4b3566221",
|
||||
"149c4e0d3d34b3faba055b1495d54818fadc882af633da70035b82190c1bd327",
|
||||
"480d85819e9298d4078f8a3bd6cfccb9c0fe2a03695b87f65f82f9aa8e2097b0",
|
||||
"7aefee9ff6110088aad1891da66fc9085eb3f77d832605a3da565deecb96e850"
|
||||
]
|
||||
},
|
||||
"D4_WORKFLOW_INDEX": {
|
||||
"hits": 3,
|
||||
"top_ids": [
|
||||
"api.send_message_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.send_message_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [
|
||||
"/send"
|
||||
],
|
||||
"resolved_anchor_candidates": [
|
||||
"api.send_message_endpoint",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"HTTP API /send",
|
||||
"Scenario",
|
||||
"api.send_message_endpoint:Сценарий",
|
||||
"api.send_message_endpoint:workflow_step",
|
||||
"api.send_message_endpoint:mentions_entity",
|
||||
"api.send_message_endpoint:Нефункциональные требования",
|
||||
"api.send_message_endpoint:Summary",
|
||||
"api.send_message_endpoint:Описание",
|
||||
"api.send_message_endpoint:Функциональные требования",
|
||||
"api.send_message_endpoint:Входные параметры"
|
||||
],
|
||||
"relation_hits_count": 0,
|
||||
"relation_targets": [],
|
||||
"fallback_doc_hits_count": 7,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 2,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 1,
|
||||
"facts": 2,
|
||||
"relations": 0,
|
||||
"chunks": 6,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "evidence_sufficient",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty",
|
||||
"exact_anchor_match"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_explain_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 393,
|
||||
"user_chars": 4384,
|
||||
"tokens_in_estimate": 1195
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты объясняешь документацию системы.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные факты
|
||||
- Не додумывай
|
||||
- Если данных недостаточно, скажи это явно
|
||||
- Объясняй структурировано
|
||||
|
||||
Формат ответа:
|
||||
1. Краткое описание
|
||||
2. Основные элементы
|
||||
3. Как это работает
|
||||
4. Связи с другими частями системы (если есть)
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Что делает /send?",
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"title": "HTTP API /send",
|
||||
"content": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"metadata": {
|
||||
"name": "send_message_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"telegram",
|
||||
"manual-send"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /send",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "5fbf2e33510b0676a3a53b957a4569bd3c2c31fb7719546602c573421ccaa32d",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlAppFactory",
|
||||
"TelegramSendService",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.send_message_endpoint",
|
||||
"source_path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"summary_text": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [
|
||||
{
|
||||
"layer": "D2_FACT_INDEX",
|
||||
"path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"title": "api.send_message_endpoint:workflow_step",
|
||||
"content": "api.send_message_endpoint workflow_step Telegram credentials доступны в переменных окружения.",
|
||||
"metadata": {
|
||||
"tags": [],
|
||||
"owner": null,
|
||||
"anchor": "Сценарий",
|
||||
"doc_id": null,
|
||||
"object": "Telegram credentials доступны в переменных окружения.",
|
||||
"fact_id": "6bf0a662808009874a108d0c97f7cca7fc4ff7a3a3d66e0947b31bf813cfdf4d",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "5fbf2e33510b0676a3a53b957a4569bd3c2c31fb7719546602c573421ccaa32d",
|
||||
"predicate": "workflow_step",
|
||||
"object_ref": null,
|
||||
"subject_id": "api.send_message_endpoint",
|
||||
"doc_version": null,
|
||||
"source_path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D2_FACT_INDEX",
|
||||
"path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"title": "api.send_message_endpoint:mentions_entity",
|
||||
"content": "api.send_message_endpoint mentions_entity TelegramNotifyWorker",
|
||||
"metadata": {
|
||||
"tags": [],
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.entities",
|
||||
"doc_id": null,
|
||||
"object": "TelegramNotifyWorker",
|
||||
"fact_id": "149c4e0d3d34b3faba055b1495d54818fadc882af633da70035b82190c1bd327",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "5fbf2e33510b0676a3a53b957a4569bd3c2c31fb7719546602c573421ccaa32d",
|
||||
"predicate": "mentions_entity",
|
||||
"object_ref": null,
|
||||
"subject_id": "api.send_message_endpoint",
|
||||
"doc_version": null,
|
||||
"source_path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"relations": []
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Что делает /send?
|
||||
- intent: DOCUMENTATION_EXPLAIN
|
||||
- sub_intent: API_METHOD_EXPLAIN
|
||||
- documents: 1 | samples: HTTP API /send
|
||||
- facts: 2 | samples: api.send_message_endpoint:workflow_step, api.send_message_endpoint:mentions_entity
|
||||
- relations: 0
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "v3-api-send-2",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "pre_llm",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 17,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.send_message_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": "api_method"
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Как работает send endpoint?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Как работает send endpoint?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Как работает send endpoint?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Как работает send endpoint?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 14988,
|
||||
"tokens_in_estimate": 3846
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+726
@@ -0,0 +1,726 @@
|
||||
# v3-api-send-2
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: pre_llm
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
Как работает send endpoint?
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 17,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.send_message_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": "api_method"
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Как работает send endpoint?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Как работает send endpoint?"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Как работает send endpoint?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Как работает send endpoint?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 14988,
|
||||
"tokens_in_estimate": 3846
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"layers_used": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 6,
|
||||
"facts_found": 2,
|
||||
"relations_found": 0,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "topic",
|
||||
"matched_anchor_value": null,
|
||||
"exact_anchor_match": false,
|
||||
"docs_layers_requested": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.send_message_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/README.md"
|
||||
]
|
||||
},
|
||||
"D2_FACT_INDEX": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"f85d982c272a2ee6baeadc433221a20e684cd8ef01cb4788d6f76d05ca56d6d0",
|
||||
"b8e44c3adb74aaa6c91ae8815fa091289e58dd3990a3a1b63e850c62075aea75",
|
||||
"bafb867ffed41c9db637df98d6cd5f6722d7747bbebc6c03e6f0d0caf3b7f9f3",
|
||||
"54bbcbac242f1c85ec3280236ed5841998a8a3a548ff16cbf0b5acafbff469e3",
|
||||
"b6bfad59b3bf00f199b5ef90c1208af19664de700413e7354468a93a4abaaa2f"
|
||||
]
|
||||
},
|
||||
"D4_WORKFLOW_INDEX": {
|
||||
"hits": 3,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [],
|
||||
"resolved_anchor_candidates": [
|
||||
"api.send_message_endpoint",
|
||||
"docs/documentation/api/send-message-endpoint.md",
|
||||
"api.control_actions_endpoint",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"api.health_endpoint",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"docs/documentation/domain/runtime-health-entity.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"api.send_message_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/documentation/api/send-message-endpoint.md",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"docs/README.md",
|
||||
"docs/documentation/domain/runtime-health-entity.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"HTTP API /send",
|
||||
"HTTP API /actions/{action}",
|
||||
"HTTP API /health",
|
||||
"Архитектура Telegram Notify App",
|
||||
"Readme",
|
||||
"Сущность runtime health",
|
||||
"api.control_actions_endpoint:workflow_step",
|
||||
"api.control_actions_endpoint:mentions_entity",
|
||||
"Scenario",
|
||||
"api.control_actions_endpoint:Функциональные требования",
|
||||
"api.control_actions_endpoint:Нефункциональные требования",
|
||||
"api.control_actions_endpoint:Сценарий",
|
||||
"api.control_actions_endpoint:Summary",
|
||||
"api.control_actions_endpoint:Описание",
|
||||
"api.control_actions_endpoint:Входные параметры"
|
||||
],
|
||||
"relation_hits_count": 0,
|
||||
"relation_targets": [],
|
||||
"fallback_doc_hits_count": 12,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 2,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 6,
|
||||
"facts": 2,
|
||||
"relations": 0,
|
||||
"chunks": 6,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "evidence_sufficient",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_explain_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 393,
|
||||
"user_chars": 14988,
|
||||
"tokens_in_estimate": 3846
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты объясняешь документацию системы.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные факты
|
||||
- Не додумывай
|
||||
- Если данных недостаточно, скажи это явно
|
||||
- Объясняй структурировано
|
||||
|
||||
Формат ответа:
|
||||
1. Краткое описание
|
||||
2. Основные элементы
|
||||
3. Как это работает
|
||||
4. Связи с другими частями системы (если есть)
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Как работает send endpoint?",
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"title": "HTTP API /send",
|
||||
"content": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"metadata": {
|
||||
"name": "send_message_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"telegram",
|
||||
"manual-send"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /send",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "5fbf2e33510b0676a3a53b957a4569bd3c2c31fb7719546602c573421ccaa32d",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlAppFactory",
|
||||
"TelegramSendService",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.send_message_endpoint",
|
||||
"source_path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"summary_text": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"content": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"metadata": {
|
||||
"name": "control_actions_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"control-plane",
|
||||
"lifecycle"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"ControlActionSet",
|
||||
"JSONResponse"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.control_actions_endpoint",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"summary_text": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "HTTP API /health",
|
||||
"content": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"metadata": {
|
||||
"name": "health_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"health",
|
||||
"control-plane"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"TelegramNotifyWorker",
|
||||
"RuntimeManager",
|
||||
"WorkerHealth"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.health_endpoint",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"summary_text": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"content": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"metadata": {
|
||||
"name": "telegram_notify_app_overview",
|
||||
"tags": [
|
||||
"architecture",
|
||||
"telegram",
|
||||
"plba",
|
||||
"runtime"
|
||||
],
|
||||
"type": "architecture_overview",
|
||||
"layer": "system",
|
||||
"links": [
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "docs_root",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"children": [
|
||||
"api.health_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"doc_kind": "spec",
|
||||
"entities": [
|
||||
"TelegramNotifyModule",
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramControlChannel",
|
||||
"TelegramSendService",
|
||||
"RuntimeManager"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "architecture.telegram_notify_app",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"summary_text": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/README.md",
|
||||
"title": "Readme",
|
||||
"content": "Readme",
|
||||
"metadata": {
|
||||
"name": "",
|
||||
"tags": [],
|
||||
"type": "",
|
||||
"layer": "",
|
||||
"links": [],
|
||||
"owner": null,
|
||||
"title": "Readme",
|
||||
"doc_id": null,
|
||||
"module": "",
|
||||
"parent": null,
|
||||
"status": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "81d952f1a6ea85b76f75e0e57f33b8fa4b2bf3cb7db11b91b90171aeedd655a6",
|
||||
"children": [],
|
||||
"doc_kind": "readme",
|
||||
"entities": [],
|
||||
"updated_at": null,
|
||||
"doc_version": null,
|
||||
"document_id": "docs/README.md",
|
||||
"source_path": "docs/README.md",
|
||||
"summary_text": "",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "Сущность runtime health",
|
||||
"content": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"metadata": {
|
||||
"name": "runtime_health",
|
||||
"tags": [
|
||||
"domain",
|
||||
"health",
|
||||
"observability"
|
||||
],
|
||||
"type": "domain_entity",
|
||||
"layer": "domain",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "used_by",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Сущность runtime health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"WorkerHealth",
|
||||
"WorkerStatus",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "domain.runtime_health",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"summary_text": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [
|
||||
{
|
||||
"layer": "D2_FACT_INDEX",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:workflow_step",
|
||||
"content": "api.control_actions_endpoint workflow_step Название:** Выполнение control action runtime",
|
||||
"metadata": {
|
||||
"tags": [],
|
||||
"owner": null,
|
||||
"anchor": "Сценарий",
|
||||
"doc_id": null,
|
||||
"object": "Название:** Выполнение control action runtime",
|
||||
"fact_id": "f85d982c272a2ee6baeadc433221a20e684cd8ef01cb4788d6f76d05ca56d6d0",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"predicate": "workflow_step",
|
||||
"object_ref": null,
|
||||
"subject_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D2_FACT_INDEX",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:mentions_entity",
|
||||
"content": "api.control_actions_endpoint mentions_entity ControlActionSet",
|
||||
"metadata": {
|
||||
"tags": [],
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.entities",
|
||||
"doc_id": null,
|
||||
"object": "ControlActionSet",
|
||||
"fact_id": "bafb867ffed41c9db637df98d6cd5f6722d7747bbebc6c03e6f0d0caf3b7f9f3",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"predicate": "mentions_entity",
|
||||
"object_ref": null,
|
||||
"subject_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"relations": []
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Как работает send endpoint?
|
||||
- intent: DOCUMENTATION_EXPLAIN
|
||||
- sub_intent: API_METHOD_EXPLAIN
|
||||
- documents: 6 | samples: HTTP API /send, HTTP API /actions/{action}, HTTP API /health
|
||||
- facts: 2 | samples: api.control_actions_endpoint:workflow_step, api.control_actions_endpoint:mentions_entity
|
||||
- relations: 0
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "v3-api-send-3",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "pre_llm",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 17,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.send_message_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"docs/README.md",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": "api_method"
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Опиши endpoint отправки сообщений"
|
||||
},
|
||||
"output": {
|
||||
"query": "Опиши endpoint отправки сообщений"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Опиши endpoint отправки сообщений"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Опиши endpoint отправки сообщений"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 14994,
|
||||
"tokens_in_estimate": 3847
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+726
@@ -0,0 +1,726 @@
|
||||
# v3-api-send-3
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: pre_llm
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
Опиши endpoint отправки сообщений
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 17,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.send_message_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"docs/README.md",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": "api_method"
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Опиши endpoint отправки сообщений"
|
||||
},
|
||||
"output": {
|
||||
"query": "Опиши endpoint отправки сообщений"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Опиши endpoint отправки сообщений"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Опиши endpoint отправки сообщений"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 14994,
|
||||
"tokens_in_estimate": 3847
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"layers_used": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 6,
|
||||
"facts_found": 2,
|
||||
"relations_found": 0,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "topic",
|
||||
"matched_anchor_value": null,
|
||||
"exact_anchor_match": false,
|
||||
"docs_layers_requested": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D4_WORKFLOW_INDEX",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.send_message_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"docs/README.md",
|
||||
"architecture.telegram_notify_app"
|
||||
]
|
||||
},
|
||||
"D2_FACT_INDEX": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"f85d982c272a2ee6baeadc433221a20e684cd8ef01cb4788d6f76d05ca56d6d0",
|
||||
"b8e44c3adb74aaa6c91ae8815fa091289e58dd3990a3a1b63e850c62075aea75",
|
||||
"bafb867ffed41c9db637df98d6cd5f6722d7747bbebc6c03e6f0d0caf3b7f9f3",
|
||||
"54bbcbac242f1c85ec3280236ed5841998a8a3a548ff16cbf0b5acafbff469e3",
|
||||
"b6bfad59b3bf00f199b5ef90c1208af19664de700413e7354468a93a4abaaa2f"
|
||||
]
|
||||
},
|
||||
"D4_WORKFLOW_INDEX": {
|
||||
"hits": 3,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [],
|
||||
"resolved_anchor_candidates": [
|
||||
"api.send_message_endpoint",
|
||||
"docs/documentation/api/send-message-endpoint.md",
|
||||
"api.control_actions_endpoint",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"api.health_endpoint",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"docs/README.md",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"domain.runtime_health",
|
||||
"docs/documentation/domain/runtime-health-entity.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"api.send_message_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"docs/README.md",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/documentation/api/send-message-endpoint.md",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"docs/README.md",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"docs/documentation/domain/runtime-health-entity.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"HTTP API /send",
|
||||
"HTTP API /actions/{action}",
|
||||
"HTTP API /health",
|
||||
"Readme",
|
||||
"Архитектура Telegram Notify App",
|
||||
"Сущность runtime health",
|
||||
"api.control_actions_endpoint:workflow_step",
|
||||
"api.control_actions_endpoint:mentions_entity",
|
||||
"Scenario",
|
||||
"api.control_actions_endpoint:Функциональные требования",
|
||||
"api.control_actions_endpoint:Нефункциональные требования",
|
||||
"api.control_actions_endpoint:Сценарий",
|
||||
"api.control_actions_endpoint:Summary",
|
||||
"api.control_actions_endpoint:Описание",
|
||||
"api.control_actions_endpoint:Входные параметры"
|
||||
],
|
||||
"relation_hits_count": 0,
|
||||
"relation_targets": [],
|
||||
"fallback_doc_hits_count": 12,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 2,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 6,
|
||||
"facts": 2,
|
||||
"relations": 0,
|
||||
"chunks": 6,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "evidence_sufficient",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_explain_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 393,
|
||||
"user_chars": 14994,
|
||||
"tokens_in_estimate": 3847
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты объясняешь документацию системы.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные факты
|
||||
- Не додумывай
|
||||
- Если данных недостаточно, скажи это явно
|
||||
- Объясняй структурировано
|
||||
|
||||
Формат ответа:
|
||||
1. Краткое описание
|
||||
2. Основные элементы
|
||||
3. Как это работает
|
||||
4. Связи с другими частями системы (если есть)
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Опиши endpoint отправки сообщений",
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "API_METHOD_EXPLAIN",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"title": "HTTP API /send",
|
||||
"content": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"metadata": {
|
||||
"name": "send_message_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"telegram",
|
||||
"manual-send"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /send",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "5fbf2e33510b0676a3a53b957a4569bd3c2c31fb7719546602c573421ccaa32d",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlAppFactory",
|
||||
"TelegramSendService",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.send_message_endpoint",
|
||||
"source_path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"summary_text": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"content": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"metadata": {
|
||||
"name": "control_actions_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"control-plane",
|
||||
"lifecycle"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"ControlActionSet",
|
||||
"JSONResponse"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.control_actions_endpoint",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"summary_text": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "HTTP API /health",
|
||||
"content": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"metadata": {
|
||||
"name": "health_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"health",
|
||||
"control-plane"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"TelegramNotifyWorker",
|
||||
"RuntimeManager",
|
||||
"WorkerHealth"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.health_endpoint",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"summary_text": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/README.md",
|
||||
"title": "Readme",
|
||||
"content": "Readme",
|
||||
"metadata": {
|
||||
"name": "",
|
||||
"tags": [],
|
||||
"type": "",
|
||||
"layer": "",
|
||||
"links": [],
|
||||
"owner": null,
|
||||
"title": "Readme",
|
||||
"doc_id": null,
|
||||
"module": "",
|
||||
"parent": null,
|
||||
"status": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "81d952f1a6ea85b76f75e0e57f33b8fa4b2bf3cb7db11b91b90171aeedd655a6",
|
||||
"children": [],
|
||||
"doc_kind": "readme",
|
||||
"entities": [],
|
||||
"updated_at": null,
|
||||
"doc_version": null,
|
||||
"document_id": "docs/README.md",
|
||||
"source_path": "docs/README.md",
|
||||
"summary_text": "",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"content": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"metadata": {
|
||||
"name": "telegram_notify_app_overview",
|
||||
"tags": [
|
||||
"architecture",
|
||||
"telegram",
|
||||
"plba",
|
||||
"runtime"
|
||||
],
|
||||
"type": "architecture_overview",
|
||||
"layer": "system",
|
||||
"links": [
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "docs_root",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"children": [
|
||||
"api.health_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"doc_kind": "spec",
|
||||
"entities": [
|
||||
"TelegramNotifyModule",
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramControlChannel",
|
||||
"TelegramSendService",
|
||||
"RuntimeManager"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "architecture.telegram_notify_app",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"summary_text": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "Сущность runtime health",
|
||||
"content": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"metadata": {
|
||||
"name": "runtime_health",
|
||||
"tags": [
|
||||
"domain",
|
||||
"health",
|
||||
"observability"
|
||||
],
|
||||
"type": "domain_entity",
|
||||
"layer": "domain",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "used_by",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Сущность runtime health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"WorkerHealth",
|
||||
"WorkerStatus",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "domain.runtime_health",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"summary_text": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [
|
||||
{
|
||||
"layer": "D2_FACT_INDEX",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:workflow_step",
|
||||
"content": "api.control_actions_endpoint workflow_step Название:** Выполнение control action runtime",
|
||||
"metadata": {
|
||||
"tags": [],
|
||||
"owner": null,
|
||||
"anchor": "Сценарий",
|
||||
"doc_id": null,
|
||||
"object": "Название:** Выполнение control action runtime",
|
||||
"fact_id": "f85d982c272a2ee6baeadc433221a20e684cd8ef01cb4788d6f76d05ca56d6d0",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"predicate": "workflow_step",
|
||||
"object_ref": null,
|
||||
"subject_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D2_FACT_INDEX",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:mentions_entity",
|
||||
"content": "api.control_actions_endpoint mentions_entity ControlActionSet",
|
||||
"metadata": {
|
||||
"tags": [],
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.entities",
|
||||
"doc_id": null,
|
||||
"object": "ControlActionSet",
|
||||
"fact_id": "bafb867ffed41c9db637df98d6cd5f6722d7747bbebc6c03e6f0d0caf3b7f9f3",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"predicate": "mentions_entity",
|
||||
"object_ref": null,
|
||||
"subject_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"relations": []
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Опиши endpoint отправки сообщений
|
||||
- intent: DOCUMENTATION_EXPLAIN
|
||||
- sub_intent: API_METHOD_EXPLAIN
|
||||
- documents: 6 | samples: HTTP API /send, HTTP API /actions/{action}, HTTP API /health
|
||||
- facts: 2 | samples: api.control_actions_endpoint:workflow_step, api.control_actions_endpoint:mentions_entity
|
||||
- relations: 0
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "v3-component-control-channel-1",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "pre_llm",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 20,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [
|
||||
"TelegramControlChannel"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Как работает TelegramControlChannel?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Как работает TelegramControlChannel?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Как работает TelegramControlChannel?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Как работает TelegramControlChannel?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 21500,
|
||||
"tokens_in_estimate": 5474
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+900
@@ -0,0 +1,900 @@
|
||||
# v3-component-control-channel-1
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: pre_llm
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
Как работает TelegramControlChannel?
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 20,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [
|
||||
"TelegramControlChannel"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Как работает TelegramControlChannel?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Как работает TelegramControlChannel?"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Как работает TelegramControlChannel?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Как работает TelegramControlChannel?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 21500,
|
||||
"tokens_in_estimate": 5474
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"layers_used": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 6,
|
||||
"facts_found": 2,
|
||||
"relations_found": 6,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "none",
|
||||
"matched_anchor_value": null,
|
||||
"exact_anchor_match": false,
|
||||
"docs_layers_requested": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop"
|
||||
]
|
||||
},
|
||||
"D2_FACT_INDEX": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"b480201013a7e5231146f665773ebc54af37c28135f407c6b758304c74561645",
|
||||
"b8e44c3adb74aaa6c91ae8815fa091289e58dd3990a3a1b63e850c62075aea75",
|
||||
"bafb867ffed41c9db637df98d6cd5f6722d7747bbebc6c03e6f0d0caf3b7f9f3",
|
||||
"54bbcbac242f1c85ec3280236ed5841998a8a3a548ff16cbf0b5acafbff469e3",
|
||||
"b6bfad59b3bf00f199b5ef90c1208af19664de700413e7354468a93a4abaaa2f"
|
||||
]
|
||||
},
|
||||
"D5_RELATION_GRAPH": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"afec31fd062e392dcd9699a92c7ab61fd4b1273c1a2b16702b23d55d8d0c47ac",
|
||||
"711fb2edb82dd222deaba3c91768b18cbbd453009235823282813c6e867dc2c1",
|
||||
"eec79f7a02b804337e791ef231784862ae26e0599eb20224790e9d4f085fa9c0",
|
||||
"5f4909bde905cd3d294ad307074a05e4ae4deefcafe6272cd2d0436e73acb8dd",
|
||||
"ae34fe4b3cd2b47632b13b1e32303e842b57948aa21160abe8d9b478995e1d74"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [
|
||||
"TelegramControlChannel"
|
||||
],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [
|
||||
"TelegramControlChannel"
|
||||
],
|
||||
"resolved_anchor_candidates": [
|
||||
"api.control_actions_endpoint",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"logic.telegram_notification_loop",
|
||||
"docs/documentation/logic/telegram-notification-loop.md",
|
||||
"api.send_message_endpoint",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"docs/README.md",
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"docs/documentation/logic/telegram-notification-loop.md",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"HTTP API /actions/{action}",
|
||||
"Архитектура Telegram Notify App",
|
||||
"Readme",
|
||||
"Сущность runtime health",
|
||||
"Цикл отправки уведомлений в Telegram",
|
||||
"HTTP API /send",
|
||||
"api.control_actions_endpoint:workflow_step",
|
||||
"api.control_actions_endpoint:mentions_entity",
|
||||
"api.control_actions_endpoint:parent",
|
||||
"api.control_actions_endpoint:related_api",
|
||||
"api.control_actions_endpoint:related_logic",
|
||||
"api.control_actions_endpoint:part_of",
|
||||
"architecture.telegram_notify_app:child",
|
||||
"architecture.telegram_notify_app:related_api",
|
||||
"api.control_actions_endpoint:Функциональные требования",
|
||||
"api.control_actions_endpoint:Нефункциональные требования",
|
||||
"api.control_actions_endpoint:Сценарий",
|
||||
"api.control_actions_endpoint:Summary",
|
||||
"api.control_actions_endpoint:Описание",
|
||||
"api.control_actions_endpoint:Входные параметры"
|
||||
],
|
||||
"relation_hits_count": 6,
|
||||
"relation_targets": [
|
||||
"api.control_actions_endpoint:parent",
|
||||
"api.control_actions_endpoint:related_api",
|
||||
"api.control_actions_endpoint:related_logic",
|
||||
"api.control_actions_endpoint:part_of",
|
||||
"architecture.telegram_notify_app:child",
|
||||
"architecture.telegram_notify_app:related_api"
|
||||
],
|
||||
"fallback_doc_hits_count": 12,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 2,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 6,
|
||||
"facts": 2,
|
||||
"relations": 6,
|
||||
"chunks": 6,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "evidence_sufficient",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_explain_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 393,
|
||||
"user_chars": 21500,
|
||||
"tokens_in_estimate": 5474
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты объясняешь документацию системы.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные факты
|
||||
- Не додумывай
|
||||
- Если данных недостаточно, скажи это явно
|
||||
- Объясняй структурировано
|
||||
|
||||
Формат ответа:
|
||||
1. Краткое описание
|
||||
2. Основные элементы
|
||||
3. Как это работает
|
||||
4. Связи с другими частями системы (если есть)
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Как работает TelegramControlChannel?",
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"content": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"metadata": {
|
||||
"name": "control_actions_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"control-plane",
|
||||
"lifecycle"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"ControlActionSet",
|
||||
"JSONResponse"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.control_actions_endpoint",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"summary_text": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"content": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"metadata": {
|
||||
"name": "telegram_notify_app_overview",
|
||||
"tags": [
|
||||
"architecture",
|
||||
"telegram",
|
||||
"plba",
|
||||
"runtime"
|
||||
],
|
||||
"type": "architecture_overview",
|
||||
"layer": "system",
|
||||
"links": [
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "docs_root",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"children": [
|
||||
"api.health_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"doc_kind": "spec",
|
||||
"entities": [
|
||||
"TelegramNotifyModule",
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramControlChannel",
|
||||
"TelegramSendService",
|
||||
"RuntimeManager"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "architecture.telegram_notify_app",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"summary_text": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/README.md",
|
||||
"title": "Readme",
|
||||
"content": "Readme",
|
||||
"metadata": {
|
||||
"name": "",
|
||||
"tags": [],
|
||||
"type": "",
|
||||
"layer": "",
|
||||
"links": [],
|
||||
"owner": null,
|
||||
"title": "Readme",
|
||||
"doc_id": null,
|
||||
"module": "",
|
||||
"parent": null,
|
||||
"status": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "81d952f1a6ea85b76f75e0e57f33b8fa4b2bf3cb7db11b91b90171aeedd655a6",
|
||||
"children": [],
|
||||
"doc_kind": "readme",
|
||||
"entities": [],
|
||||
"updated_at": null,
|
||||
"doc_version": null,
|
||||
"document_id": "docs/README.md",
|
||||
"source_path": "docs/README.md",
|
||||
"summary_text": "",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "Сущность runtime health",
|
||||
"content": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"metadata": {
|
||||
"name": "runtime_health",
|
||||
"tags": [
|
||||
"domain",
|
||||
"health",
|
||||
"observability"
|
||||
],
|
||||
"type": "domain_entity",
|
||||
"layer": "domain",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "used_by",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Сущность runtime health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"WorkerHealth",
|
||||
"WorkerStatus",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "domain.runtime_health",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"summary_text": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/logic/telegram-notification-loop.md",
|
||||
"title": "Цикл отправки уведомлений в Telegram",
|
||||
"content": "`TelegramNotifyWorker` после старта runtime запускает отдельный поток, сразу делает первую попытку отправки сообщения и затем повторяет отправку через заданный интервал. При ошибках доставки или отсутствии credentials worker не останавливает сервис, а переводит собственное состояние в `degraded`. Этот workflow определяет основной полезный цикл приложения.",
|
||||
"metadata": {
|
||||
"name": "telegram_notification_loop",
|
||||
"tags": [
|
||||
"logic",
|
||||
"telegram",
|
||||
"worker",
|
||||
"scheduling"
|
||||
],
|
||||
"type": "logic_block",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Цикл отправки уведомлений в Telegram",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "0f62f9b4dab261ca4ca34575ff5d84411a22c90b780c52eda388782b94f08470",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramSendService",
|
||||
"WorkerHealth",
|
||||
"WorkerStatus"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "logic.telegram_notification_loop",
|
||||
"source_path": "docs/documentation/logic/telegram-notification-loop.md",
|
||||
"summary_text": "`TelegramNotifyWorker` после старта runtime запускает отдельный поток, сразу делает первую попытку отправки сообщения и затем повторяет отправку через заданный интервал. При ошибках доставки или отсутствии credentials worker не останавливает сервис, а переводит собственное состояние в `degraded`. Этот workflow определяет основной полезный цикл приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"title": "HTTP API /send",
|
||||
"content": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"metadata": {
|
||||
"name": "send_message_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"telegram",
|
||||
"manual-send"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /send",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "5fbf2e33510b0676a3a53b957a4569bd3c2c31fb7719546602c573421ccaa32d",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlAppFactory",
|
||||
"TelegramSendService",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.send_message_endpoint",
|
||||
"source_path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"summary_text": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [
|
||||
{
|
||||
"layer": "D2_FACT_INDEX",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:workflow_step",
|
||||
"content": "api.control_actions_endpoint workflow_step HTTP control plane запущен.",
|
||||
"metadata": {
|
||||
"tags": [],
|
||||
"owner": null,
|
||||
"anchor": "Сценарий",
|
||||
"doc_id": null,
|
||||
"object": "HTTP control plane запущен.",
|
||||
"fact_id": "b480201013a7e5231146f665773ebc54af37c28135f407c6b758304c74561645",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"predicate": "workflow_step",
|
||||
"object_ref": null,
|
||||
"subject_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D2_FACT_INDEX",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:mentions_entity",
|
||||
"content": "api.control_actions_endpoint mentions_entity ControlActionSet",
|
||||
"metadata": {
|
||||
"tags": [],
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.entities",
|
||||
"doc_id": null,
|
||||
"object": "ControlActionSet",
|
||||
"fact_id": "bafb867ffed41c9db637df98d6cd5f6722d7747bbebc6c03e6f0d0caf3b7f9f3",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"predicate": "mentions_entity",
|
||||
"object_ref": null,
|
||||
"subject_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"relations": [
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:parent",
|
||||
"content": "api.control_actions_endpoint parent architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.parent",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "afec31fd062e392dcd9699a92c7ab61fd4b1273c1a2b16702b23d55d8d0c47ac",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "parent",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:related_api",
|
||||
"content": "api.control_actions_endpoint related_api api.health_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "api.health_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "711fb2edb82dd222deaba3c91768b18cbbd453009235823282813c6e867dc2c1",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_api",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:related_logic",
|
||||
"content": "api.control_actions_endpoint related_logic logic.telegram_notification_loop",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "logic.telegram_notification_loop",
|
||||
"doc_version": null,
|
||||
"relation_id": "eec79f7a02b804337e791ef231784862ae26e0599eb20224790e9d4f085fa9c0",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_logic",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:part_of",
|
||||
"content": "api.control_actions_endpoint part_of architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "5f4909bde905cd3d294ad307074a05e4ae4deefcafe6272cd2d0436e73acb8dd",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "part_of",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "architecture.telegram_notify_app:child",
|
||||
"content": "architecture.telegram_notify_app child api.control_actions_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.children",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"source_id": "architecture.telegram_notify_app",
|
||||
"target_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "ae34fe4b3cd2b47632b13b1e32303e842b57948aa21160abe8d9b478995e1d74",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "child",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "architecture.telegram_notify_app:related_api",
|
||||
"content": "architecture.telegram_notify_app related_api api.control_actions_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"source_id": "architecture.telegram_notify_app",
|
||||
"target_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "02530527e6e1d1e23316c9d25d0b30658d6c70063eb6e1d732d55c5ba29c9795",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_api",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Как работает TelegramControlChannel?
|
||||
- intent: DOCUMENTATION_EXPLAIN
|
||||
- sub_intent: COMPONENT_EXPLAIN
|
||||
- documents: 6 | samples: HTTP API /actions/{action}, Архитектура Telegram Notify App, Readme
|
||||
- facts: 2 | samples: api.control_actions_endpoint:workflow_step, api.control_actions_endpoint:mentions_entity
|
||||
- relations: 6 | samples: api.control_actions_endpoint:parent, api.control_actions_endpoint:related_api, api.control_actions_endpoint:related_logic
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "v3-component-control-channel-2",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "pre_llm",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 20,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [
|
||||
"TelegramControlChannel"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Роль TelegramControlChannel в системе"
|
||||
},
|
||||
"output": {
|
||||
"query": "Роль TelegramControlChannel в системе"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Роль TelegramControlChannel в системе"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Роль TelegramControlChannel в системе"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 21501,
|
||||
"tokens_in_estimate": 5474
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+900
@@ -0,0 +1,900 @@
|
||||
# v3-component-control-channel-2
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: pre_llm
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
Роль TelegramControlChannel в системе
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 20,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [
|
||||
"TelegramControlChannel"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Роль TelegramControlChannel в системе"
|
||||
},
|
||||
"output": {
|
||||
"query": "Роль TelegramControlChannel в системе"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Роль TelegramControlChannel в системе"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Роль TelegramControlChannel в системе"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 21501,
|
||||
"tokens_in_estimate": 5474
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"layers_used": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 6,
|
||||
"facts_found": 2,
|
||||
"relations_found": 6,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "none",
|
||||
"matched_anchor_value": null,
|
||||
"exact_anchor_match": false,
|
||||
"docs_layers_requested": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop"
|
||||
]
|
||||
},
|
||||
"D2_FACT_INDEX": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"b480201013a7e5231146f665773ebc54af37c28135f407c6b758304c74561645",
|
||||
"b8e44c3adb74aaa6c91ae8815fa091289e58dd3990a3a1b63e850c62075aea75",
|
||||
"bafb867ffed41c9db637df98d6cd5f6722d7747bbebc6c03e6f0d0caf3b7f9f3",
|
||||
"54bbcbac242f1c85ec3280236ed5841998a8a3a548ff16cbf0b5acafbff469e3",
|
||||
"b6bfad59b3bf00f199b5ef90c1208af19664de700413e7354468a93a4abaaa2f"
|
||||
]
|
||||
},
|
||||
"D5_RELATION_GRAPH": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"afec31fd062e392dcd9699a92c7ab61fd4b1273c1a2b16702b23d55d8d0c47ac",
|
||||
"711fb2edb82dd222deaba3c91768b18cbbd453009235823282813c6e867dc2c1",
|
||||
"eec79f7a02b804337e791ef231784862ae26e0599eb20224790e9d4f085fa9c0",
|
||||
"5f4909bde905cd3d294ad307074a05e4ae4deefcafe6272cd2d0436e73acb8dd",
|
||||
"ae34fe4b3cd2b47632b13b1e32303e842b57948aa21160abe8d9b478995e1d74"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [
|
||||
"TelegramControlChannel"
|
||||
],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [
|
||||
"TelegramControlChannel"
|
||||
],
|
||||
"resolved_anchor_candidates": [
|
||||
"api.control_actions_endpoint",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"logic.telegram_notification_loop",
|
||||
"docs/documentation/logic/telegram-notification-loop.md",
|
||||
"api.send_message_endpoint",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"docs/README.md",
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"docs/documentation/logic/telegram-notification-loop.md",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"HTTP API /actions/{action}",
|
||||
"Архитектура Telegram Notify App",
|
||||
"Readme",
|
||||
"Сущность runtime health",
|
||||
"Цикл отправки уведомлений в Telegram",
|
||||
"HTTP API /send",
|
||||
"api.control_actions_endpoint:workflow_step",
|
||||
"api.control_actions_endpoint:mentions_entity",
|
||||
"api.control_actions_endpoint:parent",
|
||||
"api.control_actions_endpoint:related_api",
|
||||
"api.control_actions_endpoint:related_logic",
|
||||
"api.control_actions_endpoint:part_of",
|
||||
"architecture.telegram_notify_app:child",
|
||||
"architecture.telegram_notify_app:related_api",
|
||||
"api.control_actions_endpoint:Функциональные требования",
|
||||
"api.control_actions_endpoint:Нефункциональные требования",
|
||||
"api.control_actions_endpoint:Сценарий",
|
||||
"api.control_actions_endpoint:Summary",
|
||||
"api.control_actions_endpoint:Описание",
|
||||
"api.control_actions_endpoint:Входные параметры"
|
||||
],
|
||||
"relation_hits_count": 6,
|
||||
"relation_targets": [
|
||||
"api.control_actions_endpoint:parent",
|
||||
"api.control_actions_endpoint:related_api",
|
||||
"api.control_actions_endpoint:related_logic",
|
||||
"api.control_actions_endpoint:part_of",
|
||||
"architecture.telegram_notify_app:child",
|
||||
"architecture.telegram_notify_app:related_api"
|
||||
],
|
||||
"fallback_doc_hits_count": 12,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 2,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 6,
|
||||
"facts": 2,
|
||||
"relations": 6,
|
||||
"chunks": 6,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "evidence_sufficient",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_explain_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 393,
|
||||
"user_chars": 21501,
|
||||
"tokens_in_estimate": 5474
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты объясняешь документацию системы.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные факты
|
||||
- Не додумывай
|
||||
- Если данных недостаточно, скажи это явно
|
||||
- Объясняй структурировано
|
||||
|
||||
Формат ответа:
|
||||
1. Краткое описание
|
||||
2. Основные элементы
|
||||
3. Как это работает
|
||||
4. Связи с другими частями системы (если есть)
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Роль TelegramControlChannel в системе",
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"content": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"metadata": {
|
||||
"name": "control_actions_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"control-plane",
|
||||
"lifecycle"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"ControlActionSet",
|
||||
"JSONResponse"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.control_actions_endpoint",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"summary_text": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"content": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"metadata": {
|
||||
"name": "telegram_notify_app_overview",
|
||||
"tags": [
|
||||
"architecture",
|
||||
"telegram",
|
||||
"plba",
|
||||
"runtime"
|
||||
],
|
||||
"type": "architecture_overview",
|
||||
"layer": "system",
|
||||
"links": [
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "docs_root",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"children": [
|
||||
"api.health_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"doc_kind": "spec",
|
||||
"entities": [
|
||||
"TelegramNotifyModule",
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramControlChannel",
|
||||
"TelegramSendService",
|
||||
"RuntimeManager"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "architecture.telegram_notify_app",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"summary_text": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/README.md",
|
||||
"title": "Readme",
|
||||
"content": "Readme",
|
||||
"metadata": {
|
||||
"name": "",
|
||||
"tags": [],
|
||||
"type": "",
|
||||
"layer": "",
|
||||
"links": [],
|
||||
"owner": null,
|
||||
"title": "Readme",
|
||||
"doc_id": null,
|
||||
"module": "",
|
||||
"parent": null,
|
||||
"status": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "81d952f1a6ea85b76f75e0e57f33b8fa4b2bf3cb7db11b91b90171aeedd655a6",
|
||||
"children": [],
|
||||
"doc_kind": "readme",
|
||||
"entities": [],
|
||||
"updated_at": null,
|
||||
"doc_version": null,
|
||||
"document_id": "docs/README.md",
|
||||
"source_path": "docs/README.md",
|
||||
"summary_text": "",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "Сущность runtime health",
|
||||
"content": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"metadata": {
|
||||
"name": "runtime_health",
|
||||
"tags": [
|
||||
"domain",
|
||||
"health",
|
||||
"observability"
|
||||
],
|
||||
"type": "domain_entity",
|
||||
"layer": "domain",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "used_by",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Сущность runtime health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"WorkerHealth",
|
||||
"WorkerStatus",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "domain.runtime_health",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"summary_text": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/logic/telegram-notification-loop.md",
|
||||
"title": "Цикл отправки уведомлений в Telegram",
|
||||
"content": "`TelegramNotifyWorker` после старта runtime запускает отдельный поток, сразу делает первую попытку отправки сообщения и затем повторяет отправку через заданный интервал. При ошибках доставки или отсутствии credentials worker не останавливает сервис, а переводит собственное состояние в `degraded`. Этот workflow определяет основной полезный цикл приложения.",
|
||||
"metadata": {
|
||||
"name": "telegram_notification_loop",
|
||||
"tags": [
|
||||
"logic",
|
||||
"telegram",
|
||||
"worker",
|
||||
"scheduling"
|
||||
],
|
||||
"type": "logic_block",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Цикл отправки уведомлений в Telegram",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "0f62f9b4dab261ca4ca34575ff5d84411a22c90b780c52eda388782b94f08470",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramSendService",
|
||||
"WorkerHealth",
|
||||
"WorkerStatus"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "logic.telegram_notification_loop",
|
||||
"source_path": "docs/documentation/logic/telegram-notification-loop.md",
|
||||
"summary_text": "`TelegramNotifyWorker` после старта runtime запускает отдельный поток, сразу делает первую попытку отправки сообщения и затем повторяет отправку через заданный интервал. При ошибках доставки или отсутствии credentials worker не останавливает сервис, а переводит собственное состояние в `degraded`. Этот workflow определяет основной полезный цикл приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"title": "HTTP API /send",
|
||||
"content": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"metadata": {
|
||||
"name": "send_message_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"telegram",
|
||||
"manual-send"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /send",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "5fbf2e33510b0676a3a53b957a4569bd3c2c31fb7719546602c573421ccaa32d",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlAppFactory",
|
||||
"TelegramSendService",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.send_message_endpoint",
|
||||
"source_path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"summary_text": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [
|
||||
{
|
||||
"layer": "D2_FACT_INDEX",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:workflow_step",
|
||||
"content": "api.control_actions_endpoint workflow_step HTTP control plane запущен.",
|
||||
"metadata": {
|
||||
"tags": [],
|
||||
"owner": null,
|
||||
"anchor": "Сценарий",
|
||||
"doc_id": null,
|
||||
"object": "HTTP control plane запущен.",
|
||||
"fact_id": "b480201013a7e5231146f665773ebc54af37c28135f407c6b758304c74561645",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"predicate": "workflow_step",
|
||||
"object_ref": null,
|
||||
"subject_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D2_FACT_INDEX",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:mentions_entity",
|
||||
"content": "api.control_actions_endpoint mentions_entity ControlActionSet",
|
||||
"metadata": {
|
||||
"tags": [],
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.entities",
|
||||
"doc_id": null,
|
||||
"object": "ControlActionSet",
|
||||
"fact_id": "bafb867ffed41c9db637df98d6cd5f6722d7747bbebc6c03e6f0d0caf3b7f9f3",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"predicate": "mentions_entity",
|
||||
"object_ref": null,
|
||||
"subject_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"relations": [
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:parent",
|
||||
"content": "api.control_actions_endpoint parent architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.parent",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "afec31fd062e392dcd9699a92c7ab61fd4b1273c1a2b16702b23d55d8d0c47ac",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "parent",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:related_api",
|
||||
"content": "api.control_actions_endpoint related_api api.health_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "api.health_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "711fb2edb82dd222deaba3c91768b18cbbd453009235823282813c6e867dc2c1",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_api",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:related_logic",
|
||||
"content": "api.control_actions_endpoint related_logic logic.telegram_notification_loop",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "logic.telegram_notification_loop",
|
||||
"doc_version": null,
|
||||
"relation_id": "eec79f7a02b804337e791ef231784862ae26e0599eb20224790e9d4f085fa9c0",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_logic",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:part_of",
|
||||
"content": "api.control_actions_endpoint part_of architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "5f4909bde905cd3d294ad307074a05e4ae4deefcafe6272cd2d0436e73acb8dd",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "part_of",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "architecture.telegram_notify_app:child",
|
||||
"content": "architecture.telegram_notify_app child api.control_actions_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.children",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"source_id": "architecture.telegram_notify_app",
|
||||
"target_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "ae34fe4b3cd2b47632b13b1e32303e842b57948aa21160abe8d9b478995e1d74",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "child",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "architecture.telegram_notify_app:related_api",
|
||||
"content": "architecture.telegram_notify_app related_api api.control_actions_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"source_id": "architecture.telegram_notify_app",
|
||||
"target_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "02530527e6e1d1e23316c9d25d0b30658d6c70063eb6e1d732d55c5ba29c9795",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_api",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Роль TelegramControlChannel в системе
|
||||
- intent: DOCUMENTATION_EXPLAIN
|
||||
- sub_intent: COMPONENT_EXPLAIN
|
||||
- documents: 6 | samples: HTTP API /actions/{action}, Архитектура Telegram Notify App, Readme
|
||||
- facts: 2 | samples: api.control_actions_endpoint:workflow_step, api.control_actions_endpoint:mentions_entity
|
||||
- relations: 6 | samples: api.control_actions_endpoint:parent, api.control_actions_endpoint:related_api, api.control_actions_endpoint:related_logic
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "v3-component-runtime-manager-1",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "pre_llm",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 20,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [
|
||||
"RuntimeManager"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Что делает RuntimeManager?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Что делает RuntimeManager?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Что делает RuntimeManager?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Что делает RuntimeManager?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 21490,
|
||||
"tokens_in_estimate": 5471
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+900
@@ -0,0 +1,900 @@
|
||||
# v3-component-runtime-manager-1
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: pre_llm
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
Что делает RuntimeManager?
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 20,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [
|
||||
"RuntimeManager"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что делает RuntimeManager?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Что делает RuntimeManager?"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что делает RuntimeManager?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что делает RuntimeManager?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 21490,
|
||||
"tokens_in_estimate": 5471
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"layers_used": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 6,
|
||||
"facts_found": 2,
|
||||
"relations_found": 6,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "none",
|
||||
"matched_anchor_value": null,
|
||||
"exact_anchor_match": false,
|
||||
"docs_layers_requested": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop"
|
||||
]
|
||||
},
|
||||
"D2_FACT_INDEX": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"b480201013a7e5231146f665773ebc54af37c28135f407c6b758304c74561645",
|
||||
"b8e44c3adb74aaa6c91ae8815fa091289e58dd3990a3a1b63e850c62075aea75",
|
||||
"bafb867ffed41c9db637df98d6cd5f6722d7747bbebc6c03e6f0d0caf3b7f9f3",
|
||||
"54bbcbac242f1c85ec3280236ed5841998a8a3a548ff16cbf0b5acafbff469e3",
|
||||
"b6bfad59b3bf00f199b5ef90c1208af19664de700413e7354468a93a4abaaa2f"
|
||||
]
|
||||
},
|
||||
"D5_RELATION_GRAPH": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"afec31fd062e392dcd9699a92c7ab61fd4b1273c1a2b16702b23d55d8d0c47ac",
|
||||
"711fb2edb82dd222deaba3c91768b18cbbd453009235823282813c6e867dc2c1",
|
||||
"eec79f7a02b804337e791ef231784862ae26e0599eb20224790e9d4f085fa9c0",
|
||||
"5f4909bde905cd3d294ad307074a05e4ae4deefcafe6272cd2d0436e73acb8dd",
|
||||
"ae34fe4b3cd2b47632b13b1e32303e842b57948aa21160abe8d9b478995e1d74"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [
|
||||
"RuntimeManager"
|
||||
],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [
|
||||
"RuntimeManager"
|
||||
],
|
||||
"resolved_anchor_candidates": [
|
||||
"api.control_actions_endpoint",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"logic.telegram_notification_loop",
|
||||
"docs/documentation/logic/telegram-notification-loop.md",
|
||||
"api.send_message_endpoint",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"docs/README.md",
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"docs/documentation/logic/telegram-notification-loop.md",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"HTTP API /actions/{action}",
|
||||
"Архитектура Telegram Notify App",
|
||||
"Readme",
|
||||
"Сущность runtime health",
|
||||
"Цикл отправки уведомлений в Telegram",
|
||||
"HTTP API /send",
|
||||
"api.control_actions_endpoint:workflow_step",
|
||||
"api.control_actions_endpoint:mentions_entity",
|
||||
"api.control_actions_endpoint:parent",
|
||||
"api.control_actions_endpoint:related_api",
|
||||
"api.control_actions_endpoint:related_logic",
|
||||
"api.control_actions_endpoint:part_of",
|
||||
"architecture.telegram_notify_app:child",
|
||||
"architecture.telegram_notify_app:related_api",
|
||||
"api.control_actions_endpoint:Функциональные требования",
|
||||
"api.control_actions_endpoint:Нефункциональные требования",
|
||||
"api.control_actions_endpoint:Сценарий",
|
||||
"api.control_actions_endpoint:Summary",
|
||||
"api.control_actions_endpoint:Описание",
|
||||
"api.control_actions_endpoint:Входные параметры"
|
||||
],
|
||||
"relation_hits_count": 6,
|
||||
"relation_targets": [
|
||||
"api.control_actions_endpoint:parent",
|
||||
"api.control_actions_endpoint:related_api",
|
||||
"api.control_actions_endpoint:related_logic",
|
||||
"api.control_actions_endpoint:part_of",
|
||||
"architecture.telegram_notify_app:child",
|
||||
"architecture.telegram_notify_app:related_api"
|
||||
],
|
||||
"fallback_doc_hits_count": 12,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 2,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 6,
|
||||
"facts": 2,
|
||||
"relations": 6,
|
||||
"chunks": 6,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "evidence_sufficient",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_explain_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 393,
|
||||
"user_chars": 21490,
|
||||
"tokens_in_estimate": 5471
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты объясняешь документацию системы.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные факты
|
||||
- Не додумывай
|
||||
- Если данных недостаточно, скажи это явно
|
||||
- Объясняй структурировано
|
||||
|
||||
Формат ответа:
|
||||
1. Краткое описание
|
||||
2. Основные элементы
|
||||
3. Как это работает
|
||||
4. Связи с другими частями системы (если есть)
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Что делает RuntimeManager?",
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"content": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"metadata": {
|
||||
"name": "control_actions_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"control-plane",
|
||||
"lifecycle"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"ControlActionSet",
|
||||
"JSONResponse"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.control_actions_endpoint",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"summary_text": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"content": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"metadata": {
|
||||
"name": "telegram_notify_app_overview",
|
||||
"tags": [
|
||||
"architecture",
|
||||
"telegram",
|
||||
"plba",
|
||||
"runtime"
|
||||
],
|
||||
"type": "architecture_overview",
|
||||
"layer": "system",
|
||||
"links": [
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "docs_root",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"children": [
|
||||
"api.health_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"doc_kind": "spec",
|
||||
"entities": [
|
||||
"TelegramNotifyModule",
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramControlChannel",
|
||||
"TelegramSendService",
|
||||
"RuntimeManager"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "architecture.telegram_notify_app",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"summary_text": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/README.md",
|
||||
"title": "Readme",
|
||||
"content": "Readme",
|
||||
"metadata": {
|
||||
"name": "",
|
||||
"tags": [],
|
||||
"type": "",
|
||||
"layer": "",
|
||||
"links": [],
|
||||
"owner": null,
|
||||
"title": "Readme",
|
||||
"doc_id": null,
|
||||
"module": "",
|
||||
"parent": null,
|
||||
"status": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "81d952f1a6ea85b76f75e0e57f33b8fa4b2bf3cb7db11b91b90171aeedd655a6",
|
||||
"children": [],
|
||||
"doc_kind": "readme",
|
||||
"entities": [],
|
||||
"updated_at": null,
|
||||
"doc_version": null,
|
||||
"document_id": "docs/README.md",
|
||||
"source_path": "docs/README.md",
|
||||
"summary_text": "",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "Сущность runtime health",
|
||||
"content": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"metadata": {
|
||||
"name": "runtime_health",
|
||||
"tags": [
|
||||
"domain",
|
||||
"health",
|
||||
"observability"
|
||||
],
|
||||
"type": "domain_entity",
|
||||
"layer": "domain",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "used_by",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Сущность runtime health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"WorkerHealth",
|
||||
"WorkerStatus",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "domain.runtime_health",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"summary_text": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/logic/telegram-notification-loop.md",
|
||||
"title": "Цикл отправки уведомлений в Telegram",
|
||||
"content": "`TelegramNotifyWorker` после старта runtime запускает отдельный поток, сразу делает первую попытку отправки сообщения и затем повторяет отправку через заданный интервал. При ошибках доставки или отсутствии credentials worker не останавливает сервис, а переводит собственное состояние в `degraded`. Этот workflow определяет основной полезный цикл приложения.",
|
||||
"metadata": {
|
||||
"name": "telegram_notification_loop",
|
||||
"tags": [
|
||||
"logic",
|
||||
"telegram",
|
||||
"worker",
|
||||
"scheduling"
|
||||
],
|
||||
"type": "logic_block",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Цикл отправки уведомлений в Telegram",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "0f62f9b4dab261ca4ca34575ff5d84411a22c90b780c52eda388782b94f08470",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramSendService",
|
||||
"WorkerHealth",
|
||||
"WorkerStatus"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "logic.telegram_notification_loop",
|
||||
"source_path": "docs/documentation/logic/telegram-notification-loop.md",
|
||||
"summary_text": "`TelegramNotifyWorker` после старта runtime запускает отдельный поток, сразу делает первую попытку отправки сообщения и затем повторяет отправку через заданный интервал. При ошибках доставки или отсутствии credentials worker не останавливает сервис, а переводит собственное состояние в `degraded`. Этот workflow определяет основной полезный цикл приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"title": "HTTP API /send",
|
||||
"content": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"metadata": {
|
||||
"name": "send_message_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"telegram",
|
||||
"manual-send"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /send",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "5fbf2e33510b0676a3a53b957a4569bd3c2c31fb7719546602c573421ccaa32d",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlAppFactory",
|
||||
"TelegramSendService",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.send_message_endpoint",
|
||||
"source_path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"summary_text": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [
|
||||
{
|
||||
"layer": "D2_FACT_INDEX",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:workflow_step",
|
||||
"content": "api.control_actions_endpoint workflow_step HTTP control plane запущен.",
|
||||
"metadata": {
|
||||
"tags": [],
|
||||
"owner": null,
|
||||
"anchor": "Сценарий",
|
||||
"doc_id": null,
|
||||
"object": "HTTP control plane запущен.",
|
||||
"fact_id": "b480201013a7e5231146f665773ebc54af37c28135f407c6b758304c74561645",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"predicate": "workflow_step",
|
||||
"object_ref": null,
|
||||
"subject_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D2_FACT_INDEX",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:mentions_entity",
|
||||
"content": "api.control_actions_endpoint mentions_entity ControlActionSet",
|
||||
"metadata": {
|
||||
"tags": [],
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.entities",
|
||||
"doc_id": null,
|
||||
"object": "ControlActionSet",
|
||||
"fact_id": "bafb867ffed41c9db637df98d6cd5f6722d7747bbebc6c03e6f0d0caf3b7f9f3",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"predicate": "mentions_entity",
|
||||
"object_ref": null,
|
||||
"subject_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"relations": [
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:parent",
|
||||
"content": "api.control_actions_endpoint parent architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.parent",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "afec31fd062e392dcd9699a92c7ab61fd4b1273c1a2b16702b23d55d8d0c47ac",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "parent",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:related_api",
|
||||
"content": "api.control_actions_endpoint related_api api.health_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "api.health_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "711fb2edb82dd222deaba3c91768b18cbbd453009235823282813c6e867dc2c1",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_api",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:related_logic",
|
||||
"content": "api.control_actions_endpoint related_logic logic.telegram_notification_loop",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "logic.telegram_notification_loop",
|
||||
"doc_version": null,
|
||||
"relation_id": "eec79f7a02b804337e791ef231784862ae26e0599eb20224790e9d4f085fa9c0",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_logic",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:part_of",
|
||||
"content": "api.control_actions_endpoint part_of architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "5f4909bde905cd3d294ad307074a05e4ae4deefcafe6272cd2d0436e73acb8dd",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "part_of",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "architecture.telegram_notify_app:child",
|
||||
"content": "architecture.telegram_notify_app child api.control_actions_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.children",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"source_id": "architecture.telegram_notify_app",
|
||||
"target_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "ae34fe4b3cd2b47632b13b1e32303e842b57948aa21160abe8d9b478995e1d74",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "child",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "architecture.telegram_notify_app:related_api",
|
||||
"content": "architecture.telegram_notify_app related_api api.control_actions_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"source_id": "architecture.telegram_notify_app",
|
||||
"target_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "02530527e6e1d1e23316c9d25d0b30658d6c70063eb6e1d732d55c5ba29c9795",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_api",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Что делает RuntimeManager?
|
||||
- intent: DOCUMENTATION_EXPLAIN
|
||||
- sub_intent: COMPONENT_EXPLAIN
|
||||
- documents: 6 | samples: HTTP API /actions/{action}, Архитектура Telegram Notify App, Readme
|
||||
- facts: 2 | samples: api.control_actions_endpoint:workflow_step, api.control_actions_endpoint:mentions_entity
|
||||
- relations: 6 | samples: api.control_actions_endpoint:parent, api.control_actions_endpoint:related_api, api.control_actions_endpoint:related_logic
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "v3-component-runtime-manager-2",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "pre_llm",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 20,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [
|
||||
"RuntimeManager"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Как устроен RuntimeManager?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Как устроен RuntimeManager?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Как устроен RuntimeManager?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Как устроен RuntimeManager?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 21491,
|
||||
"tokens_in_estimate": 5471
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+900
@@ -0,0 +1,900 @@
|
||||
# v3-component-runtime-manager-2
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: pre_llm
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
Как устроен RuntimeManager?
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 20,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [
|
||||
"RuntimeManager"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Как устроен RuntimeManager?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Как устроен RuntimeManager?"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Как устроен RuntimeManager?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Как устроен RuntimeManager?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 21491,
|
||||
"tokens_in_estimate": 5471
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"layers_used": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 6,
|
||||
"facts_found": 2,
|
||||
"relations_found": 6,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "none",
|
||||
"matched_anchor_value": null,
|
||||
"exact_anchor_match": false,
|
||||
"docs_layers_requested": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop"
|
||||
]
|
||||
},
|
||||
"D2_FACT_INDEX": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"b480201013a7e5231146f665773ebc54af37c28135f407c6b758304c74561645",
|
||||
"b8e44c3adb74aaa6c91ae8815fa091289e58dd3990a3a1b63e850c62075aea75",
|
||||
"bafb867ffed41c9db637df98d6cd5f6722d7747bbebc6c03e6f0d0caf3b7f9f3",
|
||||
"54bbcbac242f1c85ec3280236ed5841998a8a3a548ff16cbf0b5acafbff469e3",
|
||||
"b6bfad59b3bf00f199b5ef90c1208af19664de700413e7354468a93a4abaaa2f"
|
||||
]
|
||||
},
|
||||
"D5_RELATION_GRAPH": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"afec31fd062e392dcd9699a92c7ab61fd4b1273c1a2b16702b23d55d8d0c47ac",
|
||||
"711fb2edb82dd222deaba3c91768b18cbbd453009235823282813c6e867dc2c1",
|
||||
"eec79f7a02b804337e791ef231784862ae26e0599eb20224790e9d4f085fa9c0",
|
||||
"5f4909bde905cd3d294ad307074a05e4ae4deefcafe6272cd2d0436e73acb8dd",
|
||||
"ae34fe4b3cd2b47632b13b1e32303e842b57948aa21160abe8d9b478995e1d74"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [
|
||||
"RuntimeManager"
|
||||
],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [
|
||||
"RuntimeManager"
|
||||
],
|
||||
"resolved_anchor_candidates": [
|
||||
"api.control_actions_endpoint",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"logic.telegram_notification_loop",
|
||||
"docs/documentation/logic/telegram-notification-loop.md",
|
||||
"api.send_message_endpoint",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"docs/README.md",
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"docs/documentation/logic/telegram-notification-loop.md",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"HTTP API /actions/{action}",
|
||||
"Архитектура Telegram Notify App",
|
||||
"Readme",
|
||||
"Сущность runtime health",
|
||||
"Цикл отправки уведомлений в Telegram",
|
||||
"HTTP API /send",
|
||||
"api.control_actions_endpoint:workflow_step",
|
||||
"api.control_actions_endpoint:mentions_entity",
|
||||
"api.control_actions_endpoint:parent",
|
||||
"api.control_actions_endpoint:related_api",
|
||||
"api.control_actions_endpoint:related_logic",
|
||||
"api.control_actions_endpoint:part_of",
|
||||
"architecture.telegram_notify_app:child",
|
||||
"architecture.telegram_notify_app:related_api",
|
||||
"api.control_actions_endpoint:Функциональные требования",
|
||||
"api.control_actions_endpoint:Нефункциональные требования",
|
||||
"api.control_actions_endpoint:Сценарий",
|
||||
"api.control_actions_endpoint:Summary",
|
||||
"api.control_actions_endpoint:Описание",
|
||||
"api.control_actions_endpoint:Входные параметры"
|
||||
],
|
||||
"relation_hits_count": 6,
|
||||
"relation_targets": [
|
||||
"api.control_actions_endpoint:parent",
|
||||
"api.control_actions_endpoint:related_api",
|
||||
"api.control_actions_endpoint:related_logic",
|
||||
"api.control_actions_endpoint:part_of",
|
||||
"architecture.telegram_notify_app:child",
|
||||
"architecture.telegram_notify_app:related_api"
|
||||
],
|
||||
"fallback_doc_hits_count": 12,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 2,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 6,
|
||||
"facts": 2,
|
||||
"relations": 6,
|
||||
"chunks": 6,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "evidence_sufficient",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_explain_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 393,
|
||||
"user_chars": 21491,
|
||||
"tokens_in_estimate": 5471
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты объясняешь документацию системы.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные факты
|
||||
- Не додумывай
|
||||
- Если данных недостаточно, скажи это явно
|
||||
- Объясняй структурировано
|
||||
|
||||
Формат ответа:
|
||||
1. Краткое описание
|
||||
2. Основные элементы
|
||||
3. Как это работает
|
||||
4. Связи с другими частями системы (если есть)
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Как устроен RuntimeManager?",
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"content": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"metadata": {
|
||||
"name": "control_actions_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"control-plane",
|
||||
"lifecycle"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"ControlActionSet",
|
||||
"JSONResponse"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.control_actions_endpoint",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"summary_text": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"content": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"metadata": {
|
||||
"name": "telegram_notify_app_overview",
|
||||
"tags": [
|
||||
"architecture",
|
||||
"telegram",
|
||||
"plba",
|
||||
"runtime"
|
||||
],
|
||||
"type": "architecture_overview",
|
||||
"layer": "system",
|
||||
"links": [
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "docs_root",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"children": [
|
||||
"api.health_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"doc_kind": "spec",
|
||||
"entities": [
|
||||
"TelegramNotifyModule",
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramControlChannel",
|
||||
"TelegramSendService",
|
||||
"RuntimeManager"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "architecture.telegram_notify_app",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"summary_text": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/README.md",
|
||||
"title": "Readme",
|
||||
"content": "Readme",
|
||||
"metadata": {
|
||||
"name": "",
|
||||
"tags": [],
|
||||
"type": "",
|
||||
"layer": "",
|
||||
"links": [],
|
||||
"owner": null,
|
||||
"title": "Readme",
|
||||
"doc_id": null,
|
||||
"module": "",
|
||||
"parent": null,
|
||||
"status": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "81d952f1a6ea85b76f75e0e57f33b8fa4b2bf3cb7db11b91b90171aeedd655a6",
|
||||
"children": [],
|
||||
"doc_kind": "readme",
|
||||
"entities": [],
|
||||
"updated_at": null,
|
||||
"doc_version": null,
|
||||
"document_id": "docs/README.md",
|
||||
"source_path": "docs/README.md",
|
||||
"summary_text": "",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "Сущность runtime health",
|
||||
"content": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"metadata": {
|
||||
"name": "runtime_health",
|
||||
"tags": [
|
||||
"domain",
|
||||
"health",
|
||||
"observability"
|
||||
],
|
||||
"type": "domain_entity",
|
||||
"layer": "domain",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "used_by",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Сущность runtime health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"WorkerHealth",
|
||||
"WorkerStatus",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "domain.runtime_health",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"summary_text": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/logic/telegram-notification-loop.md",
|
||||
"title": "Цикл отправки уведомлений в Telegram",
|
||||
"content": "`TelegramNotifyWorker` после старта runtime запускает отдельный поток, сразу делает первую попытку отправки сообщения и затем повторяет отправку через заданный интервал. При ошибках доставки или отсутствии credentials worker не останавливает сервис, а переводит собственное состояние в `degraded`. Этот workflow определяет основной полезный цикл приложения.",
|
||||
"metadata": {
|
||||
"name": "telegram_notification_loop",
|
||||
"tags": [
|
||||
"logic",
|
||||
"telegram",
|
||||
"worker",
|
||||
"scheduling"
|
||||
],
|
||||
"type": "logic_block",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Цикл отправки уведомлений в Telegram",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "0f62f9b4dab261ca4ca34575ff5d84411a22c90b780c52eda388782b94f08470",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramSendService",
|
||||
"WorkerHealth",
|
||||
"WorkerStatus"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "logic.telegram_notification_loop",
|
||||
"source_path": "docs/documentation/logic/telegram-notification-loop.md",
|
||||
"summary_text": "`TelegramNotifyWorker` после старта runtime запускает отдельный поток, сразу делает первую попытку отправки сообщения и затем повторяет отправку через заданный интервал. При ошибках доставки или отсутствии credentials worker не останавливает сервис, а переводит собственное состояние в `degraded`. Этот workflow определяет основной полезный цикл приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"title": "HTTP API /send",
|
||||
"content": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"metadata": {
|
||||
"name": "send_message_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"telegram",
|
||||
"manual-send"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /send",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "5fbf2e33510b0676a3a53b957a4569bd3c2c31fb7719546602c573421ccaa32d",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlAppFactory",
|
||||
"TelegramSendService",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.send_message_endpoint",
|
||||
"source_path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"summary_text": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [
|
||||
{
|
||||
"layer": "D2_FACT_INDEX",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:workflow_step",
|
||||
"content": "api.control_actions_endpoint workflow_step HTTP control plane запущен.",
|
||||
"metadata": {
|
||||
"tags": [],
|
||||
"owner": null,
|
||||
"anchor": "Сценарий",
|
||||
"doc_id": null,
|
||||
"object": "HTTP control plane запущен.",
|
||||
"fact_id": "b480201013a7e5231146f665773ebc54af37c28135f407c6b758304c74561645",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"predicate": "workflow_step",
|
||||
"object_ref": null,
|
||||
"subject_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D2_FACT_INDEX",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:mentions_entity",
|
||||
"content": "api.control_actions_endpoint mentions_entity ControlActionSet",
|
||||
"metadata": {
|
||||
"tags": [],
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.entities",
|
||||
"doc_id": null,
|
||||
"object": "ControlActionSet",
|
||||
"fact_id": "bafb867ffed41c9db637df98d6cd5f6722d7747bbebc6c03e6f0d0caf3b7f9f3",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"predicate": "mentions_entity",
|
||||
"object_ref": null,
|
||||
"subject_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"relations": [
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:parent",
|
||||
"content": "api.control_actions_endpoint parent architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.parent",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "afec31fd062e392dcd9699a92c7ab61fd4b1273c1a2b16702b23d55d8d0c47ac",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "parent",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:related_api",
|
||||
"content": "api.control_actions_endpoint related_api api.health_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "api.health_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "711fb2edb82dd222deaba3c91768b18cbbd453009235823282813c6e867dc2c1",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_api",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:related_logic",
|
||||
"content": "api.control_actions_endpoint related_logic logic.telegram_notification_loop",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "logic.telegram_notification_loop",
|
||||
"doc_version": null,
|
||||
"relation_id": "eec79f7a02b804337e791ef231784862ae26e0599eb20224790e9d4f085fa9c0",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_logic",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:part_of",
|
||||
"content": "api.control_actions_endpoint part_of architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "5f4909bde905cd3d294ad307074a05e4ae4deefcafe6272cd2d0436e73acb8dd",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "part_of",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "architecture.telegram_notify_app:child",
|
||||
"content": "architecture.telegram_notify_app child api.control_actions_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.children",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"source_id": "architecture.telegram_notify_app",
|
||||
"target_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "ae34fe4b3cd2b47632b13b1e32303e842b57948aa21160abe8d9b478995e1d74",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "child",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "architecture.telegram_notify_app:related_api",
|
||||
"content": "architecture.telegram_notify_app related_api api.control_actions_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"source_id": "architecture.telegram_notify_app",
|
||||
"target_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "02530527e6e1d1e23316c9d25d0b30658d6c70063eb6e1d732d55c5ba29c9795",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_api",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Как устроен RuntimeManager?
|
||||
- intent: DOCUMENTATION_EXPLAIN
|
||||
- sub_intent: COMPONENT_EXPLAIN
|
||||
- documents: 6 | samples: HTTP API /actions/{action}, Архитектура Telegram Notify App, Readme
|
||||
- facts: 2 | samples: api.control_actions_endpoint:workflow_step, api.control_actions_endpoint:mentions_entity
|
||||
- relations: 6 | samples: api.control_actions_endpoint:parent, api.control_actions_endpoint:related_api, api.control_actions_endpoint:related_logic
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "v3-component-runtime-manager-3",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "pre_llm",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 20,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [
|
||||
"RuntimeManager"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Опиши компонент RuntimeManager"
|
||||
},
|
||||
"output": {
|
||||
"query": "Опиши компонент RuntimeManager"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Опиши компонент RuntimeManager"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Опиши компонент RuntimeManager"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 21494,
|
||||
"tokens_in_estimate": 5472
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+900
@@ -0,0 +1,900 @@
|
||||
# v3-component-runtime-manager-3
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: pre_llm
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
Опиши компонент RuntimeManager
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 20,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [
|
||||
"RuntimeManager"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Опиши компонент RuntimeManager"
|
||||
},
|
||||
"output": {
|
||||
"query": "Опиши компонент RuntimeManager"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Опиши компонент RuntimeManager"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Опиши компонент RuntimeManager"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 21494,
|
||||
"tokens_in_estimate": 5472
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"layers_used": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 6,
|
||||
"facts_found": 2,
|
||||
"relations_found": 6,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "component",
|
||||
"matched_anchor_value": "RuntimeManager",
|
||||
"exact_anchor_match": false,
|
||||
"docs_layers_requested": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop"
|
||||
]
|
||||
},
|
||||
"D2_FACT_INDEX": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"b480201013a7e5231146f665773ebc54af37c28135f407c6b758304c74561645",
|
||||
"b8e44c3adb74aaa6c91ae8815fa091289e58dd3990a3a1b63e850c62075aea75",
|
||||
"bafb867ffed41c9db637df98d6cd5f6722d7747bbebc6c03e6f0d0caf3b7f9f3",
|
||||
"54bbcbac242f1c85ec3280236ed5841998a8a3a548ff16cbf0b5acafbff469e3",
|
||||
"b6bfad59b3bf00f199b5ef90c1208af19664de700413e7354468a93a4abaaa2f"
|
||||
]
|
||||
},
|
||||
"D5_RELATION_GRAPH": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"afec31fd062e392dcd9699a92c7ab61fd4b1273c1a2b16702b23d55d8d0c47ac",
|
||||
"711fb2edb82dd222deaba3c91768b18cbbd453009235823282813c6e867dc2c1",
|
||||
"eec79f7a02b804337e791ef231784862ae26e0599eb20224790e9d4f085fa9c0",
|
||||
"5f4909bde905cd3d294ad307074a05e4ae4deefcafe6272cd2d0436e73acb8dd",
|
||||
"ae34fe4b3cd2b47632b13b1e32303e842b57948aa21160abe8d9b478995e1d74"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [
|
||||
"RuntimeManager"
|
||||
],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [
|
||||
"RuntimeManager"
|
||||
],
|
||||
"resolved_anchor_candidates": [
|
||||
"api.control_actions_endpoint",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"logic.telegram_notification_loop",
|
||||
"docs/documentation/logic/telegram-notification-loop.md",
|
||||
"api.send_message_endpoint",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"docs/README.md",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"docs/README.md",
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"docs/documentation/logic/telegram-notification-loop.md",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"HTTP API /actions/{action}",
|
||||
"Архитектура Telegram Notify App",
|
||||
"Readme",
|
||||
"Сущность runtime health",
|
||||
"Цикл отправки уведомлений в Telegram",
|
||||
"HTTP API /send",
|
||||
"api.control_actions_endpoint:workflow_step",
|
||||
"api.control_actions_endpoint:mentions_entity",
|
||||
"api.control_actions_endpoint:parent",
|
||||
"api.control_actions_endpoint:related_api",
|
||||
"api.control_actions_endpoint:related_logic",
|
||||
"api.control_actions_endpoint:part_of",
|
||||
"architecture.telegram_notify_app:child",
|
||||
"architecture.telegram_notify_app:related_api",
|
||||
"api.control_actions_endpoint:Функциональные требования",
|
||||
"api.control_actions_endpoint:Нефункциональные требования",
|
||||
"api.control_actions_endpoint:Сценарий",
|
||||
"api.control_actions_endpoint:Summary",
|
||||
"api.control_actions_endpoint:Описание",
|
||||
"api.control_actions_endpoint:Входные параметры"
|
||||
],
|
||||
"relation_hits_count": 6,
|
||||
"relation_targets": [
|
||||
"api.control_actions_endpoint:parent",
|
||||
"api.control_actions_endpoint:related_api",
|
||||
"api.control_actions_endpoint:related_logic",
|
||||
"api.control_actions_endpoint:part_of",
|
||||
"architecture.telegram_notify_app:child",
|
||||
"architecture.telegram_notify_app:related_api"
|
||||
],
|
||||
"fallback_doc_hits_count": 12,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 2,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 6,
|
||||
"facts": 2,
|
||||
"relations": 6,
|
||||
"chunks": 6,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "evidence_sufficient",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_explain_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 393,
|
||||
"user_chars": 21494,
|
||||
"tokens_in_estimate": 5472
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты объясняешь документацию системы.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные факты
|
||||
- Не додумывай
|
||||
- Если данных недостаточно, скажи это явно
|
||||
- Объясняй структурировано
|
||||
|
||||
Формат ответа:
|
||||
1. Краткое описание
|
||||
2. Основные элементы
|
||||
3. Как это работает
|
||||
4. Связи с другими частями системы (если есть)
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Опиши компонент RuntimeManager",
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"content": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"metadata": {
|
||||
"name": "control_actions_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"control-plane",
|
||||
"lifecycle"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"ControlActionSet",
|
||||
"JSONResponse"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.control_actions_endpoint",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"summary_text": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"content": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"metadata": {
|
||||
"name": "telegram_notify_app_overview",
|
||||
"tags": [
|
||||
"architecture",
|
||||
"telegram",
|
||||
"plba",
|
||||
"runtime"
|
||||
],
|
||||
"type": "architecture_overview",
|
||||
"layer": "system",
|
||||
"links": [
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "docs_root",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"children": [
|
||||
"api.health_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"doc_kind": "spec",
|
||||
"entities": [
|
||||
"TelegramNotifyModule",
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramControlChannel",
|
||||
"TelegramSendService",
|
||||
"RuntimeManager"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "architecture.telegram_notify_app",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"summary_text": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/README.md",
|
||||
"title": "Readme",
|
||||
"content": "Readme",
|
||||
"metadata": {
|
||||
"name": "",
|
||||
"tags": [],
|
||||
"type": "",
|
||||
"layer": "",
|
||||
"links": [],
|
||||
"owner": null,
|
||||
"title": "Readme",
|
||||
"doc_id": null,
|
||||
"module": "",
|
||||
"parent": null,
|
||||
"status": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "81d952f1a6ea85b76f75e0e57f33b8fa4b2bf3cb7db11b91b90171aeedd655a6",
|
||||
"children": [],
|
||||
"doc_kind": "readme",
|
||||
"entities": [],
|
||||
"updated_at": null,
|
||||
"doc_version": null,
|
||||
"document_id": "docs/README.md",
|
||||
"source_path": "docs/README.md",
|
||||
"summary_text": "",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "Сущность runtime health",
|
||||
"content": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"metadata": {
|
||||
"name": "runtime_health",
|
||||
"tags": [
|
||||
"domain",
|
||||
"health",
|
||||
"observability"
|
||||
],
|
||||
"type": "domain_entity",
|
||||
"layer": "domain",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "used_by",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Сущность runtime health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"WorkerHealth",
|
||||
"WorkerStatus",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "domain.runtime_health",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"summary_text": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/logic/telegram-notification-loop.md",
|
||||
"title": "Цикл отправки уведомлений в Telegram",
|
||||
"content": "`TelegramNotifyWorker` после старта runtime запускает отдельный поток, сразу делает первую попытку отправки сообщения и затем повторяет отправку через заданный интервал. При ошибках доставки или отсутствии credentials worker не останавливает сервис, а переводит собственное состояние в `degraded`. Этот workflow определяет основной полезный цикл приложения.",
|
||||
"metadata": {
|
||||
"name": "telegram_notification_loop",
|
||||
"tags": [
|
||||
"logic",
|
||||
"telegram",
|
||||
"worker",
|
||||
"scheduling"
|
||||
],
|
||||
"type": "logic_block",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Цикл отправки уведомлений в Telegram",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "0f62f9b4dab261ca4ca34575ff5d84411a22c90b780c52eda388782b94f08470",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramSendService",
|
||||
"WorkerHealth",
|
||||
"WorkerStatus"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "logic.telegram_notification_loop",
|
||||
"source_path": "docs/documentation/logic/telegram-notification-loop.md",
|
||||
"summary_text": "`TelegramNotifyWorker` после старта runtime запускает отдельный поток, сразу делает первую попытку отправки сообщения и затем повторяет отправку через заданный интервал. При ошибках доставки или отсутствии credentials worker не останавливает сервис, а переводит собственное состояние в `degraded`. Этот workflow определяет основной полезный цикл приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"title": "HTTP API /send",
|
||||
"content": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"metadata": {
|
||||
"name": "send_message_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"telegram",
|
||||
"manual-send"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /send",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "5fbf2e33510b0676a3a53b957a4569bd3c2c31fb7719546602c573421ccaa32d",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlAppFactory",
|
||||
"TelegramSendService",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.send_message_endpoint",
|
||||
"source_path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"summary_text": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [
|
||||
{
|
||||
"layer": "D2_FACT_INDEX",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:workflow_step",
|
||||
"content": "api.control_actions_endpoint workflow_step HTTP control plane запущен.",
|
||||
"metadata": {
|
||||
"tags": [],
|
||||
"owner": null,
|
||||
"anchor": "Сценарий",
|
||||
"doc_id": null,
|
||||
"object": "HTTP control plane запущен.",
|
||||
"fact_id": "b480201013a7e5231146f665773ebc54af37c28135f407c6b758304c74561645",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"predicate": "workflow_step",
|
||||
"object_ref": null,
|
||||
"subject_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D2_FACT_INDEX",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:mentions_entity",
|
||||
"content": "api.control_actions_endpoint mentions_entity ControlActionSet",
|
||||
"metadata": {
|
||||
"tags": [],
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.entities",
|
||||
"doc_id": null,
|
||||
"object": "ControlActionSet",
|
||||
"fact_id": "bafb867ffed41c9db637df98d6cd5f6722d7747bbebc6c03e6f0d0caf3b7f9f3",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"predicate": "mentions_entity",
|
||||
"object_ref": null,
|
||||
"subject_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"relations": [
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:parent",
|
||||
"content": "api.control_actions_endpoint parent architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.parent",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "afec31fd062e392dcd9699a92c7ab61fd4b1273c1a2b16702b23d55d8d0c47ac",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "parent",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:related_api",
|
||||
"content": "api.control_actions_endpoint related_api api.health_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "api.health_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "711fb2edb82dd222deaba3c91768b18cbbd453009235823282813c6e867dc2c1",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_api",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:related_logic",
|
||||
"content": "api.control_actions_endpoint related_logic logic.telegram_notification_loop",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "logic.telegram_notification_loop",
|
||||
"doc_version": null,
|
||||
"relation_id": "eec79f7a02b804337e791ef231784862ae26e0599eb20224790e9d4f085fa9c0",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_logic",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:part_of",
|
||||
"content": "api.control_actions_endpoint part_of architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "5f4909bde905cd3d294ad307074a05e4ae4deefcafe6272cd2d0436e73acb8dd",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "part_of",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "architecture.telegram_notify_app:child",
|
||||
"content": "architecture.telegram_notify_app child api.control_actions_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.children",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"source_id": "architecture.telegram_notify_app",
|
||||
"target_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "ae34fe4b3cd2b47632b13b1e32303e842b57948aa21160abe8d9b478995e1d74",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "child",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "architecture.telegram_notify_app:related_api",
|
||||
"content": "architecture.telegram_notify_app related_api api.control_actions_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"source_id": "architecture.telegram_notify_app",
|
||||
"target_id": "api.control_actions_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "02530527e6e1d1e23316c9d25d0b30658d6c70063eb6e1d732d55c5ba29c9795",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_api",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Опиши компонент RuntimeManager
|
||||
- intent: DOCUMENTATION_EXPLAIN
|
||||
- sub_intent: COMPONENT_EXPLAIN
|
||||
- documents: 6 | samples: HTTP API /actions/{action}, Архитектура Telegram Notify App, Readme
|
||||
- facts: 2 | samples: api.control_actions_endpoint:workflow_step, api.control_actions_endpoint:mentions_entity
|
||||
- relations: 6 | samples: api.control_actions_endpoint:parent, api.control_actions_endpoint:related_api, api.control_actions_endpoint:related_logic
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "v3-entity-runtime-health-1",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "pre_llm",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 26,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.health_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [
|
||||
"runtime health"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Что такое runtime health?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Что такое runtime health?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Что такое runtime health?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Что такое runtime health?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 20267,
|
||||
"tokens_in_estimate": 5165
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+865
@@ -0,0 +1,865 @@
|
||||
# v3-entity-runtime-health-1
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: pre_llm
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
Что такое runtime health?
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 26,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.health_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [
|
||||
"runtime health"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что такое runtime health?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Что такое runtime health?"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что такое runtime health?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что такое runtime health?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 20267,
|
||||
"tokens_in_estimate": 5165
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"layers_used": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 6,
|
||||
"facts_found": 0,
|
||||
"relations_found": 6,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "none",
|
||||
"matched_anchor_value": null,
|
||||
"exact_anchor_match": false,
|
||||
"docs_layers_requested": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D3_ENTITY_CATALOG": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"api.health_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"domain.runtime_health"
|
||||
]
|
||||
},
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"domain.runtime_health",
|
||||
"api.health_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.control_actions_endpoint",
|
||||
"architecture.telegram_notify_app"
|
||||
]
|
||||
},
|
||||
"D5_RELATION_GRAPH": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"79bdb0a74713df6064008179ca8c5c186dc23e4e1c5e2c9607b0bdddeba50f93",
|
||||
"af2a4f7c1b677b908410ba720915405e10dbd0870e30a3c6e3aa2468550ddf0e",
|
||||
"77f5d358ab85b3d92018b6b51da7c39773148dfd346686e8832a45370c841160",
|
||||
"c718b1939621233295ccaf6e8203e7fd94f3dd1bfb88f10c51bc5e33d53a24aa",
|
||||
"616f5cbf25da83cb51d8d0741a7fc351620c9ca2c6513fa2094b4aa476f0912a"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"api.health_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [
|
||||
"runtime health"
|
||||
],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [],
|
||||
"resolved_anchor_candidates": [
|
||||
"api.health_endpoint",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"domain.runtime_health",
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"logic.telegram_notification_loop",
|
||||
"docs/documentation/logic/telegram-notification-loop.md",
|
||||
"api.control_actions_endpoint",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"api.send_message_endpoint",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"api.health_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"docs/documentation/logic/telegram-notification-loop.md",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"RuntimeManager",
|
||||
"WorkerStatus",
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramControlChannel",
|
||||
"WorkerHealth",
|
||||
"Сущность runtime health",
|
||||
"HTTP API /health",
|
||||
"Цикл отправки уведомлений в Telegram",
|
||||
"HTTP API /actions/{action}",
|
||||
"Архитектура Telegram Notify App",
|
||||
"HTTP API /send",
|
||||
"domain.runtime_health:parent",
|
||||
"domain.runtime_health:part_of",
|
||||
"api.health_endpoint:depends_on",
|
||||
"api.health_endpoint:parent",
|
||||
"api.health_endpoint:part_of",
|
||||
"domain.runtime_health:used_by",
|
||||
"api.health_endpoint:Сценарий",
|
||||
"api.health_endpoint:Нефункциональные требования",
|
||||
"api.health_endpoint:Summary",
|
||||
"api.health_endpoint:Описание",
|
||||
"api.health_endpoint:Функциональные требования",
|
||||
"api.health_endpoint:Входные параметры"
|
||||
],
|
||||
"relation_hits_count": 6,
|
||||
"relation_targets": [
|
||||
"domain.runtime_health:parent",
|
||||
"domain.runtime_health:part_of",
|
||||
"api.health_endpoint:depends_on",
|
||||
"api.health_endpoint:parent",
|
||||
"api.health_endpoint:part_of",
|
||||
"domain.runtime_health:used_by"
|
||||
],
|
||||
"fallback_doc_hits_count": 12,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 0,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 6,
|
||||
"facts": 0,
|
||||
"relations": 6,
|
||||
"chunks": 6,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "evidence_sufficient",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_explain_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 393,
|
||||
"user_chars": 20267,
|
||||
"tokens_in_estimate": 5165
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты объясняешь документацию системы.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные факты
|
||||
- Не додумывай
|
||||
- Если данных недостаточно, скажи это явно
|
||||
- Объясняй структурировано
|
||||
|
||||
Формат ответа:
|
||||
1. Краткое описание
|
||||
2. Основные элементы
|
||||
3. Как это работает
|
||||
4. Связи с другими частями системы (если есть)
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Что такое runtime health?",
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "Сущность runtime health",
|
||||
"content": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"metadata": {
|
||||
"name": "runtime_health",
|
||||
"tags": [
|
||||
"domain",
|
||||
"health",
|
||||
"observability"
|
||||
],
|
||||
"type": "domain_entity",
|
||||
"layer": "domain",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "used_by",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Сущность runtime health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"WorkerHealth",
|
||||
"WorkerStatus",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "domain.runtime_health",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"summary_text": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "HTTP API /health",
|
||||
"content": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"metadata": {
|
||||
"name": "health_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"health",
|
||||
"control-plane"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"TelegramNotifyWorker",
|
||||
"RuntimeManager",
|
||||
"WorkerHealth"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.health_endpoint",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"summary_text": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/logic/telegram-notification-loop.md",
|
||||
"title": "Цикл отправки уведомлений в Telegram",
|
||||
"content": "`TelegramNotifyWorker` после старта runtime запускает отдельный поток, сразу делает первую попытку отправки сообщения и затем повторяет отправку через заданный интервал. При ошибках доставки или отсутствии credentials worker не останавливает сервис, а переводит собственное состояние в `degraded`. Этот workflow определяет основной полезный цикл приложения.",
|
||||
"metadata": {
|
||||
"name": "telegram_notification_loop",
|
||||
"tags": [
|
||||
"logic",
|
||||
"telegram",
|
||||
"worker",
|
||||
"scheduling"
|
||||
],
|
||||
"type": "logic_block",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Цикл отправки уведомлений в Telegram",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "0f62f9b4dab261ca4ca34575ff5d84411a22c90b780c52eda388782b94f08470",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramSendService",
|
||||
"WorkerHealth",
|
||||
"WorkerStatus"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "logic.telegram_notification_loop",
|
||||
"source_path": "docs/documentation/logic/telegram-notification-loop.md",
|
||||
"summary_text": "`TelegramNotifyWorker` после старта runtime запускает отдельный поток, сразу делает первую попытку отправки сообщения и затем повторяет отправку через заданный интервал. При ошибках доставки или отсутствии credentials worker не останавливает сервис, а переводит собственное состояние в `degraded`. Этот workflow определяет основной полезный цикл приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"content": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"metadata": {
|
||||
"name": "control_actions_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"control-plane",
|
||||
"lifecycle"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"ControlActionSet",
|
||||
"JSONResponse"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.control_actions_endpoint",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"summary_text": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"content": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"metadata": {
|
||||
"name": "telegram_notify_app_overview",
|
||||
"tags": [
|
||||
"architecture",
|
||||
"telegram",
|
||||
"plba",
|
||||
"runtime"
|
||||
],
|
||||
"type": "architecture_overview",
|
||||
"layer": "system",
|
||||
"links": [
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "docs_root",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"children": [
|
||||
"api.health_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"doc_kind": "spec",
|
||||
"entities": [
|
||||
"TelegramNotifyModule",
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramControlChannel",
|
||||
"TelegramSendService",
|
||||
"RuntimeManager"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "architecture.telegram_notify_app",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"summary_text": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"title": "HTTP API /send",
|
||||
"content": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"metadata": {
|
||||
"name": "send_message_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"telegram",
|
||||
"manual-send"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /send",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "5fbf2e33510b0676a3a53b957a4569bd3c2c31fb7719546602c573421ccaa32d",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlAppFactory",
|
||||
"TelegramSendService",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.send_message_endpoint",
|
||||
"source_path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"summary_text": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [],
|
||||
"relations": [
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "domain.runtime_health:parent",
|
||||
"content": "domain.runtime_health parent architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.parent",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"source_id": "domain.runtime_health",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "79bdb0a74713df6064008179ca8c5c186dc23e4e1c5e2c9607b0bdddeba50f93",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "parent",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "domain.runtime_health:part_of",
|
||||
"content": "domain.runtime_health part_of architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"source_id": "domain.runtime_health",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "af2a4f7c1b677b908410ba720915405e10dbd0870e30a3c6e3aa2468550ddf0e",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "part_of",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "api.health_endpoint:depends_on",
|
||||
"content": "api.health_endpoint depends_on domain.runtime_health",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"source_id": "api.health_endpoint",
|
||||
"target_id": "domain.runtime_health",
|
||||
"doc_version": null,
|
||||
"relation_id": "77f5d358ab85b3d92018b6b51da7c39773148dfd346686e8832a45370c841160",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "depends_on",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "api.health_endpoint:parent",
|
||||
"content": "api.health_endpoint parent architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.parent",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"source_id": "api.health_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "c718b1939621233295ccaf6e8203e7fd94f3dd1bfb88f10c51bc5e33d53a24aa",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "parent",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "api.health_endpoint:part_of",
|
||||
"content": "api.health_endpoint part_of architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"source_id": "api.health_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "616f5cbf25da83cb51d8d0741a7fc351620c9ca2c6513fa2094b4aa476f0912a",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "part_of",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "domain.runtime_health:used_by",
|
||||
"content": "domain.runtime_health used_by api.health_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"source_id": "domain.runtime_health",
|
||||
"target_id": "api.health_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "801650f8bcbfbfbefd35c14447bfef7b3c3827313db790efa7faf47db860f8c4",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "used_by",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Что такое runtime health?
|
||||
- intent: DOCUMENTATION_EXPLAIN
|
||||
- sub_intent: ENTITY_EXPLAIN
|
||||
- documents: 6 | samples: Сущность runtime health, HTTP API /health, Цикл отправки уведомлений в Telegram
|
||||
- facts: 0
|
||||
- relations: 6 | samples: domain.runtime_health:parent, domain.runtime_health:part_of, api.health_endpoint:depends_on
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "v3-entity-runtime-health-2",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "pre_llm",
|
||||
"passed": false,
|
||||
"mismatches": [
|
||||
"sub_intent: expected ENTITY_EXPLAIN, got GENERIC_QA"
|
||||
],
|
||||
"actual": {
|
||||
"intent": "GENERAL_QA",
|
||||
"sub_intent": "GENERIC_QA",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 12,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"domain.runtime_health",
|
||||
"api.health_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint"
|
||||
],
|
||||
"entity_candidates": [
|
||||
"runtime health"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_general_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Объясни runtime health"
|
||||
},
|
||||
"output": {
|
||||
"query": "Объясни runtime health"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Объясни runtime health"
|
||||
},
|
||||
"output": {
|
||||
"intent": "GENERAL_QA",
|
||||
"sub_intent": "GENERIC_QA",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Объясни runtime health"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_general_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_general_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 345,
|
||||
"user_chars": 9449,
|
||||
"tokens_in_estimate": 2449
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+528
@@ -0,0 +1,528 @@
|
||||
# v3-entity-runtime-health-2
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: pre_llm
|
||||
- passed: False
|
||||
|
||||
## Query
|
||||
Объясни runtime health
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "GENERAL_QA",
|
||||
"sub_intent": "GENERIC_QA",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 12,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"domain.runtime_health",
|
||||
"api.health_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint"
|
||||
],
|
||||
"entity_candidates": [
|
||||
"runtime health"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_general_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Объясни runtime health"
|
||||
},
|
||||
"output": {
|
||||
"query": "Объясни runtime health"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Объясни runtime health"
|
||||
},
|
||||
"output": {
|
||||
"intent": "GENERAL_QA",
|
||||
"sub_intent": "GENERIC_QA",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Объясни runtime health"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_general_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_general_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 345,
|
||||
"user_chars": 9449,
|
||||
"tokens_in_estimate": 2449
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "GENERAL_QA",
|
||||
"sub_intent": "GENERIC_QA",
|
||||
"layers_used": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 4,
|
||||
"facts_found": 0,
|
||||
"relations_found": 0,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_general_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "none",
|
||||
"matched_anchor_value": null,
|
||||
"exact_anchor_match": false,
|
||||
"docs_layers_requested": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 4,
|
||||
"top_ids": [
|
||||
"domain.runtime_health",
|
||||
"api.health_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.control_actions_endpoint"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"api.health_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [
|
||||
"runtime health"
|
||||
],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [],
|
||||
"resolved_anchor_candidates": [
|
||||
"domain.runtime_health",
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"api.health_endpoint",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"logic.telegram_notification_loop",
|
||||
"docs/documentation/logic/telegram-notification-loop.md",
|
||||
"api.control_actions_endpoint",
|
||||
"docs/documentation/api/control-actions-endpoint.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"domain.runtime_health",
|
||||
"api.health_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"docs/documentation/logic/telegram-notification-loop.md",
|
||||
"docs/documentation/api/control-actions-endpoint.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"Сущность runtime health",
|
||||
"HTTP API /health",
|
||||
"Цикл отправки уведомлений в Telegram",
|
||||
"HTTP API /actions/{action}",
|
||||
"api.health_endpoint:Функциональные требования",
|
||||
"api.health_endpoint:Выходные параметры",
|
||||
"api.health_endpoint:Описание",
|
||||
"api.health_endpoint:Сценарий",
|
||||
"api.health_endpoint:Нефункциональные требования",
|
||||
"api.health_endpoint:Входные параметры",
|
||||
"api.health_endpoint:Summary",
|
||||
"api.health_endpoint:Пример ответа"
|
||||
],
|
||||
"relation_hits_count": 0,
|
||||
"relation_targets": [],
|
||||
"fallback_doc_hits_count": 12,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 0,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 4,
|
||||
"facts": 0,
|
||||
"relations": 0,
|
||||
"chunks": 8,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "evidence_sufficient",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_general_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 345,
|
||||
"user_chars": 9449,
|
||||
"tokens_in_estimate": 2449
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты отвечаешь на общий вопрос по документации проекта.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные документы и факты
|
||||
- Не додумывай отсутствующие детали
|
||||
- Если данных недостаточно, скажи это прямо
|
||||
- Дай короткий понятный ответ без лишней структуры
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Объясни runtime health",
|
||||
"intent": "GENERAL_QA",
|
||||
"sub_intent": "GENERIC_QA",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "Сущность runtime health",
|
||||
"content": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"metadata": {
|
||||
"name": "runtime_health",
|
||||
"tags": [
|
||||
"domain",
|
||||
"health",
|
||||
"observability"
|
||||
],
|
||||
"type": "domain_entity",
|
||||
"layer": "domain",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "used_by",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Сущность runtime health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"WorkerHealth",
|
||||
"WorkerStatus",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "domain.runtime_health",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"summary_text": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "HTTP API /health",
|
||||
"content": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"metadata": {
|
||||
"name": "health_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"health",
|
||||
"control-plane"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"TelegramNotifyWorker",
|
||||
"RuntimeManager",
|
||||
"WorkerHealth"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.health_endpoint",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"summary_text": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/logic/telegram-notification-loop.md",
|
||||
"title": "Цикл отправки уведомлений в Telegram",
|
||||
"content": "`TelegramNotifyWorker` после старта runtime запускает отдельный поток, сразу делает первую попытку отправки сообщения и затем повторяет отправку через заданный интервал. При ошибках доставки или отсутствии credentials worker не останавливает сервис, а переводит собственное состояние в `degraded`. Этот workflow определяет основной полезный цикл приложения.",
|
||||
"metadata": {
|
||||
"name": "telegram_notification_loop",
|
||||
"tags": [
|
||||
"logic",
|
||||
"telegram",
|
||||
"worker",
|
||||
"scheduling"
|
||||
],
|
||||
"type": "logic_block",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Цикл отправки уведомлений в Telegram",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "0f62f9b4dab261ca4ca34575ff5d84411a22c90b780c52eda388782b94f08470",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramSendService",
|
||||
"WorkerHealth",
|
||||
"WorkerStatus"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "logic.telegram_notification_loop",
|
||||
"source_path": "docs/documentation/logic/telegram-notification-loop.md",
|
||||
"summary_text": "`TelegramNotifyWorker` после старта runtime запускает отдельный поток, сразу делает первую попытку отправки сообщения и затем повторяет отправку через заданный интервал. При ошибках доставки или отсутствии credentials worker не останавливает сервис, а переводит собственное состояние в `degraded`. Этот workflow определяет основной полезный цикл приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"content": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"metadata": {
|
||||
"name": "control_actions_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"control-plane",
|
||||
"lifecycle"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"ControlActionSet",
|
||||
"JSONResponse"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.control_actions_endpoint",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"summary_text": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [],
|
||||
"relations": []
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Объясни runtime health
|
||||
- intent: GENERAL_QA
|
||||
- sub_intent: GENERIC_QA
|
||||
- documents: 4 | samples: Сущность runtime health, HTTP API /health, Цикл отправки уведомлений в Telegram
|
||||
- facts: 0
|
||||
- relations: 0
|
||||
|
||||
## Mismatches
|
||||
- sub_intent: expected ENTITY_EXPLAIN, got GENERIC_QA
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "v3-entity-worker-status-1",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "pre_llm",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 26,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"docs/README.md",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview"
|
||||
],
|
||||
"entity_candidates": [
|
||||
"WorkerStatus"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Что такое WorkerStatus?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Что такое WorkerStatus?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Что такое WorkerStatus?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Что такое WorkerStatus?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 18776,
|
||||
"tokens_in_estimate": 4793
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+849
@@ -0,0 +1,849 @@
|
||||
# v3-entity-worker-status-1
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: pre_llm
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
Что такое WorkerStatus?
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 26,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"docs/README.md",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview"
|
||||
],
|
||||
"entity_candidates": [
|
||||
"WorkerStatus"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что такое WorkerStatus?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Что такое WorkerStatus?"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что такое WorkerStatus?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что такое WorkerStatus?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 18776,
|
||||
"tokens_in_estimate": 4793
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"layers_used": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 6,
|
||||
"facts_found": 0,
|
||||
"relations_found": 6,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "none",
|
||||
"matched_anchor_value": null,
|
||||
"exact_anchor_match": false,
|
||||
"docs_layers_requested": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D3_ENTITY_CATALOG": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint"
|
||||
]
|
||||
},
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"architecture.telegram_notify_app"
|
||||
]
|
||||
},
|
||||
"D5_RELATION_GRAPH": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"5f4909bde905cd3d294ad307074a05e4ae4deefcafe6272cd2d0436e73acb8dd",
|
||||
"711fb2edb82dd222deaba3c91768b18cbbd453009235823282813c6e867dc2c1",
|
||||
"eec79f7a02b804337e791ef231784862ae26e0599eb20224790e9d4f085fa9c0",
|
||||
"c718b1939621233295ccaf6e8203e7fd94f3dd1bfb88f10c51bc5e33d53a24aa",
|
||||
"616f5cbf25da83cb51d8d0741a7fc351620c9ca2c6513fa2094b4aa476f0912a"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"logic.telegram_notification_loop",
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [
|
||||
"WorkerStatus"
|
||||
],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [
|
||||
"WorkerStatus"
|
||||
],
|
||||
"resolved_anchor_candidates": [
|
||||
"domain.runtime_health",
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"logic.telegram_notification_loop",
|
||||
"docs/documentation/logic/telegram-notification-loop.md",
|
||||
"api.control_actions_endpoint",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"api.health_endpoint",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"api.send_message_endpoint",
|
||||
"docs/documentation/api/send-message-endpoint.md",
|
||||
"docs/README.md",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"domain.runtime_health",
|
||||
"logic.telegram_notification_loop",
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"docs/README.md",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/documentation/domain/runtime-health-entity.md",
|
||||
"docs/documentation/logic/telegram-notification-loop.md",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"docs/documentation/api/send-message-endpoint.md",
|
||||
"docs/README.md",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"WorkerStatus",
|
||||
"JSONResponse",
|
||||
"TelegramNotifyWorker",
|
||||
"RuntimeManager",
|
||||
"WorkerHealth",
|
||||
"TelegramControlAppFactory",
|
||||
"TelegramControlChannel",
|
||||
"Readme",
|
||||
"HTTP API /actions/{action}",
|
||||
"HTTP API /health",
|
||||
"HTTP API /send",
|
||||
"Архитектура Telegram Notify App",
|
||||
"Сущность runtime health",
|
||||
"api.control_actions_endpoint:part_of",
|
||||
"api.control_actions_endpoint:related_api",
|
||||
"api.control_actions_endpoint:related_logic",
|
||||
"api.health_endpoint:parent",
|
||||
"api.health_endpoint:part_of",
|
||||
"api.control_actions_endpoint:parent",
|
||||
"logic.telegram_notification_loop:Details",
|
||||
"docs/README.md:Навигация",
|
||||
"docs/README.md:Правила и шаблоны",
|
||||
"api.control_actions_endpoint:Summary",
|
||||
"api.control_actions_endpoint:Описание",
|
||||
"docs/README.md:Структура"
|
||||
],
|
||||
"relation_hits_count": 6,
|
||||
"relation_targets": [
|
||||
"api.control_actions_endpoint:part_of",
|
||||
"api.control_actions_endpoint:related_api",
|
||||
"api.control_actions_endpoint:related_logic",
|
||||
"api.health_endpoint:parent",
|
||||
"api.health_endpoint:part_of",
|
||||
"api.control_actions_endpoint:parent"
|
||||
],
|
||||
"fallback_doc_hits_count": 12,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 0,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 6,
|
||||
"facts": 0,
|
||||
"relations": 6,
|
||||
"chunks": 6,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "evidence_sufficient",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_explain_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 393,
|
||||
"user_chars": 18776,
|
||||
"tokens_in_estimate": 4793
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты объясняешь документацию системы.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные факты
|
||||
- Не додумывай
|
||||
- Если данных недостаточно, скажи это явно
|
||||
- Объясняй структурировано
|
||||
|
||||
Формат ответа:
|
||||
1. Краткое описание
|
||||
2. Основные элементы
|
||||
3. Как это работает
|
||||
4. Связи с другими частями системы (если есть)
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Что такое WorkerStatus?",
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/README.md",
|
||||
"title": "Readme",
|
||||
"content": "Readme",
|
||||
"metadata": {
|
||||
"name": "",
|
||||
"tags": [],
|
||||
"type": "",
|
||||
"layer": "",
|
||||
"links": [],
|
||||
"owner": null,
|
||||
"title": "Readme",
|
||||
"doc_id": null,
|
||||
"module": "",
|
||||
"parent": null,
|
||||
"status": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "81d952f1a6ea85b76f75e0e57f33b8fa4b2bf3cb7db11b91b90171aeedd655a6",
|
||||
"children": [],
|
||||
"doc_kind": "readme",
|
||||
"entities": [],
|
||||
"updated_at": null,
|
||||
"doc_version": null,
|
||||
"document_id": "docs/README.md",
|
||||
"source_path": "docs/README.md",
|
||||
"summary_text": "",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"content": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"metadata": {
|
||||
"name": "control_actions_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"control-plane",
|
||||
"lifecycle"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"ControlActionSet",
|
||||
"JSONResponse"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.control_actions_endpoint",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"summary_text": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "HTTP API /health",
|
||||
"content": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"metadata": {
|
||||
"name": "health_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"health",
|
||||
"control-plane"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"TelegramNotifyWorker",
|
||||
"RuntimeManager",
|
||||
"WorkerHealth"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.health_endpoint",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"summary_text": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"title": "HTTP API /send",
|
||||
"content": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"metadata": {
|
||||
"name": "send_message_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"telegram",
|
||||
"manual-send"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /send",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "5fbf2e33510b0676a3a53b957a4569bd3c2c31fb7719546602c573421ccaa32d",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlAppFactory",
|
||||
"TelegramSendService",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.send_message_endpoint",
|
||||
"source_path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"summary_text": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"content": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"metadata": {
|
||||
"name": "telegram_notify_app_overview",
|
||||
"tags": [
|
||||
"architecture",
|
||||
"telegram",
|
||||
"plba",
|
||||
"runtime"
|
||||
],
|
||||
"type": "architecture_overview",
|
||||
"layer": "system",
|
||||
"links": [
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "docs_root",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"children": [
|
||||
"api.health_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"doc_kind": "spec",
|
||||
"entities": [
|
||||
"TelegramNotifyModule",
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramControlChannel",
|
||||
"TelegramSendService",
|
||||
"RuntimeManager"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "architecture.telegram_notify_app",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"summary_text": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "Сущность runtime health",
|
||||
"content": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"metadata": {
|
||||
"name": "runtime_health",
|
||||
"tags": [
|
||||
"domain",
|
||||
"health",
|
||||
"observability"
|
||||
],
|
||||
"type": "domain_entity",
|
||||
"layer": "domain",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "used_by",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Сущность runtime health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"WorkerHealth",
|
||||
"WorkerStatus",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "domain.runtime_health",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"summary_text": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [],
|
||||
"relations": [
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:part_of",
|
||||
"content": "api.control_actions_endpoint part_of architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "5f4909bde905cd3d294ad307074a05e4ae4deefcafe6272cd2d0436e73acb8dd",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "part_of",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:related_api",
|
||||
"content": "api.control_actions_endpoint related_api api.health_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "api.health_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "711fb2edb82dd222deaba3c91768b18cbbd453009235823282813c6e867dc2c1",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_api",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:related_logic",
|
||||
"content": "api.control_actions_endpoint related_logic logic.telegram_notification_loop",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "logic.telegram_notification_loop",
|
||||
"doc_version": null,
|
||||
"relation_id": "eec79f7a02b804337e791ef231784862ae26e0599eb20224790e9d4f085fa9c0",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_logic",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "api.health_endpoint:parent",
|
||||
"content": "api.health_endpoint parent architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.parent",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"source_id": "api.health_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "c718b1939621233295ccaf6e8203e7fd94f3dd1bfb88f10c51bc5e33d53a24aa",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "parent",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "api.health_endpoint:part_of",
|
||||
"content": "api.health_endpoint part_of architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"source_id": "api.health_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "616f5cbf25da83cb51d8d0741a7fc351620c9ca2c6513fa2094b4aa476f0912a",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "part_of",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:parent",
|
||||
"content": "api.control_actions_endpoint parent architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.parent",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "afec31fd062e392dcd9699a92c7ab61fd4b1273c1a2b16702b23d55d8d0c47ac",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "parent",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Что такое WorkerStatus?
|
||||
- intent: DOCUMENTATION_EXPLAIN
|
||||
- sub_intent: ENTITY_EXPLAIN
|
||||
- documents: 6 | samples: Readme, HTTP API /actions/{action}, HTTP API /health
|
||||
- facts: 0
|
||||
- relations: 6 | samples: api.control_actions_endpoint:part_of, api.control_actions_endpoint:related_api, api.control_actions_endpoint:related_logic
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "v3-entity-worker-status-2",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "pre_llm",
|
||||
"passed": false,
|
||||
"mismatches": [
|
||||
"sub_intent: expected ENTITY_EXPLAIN, got GENERIC_QA"
|
||||
],
|
||||
"actual": {
|
||||
"intent": "GENERAL_QA",
|
||||
"sub_intent": "GENERIC_QA",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 12,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_general_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Опиши статус воркера"
|
||||
},
|
||||
"output": {
|
||||
"query": "Опиши статус воркера"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Опиши статус воркера"
|
||||
},
|
||||
"output": {
|
||||
"intent": "GENERAL_QA",
|
||||
"sub_intent": "GENERIC_QA",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Опиши статус воркера"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_general_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_general_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 345,
|
||||
"user_chars": 7558,
|
||||
"tokens_in_estimate": 1976
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+493
@@ -0,0 +1,493 @@
|
||||
# v3-entity-worker-status-2
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: pre_llm
|
||||
- passed: False
|
||||
|
||||
## Query
|
||||
Опиши статус воркера
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "GENERAL_QA",
|
||||
"sub_intent": "GENERIC_QA",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 12,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_general_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Опиши статус воркера"
|
||||
},
|
||||
"output": {
|
||||
"query": "Опиши статус воркера"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Опиши статус воркера"
|
||||
},
|
||||
"output": {
|
||||
"intent": "GENERAL_QA",
|
||||
"sub_intent": "GENERIC_QA",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Опиши статус воркера"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_general_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_general_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 345,
|
||||
"user_chars": 7558,
|
||||
"tokens_in_estimate": 1976
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "GENERAL_QA",
|
||||
"sub_intent": "GENERIC_QA",
|
||||
"layers_used": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 4,
|
||||
"facts_found": 0,
|
||||
"relations_found": 0,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_general_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "none",
|
||||
"matched_anchor_value": null,
|
||||
"exact_anchor_match": false,
|
||||
"docs_layers_requested": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 4,
|
||||
"top_ids": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [],
|
||||
"resolved_anchor_candidates": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"api.health_endpoint",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"api.send_message_endpoint",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/README.md",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"Readme",
|
||||
"HTTP API /actions/{action}",
|
||||
"HTTP API /health",
|
||||
"HTTP API /send",
|
||||
"docs/README.md:Структура",
|
||||
"docs/README.md:Навигация",
|
||||
"docs/README.md:Правила и шаблоны",
|
||||
"api.control_actions_endpoint:Summary",
|
||||
"api.control_actions_endpoint:Описание",
|
||||
"api.control_actions_endpoint:Сценарий",
|
||||
"api.control_actions_endpoint:Функциональные требования",
|
||||
"docs/README.md:Project Docs"
|
||||
],
|
||||
"relation_hits_count": 0,
|
||||
"relation_targets": [],
|
||||
"fallback_doc_hits_count": 12,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 0,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 4,
|
||||
"facts": 0,
|
||||
"relations": 0,
|
||||
"chunks": 8,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "evidence_sufficient",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_general_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 345,
|
||||
"user_chars": 7558,
|
||||
"tokens_in_estimate": 1976
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты отвечаешь на общий вопрос по документации проекта.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные документы и факты
|
||||
- Не додумывай отсутствующие детали
|
||||
- Если данных недостаточно, скажи это прямо
|
||||
- Дай короткий понятный ответ без лишней структуры
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Опиши статус воркера",
|
||||
"intent": "GENERAL_QA",
|
||||
"sub_intent": "GENERIC_QA",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/README.md",
|
||||
"title": "Readme",
|
||||
"content": "Readme",
|
||||
"metadata": {
|
||||
"name": "",
|
||||
"tags": [],
|
||||
"type": "",
|
||||
"layer": "",
|
||||
"links": [],
|
||||
"owner": null,
|
||||
"title": "Readme",
|
||||
"doc_id": null,
|
||||
"module": "",
|
||||
"parent": null,
|
||||
"status": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "81d952f1a6ea85b76f75e0e57f33b8fa4b2bf3cb7db11b91b90171aeedd655a6",
|
||||
"children": [],
|
||||
"doc_kind": "readme",
|
||||
"entities": [],
|
||||
"updated_at": null,
|
||||
"doc_version": null,
|
||||
"document_id": "docs/README.md",
|
||||
"source_path": "docs/README.md",
|
||||
"summary_text": "",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"content": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"metadata": {
|
||||
"name": "control_actions_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"control-plane",
|
||||
"lifecycle"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"ControlActionSet",
|
||||
"JSONResponse"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.control_actions_endpoint",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"summary_text": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "HTTP API /health",
|
||||
"content": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"metadata": {
|
||||
"name": "health_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"health",
|
||||
"control-plane"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"TelegramNotifyWorker",
|
||||
"RuntimeManager",
|
||||
"WorkerHealth"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.health_endpoint",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"summary_text": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"title": "HTTP API /send",
|
||||
"content": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"metadata": {
|
||||
"name": "send_message_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"telegram",
|
||||
"manual-send"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /send",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "5fbf2e33510b0676a3a53b957a4569bd3c2c31fb7719546602c573421ccaa32d",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlAppFactory",
|
||||
"TelegramSendService",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.send_message_endpoint",
|
||||
"source_path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"summary_text": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [],
|
||||
"relations": []
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Опиши статус воркера
|
||||
- intent: GENERAL_QA
|
||||
- sub_intent: GENERIC_QA
|
||||
- documents: 4 | samples: Readme, HTTP API /actions/{action}, HTTP API /health
|
||||
- facts: 0
|
||||
- relations: 0
|
||||
|
||||
## Mismatches
|
||||
- sub_intent: expected ENTITY_EXPLAIN, got GENERIC_QA
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "v3-general-1",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "pre_llm",
|
||||
"passed": false,
|
||||
"mismatches": [
|
||||
"sub_intent: expected GENERIC_QA, got COMPONENT_EXPLAIN"
|
||||
],
|
||||
"actual": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 19,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Что есть в документации?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Что есть в документации?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Что есть в документации?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Что есть в документации?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 19762,
|
||||
"tokens_in_estimate": 5039
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+859
@@ -0,0 +1,859 @@
|
||||
# v3-general-1
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: pre_llm
|
||||
- passed: False
|
||||
|
||||
## Query
|
||||
Что есть в документации?
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 19,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что есть в документации?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Что есть в документации?"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что есть в документации?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что есть в документации?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 19762,
|
||||
"tokens_in_estimate": 5039
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"layers_used": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 6,
|
||||
"facts_found": 1,
|
||||
"relations_found": 6,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "none",
|
||||
"matched_anchor_value": null,
|
||||
"exact_anchor_match": false,
|
||||
"docs_layers_requested": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"architecture.telegram_notify_app"
|
||||
]
|
||||
},
|
||||
"D2_FACT_INDEX": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"2f539384881f5f776bf4cef22c00669e53e0fd0761b3d62fa53593254a272f5a",
|
||||
"5a27c821aa4efea9f2a7c883b57d1f53ec3af31348abd220bc09f47fbca73e93",
|
||||
"0102eac8e4f8b452b0351a4aa8dca63e4774beadac71eba483708d7a90ff1cc0",
|
||||
"43fc2c29bf6f353fa55f1b8a05c903dbd1a0e8067b026b9455043669ceca37d9",
|
||||
"a31bbca2eb31ffb6655bcec7ff07b8cf2b6c7416610cf58dfc1e0c737df12fe1"
|
||||
]
|
||||
},
|
||||
"D5_RELATION_GRAPH": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"5f4909bde905cd3d294ad307074a05e4ae4deefcafe6272cd2d0436e73acb8dd",
|
||||
"711fb2edb82dd222deaba3c91768b18cbbd453009235823282813c6e867dc2c1",
|
||||
"eec79f7a02b804337e791ef231784862ae26e0599eb20224790e9d4f085fa9c0",
|
||||
"c718b1939621233295ccaf6e8203e7fd94f3dd1bfb88f10c51bc5e33d53a24aa",
|
||||
"616f5cbf25da83cb51d8d0741a7fc351620c9ca2c6513fa2094b4aa476f0912a"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [],
|
||||
"resolved_anchor_candidates": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"api.health_endpoint",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"api.send_message_endpoint",
|
||||
"docs/documentation/api/send-message-endpoint.md",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"domain.runtime_health",
|
||||
"docs/documentation/domain/runtime-health-entity.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/README.md",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"docs/documentation/api/send-message-endpoint.md",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"docs/documentation/domain/runtime-health-entity.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"Readme",
|
||||
"HTTP API /actions/{action}",
|
||||
"HTTP API /health",
|
||||
"HTTP API /send",
|
||||
"Архитектура Telegram Notify App",
|
||||
"Сущность runtime health",
|
||||
"docs/README.md:doc_list_item",
|
||||
"api.control_actions_endpoint:part_of",
|
||||
"api.control_actions_endpoint:related_api",
|
||||
"api.control_actions_endpoint:related_logic",
|
||||
"api.health_endpoint:parent",
|
||||
"api.health_endpoint:part_of",
|
||||
"api.control_actions_endpoint:parent",
|
||||
"docs/README.md:Структура",
|
||||
"docs/README.md:Навигация",
|
||||
"docs/README.md:Правила и шаблоны",
|
||||
"api.control_actions_endpoint:Summary",
|
||||
"api.control_actions_endpoint:Описание",
|
||||
"docs/README.md:Project Docs"
|
||||
],
|
||||
"relation_hits_count": 6,
|
||||
"relation_targets": [
|
||||
"api.control_actions_endpoint:part_of",
|
||||
"api.control_actions_endpoint:related_api",
|
||||
"api.control_actions_endpoint:related_logic",
|
||||
"api.health_endpoint:parent",
|
||||
"api.health_endpoint:part_of",
|
||||
"api.control_actions_endpoint:parent"
|
||||
],
|
||||
"fallback_doc_hits_count": 12,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 1,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 6,
|
||||
"facts": 1,
|
||||
"relations": 6,
|
||||
"chunks": 6,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "evidence_sufficient",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_explain_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 393,
|
||||
"user_chars": 19762,
|
||||
"tokens_in_estimate": 5039
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты объясняешь документацию системы.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные факты
|
||||
- Не додумывай
|
||||
- Если данных недостаточно, скажи это явно
|
||||
- Объясняй структурировано
|
||||
|
||||
Формат ответа:
|
||||
1. Краткое описание
|
||||
2. Основные элементы
|
||||
3. Как это работает
|
||||
4. Связи с другими частями системы (если есть)
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Что есть в документации?",
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/README.md",
|
||||
"title": "Readme",
|
||||
"content": "Readme",
|
||||
"metadata": {
|
||||
"name": "",
|
||||
"tags": [],
|
||||
"type": "",
|
||||
"layer": "",
|
||||
"links": [],
|
||||
"owner": null,
|
||||
"title": "Readme",
|
||||
"doc_id": null,
|
||||
"module": "",
|
||||
"parent": null,
|
||||
"status": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "81d952f1a6ea85b76f75e0e57f33b8fa4b2bf3cb7db11b91b90171aeedd655a6",
|
||||
"children": [],
|
||||
"doc_kind": "readme",
|
||||
"entities": [],
|
||||
"updated_at": null,
|
||||
"doc_version": null,
|
||||
"document_id": "docs/README.md",
|
||||
"source_path": "docs/README.md",
|
||||
"summary_text": "",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"content": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"metadata": {
|
||||
"name": "control_actions_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"control-plane",
|
||||
"lifecycle"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"ControlActionSet",
|
||||
"JSONResponse"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.control_actions_endpoint",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"summary_text": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "HTTP API /health",
|
||||
"content": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"metadata": {
|
||||
"name": "health_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"health",
|
||||
"control-plane"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"TelegramNotifyWorker",
|
||||
"RuntimeManager",
|
||||
"WorkerHealth"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.health_endpoint",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"summary_text": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"title": "HTTP API /send",
|
||||
"content": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"metadata": {
|
||||
"name": "send_message_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"telegram",
|
||||
"manual-send"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /send",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "5fbf2e33510b0676a3a53b957a4569bd3c2c31fb7719546602c573421ccaa32d",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlAppFactory",
|
||||
"TelegramSendService",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.send_message_endpoint",
|
||||
"source_path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"summary_text": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"content": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"metadata": {
|
||||
"name": "telegram_notify_app_overview",
|
||||
"tags": [
|
||||
"architecture",
|
||||
"telegram",
|
||||
"plba",
|
||||
"runtime"
|
||||
],
|
||||
"type": "architecture_overview",
|
||||
"layer": "system",
|
||||
"links": [
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "docs_root",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"children": [
|
||||
"api.health_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"doc_kind": "spec",
|
||||
"entities": [
|
||||
"TelegramNotifyModule",
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramControlChannel",
|
||||
"TelegramSendService",
|
||||
"RuntimeManager"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "architecture.telegram_notify_app",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"summary_text": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "Сущность runtime health",
|
||||
"content": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"metadata": {
|
||||
"name": "runtime_health",
|
||||
"tags": [
|
||||
"domain",
|
||||
"health",
|
||||
"observability"
|
||||
],
|
||||
"type": "domain_entity",
|
||||
"layer": "domain",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "used_by",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Сущность runtime health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"WorkerHealth",
|
||||
"WorkerStatus",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "domain.runtime_health",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"summary_text": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [
|
||||
{
|
||||
"layer": "D2_FACT_INDEX",
|
||||
"path": "docs/README.md",
|
||||
"title": "docs/README.md:doc_list_item",
|
||||
"content": "docs/README.md doc_list_item `documentation/api/` — документация HTTP API control plane.",
|
||||
"metadata": {
|
||||
"tags": [],
|
||||
"owner": null,
|
||||
"anchor": "Структура",
|
||||
"doc_id": null,
|
||||
"object": "`documentation/api/` — документация HTTP API control plane.",
|
||||
"fact_id": "2f539384881f5f776bf4cef22c00669e53e0fd0761b3d62fa53593254a272f5a",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "81d952f1a6ea85b76f75e0e57f33b8fa4b2bf3cb7db11b91b90171aeedd655a6",
|
||||
"predicate": "doc_list_item",
|
||||
"object_ref": null,
|
||||
"subject_id": "docs/README.md",
|
||||
"doc_version": null,
|
||||
"source_path": "docs/README.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"relations": [
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:part_of",
|
||||
"content": "api.control_actions_endpoint part_of architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "5f4909bde905cd3d294ad307074a05e4ae4deefcafe6272cd2d0436e73acb8dd",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "part_of",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:related_api",
|
||||
"content": "api.control_actions_endpoint related_api api.health_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "api.health_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "711fb2edb82dd222deaba3c91768b18cbbd453009235823282813c6e867dc2c1",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_api",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:related_logic",
|
||||
"content": "api.control_actions_endpoint related_logic logic.telegram_notification_loop",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "logic.telegram_notification_loop",
|
||||
"doc_version": null,
|
||||
"relation_id": "eec79f7a02b804337e791ef231784862ae26e0599eb20224790e9d4f085fa9c0",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_logic",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "api.health_endpoint:parent",
|
||||
"content": "api.health_endpoint parent architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.parent",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"source_id": "api.health_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "c718b1939621233295ccaf6e8203e7fd94f3dd1bfb88f10c51bc5e33d53a24aa",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "parent",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "api.health_endpoint:part_of",
|
||||
"content": "api.health_endpoint part_of architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"source_id": "api.health_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "616f5cbf25da83cb51d8d0741a7fc351620c9ca2c6513fa2094b4aa476f0912a",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "part_of",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:parent",
|
||||
"content": "api.control_actions_endpoint parent architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.parent",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "afec31fd062e392dcd9699a92c7ab61fd4b1273c1a2b16702b23d55d8d0c47ac",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "parent",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Что есть в документации?
|
||||
- intent: DOCUMENTATION_EXPLAIN
|
||||
- sub_intent: COMPONENT_EXPLAIN
|
||||
- documents: 6 | samples: Readme, HTTP API /actions/{action}, HTTP API /health
|
||||
- facts: 1 | samples: docs/README.md:doc_list_item
|
||||
- relations: 6 | samples: api.control_actions_endpoint:part_of, api.control_actions_endpoint:related_api, api.control_actions_endpoint:related_logic
|
||||
|
||||
## Mismatches
|
||||
- sub_intent: expected GENERIC_QA, got COMPONENT_EXPLAIN
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "v3-general-2",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "pre_llm",
|
||||
"passed": false,
|
||||
"mismatches": [
|
||||
"sub_intent: expected GENERIC_QA, got COMPONENT_EXPLAIN"
|
||||
],
|
||||
"actual": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 19,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Какая структура документации?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Какая структура документации?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Какая структура документации?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Какая структура документации?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 19767,
|
||||
"tokens_in_estimate": 5040
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+859
@@ -0,0 +1,859 @@
|
||||
# v3-general-2
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: pre_llm
|
||||
- passed: False
|
||||
|
||||
## Query
|
||||
Какая структура документации?
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 19,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Какая структура документации?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Какая структура документации?"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Какая структура документации?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Какая структура документации?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 19767,
|
||||
"tokens_in_estimate": 5040
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"layers_used": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 6,
|
||||
"facts_found": 1,
|
||||
"relations_found": 6,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "none",
|
||||
"matched_anchor_value": null,
|
||||
"exact_anchor_match": false,
|
||||
"docs_layers_requested": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D2_FACT_INDEX",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"architecture.telegram_notify_app"
|
||||
]
|
||||
},
|
||||
"D2_FACT_INDEX": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"2f539384881f5f776bf4cef22c00669e53e0fd0761b3d62fa53593254a272f5a",
|
||||
"5a27c821aa4efea9f2a7c883b57d1f53ec3af31348abd220bc09f47fbca73e93",
|
||||
"0102eac8e4f8b452b0351a4aa8dca63e4774beadac71eba483708d7a90ff1cc0",
|
||||
"43fc2c29bf6f353fa55f1b8a05c903dbd1a0e8067b026b9455043669ceca37d9",
|
||||
"a31bbca2eb31ffb6655bcec7ff07b8cf2b6c7416610cf58dfc1e0c737df12fe1"
|
||||
]
|
||||
},
|
||||
"D5_RELATION_GRAPH": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"5f4909bde905cd3d294ad307074a05e4ae4deefcafe6272cd2d0436e73acb8dd",
|
||||
"711fb2edb82dd222deaba3c91768b18cbbd453009235823282813c6e867dc2c1",
|
||||
"eec79f7a02b804337e791ef231784862ae26e0599eb20224790e9d4f085fa9c0",
|
||||
"c718b1939621233295ccaf6e8203e7fd94f3dd1bfb88f10c51bc5e33d53a24aa",
|
||||
"616f5cbf25da83cb51d8d0741a7fc351620c9ca2c6513fa2094b4aa476f0912a"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [],
|
||||
"resolved_anchor_candidates": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"api.health_endpoint",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"api.send_message_endpoint",
|
||||
"docs/documentation/api/send-message-endpoint.md",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"domain.runtime_health",
|
||||
"docs/documentation/domain/runtime-health-entity.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/README.md",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"docs/documentation/api/send-message-endpoint.md",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"docs/documentation/domain/runtime-health-entity.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"Readme",
|
||||
"HTTP API /actions/{action}",
|
||||
"HTTP API /health",
|
||||
"HTTP API /send",
|
||||
"Архитектура Telegram Notify App",
|
||||
"Сущность runtime health",
|
||||
"docs/README.md:doc_list_item",
|
||||
"api.control_actions_endpoint:part_of",
|
||||
"api.control_actions_endpoint:related_api",
|
||||
"api.control_actions_endpoint:related_logic",
|
||||
"api.health_endpoint:parent",
|
||||
"api.health_endpoint:part_of",
|
||||
"api.control_actions_endpoint:parent",
|
||||
"docs/README.md:Структура",
|
||||
"docs/README.md:Навигация",
|
||||
"docs/README.md:Правила и шаблоны",
|
||||
"api.control_actions_endpoint:Summary",
|
||||
"api.control_actions_endpoint:Описание",
|
||||
"docs/README.md:Project Docs"
|
||||
],
|
||||
"relation_hits_count": 6,
|
||||
"relation_targets": [
|
||||
"api.control_actions_endpoint:part_of",
|
||||
"api.control_actions_endpoint:related_api",
|
||||
"api.control_actions_endpoint:related_logic",
|
||||
"api.health_endpoint:parent",
|
||||
"api.health_endpoint:part_of",
|
||||
"api.control_actions_endpoint:parent"
|
||||
],
|
||||
"fallback_doc_hits_count": 12,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 1,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 6,
|
||||
"facts": 1,
|
||||
"relations": 6,
|
||||
"chunks": 6,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "evidence_sufficient",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_explain_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 393,
|
||||
"user_chars": 19767,
|
||||
"tokens_in_estimate": 5040
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты объясняешь документацию системы.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные факты
|
||||
- Не додумывай
|
||||
- Если данных недостаточно, скажи это явно
|
||||
- Объясняй структурировано
|
||||
|
||||
Формат ответа:
|
||||
1. Краткое описание
|
||||
2. Основные элементы
|
||||
3. Как это работает
|
||||
4. Связи с другими частями системы (если есть)
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Какая структура документации?",
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "COMPONENT_EXPLAIN",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/README.md",
|
||||
"title": "Readme",
|
||||
"content": "Readme",
|
||||
"metadata": {
|
||||
"name": "",
|
||||
"tags": [],
|
||||
"type": "",
|
||||
"layer": "",
|
||||
"links": [],
|
||||
"owner": null,
|
||||
"title": "Readme",
|
||||
"doc_id": null,
|
||||
"module": "",
|
||||
"parent": null,
|
||||
"status": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "81d952f1a6ea85b76f75e0e57f33b8fa4b2bf3cb7db11b91b90171aeedd655a6",
|
||||
"children": [],
|
||||
"doc_kind": "readme",
|
||||
"entities": [],
|
||||
"updated_at": null,
|
||||
"doc_version": null,
|
||||
"document_id": "docs/README.md",
|
||||
"source_path": "docs/README.md",
|
||||
"summary_text": "",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"content": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"metadata": {
|
||||
"name": "control_actions_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"control-plane",
|
||||
"lifecycle"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"ControlActionSet",
|
||||
"JSONResponse"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.control_actions_endpoint",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"summary_text": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "HTTP API /health",
|
||||
"content": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"metadata": {
|
||||
"name": "health_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"health",
|
||||
"control-plane"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"TelegramNotifyWorker",
|
||||
"RuntimeManager",
|
||||
"WorkerHealth"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.health_endpoint",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"summary_text": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"title": "HTTP API /send",
|
||||
"content": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"metadata": {
|
||||
"name": "send_message_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"telegram",
|
||||
"manual-send"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /send",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "5fbf2e33510b0676a3a53b957a4569bd3c2c31fb7719546602c573421ccaa32d",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlAppFactory",
|
||||
"TelegramSendService",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.send_message_endpoint",
|
||||
"source_path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"summary_text": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"content": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"metadata": {
|
||||
"name": "telegram_notify_app_overview",
|
||||
"tags": [
|
||||
"architecture",
|
||||
"telegram",
|
||||
"plba",
|
||||
"runtime"
|
||||
],
|
||||
"type": "architecture_overview",
|
||||
"layer": "system",
|
||||
"links": [
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "docs_root",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"children": [
|
||||
"api.health_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"doc_kind": "spec",
|
||||
"entities": [
|
||||
"TelegramNotifyModule",
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramControlChannel",
|
||||
"TelegramSendService",
|
||||
"RuntimeManager"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "architecture.telegram_notify_app",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"summary_text": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "Сущность runtime health",
|
||||
"content": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"metadata": {
|
||||
"name": "runtime_health",
|
||||
"tags": [
|
||||
"domain",
|
||||
"health",
|
||||
"observability"
|
||||
],
|
||||
"type": "domain_entity",
|
||||
"layer": "domain",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "used_by",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Сущность runtime health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"WorkerHealth",
|
||||
"WorkerStatus",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "domain.runtime_health",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"summary_text": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [
|
||||
{
|
||||
"layer": "D2_FACT_INDEX",
|
||||
"path": "docs/README.md",
|
||||
"title": "docs/README.md:doc_list_item",
|
||||
"content": "docs/README.md doc_list_item `documentation/api/` — документация HTTP API control plane.",
|
||||
"metadata": {
|
||||
"tags": [],
|
||||
"owner": null,
|
||||
"anchor": "Структура",
|
||||
"doc_id": null,
|
||||
"object": "`documentation/api/` — документация HTTP API control plane.",
|
||||
"fact_id": "2f539384881f5f776bf4cef22c00669e53e0fd0761b3d62fa53593254a272f5a",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "81d952f1a6ea85b76f75e0e57f33b8fa4b2bf3cb7db11b91b90171aeedd655a6",
|
||||
"predicate": "doc_list_item",
|
||||
"object_ref": null,
|
||||
"subject_id": "docs/README.md",
|
||||
"doc_version": null,
|
||||
"source_path": "docs/README.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"relations": [
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:part_of",
|
||||
"content": "api.control_actions_endpoint part_of architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "5f4909bde905cd3d294ad307074a05e4ae4deefcafe6272cd2d0436e73acb8dd",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "part_of",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:related_api",
|
||||
"content": "api.control_actions_endpoint related_api api.health_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "api.health_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "711fb2edb82dd222deaba3c91768b18cbbd453009235823282813c6e867dc2c1",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_api",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:related_logic",
|
||||
"content": "api.control_actions_endpoint related_logic logic.telegram_notification_loop",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "logic.telegram_notification_loop",
|
||||
"doc_version": null,
|
||||
"relation_id": "eec79f7a02b804337e791ef231784862ae26e0599eb20224790e9d4f085fa9c0",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_logic",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "api.health_endpoint:parent",
|
||||
"content": "api.health_endpoint parent architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.parent",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"source_id": "api.health_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "c718b1939621233295ccaf6e8203e7fd94f3dd1bfb88f10c51bc5e33d53a24aa",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "parent",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "api.health_endpoint:part_of",
|
||||
"content": "api.health_endpoint part_of architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"source_id": "api.health_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "616f5cbf25da83cb51d8d0741a7fc351620c9ca2c6513fa2094b4aa476f0912a",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "part_of",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:parent",
|
||||
"content": "api.control_actions_endpoint parent architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.parent",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "afec31fd062e392dcd9699a92c7ab61fd4b1273c1a2b16702b23d55d8d0c47ac",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "parent",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Какая структура документации?
|
||||
- intent: DOCUMENTATION_EXPLAIN
|
||||
- sub_intent: COMPONENT_EXPLAIN
|
||||
- documents: 6 | samples: Readme, HTTP API /actions/{action}, HTTP API /health
|
||||
- facts: 1 | samples: docs/README.md:doc_list_item
|
||||
- relations: 6 | samples: api.control_actions_endpoint:part_of, api.control_actions_endpoint:related_api, api.control_actions_endpoint:related_logic
|
||||
|
||||
## Mismatches
|
||||
- sub_intent: expected GENERIC_QA, got COMPONENT_EXPLAIN
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "v3-general-3",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "pre_llm",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "GENERAL_QA",
|
||||
"sub_intent": "GENERIC_QA",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 12,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_general_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "С чего начать читать документацию?"
|
||||
},
|
||||
"output": {
|
||||
"query": "С чего начать читать документацию?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "С чего начать читать документацию?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "GENERAL_QA",
|
||||
"sub_intent": "GENERIC_QA",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "С чего начать читать документацию?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_general_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_general_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 345,
|
||||
"user_chars": 7572,
|
||||
"tokens_in_estimate": 1980
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+493
@@ -0,0 +1,493 @@
|
||||
# v3-general-3
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: pre_llm
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
С чего начать читать документацию?
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "GENERAL_QA",
|
||||
"sub_intent": "GENERIC_QA",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 12,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"entity_candidates": [],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_general_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "С чего начать читать документацию?"
|
||||
},
|
||||
"output": {
|
||||
"query": "С чего начать читать документацию?"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "С чего начать читать документацию?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "GENERAL_QA",
|
||||
"sub_intent": "GENERIC_QA",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "С чего начать читать документацию?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_general_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_general_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 345,
|
||||
"user_chars": 7572,
|
||||
"tokens_in_estimate": 1980
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "GENERAL_QA",
|
||||
"sub_intent": "GENERIC_QA",
|
||||
"layers_used": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 4,
|
||||
"facts_found": 0,
|
||||
"relations_found": 0,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_general_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "none",
|
||||
"matched_anchor_value": null,
|
||||
"exact_anchor_match": false,
|
||||
"docs_layers_requested": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 4,
|
||||
"top_ids": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [],
|
||||
"resolved_anchor_candidates": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"api.health_endpoint",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"api.send_message_endpoint",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"api.actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/README.md",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"docs/documentation/api/send-message-endpoint.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"Readme",
|
||||
"HTTP API /actions/{action}",
|
||||
"HTTP API /health",
|
||||
"HTTP API /send",
|
||||
"docs/README.md:Структура",
|
||||
"docs/README.md:Навигация",
|
||||
"docs/README.md:Правила и шаблоны",
|
||||
"api.control_actions_endpoint:Summary",
|
||||
"api.control_actions_endpoint:Описание",
|
||||
"api.control_actions_endpoint:Сценарий",
|
||||
"api.control_actions_endpoint:Функциональные требования",
|
||||
"docs/README.md:Project Docs"
|
||||
],
|
||||
"relation_hits_count": 0,
|
||||
"relation_targets": [],
|
||||
"fallback_doc_hits_count": 12,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 0,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 4,
|
||||
"facts": 0,
|
||||
"relations": 0,
|
||||
"chunks": 8,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "evidence_sufficient",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_general_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 345,
|
||||
"user_chars": 7572,
|
||||
"tokens_in_estimate": 1980
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты отвечаешь на общий вопрос по документации проекта.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные документы и факты
|
||||
- Не додумывай отсутствующие детали
|
||||
- Если данных недостаточно, скажи это прямо
|
||||
- Дай короткий понятный ответ без лишней структуры
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "С чего начать читать документацию?",
|
||||
"intent": "GENERAL_QA",
|
||||
"sub_intent": "GENERIC_QA",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/README.md",
|
||||
"title": "Readme",
|
||||
"content": "Readme",
|
||||
"metadata": {
|
||||
"name": "",
|
||||
"tags": [],
|
||||
"type": "",
|
||||
"layer": "",
|
||||
"links": [],
|
||||
"owner": null,
|
||||
"title": "Readme",
|
||||
"doc_id": null,
|
||||
"module": "",
|
||||
"parent": null,
|
||||
"status": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "81d952f1a6ea85b76f75e0e57f33b8fa4b2bf3cb7db11b91b90171aeedd655a6",
|
||||
"children": [],
|
||||
"doc_kind": "readme",
|
||||
"entities": [],
|
||||
"updated_at": null,
|
||||
"doc_version": null,
|
||||
"document_id": "docs/README.md",
|
||||
"source_path": "docs/README.md",
|
||||
"summary_text": "",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"content": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"metadata": {
|
||||
"name": "control_actions_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"control-plane",
|
||||
"lifecycle"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"ControlActionSet",
|
||||
"JSONResponse"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.control_actions_endpoint",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"summary_text": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "HTTP API /health",
|
||||
"content": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"metadata": {
|
||||
"name": "health_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"health",
|
||||
"control-plane"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"TelegramNotifyWorker",
|
||||
"RuntimeManager",
|
||||
"WorkerHealth"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.health_endpoint",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"summary_text": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"title": "HTTP API /send",
|
||||
"content": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"metadata": {
|
||||
"name": "send_message_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"telegram",
|
||||
"manual-send"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /send",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "5fbf2e33510b0676a3a53b957a4569bd3c2c31fb7719546602c573421ccaa32d",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlAppFactory",
|
||||
"TelegramSendService",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.send_message_endpoint",
|
||||
"source_path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"summary_text": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [],
|
||||
"relations": []
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: С чего начать читать документацию?
|
||||
- intent: GENERAL_QA
|
||||
- sub_intent: GENERIC_QA
|
||||
- documents: 4 | samples: Readme, HTTP API /actions/{action}, HTTP API /health
|
||||
- facts: 0
|
||||
- relations: 0
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
{
|
||||
"meta": {
|
||||
"case_id": "v3-negative-1",
|
||||
"source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml",
|
||||
"runner": "agent_runtime",
|
||||
"mode": "pre_llm",
|
||||
"passed": true,
|
||||
"mismatches": [],
|
||||
"actual": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 26,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"docs/README.md",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"entity_candidates": [
|
||||
"PaymentTransaction"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
},
|
||||
"pipeline_steps": [
|
||||
{
|
||||
"step": "input_query",
|
||||
"input": {
|
||||
"query": "Что такое PaymentTransaction?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Что такое PaymentTransaction?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "router",
|
||||
"input": {
|
||||
"query": "Что такое PaymentTransaction?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "docs_pipeline",
|
||||
"input": {
|
||||
"query": "Что такое PaymentTransaction?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 18782,
|
||||
"tokens_in_estimate": 4794
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+841
@@ -0,0 +1,841 @@
|
||||
# v3-negative-1
|
||||
|
||||
- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml
|
||||
- runner: agent_runtime
|
||||
- mode: pre_llm
|
||||
- passed: True
|
||||
|
||||
## Query
|
||||
Что такое PaymentTransaction?
|
||||
|
||||
## Actual
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START",
|
||||
"rag_count": 26,
|
||||
"llm_answer": "",
|
||||
"answer_mode": "answered",
|
||||
"path_scope": [],
|
||||
"doc_scope": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"docs/README.md",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"entity_candidates": [
|
||||
"PaymentTransaction"
|
||||
],
|
||||
"symbol_candidates": [],
|
||||
"layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"filters": {
|
||||
"doc_type": null
|
||||
},
|
||||
"pipeline_mode": "pre_llm_only",
|
||||
"gate_decision": "allow",
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": true
|
||||
}
|
||||
|
||||
## Pipeline Steps
|
||||
### input_query
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что такое PaymentTransaction?"
|
||||
},
|
||||
"output": {
|
||||
"query": "Что такое PaymentTransaction?"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### router
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что такое PaymentTransaction?"
|
||||
},
|
||||
"output": {
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"graph_id": "DocsQAGraph",
|
||||
"conversation_mode": "START"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### docs_pipeline
|
||||
```json
|
||||
{
|
||||
"input": {
|
||||
"query": "Что такое PaymentTransaction?"
|
||||
},
|
||||
"output": {
|
||||
"answer_mode": "ready",
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"llm_request": {
|
||||
"prompt_name": "docs_explain_answer",
|
||||
"log_context": "graph.project_qa.docs.answer",
|
||||
"prompt_stats": {
|
||||
"system_chars": 393,
|
||||
"user_chars": 18782,
|
||||
"tokens_in_estimate": 4794
|
||||
}
|
||||
},
|
||||
"degraded_reason": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Diagnostics
|
||||
{
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"layers_used": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"documents_found": 6,
|
||||
"facts_found": 0,
|
||||
"relations_found": 6,
|
||||
"openapi_fields_extracted": 0,
|
||||
"missing_required_fields": [],
|
||||
"openapi_status": {
|
||||
"has_path": false,
|
||||
"has_method": false,
|
||||
"has_request": false,
|
||||
"has_response": false
|
||||
},
|
||||
"prompt_used": "docs_explain_answer",
|
||||
"llm_mode": "prose",
|
||||
"output_valid": true,
|
||||
"matched_intent_source": "deterministic",
|
||||
"matched_anchor_type": "none",
|
||||
"matched_anchor_value": null,
|
||||
"exact_anchor_match": false,
|
||||
"docs_layers_requested": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"docs_layers_with_hits": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"planned_layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"executed_layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"non_empty_layers": [
|
||||
"D3_ENTITY_CATALOG",
|
||||
"D1_DOCUMENT_CATALOG",
|
||||
"D5_RELATION_GRAPH",
|
||||
"D0_DOC_CHUNKS"
|
||||
],
|
||||
"layer_diagnostics": {
|
||||
"D3_ENTITY_CATALOG": {
|
||||
"hits": 8,
|
||||
"top_ids": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint"
|
||||
]
|
||||
},
|
||||
"D1_DOCUMENT_CATALOG": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"architecture.telegram_notify_app"
|
||||
]
|
||||
},
|
||||
"D5_RELATION_GRAPH": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"5f4909bde905cd3d294ad307074a05e4ae4deefcafe6272cd2d0436e73acb8dd",
|
||||
"711fb2edb82dd222deaba3c91768b18cbbd453009235823282813c6e867dc2c1",
|
||||
"eec79f7a02b804337e791ef231784862ae26e0599eb20224790e9d4f085fa9c0",
|
||||
"c718b1939621233295ccaf6e8203e7fd94f3dd1bfb88f10c51bc5e33d53a24aa",
|
||||
"616f5cbf25da83cb51d8d0741a7fc351620c9ca2c6513fa2094b4aa476f0912a"
|
||||
]
|
||||
},
|
||||
"D0_DOC_CHUNKS": {
|
||||
"hits": 6,
|
||||
"top_ids": [
|
||||
"docs/README.md",
|
||||
"api.control_actions_endpoint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"query_entity_candidates": [
|
||||
"PaymentTransaction"
|
||||
],
|
||||
"resolved_entity_candidates": [],
|
||||
"query_anchor_candidates": [
|
||||
"PaymentTransaction"
|
||||
],
|
||||
"resolved_anchor_candidates": [
|
||||
"api.control_actions_endpoint",
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"api.health_endpoint",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"api.send_message_endpoint",
|
||||
"docs/documentation/api/send-message-endpoint.md",
|
||||
"docs/README.md",
|
||||
"architecture.telegram_notify_app",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"domain.runtime_health",
|
||||
"docs/documentation/domain/runtime-health-entity.md"
|
||||
],
|
||||
"anchor_candidates": [],
|
||||
"selected_anchor": null,
|
||||
"anchor_selection_reason": "",
|
||||
"anchor_match_type": "",
|
||||
"doc_ids": [
|
||||
"api.control_actions_endpoint",
|
||||
"api.health_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"docs/README.md",
|
||||
"api.actions_endpoint",
|
||||
"architecture.telegram_notify_app",
|
||||
"architecture.telegram_notify_app_overview",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"doc_paths": [
|
||||
"docs/documentation/api/control-actions-endpoint.md",
|
||||
"docs/documentation/api/health-endpoint.md",
|
||||
"docs/documentation/api/send-message-endpoint.md",
|
||||
"docs/README.md",
|
||||
"docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"docs/documentation/domain/runtime-health-entity.md"
|
||||
],
|
||||
"doc_titles": [
|
||||
"ControlActionSet",
|
||||
"JSONResponse",
|
||||
"TelegramControlChannel",
|
||||
"TelegramNotifyWorker",
|
||||
"RuntimeManager",
|
||||
"WorkerHealth",
|
||||
"TelegramControlAppFactory",
|
||||
"Readme",
|
||||
"HTTP API /actions/{action}",
|
||||
"HTTP API /health",
|
||||
"HTTP API /send",
|
||||
"Архитектура Telegram Notify App",
|
||||
"Сущность runtime health",
|
||||
"api.control_actions_endpoint:part_of",
|
||||
"api.control_actions_endpoint:related_api",
|
||||
"api.control_actions_endpoint:related_logic",
|
||||
"api.health_endpoint:parent",
|
||||
"api.health_endpoint:part_of",
|
||||
"api.control_actions_endpoint:parent",
|
||||
"docs/README.md:Структура",
|
||||
"docs/README.md:Навигация",
|
||||
"docs/README.md:Правила и шаблоны",
|
||||
"api.control_actions_endpoint:Summary",
|
||||
"api.control_actions_endpoint:Описание",
|
||||
"docs/README.md:Project Docs"
|
||||
],
|
||||
"relation_hits_count": 6,
|
||||
"relation_targets": [
|
||||
"api.control_actions_endpoint:part_of",
|
||||
"api.control_actions_endpoint:related_api",
|
||||
"api.control_actions_endpoint:related_logic",
|
||||
"api.health_endpoint:parent",
|
||||
"api.health_endpoint:part_of",
|
||||
"api.control_actions_endpoint:parent"
|
||||
],
|
||||
"fallback_doc_hits_count": 12,
|
||||
"fallback_used": false,
|
||||
"fact_hits": 0,
|
||||
"entity_hits": 0,
|
||||
"evidence_summary": {
|
||||
"documents": 6,
|
||||
"facts": 0,
|
||||
"relations": 6,
|
||||
"chunks": 6,
|
||||
"entity_hits": 0,
|
||||
"openapi_signals": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
}
|
||||
},
|
||||
"gate_decision": "allow",
|
||||
"gate_decision_reason": "evidence_sufficient",
|
||||
"gate_missing_requirements": [],
|
||||
"gate_satisfied_requirements": [
|
||||
"retrieval_non_empty"
|
||||
],
|
||||
"openapi_evidence": {
|
||||
"path_found": false,
|
||||
"method_found": false,
|
||||
"request_schema": false,
|
||||
"response_schema": false,
|
||||
"status_codes": false,
|
||||
"payload_description": false
|
||||
},
|
||||
"requested_fragment_type": null,
|
||||
"fragment_evidence_found": [],
|
||||
"fragment_missing_requirements": [],
|
||||
"answer_mode": "ready",
|
||||
"degrade_reason": null,
|
||||
"degraded_reason": null,
|
||||
"code_intents_stubbed": false
|
||||
}
|
||||
|
||||
## LLM Request
|
||||
- prompt_name: docs_explain_answer
|
||||
- log_context: graph.project_qa.docs.answer
|
||||
|
||||
### Prompt Stats
|
||||
```json
|
||||
{
|
||||
"system_chars": 393,
|
||||
"user_chars": 18782,
|
||||
"tokens_in_estimate": 4794
|
||||
}
|
||||
```
|
||||
|
||||
### System Prompt
|
||||
```text
|
||||
Ты объясняешь документацию системы.
|
||||
|
||||
На вход приходит JSON с полями:
|
||||
- question
|
||||
- intent
|
||||
- sub_intent
|
||||
- documents
|
||||
- facts
|
||||
- relations
|
||||
|
||||
Правила:
|
||||
- Используй только предоставленные факты
|
||||
- Не додумывай
|
||||
- Если данных недостаточно, скажи это явно
|
||||
- Объясняй структурировано
|
||||
|
||||
Формат ответа:
|
||||
1. Краткое описание
|
||||
2. Основные элементы
|
||||
3. Как это работает
|
||||
4. Связи с другими частями системы (если есть)
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
```json
|
||||
{
|
||||
"question": "Что такое PaymentTransaction?",
|
||||
"intent": "DOCUMENTATION_EXPLAIN",
|
||||
"sub_intent": "ENTITY_EXPLAIN",
|
||||
"documents": [
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/README.md",
|
||||
"title": "Readme",
|
||||
"content": "Readme",
|
||||
"metadata": {
|
||||
"name": "",
|
||||
"tags": [],
|
||||
"type": "",
|
||||
"layer": "",
|
||||
"links": [],
|
||||
"owner": null,
|
||||
"title": "Readme",
|
||||
"doc_id": null,
|
||||
"module": "",
|
||||
"parent": null,
|
||||
"status": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "81d952f1a6ea85b76f75e0e57f33b8fa4b2bf3cb7db11b91b90171aeedd655a6",
|
||||
"children": [],
|
||||
"doc_kind": "readme",
|
||||
"entities": [],
|
||||
"updated_at": null,
|
||||
"doc_version": null,
|
||||
"document_id": "docs/README.md",
|
||||
"source_path": "docs/README.md",
|
||||
"summary_text": "",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"content": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"metadata": {
|
||||
"name": "control_actions_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"control-plane",
|
||||
"lifecycle"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /actions/{action}",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"ControlActionSet",
|
||||
"JSONResponse"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.control_actions_endpoint",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"summary_text": "Endpoint `/actions/{action}` управляет control actions runtime и поддерживает `start`, `stop` и `status`. Для долгих операций `start` и `stop` допускается ответ HTTP 202, если действие еще выполняется. Endpoint используется для operator-driven управления жизненным циклом worker'а через HTTP API.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "HTTP API /health",
|
||||
"content": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"metadata": {
|
||||
"name": "health_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"health",
|
||||
"control-plane"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlChannel",
|
||||
"TelegramNotifyWorker",
|
||||
"RuntimeManager",
|
||||
"WorkerHealth"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.health_endpoint",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"summary_text": "Endpoint `/health` возвращает агрегированный health payload runtime. Если общий статус равен `ok`, API отвечает с HTTP 200; для состояний деградации или неготовности возвращается HTTP 503 с тем же payload. Endpoint служит основной точкой внешней проверки состояния приложения.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"title": "HTTP API /send",
|
||||
"content": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"metadata": {
|
||||
"name": "send_message_endpoint",
|
||||
"tags": [
|
||||
"api",
|
||||
"telegram",
|
||||
"manual-send"
|
||||
],
|
||||
"type": "api_method",
|
||||
"layer": "application",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "HTTP API /send",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "5fbf2e33510b0676a3a53b957a4569bd3c2c31fb7719546602c573421ccaa32d",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"TelegramControlAppFactory",
|
||||
"TelegramSendService",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "api.send_message_endpoint",
|
||||
"source_path": "docs/documentation/api/send-message-endpoint.md",
|
||||
"summary_text": "Endpoint `/send` выполняет ручную отправку сообщения в Telegram через `TelegramSendService`. Он используется для операторской проверки доставки и для отправки уведомлений вне периодического worker loop. Endpoint работает поверх тех же credentials и того же delivery path, что и фоновая отправка.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"content": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"metadata": {
|
||||
"name": "telegram_notify_app_overview",
|
||||
"tags": [
|
||||
"architecture",
|
||||
"telegram",
|
||||
"plba",
|
||||
"runtime"
|
||||
],
|
||||
"type": "architecture_overview",
|
||||
"layer": "system",
|
||||
"links": [
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.control_actions_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_api",
|
||||
"target": "api.send_message_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
},
|
||||
{
|
||||
"type": "depends_on",
|
||||
"target": "domain.runtime_health"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Архитектура Telegram Notify App",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "docs_root",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b1cc9f823e55bddbc825466d10a0fdb4ca4354ac02d91f9e2aef7b7d2ec8256",
|
||||
"children": [
|
||||
"api.health_endpoint",
|
||||
"api.control_actions_endpoint",
|
||||
"api.send_message_endpoint",
|
||||
"logic.telegram_notification_loop",
|
||||
"domain.runtime_health"
|
||||
],
|
||||
"doc_kind": "spec",
|
||||
"entities": [
|
||||
"TelegramNotifyModule",
|
||||
"TelegramNotifyWorker",
|
||||
"TelegramControlChannel",
|
||||
"TelegramSendService",
|
||||
"RuntimeManager"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "architecture.telegram_notify_app",
|
||||
"source_path": "docs/documentation/architecture/telegram-notify-app-overview.md",
|
||||
"summary_text": "`test_echo_app` — сервис на базе PLBA runtime, который поднимает HTTP control plane и запускает фоновый воркер для периодической отправки уведомлений в Telegram. Приложение использует YAML-конфиг для runtime-настроек и переменные окружения для Telegram credentials. Основной контур системы состоит из runtime manager, control channel, send service и worker loop.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D1_DOCUMENT_CATALOG",
|
||||
"path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"title": "Сущность runtime health",
|
||||
"content": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"metadata": {
|
||||
"name": "runtime_health",
|
||||
"tags": [
|
||||
"domain",
|
||||
"health",
|
||||
"observability"
|
||||
],
|
||||
"type": "domain_entity",
|
||||
"layer": "domain",
|
||||
"links": [
|
||||
{
|
||||
"type": "part_of",
|
||||
"target": "architecture.telegram_notify_app"
|
||||
},
|
||||
{
|
||||
"type": "used_by",
|
||||
"target": "api.health_endpoint"
|
||||
},
|
||||
{
|
||||
"type": "related_logic",
|
||||
"target": "logic.telegram_notification_loop"
|
||||
}
|
||||
],
|
||||
"owner": null,
|
||||
"title": "Сущность runtime health",
|
||||
"doc_id": null,
|
||||
"module": "telegram_notify_app",
|
||||
"parent": "architecture.telegram_notify_app",
|
||||
"status": "draft",
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "37d4dcf470ea3de95d59e44786006e369a3ea11bf5dbf4c88877696e9183ee87",
|
||||
"children": [],
|
||||
"doc_kind": "misc",
|
||||
"entities": [
|
||||
"WorkerHealth",
|
||||
"WorkerStatus",
|
||||
"TelegramNotifyWorker"
|
||||
],
|
||||
"updated_at": "2026-03-20",
|
||||
"doc_version": null,
|
||||
"document_id": "domain.runtime_health",
|
||||
"source_path": "docs/documentation/domain/runtime-health-entity.md",
|
||||
"summary_text": "`runtime health` — доменная модель наблюдаемости сервиса, которая описывает общее состояние runtime и состояние отдельных компонентов. Для `test_echo_app` главным объектом наблюдения является компонент `telegram_notify`, у которого важны статус, время старта и количество успешных отправок. Эта модель используется для внешнего health-monitoring и внутренней диагностики.",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"facts": [],
|
||||
"relations": [
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:part_of",
|
||||
"content": "api.control_actions_endpoint part_of architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "5f4909bde905cd3d294ad307074a05e4ae4deefcafe6272cd2d0436e73acb8dd",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "part_of",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:related_api",
|
||||
"content": "api.control_actions_endpoint related_api api.health_endpoint",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "api.health_endpoint",
|
||||
"doc_version": null,
|
||||
"relation_id": "711fb2edb82dd222deaba3c91768b18cbbd453009235823282813c6e867dc2c1",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_api",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:related_logic",
|
||||
"content": "api.control_actions_endpoint related_logic logic.telegram_notification_loop",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "logic.telegram_notification_loop",
|
||||
"doc_version": null,
|
||||
"relation_id": "eec79f7a02b804337e791ef231784862ae26e0599eb20224790e9d4f085fa9c0",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "related_logic",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "api.health_endpoint:parent",
|
||||
"content": "api.health_endpoint parent architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.parent",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"source_id": "api.health_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "c718b1939621233295ccaf6e8203e7fd94f3dd1bfb88f10c51bc5e33d53a24aa",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "parent",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/health-endpoint.md",
|
||||
"title": "api.health_endpoint:part_of",
|
||||
"content": "api.health_endpoint part_of architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.links",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "8b5a533a8076e2e9d36995eee29aeade260080bdca2ec8e21fe28f08574b983f",
|
||||
"source_id": "api.health_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "616f5cbf25da83cb51d8d0741a7fc351620c9ca2c6513fa2094b4aa476f0912a",
|
||||
"source_path": "docs/documentation/api/health-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "part_of",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"layer": "D5_RELATION_GRAPH",
|
||||
"path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"title": "api.control_actions_endpoint:parent",
|
||||
"content": "api.control_actions_endpoint parent architecture.telegram_notify_app",
|
||||
"metadata": {
|
||||
"owner": null,
|
||||
"anchor": "frontmatter.parent",
|
||||
"doc_id": null,
|
||||
"repo_id": "test_echo_app",
|
||||
"section": null,
|
||||
"blob_sha": "a251c550a23249ef1a74389c93aaccd4c5ae88ef621efad2aa018fcd132cce7e",
|
||||
"source_id": "api.control_actions_endpoint",
|
||||
"target_id": "architecture.telegram_notify_app",
|
||||
"doc_version": null,
|
||||
"relation_id": "afec31fd062e392dcd9699a92c7ab61fd4b1273c1a2b16702b23d55d8d0c47ac",
|
||||
"source_path": "docs/documentation/api/control-actions-endpoint.md",
|
||||
"artifact_type": null,
|
||||
"last_modified": null,
|
||||
"relation_type": "parent",
|
||||
"staleness_score": null,
|
||||
"system_component": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### User Prompt Overview
|
||||
- question: Что такое PaymentTransaction?
|
||||
- intent: DOCUMENTATION_EXPLAIN
|
||||
- sub_intent: ENTITY_EXPLAIN
|
||||
- documents: 6 | samples: Readme, HTTP API /actions/{action}, HTTP API /health
|
||||
- facts: 0
|
||||
- relations: 6 | samples: api.control_actions_endpoint:part_of, api.control_actions_endpoint:related_api, api.control_actions_endpoint:related_logic
|
||||
|
||||
## Mismatches
|
||||
- none
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user